remove build folder, if created through setup-process in test

pull/1970/head
sebres 7 years ago
parent eac80966c5
commit fa007bfa7c

@ -121,6 +121,7 @@ class SetupTest(unittest.TestCase):
if not self.setup:
return # if verbose skip didn't work out
tmp = tempfile.mkdtemp()
remove_build = not os.path.exists('build')
# suppress stdout (and stderr) if not heavydebug
supdbgout = ' >/dev/null' if unittest.F2B.log_level >= logging.DEBUG else '' # HEAVYDEBUG
try:
@ -178,6 +179,8 @@ class SetupTest(unittest.TestCase):
# remove build directory
os.system("%s %s clean --all%s"
% (sys.executable, self.setup, (supdbgout + ' 2>&1') if supdbgout else ''))
if remove_build and os.path.exists('build'):
shutil.rmtree('build')
class TestsUtilsTest(LogCaptureTestCase):

Loading…
Cancel
Save