diff --git a/tests/fixtures.py b/tests/fixtures.py index 992506f95..1f6c3a4a9 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -5,6 +5,7 @@ import logging import os import pytest import re +import shutil import tempfile import utils @@ -99,6 +100,8 @@ def node_factory(directory, test_name, bitcoind, executor): if not ok: raise Exception("At least one lightning exited with unexpected non-zero return code") + shutil.rmtree(nf.directory) + def getValgrindErrors(node): for error_file in os.listdir(node.daemon.lightning_dir): diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 7247ec19f..4704b83c6 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -337,6 +337,8 @@ class BaseLightningDTests(unittest.TestCase): if not ok: raise Exception("At least one lightning exited with unexpected non-zero return code") + shutil.rmtree(self.node_factory.directory) + class LightningDTests(BaseLightningDTests): def connect(self, may_reconnect=False):