punit 1.3.7__tar.gz → 1.4.0__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.3.7/src/pUnit.egg-info → punit-1.4.0}/PKG-INFO +4 -3
- {punit-1.3.7 → punit-1.4.0}/README.md +1 -1
- {punit-1.3.7 → punit-1.4.0}/pyproject.toml +3 -2
- {punit-1.3.7 → punit-1.4.0/src/pUnit.egg-info}/PKG-INFO +4 -3
- {punit-1.3.7 → punit-1.4.0}/src/punit/__init__.py +2 -2
- {punit-1.3.7 → punit-1.4.0}/src/punit/assertions/exceptions.py +11 -3
- {punit-1.3.7 → punit-1.4.0}/src/punit/reports/HtmlReportGenerator.py +2 -1
- {punit-1.3.7 → punit-1.4.0}/.scripts/punit +0 -0
- {punit-1.3.7 → punit-1.4.0}/LICENSE +0 -0
- {punit-1.3.7 → punit-1.4.0}/setup.cfg +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/pUnit.egg-info/SOURCES.txt +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/pUnit.egg-info/dependency_links.txt +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/pUnit.egg-info/requires.txt +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/pUnit.egg-info/top_level.txt +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/TestResult.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/__main__.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/assertions/__init__.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/assertions/collections.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/assertions/strings.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/cli.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/discovery/TestModuleDiscovery.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/discovery/__init__.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/facts/Fact.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/facts/FactManager.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/facts/__init__.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/filters/Filter.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/filters/FilterManager.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/filters/__init__.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/metadata/CallableMetadata.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/metadata/__init__.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/py.typed +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/reports/JUnitReportGenerator.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/reports/JsonReportGenerator.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/reports/__init__.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/runner.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/theories/Theory.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/theories/TheoryManager.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/theories/__init__.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/traits/Trait.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/traits/TraitManager.py +0 -0
- {punit-1.3.7 → punit-1.4.0}/src/punit/traits/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pUnit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: A modernized unit-test framework for Python.
|
|
5
5
|
Author-email: Shaun Wilson <mrshaunwilson@msn.com>
|
|
6
6
|
License: MIT License
|
|
@@ -30,12 +30,13 @@ Project-URL: Homepage, https://github.com/wilson0x4d/punit
|
|
|
30
30
|
Project-URL: Repository, https://github.com/wilson0x4d/punit.git
|
|
31
31
|
Keywords: test,unittest,unit-test,xUnit,nUnit,pytest
|
|
32
32
|
Classifier: Operating System :: OS Independent
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
33
34
|
Classifier: Programming Language :: Python :: 3.12
|
|
34
35
|
Classifier: Programming Language :: Python :: 3.13
|
|
35
36
|
Classifier: Programming Language :: Python :: 3.14
|
|
36
37
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
37
38
|
Classifier: Intended Audience :: Developers
|
|
38
|
-
Requires-Python: >=3.
|
|
39
|
+
Requires-Python: >=3.11
|
|
39
40
|
Description-Content-Type: text/markdown
|
|
40
41
|
License-File: LICENSE
|
|
41
42
|
Provides-Extra: dev
|
|
@@ -196,7 +197,7 @@ You will want to take particular note of the `--exclude` command-line parameter
|
|
|
196
197
|
|
|
197
198
|
The long-term vision is to provide both imperative and declarative syntaxes for testing while keeping `pUnit` as simple as possible in its implementation.
|
|
198
199
|
|
|
199
|
-
`pUnit` is a Python 3.
|
|
200
|
+
`pUnit` is a Python 3.11+ package and there are no plans to backport it to earlier versions of Python, however, user requests (with proposed changes) _will be accepted_ when it makes sense (for example, `pUnit` currently supports Python 3.11, but originally only supported Python 3.12.)
|
|
200
201
|
|
|
201
202
|
As Python progresses so will `pUnit` and SEMVER rules will be respected to provide developers with assurance that a major version of `pUnit` is fit for a particular purpose, thus, if there is ever a breaking change in Python that requires a breaking change in `pUnit` you can expect `pUnit` versioning to reflect this.
|
|
202
203
|
|
|
@@ -150,7 +150,7 @@ You will want to take particular note of the `--exclude` command-line parameter
|
|
|
150
150
|
|
|
151
151
|
The long-term vision is to provide both imperative and declarative syntaxes for testing while keeping `pUnit` as simple as possible in its implementation.
|
|
152
152
|
|
|
153
|
-
`pUnit` is a Python 3.
|
|
153
|
+
`pUnit` is a Python 3.11+ package and there are no plans to backport it to earlier versions of Python, however, user requests (with proposed changes) _will be accepted_ when it makes sense (for example, `pUnit` currently supports Python 3.11, but originally only supported Python 3.12.)
|
|
154
154
|
|
|
155
155
|
As Python progresses so will `pUnit` and SEMVER rules will be respected to provide developers with assurance that a major version of `pUnit` is fit for a particular purpose, thus, if there is ever a breaking change in Python that requires a breaking change in `pUnit` you can expect `pUnit` versioning to reflect this.
|
|
156
156
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pUnit"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.4.0"
|
|
4
4
|
description = "A modernized unit-test framework for Python."
|
|
5
5
|
keywords = ["test", "unittest", "unit-test", "xUnit", "nUnit", "pytest"]
|
|
6
6
|
authors = [
|
|
@@ -8,9 +8,10 @@ authors = [
|
|
|
8
8
|
]
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {file = "LICENSE"}
|
|
11
|
-
requires-python = ">=3.
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
12
|
classifiers = [
|
|
13
13
|
"Operating System :: OS Independent",
|
|
14
|
+
"Programming Language :: Python :: 3.11",
|
|
14
15
|
"Programming Language :: Python :: 3.12",
|
|
15
16
|
"Programming Language :: Python :: 3.13",
|
|
16
17
|
"Programming Language :: Python :: 3.14",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pUnit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: A modernized unit-test framework for Python.
|
|
5
5
|
Author-email: Shaun Wilson <mrshaunwilson@msn.com>
|
|
6
6
|
License: MIT License
|
|
@@ -30,12 +30,13 @@ Project-URL: Homepage, https://github.com/wilson0x4d/punit
|
|
|
30
30
|
Project-URL: Repository, https://github.com/wilson0x4d/punit.git
|
|
31
31
|
Keywords: test,unittest,unit-test,xUnit,nUnit,pytest
|
|
32
32
|
Classifier: Operating System :: OS Independent
|
|
33
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
33
34
|
Classifier: Programming Language :: Python :: 3.12
|
|
34
35
|
Classifier: Programming Language :: Python :: 3.13
|
|
35
36
|
Classifier: Programming Language :: Python :: 3.14
|
|
36
37
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
37
38
|
Classifier: Intended Audience :: Developers
|
|
38
|
-
Requires-Python: >=3.
|
|
39
|
+
Requires-Python: >=3.11
|
|
39
40
|
Description-Content-Type: text/markdown
|
|
40
41
|
License-File: LICENSE
|
|
41
42
|
Provides-Extra: dev
|
|
@@ -196,7 +197,7 @@ You will want to take particular note of the `--exclude` command-line parameter
|
|
|
196
197
|
|
|
197
198
|
The long-term vision is to provide both imperative and declarative syntaxes for testing while keeping `pUnit` as simple as possible in its implementation.
|
|
198
199
|
|
|
199
|
-
`pUnit` is a Python 3.
|
|
200
|
+
`pUnit` is a Python 3.11+ package and there are no plans to backport it to earlier versions of Python, however, user requests (with proposed changes) _will be accepted_ when it makes sense (for example, `pUnit` currently supports Python 3.11, but originally only supported Python 3.12.)
|
|
200
201
|
|
|
201
202
|
As Python progresses so will `pUnit` and SEMVER rules will be respected to provide developers with assurance that a major version of `pUnit` is fit for a particular purpose, thus, if there is ever a breaking change in Python that requires a breaking change in `pUnit` you can expect `pUnit` versioning to reflect this.
|
|
202
203
|
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: ©
|
|
1
|
+
# SPDX-FileCopyrightText: © 2026 Shaun Wilson
|
|
2
2
|
# SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
|
-
from typing import Any, Callable, Optional, cast, get_args
|
|
4
|
+
from typing import Any, Callable, Generic, Optional, TypeVar, cast, get_args
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
TError = TypeVar('TError', bound=Exception)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class raises(Generic[TError]):
|
|
8
11
|
|
|
9
12
|
__action:Callable
|
|
10
13
|
__exact:bool
|
|
@@ -27,3 +30,8 @@ class raises[TError:Exception]:
|
|
|
27
30
|
elif expected is not None:
|
|
28
31
|
return issubclass(type(ex), cast(Any,expected))
|
|
29
32
|
return False
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
'raises'
|
|
37
|
+
]
|
|
@@ -81,7 +81,8 @@ class HtmlReportGenerator:
|
|
|
81
81
|
if testResult.exception is not None:
|
|
82
82
|
if len(f'{testResult.exception}') > 0:
|
|
83
83
|
lines.append(f'Error:<br/> {testResult.exception}<br/>')
|
|
84
|
-
|
|
84
|
+
tbstr = "".join(traceback.format_tb(testResult.exception.__traceback__)).replace('\n', '<br/>').replace(' ', ' ')
|
|
85
|
+
lines.append(f'Traceback:<br/>{tbstr}')
|
|
85
86
|
lines.append('</pre></div>')
|
|
86
87
|
if testResult.stdout is not None:
|
|
87
88
|
lines.append(f'<div class="testresult-stdout"><pre>{testResult.stdout}</pre></div>')
|
|
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
|