Moved unittests
This commit is contained in:
1
unittests/unittests_shared/__init__.py
Normal file
1
unittests/unittests_shared/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# imports:
|
26
unittests/unittests_shared/cli_commands.py
Normal file
26
unittests/unittests_shared/cli_commands.py
Normal 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)
|
43
unittests/unittests_shared/unittests_shared.json
Normal file
43
unittests/unittests_shared/unittests_shared.json
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"ProjectSettings": {
|
||||
"Name": "unittest_shared",
|
||||
"Version": {
|
||||
"Major": "0",
|
||||
"Minor": "0",
|
||||
"Micro": "0"
|
||||
},
|
||||
"Author": "",
|
||||
"AuthorEmail": "",
|
||||
"Description": "",
|
||||
"LongDescription": "",
|
||||
"URL": "",
|
||||
"CopyrightDate": "",
|
||||
"CopyrightName": "",
|
||||
"LicenseName": "",
|
||||
"LicenseDescription": "",
|
||||
"Dependencies": [
|
||||
"cpl-core>=2022.6.17.dev4"
|
||||
],
|
||||
"PythonVersion": ">=3.10.4",
|
||||
"PythonPath": {
|
||||
"linux": ""
|
||||
},
|
||||
"Classifiers": []
|
||||
},
|
||||
"BuildSettings": {
|
||||
"ProjectType": "library",
|
||||
"SourcePath": "",
|
||||
"OutputPath": "../../dist",
|
||||
"Main": "unittest_shared.main",
|
||||
"EntryPoint": "unittest_shared",
|
||||
"IncludePackageData": false,
|
||||
"Included": [],
|
||||
"Excluded": [
|
||||
"*/__pycache__",
|
||||
"*/logs",
|
||||
"*/tests"
|
||||
],
|
||||
"PackageData": {},
|
||||
"ProjectReferences": []
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user