pUnit 1.3.2__tar.gz → 1.3.7__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.2/src/pUnit.egg-info → punit-1.3.7}/PKG-INFO +1 -1
- {punit-1.3.2 → punit-1.3.7}/pyproject.toml +1 -1
- {punit-1.3.2 → punit-1.3.7/src/pUnit.egg-info}/PKG-INFO +1 -1
- {punit-1.3.2 → punit-1.3.7}/src/punit/__init__.py +2 -2
- {punit-1.3.2 → punit-1.3.7}/src/punit/metadata/CallableMetadata.py +1 -1
- {punit-1.3.2 → punit-1.3.7}/src/punit/reports/HtmlReportGenerator.py +1 -1
- {punit-1.3.2 → punit-1.3.7}/src/punit/reports/JsonReportGenerator.py +6 -2
- {punit-1.3.2 → punit-1.3.7}/.scripts/punit +0 -0
- {punit-1.3.2 → punit-1.3.7}/LICENSE +0 -0
- {punit-1.3.2 → punit-1.3.7}/README.md +0 -0
- {punit-1.3.2 → punit-1.3.7}/setup.cfg +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/pUnit.egg-info/SOURCES.txt +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/pUnit.egg-info/dependency_links.txt +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/pUnit.egg-info/requires.txt +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/pUnit.egg-info/top_level.txt +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/TestResult.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/__main__.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/assertions/__init__.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/assertions/collections.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/assertions/exceptions.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/assertions/strings.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/cli.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/discovery/TestModuleDiscovery.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/discovery/__init__.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/facts/Fact.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/facts/FactManager.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/facts/__init__.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/filters/Filter.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/filters/FilterManager.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/filters/__init__.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/metadata/__init__.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/py.typed +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/reports/JUnitReportGenerator.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/reports/__init__.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/runner.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/theories/Theory.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/theories/TheoryManager.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/theories/__init__.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/traits/Trait.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/traits/TraitManager.py +0 -0
- {punit-1.3.2 → punit-1.3.7}/src/punit/traits/__init__.py +0 -0
|
@@ -27,7 +27,7 @@ class CallableMetadata:
|
|
|
27
27
|
"""
|
|
28
28
|
The name used for pattern matched "Test Filtering".
|
|
29
29
|
"""
|
|
30
|
-
return f'{".".join(self.__moduleName.split(".")[1:])}/{"" if self.__className is None else f"{self.__className}/"}{self.__name}'
|
|
30
|
+
return f'{".".join(self.__moduleName.split(".")[1:])}/{"" if self.__className is None or len(self.__className) == 0 else f"{self.__className}/"}{self.__name}'
|
|
31
31
|
|
|
32
32
|
@property
|
|
33
33
|
def moduleName(self) -> str:
|
|
@@ -59,7 +59,7 @@ class HtmlReportGenerator:
|
|
|
59
59
|
if currentModuleName is not None:
|
|
60
60
|
lines.append('</div>')
|
|
61
61
|
lines.append('<div class="testresults-module">')
|
|
62
|
-
lines.append(f'<h2 class="module-name">{testResult.
|
|
62
|
+
lines.append(f'<h2 class="module-name">{testResult.moduleName}</h2>')
|
|
63
63
|
currentModuleName = testResult.moduleName
|
|
64
64
|
passfailstyle = '-pass' if testResult.isSuccess else '-fail'
|
|
65
65
|
passfailglyph = '🟩' if testResult.isSuccess else '🟥'
|
|
@@ -15,7 +15,7 @@ class JsonReportGenerator:
|
|
|
15
15
|
testResults.sort(key=lambda e : e.moduleName)
|
|
16
16
|
results = list[dict[str, Any]]()
|
|
17
17
|
for testResult in testResults:
|
|
18
|
-
filterName:str = f'{testResult.
|
|
18
|
+
filterName:str = f'{testResult.moduleName}'
|
|
19
19
|
if testResult.className is not None:
|
|
20
20
|
filterName = f'{filterName}/{testResult.className}'
|
|
21
21
|
filterName = f'{filterName}/{testResult.testName}'
|
|
@@ -32,6 +32,10 @@ class JsonReportGenerator:
|
|
|
32
32
|
if testResult.exception is not None:
|
|
33
33
|
result['message'] = f'{testResult.exception}\n{"".join(traceback.format_tb(testResult.exception.__traceback__))}'
|
|
34
34
|
else:
|
|
35
|
-
result['message'] = 'Unknown Error'
|
|
35
|
+
result['message'] = f'Unknown Error!\n\nstdout:\n{testResult.stdout}\n\nstderr:\n{testResult.stderr}'
|
|
36
|
+
elif testResult.stdout is not None:
|
|
37
|
+
result['message'] = testResult.stdout
|
|
38
|
+
elif testResult.stderr is not None:
|
|
39
|
+
result['message'] = testResult.stderr
|
|
36
40
|
results.append(result)
|
|
37
41
|
return json.dumps(results)
|
|
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
|