diff --git a/tests/test_services.py b/tests/test_services.py index cc63a9e..d9952eb 100644 --- a/tests/test_services.py +++ b/tests/test_services.py @@ -20,6 +20,7 @@ class ServiceTest(unittest.TestCase): @classmethod def setUpClass(cls) -> None: build_new_protos() + build_new_protos(package_name='unittesting') # Add build root to path to access its modules sys.path.append(BUILD_ROOT) diff --git a/tests/testutils/__init__.py b/tests/testutils/__init__.py index b8e7d78..b4ea38e 100644 --- a/tests/testutils/__init__.py +++ b/tests/testutils/__init__.py @@ -47,8 +47,8 @@ def clear_imports(): importlib.invalidate_caches() -def build_new_protos(): - build_package = os.path.join(BUILD_ROOT, 'sandbox') +def build_new_protos(package_name: str = 'sandbox'): + build_package = os.path.join(BUILD_ROOT, package_name) if os.path.exists(build_package): shutil.rmtree(build_package) time.sleep(0.1) @@ -62,7 +62,7 @@ def build_new_protos(): # builder.build() log.info(f'{PROJECT_ROOT=}') - stdout, stderr, retcode = run_command(f'python -m neobuilder.cli.neobuilder -b {BUILD_ROOT} sandbox {PROTO_ROOT}') + stdout, stderr, retcode = run_command(f'python -m neobuilder.cli.neobuilder -b {BUILD_ROOT} {package_name} {PROTO_ROOT}') log.info(f'{stdout=}') log.info(f'{stderr=}') log.info(f'{retcode=}')