#157 #165

Merged
edraft merged 14 commits from #157 into 2023.4 2023-04-11 11:48:49 +02:00
Showing only changes of commit 69a3bc5e31 - Show all commits

View File

@ -8,6 +8,7 @@ from unittests_cli.constants import PLAYGROUND_PATH
class CommandTestCase(unittest.TestCase): class CommandTestCase(unittest.TestCase):
_skip_tear_down = False _skip_tear_down = False
_cwd = os.getcwd()
def __init__(self, method_name: str): def __init__(self, method_name: str):
unittest.TestCase.__init__(self, method_name) unittest.TestCase.__init__(self, method_name)
@ -32,6 +33,7 @@ class CommandTestCase(unittest.TestCase):
if cls._skip_tear_down: if cls._skip_tear_down:
return return
try: try:
os.chdir(cls._cwd)
if os.path.exists(PLAYGROUND_PATH): if os.path.exists(PLAYGROUND_PATH):
shutil.rmtree(os.path.abspath(os.path.join(PLAYGROUND_PATH))) shutil.rmtree(os.path.abspath(os.path.join(PLAYGROUND_PATH)))
except Exception as e: except Exception as e: