Improved cpl n custom templating #139

This commit is contained in:
2022-12-06 17:42:55 +01:00
parent 5f10603fe5
commit e244535557
56 changed files with 329 additions and 2304 deletions

View File

@@ -7,6 +7,7 @@ from unittests_cli.constants import PLAYGROUND_PATH
class CommandTestCase(unittest.TestCase):
_skip_tear_down = False
def __init__(self, method_name: str):
unittest.TestCase.__init__(self, method_name)
@@ -18,7 +19,8 @@ class CommandTestCase(unittest.TestCase):
if os.path.exists(PLAYGROUND_PATH):
shutil.rmtree(os.path.abspath(os.path.join(PLAYGROUND_PATH)))
os.makedirs(PLAYGROUND_PATH)
if not os.path.exists(PLAYGROUND_PATH):
os.makedirs(PLAYGROUND_PATH)
os.chdir(PLAYGROUND_PATH)
except Exception as e:
print(f'Setup of {__name__} failed: {traceback.format_exc()}')
@@ -28,6 +30,8 @@ class CommandTestCase(unittest.TestCase):
@classmethod
def tearDownClass(cls):
if cls._skip_tear_down:
return
try:
if os.path.exists(PLAYGROUND_PATH):
shutil.rmtree(os.path.abspath(os.path.join(PLAYGROUND_PATH)))