Coverage for myPackage/__init__.py: 77%
43 statements
« prev ^ index » next coverage.py v7.10.7, created at 2025-10-01 16:45 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2025-10-01 16:45 +0000
1# ==================================================================================================================== #
2# _____ _ _ _ _ _ #
3# _ __ _ |_ _|__ ___ | (_)_ __ __ _ / \ ___| |_(_) ___ _ __ ___ #
4# | '_ \| | | || |/ _ \ / _ \| | | '_ \ / _` | / _ \ / __| __| |/ _ \| '_ \/ __| #
5# | |_) | |_| || | (_) | (_) | | | | | | (_| |_ / ___ \ (__| |_| | (_) | | | \__ \ #
6# | .__/ \__, ||_|\___/ \___/|_|_|_| |_|\__, (_)_/ \_\___|\__|_|\___/|_| |_|___/ #
7# |_| |___/ |___/ #
8# ==================================================================================================================== #
9# Authors: #
10# Patrick Lehmann #
11# #
12# License: #
13# ==================================================================================================================== #
14# Copyright 2017-2025 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-2025, Patrick Lehmann"
38__license__ = "Apache License, Version 2.0"
39__version__ = "0.4.5"
40__keywords__ = ["GitHub Actions"]
41__issue_tracker__ = "https://GitHub.com/pyTooling/Actions/issues"
43from subprocess import check_call
45from pyTooling.Decorators import export, readonly
46from pyTooling.Platform import Platform
49@export
50class Base:
51 """
52 A base-class for dummy applications.
53 """
55 _value: int #: An internal value.
57 def __init__(self) -> None:
58 # """
59 # Initializes the base-class.
60 # """
61 self._value = 0
63 @readonly
64 def Value(self) -> int:
65 """
66 Read-only property to return the internal value.
68 :return: Internal value.
69 """
70 return self._value
72 def Add(self, value) -> None:
73 """
74 Accumulate value to internal value.
76 :param value: Value to accumulate.
77 """
78 self._value += value
81@export
82class Application(Base):
83 """
84 A dummy application for demonstration purposes.
85 """
87 def __init__(self) -> None:
88 # """
89 # Initializes the dummy application.
90 # """
91 super().__init__()
93 platform = Platform()
94 # pylint: disable=using-constant-test
95 if platform.IsNativeLinux:
96 self._value += 1
97 elif platform.IsNativeMacOS:
98 self._value += 2
99 elif platform.IsNativeWindows:
100 self._value += 3
101 elif platform.IsMSYSOnWindows: 101 ↛ 102line 101 didn't jump to line 102 because the condition on line 101 was never true
102 self._value += 11
103 elif platform.IsMinGW32OnWindows: 103 ↛ 104line 103 didn't jump to line 104 because the condition on line 103 was never true
104 self._value += 12
105 elif platform.IsMinGW64OnWindows:
106 self._value += 13
107 elif platform.IsUCRT64OnWindows: 107 ↛ 109line 107 didn't jump to line 109 because the condition on line 107 was always true
108 self._value += 14
109 elif platform.IsClang32OnWindows:
110 self._value += 15
111 elif platform.IsClang64OnWindows:
112 self._value += 16