Changed project files of general test project
This commit is contained in:
@@ -50,13 +50,6 @@ class LiveServerThread(threading.Thread):
|
||||
Console.error('Entry point main.py not found')
|
||||
return
|
||||
|
||||
Console.set_foreground_color(ForegroundColorEnum.green)
|
||||
Console.write_line('Read successfully')
|
||||
Console.set_foreground_color(ForegroundColorEnum.cyan)
|
||||
now = datetime.now()
|
||||
Console.write_line(f'Started at {now.strftime("%Y-%m-%d %H:%M:%S")}\n\n')
|
||||
Console.set_foreground_color(ForegroundColorEnum.default)
|
||||
|
||||
env_vars = os.environ
|
||||
if sys.platform == 'win32':
|
||||
env_vars['PYTHONPATH'] = f'{os.path.dirname(src_path)};' \
|
||||
@@ -65,5 +58,12 @@ class LiveServerThread(threading.Thread):
|
||||
env_vars['PYTHONPATH'] = f'{os.path.dirname(src_path)}:' \
|
||||
f'{os.path.join(os.path.dirname(src_path), self._build_settings.source_path)}'
|
||||
|
||||
Console.set_foreground_color(ForegroundColorEnum.green)
|
||||
Console.write_line('Read successfully')
|
||||
Console.set_foreground_color(ForegroundColorEnum.cyan)
|
||||
now = datetime.now()
|
||||
Console.write_line(f'Started at {now.strftime("%Y-%m-%d %H:%M:%S")}\n\n')
|
||||
Console.set_foreground_color(ForegroundColorEnum.default)
|
||||
|
||||
self._command = [sys.executable, self._main, ''.join(self._args)]
|
||||
subprocess.run(self._command, env=env_vars)
|
||||
|
8
src/tests/custom/general/cpl-workspace.json
Normal file
8
src/tests/custom/general/cpl-workspace.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Workspace": {
|
||||
"DefaultProject": "general",
|
||||
"Projects": {
|
||||
"general": "src/general/general.json"
|
||||
}
|
||||
}
|
||||
}
|
@@ -8,7 +8,7 @@ from cpl.dependency_injection.service_provider_abc import ServiceProviderABC
|
||||
from cpl.logging.logger_abc import LoggerABC
|
||||
from cpl.mailing.email import EMail
|
||||
from cpl.mailing.email_client_abc import EMailClientABC
|
||||
from tests.custom.general.test_service import TestService
|
||||
from test_service import TestService
|
||||
|
||||
|
||||
class Application(ApplicationABC):
|
@@ -1,6 +1,6 @@
|
||||
from cpl.application.application_builder import ApplicationBuilder
|
||||
from tests.custom.general.application import Application
|
||||
from tests.custom.general.startup import Startup
|
||||
from application import Application
|
||||
from startup import Startup
|
||||
|
||||
|
||||
def main():
|
@@ -6,7 +6,7 @@ from cpl.logging.logger_service import Logger
|
||||
from cpl.logging.logger_abc import LoggerABC
|
||||
from cpl.mailing.email_client_service import EMailClient
|
||||
from cpl.mailing.email_client_abc import EMailClientABC
|
||||
from tests.custom.general.test_service import TestService
|
||||
from test_service import TestService
|
||||
|
||||
|
||||
class Startup(StartupABC):
|
||||
@@ -20,7 +20,6 @@ class Startup(StartupABC):
|
||||
def configure_configuration(self) -> ConfigurationABC:
|
||||
self._configuration.add_environment_variables('PYTHON_')
|
||||
self._configuration.add_environment_variables('CPL_')
|
||||
self._configuration.add_console_arguments()
|
||||
self._configuration.add_json_file(f'appsettings.json')
|
||||
self._configuration.add_json_file(f'appsettings.{self._configuration.environment.environment_name}.json')
|
||||
self._configuration.add_json_file(f'appsettings.{self._configuration.environment.host_name}.json', optional=True)
|
Reference in New Issue
Block a user