Coverage for myPackage/__init__.py: 89%
41 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-02 22:15 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-02 22:15 +0000
1# ==================================================================================================================== #
2# _____ _ _ _ _ _ #
3# _ __ _ |_ _|__ ___ | (_)_ __ __ _ / \ ___| |_(_) ___ _ __ ___ #
4# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | / _ \ / __| __| |/ _ \| '_ \/ __| #
5# | |_) | |_| || | (_) | (_) | | | | | | (_| |_ / ___ \ (__| |_| | (_) | | | \__ \ #
6# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_/ \_\___|\__|_|\___/|_| |_|___/ #
7# |_| |___/ |___/ #
8# ==================================================================================================================== #
9# Authors: #
10# Patrick Lehmann #
11# #
12# License: #
13# ==================================================================================================================== #
14# Copyright 2017-2026 Patrick Lehmann - Bötzingen, Germany #
15# #
16# Licensed under the Apache License, Version 2.0 (the "License"); #
17# you may not use this file except in compliance with the License. #
18# You may obtain a copy of the License at #
19# #
20# http://www.apache.org/licenses/LICENSE-2.0 #
21# #
22# Unless required by applicable law or agreed to in writing, software #
23# distributed under the License is distributed on an "AS IS" BASIS, #
24# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
25# See the License for the specific language governing permissions and #
26# limitations under the License. #
27# #
28# SPDX-License-Identifier: Apache-2.0 #
29# ==================================================================================================================== #
30#
31"""
32A module for a set of dummy classes.
33"""
35__author__ = "Patrick Lehmann"
36__email__ = "Paebbels@gmail.com"
37__copyright__ = "2017-2026, Patrick Lehmann"
38__license__ = "Apache License, Version 2.0"
39__version__ = "9.0.0"
40__keywords__ = ["GitHub Actions"]
41__project_url__ = "https://github.com/pyTooling/Actions"
42__documentation_url__ = "https://pyTooling.github.io/Actions"
43__issue_tracker_url__ = "https://GitHub.com/pyTooling/Actions/issues"
45from pickle import dumps
46from subprocess import check_call
48from pyTooling.Decorators import export, readonly
49from pyTooling.Platform import Platform
52@export
53class Base:
54 """
55 A base-class for dummy applications.
56 """
58 _value: int #: An internal value.
60 def __init__(self) -> None:
61 # """
62 # Initializes the base-class.
63 # """
64 self._value = 0
66 @readonly
67 def Value(self) -> int:
68 """
69 Read-only property to return the internal value.
71 :return: Internal value.
72 """
73 return self._value
75 def Add(self, value: int) -> None:
76 """
77 Accumulate value to internal value.
79 :param value: Value to accumulate.
80 """
81 self._value += value
84@export
85class Application(Base):
86 """
87 A dummy application for demonstration purposes.
88 """
90 def __init__(self) -> None:
91 # """
92 # Initializes the dummy application.
93 # """
94 super().__init__()
96 platform = Platform()
97 # pylint: disable=using-constant-test
98 if platform.IsNativeLinux:
99 self._value += 1
100 elif platform.IsNativeMacOS:
101 self._value += 2
102 elif platform.IsNativeWindows:
103 self._value += 3
104 elif platform.IsMSYSOnWindows: 104 ↛ 105line 104 didn't jump to line 105 because the condition on line 104 was never true
105 self._value += 11
106 elif platform.IsUCRT64OnWindows:
107 self._value += 14
108 elif platform.IsClang32OnWindows: 108 ↛ 109line 108 didn't jump to line 109 because the condition on line 108 was never true
109 self._value += 15
110 elif platform.IsClang64OnWindows: 110 ↛ exitline 110 didn't return from function '__init__' because the condition on line 110 was always true
111 self._value += 16