pytest: Remove directories of successful tests

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker 2018-06-05 15:12:05 +02:00 committed by Rusty Russell
parent d43403257d
commit 38b7a0e2d2
2 changed files with 5 additions and 0 deletions

View File

@ -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):

View File

@ -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):