mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
pytest: Fix directory deletion on passed tests
We were checking the test request against the searched for string. This fixes it by actually looking at the outcome instead and should clean up correctly if tests do not fail. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
245dff26e0
commit
fd1e8a5999
@ -57,7 +57,7 @@ def directory(request, test_base_dir, test_name):
|
||||
# determine whether we succeeded or failed. Outcome can be None if the
|
||||
# failure occurs during the setup phase, hence the use to getattr instead
|
||||
# of accessing it directly.
|
||||
outcome = getattr(request.node, 'rep_call', None)
|
||||
outcome = getattr(request.node, 'rep_call', None).outcome
|
||||
failed = not outcome or request.node.has_errors or outcome != 'passed'
|
||||
|
||||
if not failed:
|
||||
|
Loading…
Reference in New Issue
Block a user