mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
parent
83e5319794
commit
452048d0ee
2 changed files with 9 additions and 5 deletions
|
|
@ -85,3 +85,11 @@ def pytest_runtest_makereport(item, call):
|
|||
# be "setup", "call", "teardown"
|
||||
|
||||
setattr(item, "rep_" + rep.when, rep)
|
||||
|
||||
# In the event of module scoped fixtures, also mark failure in module.
|
||||
module = item
|
||||
while module is not None and not isinstance(module, pytest.Module):
|
||||
module = module.parent
|
||||
if module is not None:
|
||||
if rep.when == 'call' and (rep.failed or rep.skipped):
|
||||
module.module_test_failure = True
|
||||
|
|
|
|||
|
|
@ -218,11 +218,7 @@ class ModuleUnitTest(BaseTest):
|
|||
yield mongo_client[self.TEST_OPENPYPE_NAME]["settings"]
|
||||
|
||||
def is_test_failed(self, request):
|
||||
# if request.node doesn't have rep_call, something failed
|
||||
try:
|
||||
return request.node.rep_call.failed
|
||||
except AttributeError:
|
||||
return True
|
||||
return getattr(request.node, "module_test_failure", False)
|
||||
|
||||
|
||||
class PublishTest(ModuleUnitTest):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue