pUnit 1.3.0__tar.gz → 1.3.2__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.0/src/pUnit.egg-info → punit-1.3.2}/PKG-INFO +1 -1
- {punit-1.3.0 → punit-1.3.2}/pyproject.toml +1 -1
- {punit-1.3.0 → punit-1.3.2/src/pUnit.egg-info}/PKG-INFO +1 -1
- {punit-1.3.0 → punit-1.3.2}/src/punit/TestResult.py +1 -1
- {punit-1.3.0 → punit-1.3.2}/src/punit/__init__.py +2 -2
- {punit-1.3.0 → punit-1.3.2}/src/punit/reports/HtmlReportGenerator.py +7 -3
- {punit-1.3.0 → punit-1.3.2}/src/punit/reports/JsonReportGenerator.py +8 -1
- {punit-1.3.0 → punit-1.3.2}/.scripts/punit +0 -0
- {punit-1.3.0 → punit-1.3.2}/LICENSE +0 -0
- {punit-1.3.0 → punit-1.3.2}/README.md +0 -0
- {punit-1.3.0 → punit-1.3.2}/setup.cfg +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/pUnit.egg-info/SOURCES.txt +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/pUnit.egg-info/dependency_links.txt +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/pUnit.egg-info/requires.txt +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/pUnit.egg-info/top_level.txt +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/__main__.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/assertions/__init__.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/assertions/collections.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/assertions/exceptions.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/assertions/strings.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/cli.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/discovery/TestModuleDiscovery.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/discovery/__init__.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/facts/Fact.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/facts/FactManager.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/facts/__init__.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/filters/Filter.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/filters/FilterManager.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/filters/__init__.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/metadata/CallableMetadata.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/metadata/__init__.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/py.typed +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/reports/JUnitReportGenerator.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/reports/__init__.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/runner.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/theories/Theory.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/theories/TheoryManager.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/theories/__init__.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/traits/Trait.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/traits/TraitManager.py +0 -0
- {punit-1.3.0 → punit-1.3.2}/src/punit/traits/__init__.py +0 -0
|
@@ -60,7 +60,7 @@ class TestResult:
|
|
|
60
60
|
|
|
61
61
|
@property
|
|
62
62
|
def className(self) -> Optional[str]:
|
|
63
|
-
return self.__className
|
|
63
|
+
return self.__className if self.__className is not None and len(self.__className) > 0 else None
|
|
64
64
|
|
|
65
65
|
@className.setter
|
|
66
66
|
def className(self, value:Optional[str]) -> None:
|
|
@@ -60,14 +60,18 @@ class HtmlReportGenerator:
|
|
|
60
60
|
lines.append('</div>')
|
|
61
61
|
lines.append('<div class="testresults-module">')
|
|
62
62
|
lines.append(f'<h2 class="module-name">{testResult.packageName}/{testResult.moduleName}</h2>')
|
|
63
|
-
currentModuleName = testResult.moduleName
|
|
63
|
+
currentModuleName = testResult.moduleName
|
|
64
64
|
passfailstyle = '-pass' if testResult.isSuccess else '-fail'
|
|
65
65
|
passfailglyph = '🟩' if testResult.isSuccess else '🟥'
|
|
66
66
|
lines.append(f'<div class="testresult testresult{passfailstyle}">')
|
|
67
67
|
lines.append('<div class="testresult-heading">')
|
|
68
68
|
lines.append(f'<span class="glyph glyph{passfailstyle}">{passfailglyph}</span>')
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
className = "" if testResult.className is None else f"{testResult.className}."
|
|
70
|
+
data = testResult.properties.get('data')
|
|
71
|
+
if data is not None and len(data) > 0:
|
|
72
|
+
lines.append(f'<span class="test-class">{className}</span><span class="test-name">{testResult.testName}{data}</span>')
|
|
73
|
+
else:
|
|
74
|
+
lines.append(f'<span class="test-class">{className}</span><span class="test-name">{testResult.testName}</span>')
|
|
71
75
|
lines.append(f'<span class="test-time test-time{passfailstyle}">{testResult.tookPretty}</span>')
|
|
72
76
|
lines.append('</div>')
|
|
73
77
|
if not testResult.isSuccess or testResult.stdout is not None or testResult.stderr is not None:
|
|
@@ -15,9 +15,16 @@ 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.packageName}/{testResult.moduleName}'
|
|
19
|
+
if testResult.className is not None:
|
|
20
|
+
filterName = f'{filterName}/{testResult.className}'
|
|
21
|
+
filterName = f'{filterName}/{testResult.testName}'
|
|
22
|
+
data = testResult.properties.get('data')
|
|
23
|
+
if data is not None and len(data) > 0:
|
|
24
|
+
filterName = f'{filterName}{data}'
|
|
18
25
|
result = dict[str, Any]({
|
|
19
26
|
'status': 'pass' if testResult.isSuccess else 'fail',
|
|
20
|
-
'name':
|
|
27
|
+
'name': filterName,
|
|
21
28
|
})
|
|
22
29
|
if testResult.took is not None:
|
|
23
30
|
result['took'] = round(testResult.took * 1000, 3)
|
|
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
|