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.
Files changed (41) hide show
  1. {punit-1.4.4 → punit-1.4.6}/.scripts/punit +0 -2
  2. {punit-1.4.4/src/pUnit.egg-info → punit-1.4.6}/PKG-INFO +1 -1
  3. {punit-1.4.4 → punit-1.4.6}/pyproject.toml +1 -1
  4. {punit-1.4.4 → punit-1.4.6/src/pUnit.egg-info}/PKG-INFO +1 -1
  5. {punit-1.4.4 → punit-1.4.6}/src/punit/__init__.py +2 -2
  6. {punit-1.4.4 → punit-1.4.6}/src/punit/__main__.py +2 -1
  7. {punit-1.4.4 → punit-1.4.6}/src/punit/cli.py +14 -6
  8. {punit-1.4.4 → punit-1.4.6}/LICENSE +0 -0
  9. {punit-1.4.4 → punit-1.4.6}/README.md +0 -0
  10. {punit-1.4.4 → punit-1.4.6}/setup.cfg +0 -0
  11. {punit-1.4.4 → punit-1.4.6}/src/pUnit.egg-info/SOURCES.txt +0 -0
  12. {punit-1.4.4 → punit-1.4.6}/src/pUnit.egg-info/dependency_links.txt +0 -0
  13. {punit-1.4.4 → punit-1.4.6}/src/pUnit.egg-info/requires.txt +0 -0
  14. {punit-1.4.4 → punit-1.4.6}/src/pUnit.egg-info/top_level.txt +0 -0
  15. {punit-1.4.4 → punit-1.4.6}/src/punit/TestResult.py +0 -0
  16. {punit-1.4.4 → punit-1.4.6}/src/punit/assertions/__init__.py +0 -0
  17. {punit-1.4.4 → punit-1.4.6}/src/punit/assertions/collections.py +0 -0
  18. {punit-1.4.4 → punit-1.4.6}/src/punit/assertions/exceptions.py +0 -0
  19. {punit-1.4.4 → punit-1.4.6}/src/punit/assertions/strings.py +0 -0
  20. {punit-1.4.4 → punit-1.4.6}/src/punit/discovery/TestModuleDiscovery.py +0 -0
  21. {punit-1.4.4 → punit-1.4.6}/src/punit/discovery/__init__.py +0 -0
  22. {punit-1.4.4 → punit-1.4.6}/src/punit/facts/Fact.py +0 -0
  23. {punit-1.4.4 → punit-1.4.6}/src/punit/facts/FactManager.py +0 -0
  24. {punit-1.4.4 → punit-1.4.6}/src/punit/facts/__init__.py +0 -0
  25. {punit-1.4.4 → punit-1.4.6}/src/punit/filters/Filter.py +0 -0
  26. {punit-1.4.4 → punit-1.4.6}/src/punit/filters/FilterManager.py +0 -0
  27. {punit-1.4.4 → punit-1.4.6}/src/punit/filters/__init__.py +0 -0
  28. {punit-1.4.4 → punit-1.4.6}/src/punit/metadata/CallableMetadata.py +0 -0
  29. {punit-1.4.4 → punit-1.4.6}/src/punit/metadata/__init__.py +0 -0
  30. {punit-1.4.4 → punit-1.4.6}/src/punit/py.typed +0 -0
  31. {punit-1.4.4 → punit-1.4.6}/src/punit/reports/HtmlReportGenerator.py +0 -0
  32. {punit-1.4.4 → punit-1.4.6}/src/punit/reports/JUnitReportGenerator.py +0 -0
  33. {punit-1.4.4 → punit-1.4.6}/src/punit/reports/JsonReportGenerator.py +0 -0
  34. {punit-1.4.4 → punit-1.4.6}/src/punit/reports/__init__.py +0 -0
  35. {punit-1.4.4 → punit-1.4.6}/src/punit/runner.py +0 -0
  36. {punit-1.4.4 → punit-1.4.6}/src/punit/theories/Theory.py +0 -0
  37. {punit-1.4.4 → punit-1.4.6}/src/punit/theories/TheoryManager.py +0 -0
  38. {punit-1.4.4 → punit-1.4.6}/src/punit/theories/__init__.py +0 -0
  39. {punit-1.4.4 → punit-1.4.6}/src/punit/traits/Trait.py +0 -0
  40. {punit-1.4.4 → punit-1.4.6}/src/punit/traits/TraitManager.py +0 -0
  41. {punit-1.4.4 → punit-1.4.6}/src/punit/traits/__init__.py +0 -0
@@ -4,6 +4,4 @@
4
4
  ##
5
5
  from subprocess import run
6
6
  from sys import executable, argv
7
- from os import _exit
8
7
  result = run([executable, "-m", "punit"] + argv[1:], check=False)
9
- _exit(result.returncode)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pUnit
3
- Version: 1.4.4
3
+ Version: 1.4.6
4
4
  Summary: A modernized unit-test framework for Python.
5
5
  Author-email: Shaun Wilson <mrshaunwilson@msn.com>
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pUnit"
3
- version = "1.4.4"
3
+ version = "1.4.6"
4
4
  description = "A modernized unit-test framework for Python."
5
5
  keywords = ["test", "unittest", "unit-test", "xUnit", "nUnit", "pytest"]
6
6
  authors = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pUnit
3
- Version: 1.4.4
3
+ Version: 1.4.6
4
4
  Summary: A modernized unit-test framework for Python.
5
5
  Author-email: Shaun Wilson <mrshaunwilson@msn.com>
6
6
  License: MIT License
@@ -7,8 +7,8 @@ from .theories import *
7
7
  from .traits import *
8
8
 
9
9
 
10
- __version__ = '1.4.4'
11
- __commit__ = '9f70be4'
10
+ __version__ = '1.4.6'
11
+ __commit__ = '57f85c6'
12
12
  __all__ = [
13
13
  '__version__', '__commit__',
14
14
  'assertions',
@@ -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
- os._exit(119) # pragma: no cover
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: # pragma: no cover
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