Moved unittests

This commit is contained in:
2022-05-26 15:49:52 +02:00
parent 79b51cf8c5
commit df32978a31
30 changed files with 9 additions and 34 deletions

View File

@@ -0,0 +1,26 @@
import os
import subprocess
from unittests_cli.constants import CLI_PATH
class CLICommands:
@staticmethod
def _run(cmd: str, *args):
env_vars = os.environ
env_vars['CPL_IS_UNITTEST'] = 'YES'
command = ['python', CLI_PATH, cmd]
for arg in args:
command.append(arg)
print(f'Running {command}')
subprocess.run(command, env=env_vars)
@classmethod
def generate(cls, *args):
cls._run('generate', *args)
@classmethod
def new(cls, *args):
cls._run('new', *args)