punit 0.1.3__tar.gz → 0.1.5__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-0.1.3 → punit-0.1.5}/PKG-INFO +1 -1
- {punit-0.1.3 → punit-0.1.5}/punit/__init__.py +1 -1
- {punit-0.1.3 → punit-0.1.5}/punit/facts/Fact.py +4 -0
- {punit-0.1.3 → punit-0.1.5}/punit/facts/FactManager.py +1 -4
- {punit-0.1.3 → punit-0.1.5}/punit/reports/HtmlReportGenerator.py +1 -1
- {punit-0.1.3 → punit-0.1.5}/punit/theories/Theory.py +4 -0
- {punit-0.1.3 → punit-0.1.5}/punit/theories/TheoryManager.py +1 -4
- {punit-0.1.3 → punit-0.1.5}/punit.egg-info/PKG-INFO +1 -1
- {punit-0.1.3 → punit-0.1.5}/pyproject.toml +1 -1
- {punit-0.1.3 → punit-0.1.5}/LICENSE +0 -0
- {punit-0.1.3 → punit-0.1.5}/README.md +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/TestResult.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/__main__.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/assertions/__init__.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/assertions/collections.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/assertions/exceptions.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/assertions/strings.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/cli.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/discovery/TestModuleDiscovery.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/discovery/__init__.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/facts/__init__.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/reports/JUnitReportGenerator.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/reports/__init__.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/runner.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit/theories/__init__.py +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit.egg-info/SOURCES.txt +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit.egg-info/dependency_links.txt +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit.egg-info/entry_points.txt +0 -0
- {punit-0.1.3 → punit-0.1.5}/punit.egg-info/top_level.txt +0 -0
- {punit-0.1.3 → punit-0.1.5}/setup.cfg +0 -0
|
@@ -34,6 +34,10 @@ class Fact:
|
|
|
34
34
|
@property
|
|
35
35
|
def testName(self) -> str:
|
|
36
36
|
return self.__testName
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def filterName(self) -> str:
|
|
40
|
+
return f'{self.moduleName}/{"" if self.className is None or len(self.className) == 0 else f"{self.className}/"}{self.testName}'
|
|
37
41
|
|
|
38
42
|
async def execute(self, module:ModuleType) -> None:
|
|
39
43
|
coro:Coroutine = None
|
|
@@ -42,9 +42,6 @@ class FactManager:
|
|
|
42
42
|
return l
|
|
43
43
|
|
|
44
44
|
def put(self, fact:Fact) -> None:
|
|
45
|
-
filterName
|
|
46
|
-
if hasattr(fact.target, '__qualname__'):
|
|
47
|
-
filterName = fact.target.__qualname__
|
|
48
|
-
if len(self.__filterPattern.findall(filterName)) > 0:
|
|
45
|
+
if len(self.__filterPattern.findall(fact.filterName)) > 0:
|
|
49
46
|
l = self.get(fact.moduleName)
|
|
50
47
|
l.append(fact)
|
|
@@ -53,7 +53,7 @@ class HtmlReportGenerator:
|
|
|
53
53
|
lines.append(f'<div>Total Failed: <span class="fail">{failureCount}</span></div>')
|
|
54
54
|
lines.append('<div> </div>')
|
|
55
55
|
percentstyle = 'pass' if failureCount == 0 else 'fail'
|
|
56
|
-
lines.append(f'<div class="passfail-percent">Pass/Fail <span class="percent-{percentstyle}">{100-((failureCount/totalCount)*100):.1f}%</span></div>')
|
|
56
|
+
lines.append(f'<div class="passfail-percent">Pass/Fail <span class="percent-{percentstyle}">{100-(((failureCount/totalCount) if totalCount > 0 else 1)*100):.1f}%</span></div>')
|
|
57
57
|
lines.append('<div> </div>')
|
|
58
58
|
lines.append('</div>')
|
|
59
59
|
currentModuleName = None
|
|
@@ -41,6 +41,10 @@ class Theory:
|
|
|
41
41
|
@property
|
|
42
42
|
def testName(self) -> str:
|
|
43
43
|
return self.__testName
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def filterName(self) -> str:
|
|
47
|
+
return f'{self.moduleName}/{"" if self.className is None or len(self.className) == 0 else f"{self.className}/"}{self.testName}'
|
|
44
48
|
|
|
45
49
|
async def execute(self, module:ModuleType, data:tuple) -> None:
|
|
46
50
|
coro:Coroutine = None
|
|
@@ -44,10 +44,7 @@ class TheoryManager:
|
|
|
44
44
|
return l
|
|
45
45
|
|
|
46
46
|
def put(self, theory:Theory) -> None:
|
|
47
|
-
filterName
|
|
48
|
-
if hasattr(theory.target, '__qualname__'):
|
|
49
|
-
filterName = theory.target.__qualname__
|
|
50
|
-
if len(self.__filterPattern.findall(filterName)) > 0:
|
|
47
|
+
if len(self.__filterPattern.findall(theory.filterName)) > 0:
|
|
51
48
|
l = self.get(theory.moduleName)
|
|
52
49
|
d = self.__datas.get(theory.target)
|
|
53
50
|
if d is not 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
|