mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
pytest: fix overzealous removal of directories on failure.
We were always deleting the directories. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
ae9753df3a
commit
a297c1b9a5
@ -29,7 +29,7 @@ def test_base_dir():
|
||||
# Now check if any test directory is left because the corresponding test
|
||||
# failed. If there are no such tests we can clean up the root test
|
||||
# directory.
|
||||
contents = [d for d in os.listdir(directory) if os.path.isdir(d) and d.startswith('test_')]
|
||||
contents = [d for d in os.listdir(directory) if os.path.isdir(os.path.join(directory, d)) and d.startswith('test_')]
|
||||
if contents == []:
|
||||
shutil.rmtree(directory)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user