diff --git a/dist/requirements.txt b/dist/requirements.txt index a414030a..5be2dd07 100644 --- a/dist/requirements.txt +++ b/dist/requirements.txt @@ -1,2 +1,2 @@ -wheel >= 0.40.0 -twine >= 4.0.2 +wheel ~= 0.43 +twine ~= 5.0 diff --git a/doc/Dependency.rst b/doc/Dependency.rst index 94956351..682d6606 100644 --- a/doc/Dependency.rst +++ b/doc/Dependency.rst @@ -135,7 +135,7 @@ install the mandatory dependencies too. +============================================================================+==============+==========================================================================================================+======================================================================================================================================================+ | `pyTooling `__ | ≥6.1.0 | `Apache License, 2.0 `__ | *None* | +----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ -| `wheel `__ | ≥0.40.0 | `MIT `__ | *Not yet evaluated.* | +| `wheel `__ | ≥0.43 | `MIT `__ | *Not yet evaluated.* | +----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -164,7 +164,7 @@ install the mandatory dependencies too. +----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ | **Package** | **Version** | **License** | **Dependencies** | +==========================================================+==============+===========================================================================================+======================+ -| `wheel `__ | ≥0.40.0 | `MIT `__ | *Not yet evaluated.* | +| `wheel `__ | ≥0.43 | `MIT `__ | *Not yet evaluated.* | +----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ -| `Twine `__ | ≥4.0.2 | `Apache License, 2.0 `__ | *Not yet evaluated.* | +| `Twine `__ | ≥5.0 | `Apache License, 2.0 `__ | *Not yet evaluated.* | +----------------------------------------------------------+--------------+-------------------------------------------------------------------------------------------+----------------------+ diff --git a/pyEDAA/Reports/Unittesting/JUnit.py b/pyEDAA/Reports/Unittesting/JUnit.py index ef866be2..57754f10 100644 --- a/pyEDAA/Reports/Unittesting/JUnit.py +++ b/pyEDAA/Reports/Unittesting/JUnit.py @@ -266,6 +266,12 @@ def Generate(self, overwrite: bool = False) -> None: rootElement.attrib["timestamp"] = f"{self._startTime.isoformat()}" if self._totalDuration is not None: rootElement.attrib["time"] = f"{self._totalDuration.total_seconds():.6f}" + rootElement.attrib["tests"] = str(self._tests) + rootElement.attrib["failures"] = str(self._failed) + rootElement.attrib["errors"] = str(self._errored) + rootElement.attrib["skipped"] = str(self._skipped) + # if self._assertionCount is not None: + # rootElement.attrib["assertions"] = f"{self._assertionCount}" self._xmlDocument = ElementTree(rootElement) @@ -279,6 +285,12 @@ def _GenerateTestsuite(self, testsuite: Testsuite, parentElement: _Element): testsuiteElement.attrib["timestamp"] = f"{testsuite._startTime.isoformat()}" if testsuite._totalDuration is not None: testsuiteElement.attrib["time"] = f"{testsuite._totalDuration.total_seconds():.6f}" + testsuiteElement.attrib["tests"] = str(testsuite._tests) + testsuiteElement.attrib["failures"] = str(testsuite._failed) + testsuiteElement.attrib["errors"] = str(testsuite._errored) + testsuiteElement.attrib["skipped"] = str(testsuite._skipped) + # if testsuite._assertionCount is not None: + # testsuiteElement.attrib["assertions"] = f"{testsuite._assertionCount}" for ts in testsuite._testsuites.values(): self._GenerateTestsuite(ts, testsuiteElement) diff --git a/pyEDAA/Reports/Unittesting/__init__.py b/pyEDAA/Reports/Unittesting/__init__.py index a69ce654..55f5bc10 100644 --- a/pyEDAA/Reports/Unittesting/__init__.py +++ b/pyEDAA/Reports/Unittesting/__init__.py @@ -445,11 +445,14 @@ def __init__( self._testsuites[testsuite._name] = testsuite self._status = TestsuiteStatus.Unknown - self._excluded = 0 - self._skipped = 0 - self._errored = 0 - self._failed = 0 - self._passed = 0 + self._tests = 0 + self._inconsistent = 0 + self._excluded = 0 + self._skipped = 0 + self._errored = 0 + self._weak = 0 + self._failed = 0 + self._passed = 0 @readonly def Status(self) -> TestsuiteStatus: @@ -483,19 +486,12 @@ def PassedAssertionCount(self) -> int: # return self._assertionCount - (self._warningCount + self._errorCount + self._fatalCount) @readonly - def WarningCount(self) -> int: - raise NotImplementedError() - # return self._warningCount - - @readonly - def ErrorCount(self) -> int: - raise NotImplementedError() - # return self._errorCount + def Tests(self) -> int: + return self._tests @readonly - def FatalCount(self) -> int: - raise NotImplementedError() - # return self._fatalCount + def Inconsistent(self) -> int: + return self._inconsistent @readonly def Excluded(self) -> int: @@ -509,6 +505,10 @@ def Skipped(self) -> int: def Errored(self) -> int: return self._errored + @readonly + def Weak(self) -> int: + return self._weak + @readonly def Failed(self) -> int: return self._failed @@ -517,6 +517,21 @@ def Failed(self) -> int: def Passed(self) -> int: return self._passed + @readonly + def WarningCount(self) -> int: + raise NotImplementedError() + # return self._warningCount + + @readonly + def ErrorCount(self) -> int: + raise NotImplementedError() + # return self._errorCount + + @readonly + def FatalCount(self) -> int: + raise NotImplementedError() + # return self._fatalCount + def Aggregate(self) -> TestsuiteAggregateReturnType: tests = 0 inconsistent = 0 @@ -694,6 +709,7 @@ def Aggregate(self, strict: bool = True) -> TestsuiteAggregateReturnType: else: raise UnittestException(f"Internal error for testcase '{testcase._name}', field '_status' is '{status}'.") + self._tests = tests self._inconsistent = inconsistent self._excluded = excluded self._skipped = skipped @@ -771,6 +787,7 @@ def __init__( def Aggregate(self) -> TestsuiteAggregateReturnType: tests, inconsistent, excluded, skipped, errored, weak, failed, passed, warningCount, errorCount, fatalCount = super().Aggregate() + self._tests = tests self._inconsistent = inconsistent self._excluded = excluded self._skipped = skipped diff --git a/pyEDAA/Reports/__init__.py b/pyEDAA/Reports/__init__.py index bf3c6e92..99f95145 100644 --- a/pyEDAA/Reports/__init__.py +++ b/pyEDAA/Reports/__init__.py @@ -35,7 +35,7 @@ __email__ = "Paebbels@gmail.com" __copyright__ = "2021-2024, Electronic Design Automation Abstraction (EDA²)" __license__ = "Apache License, Version 2.0" -__version__ = "0.5.0" +__version__ = "0.5.1" __keywords__ = ["Reports", "Abstract Model", "Data Model", "Test Case", "Test Suite", "OSVVM", "YAML", "XML"] from enum import Enum