orionis 0.404.0__py3-none-any.whl → 0.406.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orionis/console/base/command.py +57 -50
- orionis/console/base/contracts/command.py +68 -0
- orionis/console/dynamic/contracts/progress_bar.py +3 -3
- orionis/console/dynamic/progress_bar.py +8 -8
- orionis/console/output/console.py +8 -2
- orionis/console/output/contracts/console.py +1 -1
- orionis/container/container.py +2 -2
- orionis/container/context/scope.py +4 -1
- orionis/container/contracts/service_provider.py +2 -2
- orionis/container/entities/binding.py +31 -44
- orionis/container/enums/lifetimes.py +22 -1
- orionis/container/facades/facade.py +1 -2
- orionis/container/providers/service_provider.py +2 -2
- orionis/foundation/application.py +542 -248
- orionis/foundation/config/app/entities/app.py +107 -90
- orionis/foundation/config/auth/entities/auth.py +4 -33
- orionis/foundation/config/cache/entities/cache.py +18 -41
- orionis/foundation/config/cache/entities/file.py +8 -35
- orionis/foundation/config/cache/entities/stores.py +17 -38
- orionis/foundation/config/cors/entities/cors.py +41 -54
- orionis/foundation/config/database/entities/connections.py +40 -56
- orionis/foundation/config/database/entities/database.py +11 -38
- orionis/foundation/config/database/entities/mysql.py +48 -76
- orionis/foundation/config/database/entities/oracle.py +30 -57
- orionis/foundation/config/database/entities/pgsql.py +45 -61
- orionis/foundation/config/database/entities/sqlite.py +26 -53
- orionis/foundation/config/filesystems/entitites/aws.py +28 -49
- orionis/foundation/config/filesystems/entitites/disks.py +27 -47
- orionis/foundation/config/filesystems/entitites/filesystems.py +15 -37
- orionis/foundation/config/filesystems/entitites/local.py +9 -35
- orionis/foundation/config/filesystems/entitites/public.py +14 -41
- orionis/foundation/config/logging/entities/channels.py +56 -86
- orionis/foundation/config/logging/entities/chunked.py +18 -10
- orionis/foundation/config/logging/entities/daily.py +17 -9
- orionis/foundation/config/logging/entities/hourly.py +15 -7
- orionis/foundation/config/logging/entities/logging.py +12 -18
- orionis/foundation/config/logging/entities/monthly.py +16 -8
- orionis/foundation/config/logging/entities/stack.py +15 -7
- orionis/foundation/config/logging/entities/weekly.py +15 -7
- orionis/foundation/config/logging/validators/path.py +6 -0
- orionis/foundation/config/mail/entities/file.py +9 -36
- orionis/foundation/config/mail/entities/mail.py +22 -40
- orionis/foundation/config/mail/entities/mailers.py +29 -44
- orionis/foundation/config/mail/entities/smtp.py +47 -48
- orionis/foundation/config/queue/entities/brokers.py +19 -41
- orionis/foundation/config/queue/entities/database.py +24 -46
- orionis/foundation/config/queue/entities/queue.py +28 -40
- orionis/foundation/config/roots/paths.py +272 -468
- orionis/foundation/config/session/entities/session.py +23 -53
- orionis/foundation/config/startup.py +165 -135
- orionis/foundation/config/testing/entities/testing.py +137 -122
- orionis/foundation/config/testing/enums/__init__.py +6 -2
- orionis/foundation/config/testing/enums/drivers.py +16 -0
- orionis/foundation/config/testing/enums/verbosity.py +18 -0
- orionis/foundation/contracts/application.py +152 -362
- orionis/foundation/providers/console_provider.py +24 -2
- orionis/foundation/providers/dumper_provider.py +24 -2
- orionis/foundation/providers/logger_provider.py +24 -2
- orionis/foundation/providers/path_resolver_provider.py +25 -2
- orionis/foundation/providers/progress_bar_provider.py +24 -2
- orionis/foundation/providers/testing_provider.py +39 -0
- orionis/foundation/providers/workers_provider.py +24 -2
- orionis/metadata/framework.py +1 -1
- orionis/services/environment/helpers/functions.py +1 -2
- orionis/services/environment/key/__init__.py +0 -0
- orionis/services/environment/key/key_generator.py +37 -0
- orionis/services/log/handlers/filename.py +64 -0
- orionis/services/log/handlers/size_rotating.py +9 -40
- orionis/services/log/handlers/timed_rotating.py +9 -41
- orionis/services/log/log_service.py +9 -52
- orionis/support/entities/__init__.py +0 -0
- orionis/support/entities/base.py +104 -0
- orionis/support/facades/testing.py +15 -0
- orionis/support/facades/workers.py +1 -1
- orionis/test/cases/asynchronous.py +0 -11
- orionis/test/cases/synchronous.py +0 -9
- orionis/test/contracts/dumper.py +11 -4
- orionis/test/contracts/kernel.py +5 -110
- orionis/test/contracts/logs.py +27 -65
- orionis/test/contracts/printer.py +16 -128
- orionis/test/contracts/test_result.py +100 -0
- orionis/test/contracts/unit_test.py +87 -150
- orionis/test/core/unit_test.py +608 -554
- orionis/test/entities/result.py +22 -2
- orionis/test/enums/__init__.py +0 -2
- orionis/test/enums/status.py +14 -9
- orionis/test/exceptions/config.py +9 -1
- orionis/test/exceptions/failure.py +34 -11
- orionis/test/exceptions/persistence.py +10 -2
- orionis/test/exceptions/runtime.py +9 -1
- orionis/test/exceptions/value.py +13 -1
- orionis/test/kernel.py +87 -289
- orionis/test/output/dumper.py +82 -18
- orionis/test/output/printer.py +399 -156
- orionis/test/records/logs.py +203 -82
- orionis/test/validators/__init__.py +33 -0
- orionis/test/validators/base_path.py +45 -0
- orionis/test/validators/execution_mode.py +45 -0
- orionis/test/validators/fail_fast.py +37 -0
- orionis/test/validators/folder_path.py +34 -0
- orionis/test/validators/module_name.py +31 -0
- orionis/test/validators/name_pattern.py +40 -0
- orionis/test/validators/pattern.py +36 -0
- orionis/test/validators/persistent.py +42 -0
- orionis/test/validators/persistent_driver.py +43 -0
- orionis/test/validators/print_result.py +37 -0
- orionis/test/validators/tags.py +37 -0
- orionis/test/validators/throw_exception.py +39 -0
- orionis/test/validators/verbosity.py +37 -0
- orionis/test/validators/web_report.py +35 -0
- orionis/test/validators/workers.py +31 -0
- orionis/test/view/render.py +48 -54
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/METADATA +1 -1
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/RECORD +160 -108
- tests/container/__init__.py +0 -0
- tests/container/context/__init__.py +0 -0
- tests/container/context/test_manager.py +27 -0
- tests/container/context/test_scope.py +23 -0
- tests/container/entities/__init__.py +0 -0
- tests/container/entities/test_binding.py +133 -0
- tests/container/enums/__init__.py +0 -0
- tests/container/enums/test_lifetimes.py +63 -0
- tests/container/facades/__init__.py +0 -0
- tests/container/facades/test_facade.py +61 -0
- tests/container/mocks/__init__.py +0 -0
- tests/container/mocks/mock_complex_classes.py +482 -0
- tests/container/mocks/mock_simple_classes.py +32 -0
- tests/container/providers/__init__.py +0 -0
- tests/container/providers/test_providers.py +48 -0
- tests/container/resolver/__init__.py +0 -0
- tests/container/resolver/test_resolver.py +55 -0
- tests/container/test_container.py +254 -0
- tests/container/test_singleton.py +98 -0
- tests/container/test_thread_safety.py +217 -0
- tests/container/validators/__init__.py +0 -0
- tests/container/validators/test_implements.py +140 -0
- tests/container/validators/test_is_abstract_class.py +99 -0
- tests/container/validators/test_is_callable.py +73 -0
- tests/container/validators/test_is_concrete_class.py +97 -0
- tests/container/validators/test_is_instance.py +105 -0
- tests/container/validators/test_is_not_subclass.py +117 -0
- tests/container/validators/test_is_subclass.py +115 -0
- tests/container/validators/test_is_valid_alias.py +113 -0
- tests/container/validators/test_lifetime.py +75 -0
- tests/foundation/config/logging/test_foundation_config_logging_chunked.py +12 -34
- tests/foundation/config/logging/test_foundation_config_logging_daily.py +11 -11
- tests/foundation/config/logging/test_foundation_config_logging_hourly.py +7 -8
- tests/foundation/config/logging/test_foundation_config_logging_monthly.py +7 -10
- tests/foundation/config/logging/test_foundation_config_logging_stack.py +6 -11
- tests/foundation/config/logging/test_foundation_config_logging_weekly.py +6 -5
- tests/foundation/config/testing/test_foundation_config_testing.py +1 -1
- tests/metadata/test_metadata_framework.py +18 -18
- tests/testing/test_testing_result.py +117 -117
- tests/testing/test_testing_unit.py +209 -209
- orionis/foundation/config/base.py +0 -112
- orionis/test/arguments/parser.py +0 -187
- orionis/test/contracts/parser.py +0 -43
- orionis/test/entities/arguments.py +0 -38
- orionis/test/enums/execution_mode.py +0 -16
- /orionis/{test/arguments → console/base/contracts}/__init__.py +0 -0
- /orionis/foundation/config/testing/enums/{test_mode.py → mode.py} +0 -0
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/WHEEL +0 -0
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/top_level.txt +0 -0
- {orionis-0.404.0.dist-info → orionis-0.406.0.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from abc import ABC, abstractmethod
|
|
3
|
+
from typing import List, Dict, Optional, Tuple
|
|
4
|
+
from orionis.test.entities.result import TestResult
|
|
5
|
+
|
|
6
|
+
class IOrionisTestResult(ABC):
|
|
7
|
+
"""
|
|
8
|
+
Interface for OrionisTestResult, a custom test result collector that extends
|
|
9
|
+
unittest's TextTestResult to include rich execution metadata such as
|
|
10
|
+
execution time, error tracebacks, and reflection-based information.
|
|
11
|
+
|
|
12
|
+
Classes implementing this interface are responsible for capturing detailed
|
|
13
|
+
information about each test case execution, including success, failure,
|
|
14
|
+
error, and skip states.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
@abstractmethod
|
|
19
|
+
def test_results(self) -> List[TestResult]:
|
|
20
|
+
"""
|
|
21
|
+
A list containing the detailed results of each executed test case.
|
|
22
|
+
|
|
23
|
+
Each entry is an instance of `TestResult`, storing metadata such as
|
|
24
|
+
status, execution time, method name, module, file, and optional error info.
|
|
25
|
+
"""
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
@abstractmethod
|
|
30
|
+
def _test_timings(self) -> Dict[unittest.case.TestCase, float]:
|
|
31
|
+
"""
|
|
32
|
+
Internal mapping from each test case to its execution duration in seconds.
|
|
33
|
+
Used to compute elapsed time between `startTest()` and `stopTest()`.
|
|
34
|
+
"""
|
|
35
|
+
pass
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
@abstractmethod
|
|
39
|
+
def _current_test_start(self) -> Optional[float]:
|
|
40
|
+
"""
|
|
41
|
+
Timestamp (in seconds) marking the beginning of the currently running test.
|
|
42
|
+
Used internally to calculate duration.
|
|
43
|
+
"""
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
@abstractmethod
|
|
47
|
+
def startTest(self, test: unittest.case.TestCase) -> None:
|
|
48
|
+
"""
|
|
49
|
+
Called before the test is run.
|
|
50
|
+
|
|
51
|
+
Records the current start time for the test case in `_current_test_start`.
|
|
52
|
+
"""
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
@abstractmethod
|
|
56
|
+
def stopTest(self, test: unittest.case.TestCase) -> None:
|
|
57
|
+
"""
|
|
58
|
+
Called after the test has run.
|
|
59
|
+
|
|
60
|
+
Calculates and stores the execution time for the test in `_test_timings`.
|
|
61
|
+
"""
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
@abstractmethod
|
|
65
|
+
def addSuccess(self, test: unittest.case.TestCase) -> None:
|
|
66
|
+
"""
|
|
67
|
+
Called when a test case completes successfully.
|
|
68
|
+
|
|
69
|
+
Appends a `TestResult` instance with status `PASSED` to `test_results`.
|
|
70
|
+
"""
|
|
71
|
+
pass
|
|
72
|
+
|
|
73
|
+
@abstractmethod
|
|
74
|
+
def addFailure(self, test: unittest.case.TestCase, err: Tuple[BaseException, BaseException, object]) -> None:
|
|
75
|
+
"""
|
|
76
|
+
Called when a test case fails due to an assertion failure.
|
|
77
|
+
|
|
78
|
+
Captures and appends a `TestResult` instance with status `FAILED`, along
|
|
79
|
+
with traceback and error message.
|
|
80
|
+
"""
|
|
81
|
+
pass
|
|
82
|
+
|
|
83
|
+
@abstractmethod
|
|
84
|
+
def addError(self, test: unittest.case.TestCase, err: Tuple[BaseException, BaseException, object]) -> None:
|
|
85
|
+
"""
|
|
86
|
+
Called when a test case encounters an unexpected error or exception.
|
|
87
|
+
|
|
88
|
+
Captures and appends a `TestResult` instance with status `ERRORED`, along
|
|
89
|
+
with traceback and error message.
|
|
90
|
+
"""
|
|
91
|
+
pass
|
|
92
|
+
|
|
93
|
+
@abstractmethod
|
|
94
|
+
def addSkip(self, test: unittest.case.TestCase, reason: str) -> None:
|
|
95
|
+
"""
|
|
96
|
+
Called when a test case is skipped.
|
|
97
|
+
|
|
98
|
+
Appends a `TestResult` instance with status `SKIPPED` and reason to `test_results`.
|
|
99
|
+
"""
|
|
100
|
+
pass
|
|
@@ -1,71 +1,54 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
|
+
from pathlib import Path
|
|
2
3
|
from typing import Any, Dict, List, Optional
|
|
3
|
-
from orionis.foundation.
|
|
4
|
-
from orionis.
|
|
5
|
-
from orionis.
|
|
4
|
+
from orionis.foundation.config.testing.enums import ExecutionMode
|
|
5
|
+
from orionis.foundation.config.testing.enums.drivers import PersistentDrivers
|
|
6
|
+
from orionis.foundation.config.testing.enums.verbosity import VerbosityMode
|
|
6
7
|
|
|
7
8
|
class IUnitTest(ABC):
|
|
8
9
|
|
|
9
10
|
@abstractmethod
|
|
10
11
|
def configure(
|
|
11
|
-
self,
|
|
12
|
-
*,
|
|
13
|
-
verbosity: int = 2,
|
|
14
|
-
execution_mode: str | ExecutionMode = ExecutionMode.SEQUENTIAL,
|
|
15
|
-
max_workers: int = Workers().calculate(),
|
|
16
|
-
fail_fast: bool = False,
|
|
17
|
-
print_result: bool = True,
|
|
18
|
-
throw_exception: bool = False,
|
|
19
|
-
persistent: bool = False,
|
|
20
|
-
persistent_driver: str = 'sqlite',
|
|
21
|
-
web_report: bool = False
|
|
22
|
-
):
|
|
23
|
-
"""
|
|
24
|
-
Configures the UnitTest instance with the specified parameters.
|
|
25
|
-
|
|
26
|
-
Parameters
|
|
27
|
-
----------
|
|
28
|
-
verbosity : int, optional
|
|
29
|
-
The verbosity level for test output. If None, the current setting is retained.
|
|
30
|
-
execution_mode : str or ExecutionMode, optional
|
|
31
|
-
The mode in which the tests will be executed ('SEQUENTIAL' or 'PARALLEL'). If None, the current setting is retained.
|
|
32
|
-
max_workers : int, optional
|
|
33
|
-
The maximum number of workers to use for parallel execution. If None, the current setting is retained.
|
|
34
|
-
fail_fast : bool, optional
|
|
35
|
-
Whether to stop execution upon the first failure. If None, the current setting is retained.
|
|
36
|
-
print_result : bool, optional
|
|
37
|
-
Whether to print the test results after execution. If None, the current setting is retained.
|
|
38
|
-
throw_exception : bool, optional
|
|
39
|
-
Whether to throw an exception if any test fails. Defaults to False.
|
|
40
|
-
persistent : bool, optional
|
|
41
|
-
Whether to persist the test results in a database. Defaults to False.
|
|
42
|
-
persistent_driver : str, optional
|
|
43
|
-
The driver to use for persistent storage. Defaults to 'sqlite'.
|
|
44
|
-
|
|
45
|
-
Returns
|
|
46
|
-
-------
|
|
47
|
-
UnitTest
|
|
48
|
-
The configured UnitTest instance.
|
|
49
|
-
"""
|
|
50
|
-
pass
|
|
51
|
-
|
|
52
|
-
@abstractmethod
|
|
53
|
-
def setApplication(
|
|
54
12
|
self,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
13
|
+
*,
|
|
14
|
+
verbosity: int | VerbosityMode,
|
|
15
|
+
execution_mode: str | ExecutionMode,
|
|
16
|
+
max_workers: int,
|
|
17
|
+
fail_fast: bool,
|
|
18
|
+
print_result: bool,
|
|
19
|
+
throw_exception: bool,
|
|
20
|
+
persistent: bool,
|
|
21
|
+
persistent_driver: str | PersistentDrivers,
|
|
22
|
+
web_report: bool
|
|
23
|
+
) -> 'IUnitTest':
|
|
24
|
+
"""
|
|
25
|
+
Configure the unit test runner with the specified options.
|
|
60
26
|
|
|
61
27
|
Parameters
|
|
62
28
|
----------
|
|
63
|
-
|
|
64
|
-
|
|
29
|
+
verbosity : int or VerbosityMode
|
|
30
|
+
Level of verbosity for test output.
|
|
31
|
+
execution_mode : str or ExecutionMode
|
|
32
|
+
Mode in which tests are executed (e.g., sequential, parallel).
|
|
33
|
+
max_workers : int
|
|
34
|
+
Maximum number of worker threads or processes.
|
|
35
|
+
fail_fast : bool
|
|
36
|
+
If True, stop execution on first failure.
|
|
37
|
+
print_result : bool
|
|
38
|
+
If True, print test results to the console.
|
|
39
|
+
throw_exception : bool
|
|
40
|
+
If True, raise exceptions on test failures.
|
|
41
|
+
persistent : bool
|
|
42
|
+
If True, enable persistent storage for test results.
|
|
43
|
+
persistent_driver : str | PersistentDrivers
|
|
44
|
+
Name of the persistent storage driver.
|
|
45
|
+
web_report : bool
|
|
46
|
+
If True, generate a web-based test report.
|
|
65
47
|
|
|
66
48
|
Returns
|
|
67
49
|
-------
|
|
68
|
-
|
|
50
|
+
IUnitTest
|
|
51
|
+
The configured unit test runner instance.
|
|
69
52
|
"""
|
|
70
53
|
pass
|
|
71
54
|
|
|
@@ -73,39 +56,32 @@ class IUnitTest(ABC):
|
|
|
73
56
|
def discoverTestsInFolder(
|
|
74
57
|
self,
|
|
75
58
|
*,
|
|
76
|
-
base_path: str
|
|
59
|
+
base_path: str | Path,
|
|
77
60
|
folder_path: str,
|
|
78
|
-
pattern: str
|
|
61
|
+
pattern: str,
|
|
79
62
|
test_name_pattern: Optional[str] = None,
|
|
80
63
|
tags: Optional[List[str]] = None
|
|
81
|
-
):
|
|
64
|
+
) -> 'IUnitTest':
|
|
82
65
|
"""
|
|
66
|
+
Discover test cases in a specified folder.
|
|
67
|
+
|
|
83
68
|
Parameters
|
|
84
69
|
----------
|
|
70
|
+
base_path : str or Path
|
|
71
|
+
Base directory for test discovery.
|
|
85
72
|
folder_path : str
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
tags : list of str or None, optional
|
|
94
|
-
A list of tags to filter tests. Defaults to None.
|
|
73
|
+
Relative or absolute path to the folder containing tests.
|
|
74
|
+
pattern : str
|
|
75
|
+
File pattern to match test files (e.g., 'test_*.py').
|
|
76
|
+
test_name_pattern : str, optional
|
|
77
|
+
Pattern to match test function or class names.
|
|
78
|
+
tags : list of str, optional
|
|
79
|
+
List of tags to filter discovered tests.
|
|
95
80
|
|
|
96
81
|
Returns
|
|
97
82
|
-------
|
|
98
|
-
|
|
99
|
-
The
|
|
100
|
-
|
|
101
|
-
Raises
|
|
102
|
-
------
|
|
103
|
-
OrionisTestValueError
|
|
104
|
-
If the test folder does not exist, no tests are found, or an error occurs during test discovery.
|
|
105
|
-
|
|
106
|
-
Notes
|
|
107
|
-
-----
|
|
108
|
-
This method updates the internal test suite with the discovered tests and tracks the number of tests found.
|
|
83
|
+
IUnitTest
|
|
84
|
+
The unit test runner instance with discovered tests.
|
|
109
85
|
"""
|
|
110
86
|
pass
|
|
111
87
|
|
|
@@ -115,152 +91,113 @@ class IUnitTest(ABC):
|
|
|
115
91
|
*,
|
|
116
92
|
module_name: str,
|
|
117
93
|
test_name_pattern: Optional[str] = None
|
|
118
|
-
):
|
|
94
|
+
) -> 'IUnitTest':
|
|
119
95
|
"""
|
|
120
|
-
|
|
96
|
+
Discover test cases in a specified module.
|
|
121
97
|
|
|
122
98
|
Parameters
|
|
123
99
|
----------
|
|
124
100
|
module_name : str
|
|
125
|
-
Name of the module
|
|
101
|
+
Name of the module to search for tests.
|
|
126
102
|
test_name_pattern : str, optional
|
|
127
|
-
Pattern to
|
|
103
|
+
Pattern to match test function or class names.
|
|
128
104
|
|
|
129
105
|
Returns
|
|
130
106
|
-------
|
|
131
|
-
|
|
132
|
-
The
|
|
133
|
-
|
|
134
|
-
Exceptions
|
|
135
|
-
----------
|
|
136
|
-
OrionisTestValueError
|
|
137
|
-
If the specified module cannot be imported.
|
|
107
|
+
IUnitTest
|
|
108
|
+
The unit test runner instance with discovered tests.
|
|
138
109
|
"""
|
|
139
110
|
pass
|
|
140
111
|
|
|
141
112
|
@abstractmethod
|
|
142
|
-
def run(
|
|
143
|
-
self
|
|
144
|
-
) -> Dict[str, Any]:
|
|
113
|
+
def run(self) -> Dict[str, Any]:
|
|
145
114
|
"""
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Parameters
|
|
149
|
-
----------
|
|
150
|
-
print_result : bool, optional
|
|
151
|
-
If provided, overrides the instance's `print_result` attribute to determine whether to print results.
|
|
152
|
-
throw_exception : bool, optional
|
|
153
|
-
If True, raises an exception if any test failures or errors are detected.
|
|
115
|
+
Execute all discovered tests.
|
|
154
116
|
|
|
155
117
|
Returns
|
|
156
118
|
-------
|
|
157
119
|
dict
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
Raises
|
|
161
|
-
------
|
|
162
|
-
OrionisTestFailureException
|
|
163
|
-
If `throw_exception` is True and there are test failures or errors.
|
|
120
|
+
Dictionary containing the results of the test execution.
|
|
164
121
|
"""
|
|
165
122
|
pass
|
|
166
123
|
|
|
167
124
|
@abstractmethod
|
|
168
|
-
def getTestNames(
|
|
169
|
-
self
|
|
170
|
-
) -> List[str]:
|
|
125
|
+
def getTestNames(self) -> List[str]:
|
|
171
126
|
"""
|
|
172
|
-
Get
|
|
127
|
+
Get the list of discovered test names.
|
|
173
128
|
|
|
174
129
|
Returns
|
|
175
130
|
-------
|
|
176
|
-
|
|
177
|
-
|
|
131
|
+
list of str
|
|
132
|
+
Names of all discovered tests.
|
|
178
133
|
"""
|
|
179
134
|
pass
|
|
180
135
|
|
|
181
136
|
@abstractmethod
|
|
182
|
-
def getTestCount(
|
|
183
|
-
self
|
|
184
|
-
) -> int:
|
|
137
|
+
def getTestCount(self) -> int:
|
|
185
138
|
"""
|
|
186
|
-
|
|
139
|
+
Get the total number of discovered tests.
|
|
187
140
|
|
|
188
141
|
Returns
|
|
189
142
|
-------
|
|
190
143
|
int
|
|
191
|
-
|
|
144
|
+
Number of discovered tests.
|
|
192
145
|
"""
|
|
193
146
|
pass
|
|
194
147
|
|
|
195
148
|
@abstractmethod
|
|
196
|
-
def clearTests(
|
|
197
|
-
self
|
|
198
|
-
) -> None:
|
|
149
|
+
def clearTests(self) -> None:
|
|
199
150
|
"""
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
Resets the internal test suite to an empty `unittest.TestSuite`, removing any previously added tests.
|
|
151
|
+
Remove all discovered tests from the runner.
|
|
203
152
|
"""
|
|
204
153
|
pass
|
|
205
154
|
|
|
206
155
|
@abstractmethod
|
|
207
|
-
def getResult(
|
|
208
|
-
self
|
|
209
|
-
) -> dict:
|
|
156
|
+
def getResult(self) -> dict:
|
|
210
157
|
"""
|
|
211
|
-
|
|
158
|
+
Retrieve the results of the last test run.
|
|
212
159
|
|
|
213
160
|
Returns
|
|
214
161
|
-------
|
|
215
|
-
|
|
216
|
-
|
|
162
|
+
dict
|
|
163
|
+
Dictionary containing the results of the last test execution.
|
|
217
164
|
"""
|
|
218
165
|
pass
|
|
219
166
|
|
|
220
167
|
@abstractmethod
|
|
221
|
-
def getOutputBuffer(
|
|
222
|
-
self
|
|
223
|
-
) -> int:
|
|
168
|
+
def getOutputBuffer(self) -> int:
|
|
224
169
|
"""
|
|
225
|
-
|
|
226
|
-
|
|
170
|
+
Get the size or identifier of the output buffer.
|
|
171
|
+
|
|
227
172
|
Returns
|
|
228
173
|
-------
|
|
229
174
|
int
|
|
230
|
-
|
|
175
|
+
Output buffer size or identifier.
|
|
231
176
|
"""
|
|
232
177
|
pass
|
|
233
178
|
|
|
234
179
|
@abstractmethod
|
|
235
|
-
def printOutputBuffer(
|
|
236
|
-
self
|
|
237
|
-
) -> None:
|
|
180
|
+
def printOutputBuffer(self) -> None:
|
|
238
181
|
"""
|
|
239
|
-
|
|
240
|
-
This method retrieves the output buffer and prints its contents using the rich console.
|
|
182
|
+
Print the contents of the output buffer to the console.
|
|
241
183
|
"""
|
|
242
184
|
pass
|
|
243
185
|
|
|
244
186
|
@abstractmethod
|
|
245
|
-
def getErrorBuffer(
|
|
246
|
-
self
|
|
247
|
-
) -> int:
|
|
187
|
+
def getErrorBuffer(self) -> int:
|
|
248
188
|
"""
|
|
249
|
-
|
|
250
|
-
|
|
189
|
+
Get the size or identifier of the error buffer.
|
|
190
|
+
|
|
251
191
|
Returns
|
|
252
192
|
-------
|
|
253
193
|
int
|
|
254
|
-
|
|
194
|
+
Error buffer size or identifier.
|
|
255
195
|
"""
|
|
256
196
|
pass
|
|
257
197
|
|
|
258
198
|
@abstractmethod
|
|
259
|
-
def printErrorBuffer(
|
|
260
|
-
self
|
|
261
|
-
) -> None:
|
|
199
|
+
def printErrorBuffer(self) -> None:
|
|
262
200
|
"""
|
|
263
|
-
|
|
264
|
-
This method retrieves the error buffer and prints its contents using the rich console.
|
|
201
|
+
Print the contents of the error buffer to the console.
|
|
265
202
|
"""
|
|
266
203
|
pass
|