Browse Source

pytest: Remove directories of successful tests

Signed-off-by: Christian Decker <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
committed by Rusty Russell
parent
commit
38b7a0e2d2
  1. 3
      tests/fixtures.py
  2. 2
      tests/test_lightningd.py

3
tests/fixtures.py

@ -5,6 +5,7 @@ import logging
import os import os
import pytest import pytest
import re import re
import shutil
import tempfile import tempfile
import utils import utils
@ -99,6 +100,8 @@ def node_factory(directory, test_name, bitcoind, executor):
if not ok: if not ok:
raise Exception("At least one lightning exited with unexpected non-zero return code") raise Exception("At least one lightning exited with unexpected non-zero return code")
shutil.rmtree(nf.directory)
def getValgrindErrors(node): def getValgrindErrors(node):
for error_file in os.listdir(node.daemon.lightning_dir): for error_file in os.listdir(node.daemon.lightning_dir):

2
tests/test_lightningd.py

@ -337,6 +337,8 @@ class BaseLightningDTests(unittest.TestCase):
if not ok: if not ok:
raise Exception("At least one lightning exited with unexpected non-zero return code") raise Exception("At least one lightning exited with unexpected non-zero return code")
shutil.rmtree(self.node_factory.directory)
class LightningDTests(BaseLightningDTests): class LightningDTests(BaseLightningDTests):
def connect(self, may_reconnect=False): def connect(self, may_reconnect=False):

Loading…
Cancel
Save