File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,29 +118,3 @@ def pytest_sessionstart(session):
118118 user_dict = api .get ("user_show" )
119119 user_dict ["fullname" ] = defaults ["user_name" ]
120120 api .post ("user_update" , user_dict )
121-
122-
123- @pytest .hookimpl (tryfirst = True , hookwrapper = True )
124- def pytest_runtest_makereport (item , call ):
125- """Writes report to failures file
126-
127- We need this to check whether the tests passed or failed
128- due to the threading issue we have.
129- https://github.com/DCOR-dev/DCOR-Aid/issues/14
130- """
131- # https://docs.pytest.org/en/stable/example/simple.html
132- # #post-process-test-reports-failures
133- # execute all other hooks to obtain the report object
134- outcome = yield
135- rep = outcome .get_result ()
136-
137- # we only look at actual failing test calls, not setup/teardown
138- if rep .when == "call" and rep .failed :
139- mode = "a" if os_path .exists ("pytest-failures.txt" ) else "w"
140- with open ("pytest-failures.txt" , mode ) as f :
141- # let's also access a fixture for the fun of it
142- if "tmpdir" in item .fixturenames :
143- extra = " ({})" .format (item .funcargs ["tmpdir" ])
144- else :
145- extra = ""
146- f .write (rep .nodeid + extra + "\n " )
You can’t perform that action at this time.
0 commit comments