punit 1.4.4__tar.gz → 1.4.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {punit-1.4.4 → punit-1.4.6}/.scripts/punit +0 -2
- {punit-1.4.4/src/pUnit.egg-info → punit-1.4.6}/PKG-INFO +1 -1
- {punit-1.4.4 → punit-1.4.6}/pyproject.toml +1 -1
- {punit-1.4.4 → punit-1.4.6/src/pUnit.egg-info}/PKG-INFO +1 -1
- {punit-1.4.4 → punit-1.4.6}/src/punit/__init__.py +2 -2
- {punit-1.4.4 → punit-1.4.6}/src/punit/__main__.py +2 -1
- {punit-1.4.4 → punit-1.4.6}/src/punit/cli.py +14 -6
- {punit-1.4.4 → punit-1.4.6}/LICENSE +0 -0
- {punit-1.4.4 → punit-1.4.6}/README.md +0 -0
- {punit-1.4.4 → punit-1.4.6}/setup.cfg +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/pUnit.egg-info/SOURCES.txt +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/pUnit.egg-info/dependency_links.txt +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/pUnit.egg-info/requires.txt +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/pUnit.egg-info/top_level.txt +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/TestResult.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/assertions/__init__.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/assertions/collections.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/assertions/exceptions.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/assertions/strings.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/discovery/TestModuleDiscovery.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/discovery/__init__.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/facts/Fact.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/facts/FactManager.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/facts/__init__.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/filters/Filter.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/filters/FilterManager.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/filters/__init__.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/metadata/CallableMetadata.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/metadata/__init__.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/py.typed +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/reports/HtmlReportGenerator.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/reports/JUnitReportGenerator.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/reports/JsonReportGenerator.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/reports/__init__.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/runner.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/theories/Theory.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/theories/TheoryManager.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/theories/__init__.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/traits/Trait.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/traits/TraitManager.py +0 -0
- {punit-1.4.4 → punit-1.4.6}/src/punit/traits/__init__.py +0 -0
|
@@ -61,7 +61,8 @@ async def async_main() -> None:
|
|
|
61
61
|
except (AttributeError, ValueError, OSError):
|
|
62
62
|
# Pass if the stream doesn't support fsync (e.g. some virtualized environments)
|
|
63
63
|
pass
|
|
64
|
-
|
|
64
|
+
if cli.no_exitcode is not True: # pragma: no cover
|
|
65
|
+
sys.exit(119)
|
|
65
66
|
|
|
66
67
|
|
|
67
68
|
def main() -> None:
|
|
@@ -19,6 +19,7 @@ class CommandLineInterface:
|
|
|
19
19
|
__includePatterns:list[str]
|
|
20
20
|
__includeTraits:list[Trait]
|
|
21
21
|
__no_default_patterns:bool
|
|
22
|
+
__no_exitcode:bool
|
|
22
23
|
__outputFilename:Optional[str]
|
|
23
24
|
__quiet:bool
|
|
24
25
|
__reportFormat:Optional[str]
|
|
@@ -35,6 +36,7 @@ class CommandLineInterface:
|
|
|
35
36
|
self.__includePatterns = []
|
|
36
37
|
self.__includeTraits = []
|
|
37
38
|
self.__no_default_patterns = False
|
|
39
|
+
self.__no_exitcode = False
|
|
38
40
|
self.__outputFilename = None
|
|
39
41
|
self.__quiet = False
|
|
40
42
|
self.__reportFormat = None
|
|
@@ -129,6 +131,8 @@ class CommandLineInterface:
|
|
|
129
131
|
self.__verbose = True
|
|
130
132
|
case '-n' | '--no-default-patterns':
|
|
131
133
|
self.__no_default_patterns = True
|
|
134
|
+
case '--no-exitcode':
|
|
135
|
+
self.__no_exitcode = True
|
|
132
136
|
case '-r' | '--report':
|
|
133
137
|
extractReportFormat = True
|
|
134
138
|
case '-o' | '--output':
|
|
@@ -201,12 +205,14 @@ class CommandLineInterface:
|
|
|
201
205
|
def workdir(self) -> str:
|
|
202
206
|
return os.path.curdir if self.__workdir is None else self.__workdir
|
|
203
207
|
|
|
208
|
+
@property
|
|
209
|
+
def no_exitcode(self) -> bool:
|
|
210
|
+
return self.__no_exitcode is True
|
|
204
211
|
|
|
205
212
|
def printHelp(self) -> None:
|
|
206
|
-
if True:
|
|
213
|
+
if True: # pragma: no cover
|
|
207
214
|
self.printVersion()
|
|
208
|
-
print(
|
|
209
|
-
"""
|
|
215
|
+
print("""
|
|
210
216
|
Usage: python3 -m punit [-h|--help]
|
|
211
217
|
[-q|--quiet] [-v|--verbose]
|
|
212
218
|
[-z|--failfast]
|
|
@@ -217,6 +223,7 @@ Usage: python3 -m punit [-h|--help]
|
|
|
217
223
|
[-t|--trait [!]NAME[=VALUE]]
|
|
218
224
|
[-w|--working-directory PATH]
|
|
219
225
|
[-n|--no-default-patterns]
|
|
226
|
+
[--no-exitcode]
|
|
220
227
|
[-r|--report {junit|json}]
|
|
221
228
|
[-o|--output FILENAME]
|
|
222
229
|
|
|
@@ -244,11 +251,13 @@ Options:
|
|
|
244
251
|
Execute tests with the specified trait, negated by prefixing with '!'.
|
|
245
252
|
If VALUE is specified, matches tests with the trait having specified value.
|
|
246
253
|
If VALUE is not specified, matches any test with the trait having any value.
|
|
247
|
-
Default: No filtering based on traits.
|
|
254
|
+
Default: No filtering based on traits.
|
|
248
255
|
-w, --working-directory PATH
|
|
249
256
|
Working directory (defaults to start directory)
|
|
250
257
|
-n, --no-default-patterns
|
|
251
258
|
Do not apply any default include/exclude patterns.
|
|
259
|
+
--no-exitcode
|
|
260
|
+
Do not exit with an error code on unit test failure.
|
|
252
261
|
-r, --report {html|junit}
|
|
253
262
|
Generate a report to stdout using either an "html"
|
|
254
263
|
or "junit" format. When generating a report to stdout
|
|
@@ -258,8 +267,7 @@ Options:
|
|
|
258
267
|
If `--report` is used, instead of writing to stdout
|
|
259
268
|
write to FILENAME. In this case `--report` does not
|
|
260
269
|
suppress any program output.
|
|
261
|
-
"""
|
|
262
|
-
)
|
|
270
|
+
""")
|
|
263
271
|
os._exit(0)
|
|
264
272
|
|
|
265
273
|
def printSummary(self) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|