service
dev_tool.services.unittest.service
log = logging.getLogger(__name__)
module-attribute
UnitTestService
Bases: BaseService
A service class for running unit tests.
This class provides methods for running tests for Django, Python, and JavaScript projects.
The constructor for the UnitTestService class.
Parameters:
-
config(dict[str, Any]) –The configuration dictionary for unit test settings.
-
runner(CommandRunnerProtocol) –The command runner for executing commands.
Source code in dev_tool/services/unittest/service.py
runner
property
A property that returns the command runner.
Returns:
-
CommandRunnerProtocol–The CommandRunnerProtocol instance.
set_config
A method that sets the configuration for the unit test service.
Parameters:
Source code in dev_tool/services/unittest/service.py
run_django_unittest
A method that runs unit tests for Django projects.
This method requires Django settings to be properly configured.
Source code in dev_tool/services/unittest/service.py
run_javascript_unittest
A method that runs JavaScript unit tests.
Source code in dev_tool/services/unittest/service.py
run_python_unittest
A method that runs unit tests for Python projects.
Source code in dev_tool/services/unittest/service.py
with_venv
A method that prepends the virtual environment Python to a command.
Parameters:
Returns: