diff --git a/tests/conftest.py b/tests/conftest.py index 0f65838e..c6306454 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -199,6 +199,22 @@ def timedelta_to_human_text(delta: datetime.timedelta) -> str: # ///////////////////////////////////////////////////////////////////////////// +def helper__build_test_id(item: pytest.Function) -> str: + assert item is not None + assert isinstance(item, pytest.Function) + + testID = "" + + if item.cls is not None: + testID = item.cls.__module__ + "." + item.cls.__name__ + "::" + + testID = testID + item.name + + return testID + +# ///////////////////////////////////////////////////////////////////////////// + + def helper__makereport__setup( item: pytest.Function, call: pytest.CallInfo, outcome: pluggy.Result ): @@ -224,12 +240,7 @@ def helper__makereport__setup( TEST_PROCESS_STATS.incrementNotExecutedTestCount() return - testID = "" - - if item.cls is not None: - testID = item.cls.__module__ + "." + item.cls.__name__ + "::" - - testID = testID + item.name + testID = helper__build_test_id(item) if rep.outcome == "passed": testNumber = TEST_PROCESS_STATS.incrementExecutedTestCount() @@ -279,12 +290,7 @@ def helper__makereport__call( assert type(rep) == pytest.TestReport # noqa: E721 # -------- - testID = "" - - if item.cls is not None: - testID = item.cls.__module__ + "." + item.cls.__name__ + "::" - - testID = testID + item.name + testID = helper__build_test_id(item) # -------- assert call.start <= call.stop @@ -394,10 +400,6 @@ def pytest_runtest_makereport(item: pytest.Function, call: pytest.CallInfo): assert outcome is not None assert type(outcome) == pluggy.Result # noqa: E721 - rep: pytest.TestReport = outcome.get_result() - assert rep is not None - assert type(rep) == pytest.TestReport # noqa: E721 - if call.when == "collect": return pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy