orionis 0.432.0__py3-none-any.whl → 0.434.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/app.py +17 -0
- orionis/metadata/framework.py +1 -1
- orionis/support/entities/base.py +18 -37
- orionis/support/facades/console.py +3 -9
- orionis/support/facades/dumper.py +3 -9
- orionis/support/facades/logger.py +3 -9
- orionis/support/facades/path_resolver.py +3 -10
- orionis/support/facades/progress_bar.py +3 -10
- orionis/support/facades/testing.py +4 -10
- orionis/support/facades/workers.py +4 -9
- orionis/support/formatter/exceptions/contracts/parser.py +10 -7
- orionis/support/formatter/exceptions/parser.py +28 -26
- orionis/support/formatter/serializer.py +12 -5
- orionis/support/patterns/singleton/meta.py +17 -21
- orionis/support/standard/contracts/std.py +25 -24
- orionis/support/standard/exceptions/value.py +2 -2
- orionis/support/standard/std.py +26 -24
- orionis/support/wrapper/dot_dict.py +16 -51
- orionis/test/cases/asynchronous.py +17 -81
- orionis/test/cases/synchronous.py +17 -73
- orionis/test/contracts/dumper.py +17 -21
- orionis/test/contracts/kernel.py +5 -12
- orionis/test/contracts/logs.py +16 -21
- orionis/test/contracts/printer.py +70 -8
- orionis/test/contracts/render.py +7 -13
- orionis/test/contracts/test_result.py +58 -27
- orionis/test/contracts/unit_test.py +18 -18
- orionis/test/core/unit_test.py +162 -519
- orionis/test/entities/result.py +49 -21
- orionis/test/enums/status.py +11 -17
- orionis/test/exceptions/config.py +4 -8
- orionis/test/exceptions/failure.py +2 -18
- orionis/test/exceptions/persistence.py +4 -8
- orionis/test/exceptions/runtime.py +4 -8
- orionis/test/exceptions/value.py +5 -13
- orionis/test/kernel.py +14 -42
- orionis/test/output/dumper.py +21 -43
- orionis/test/output/printer.py +6 -146
- orionis/test/records/logs.py +57 -121
- orionis/test/validators/base_path.py +8 -6
- orionis/test/validators/execution_mode.py +2 -3
- orionis/test/validators/fail_fast.py +4 -8
- orionis/test/validators/folder_path.py +5 -7
- orionis/test/validators/module_name.py +3 -3
- orionis/test/validators/name_pattern.py +4 -9
- orionis/test/validators/pattern.py +4 -9
- orionis/test/validators/persistent.py +4 -14
- orionis/test/validators/persistent_driver.py +7 -12
- orionis/test/validators/print_result.py +4 -9
- orionis/test/validators/tags.py +6 -7
- orionis/test/validators/throw_exception.py +7 -14
- orionis/test/validators/verbosity.py +15 -5
- orionis/test/validators/web_report.py +6 -10
- orionis/test/validators/workers.py +9 -4
- orionis/test/view/render.py +9 -26
- {orionis-0.432.0.dist-info → orionis-0.434.0.dist-info}/METADATA +1 -1
- {orionis-0.432.0.dist-info → orionis-0.434.0.dist-info}/RECORD +76 -75
- tests/support/entities/mock_dataclass.py +16 -10
- tests/support/entities/test_base.py +6 -14
- tests/support/patterns/singleton/test_patterns_singleton.py +7 -8
- tests/support/standard/test_services_std.py +113 -37
- tests/support/wrapper/test_services_wrapper_docdict.py +25 -40
- tests/testing/cases/test_testing_asynchronous.py +14 -14
- tests/testing/cases/test_testing_synchronous.py +12 -14
- tests/testing/entities/test_testing_result.py +12 -51
- tests/testing/enums/test_testing_status.py +8 -13
- tests/testing/output/test_testing_dumper.py +3 -6
- tests/testing/output/test_testing_printer.py +5 -5
- tests/testing/records/test_testing_records.py +16 -26
- tests/testing/test_testing_unit.py +8 -94
- tests/testing/validators/test_testing_validators.py +55 -112
- tests/testing/view/test_render.py +4 -5
- {orionis-0.432.0.dist-info → orionis-0.434.0.dist-info}/WHEEL +0 -0
- {orionis-0.432.0.dist-info → orionis-0.434.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.432.0.dist-info → orionis-0.434.0.dist-info}/top_level.txt +0 -0
- {orionis-0.432.0.dist-info → orionis-0.434.0.dist-info}/zip-safe +0 -0
|
@@ -9,22 +9,11 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
9
9
|
|
|
10
10
|
async def testDefaultConfiguration(self) -> None:
|
|
11
11
|
"""
|
|
12
|
-
|
|
13
|
-
the default configuration values and internal attributes correctly.
|
|
14
|
-
|
|
15
|
-
Parameters
|
|
16
|
-
----------
|
|
17
|
-
self : TestTestingUnit
|
|
18
|
-
The test case instance.
|
|
12
|
+
Test that the `UnitTest` class initializes with the correct default configuration values and internal attributes.
|
|
19
13
|
|
|
20
14
|
Returns
|
|
21
15
|
-------
|
|
22
16
|
None
|
|
23
|
-
This method does not return any value.
|
|
24
|
-
|
|
25
|
-
Notes
|
|
26
|
-
-----
|
|
27
|
-
Verifies that the loader and suite attributes are instances of their expected classes.
|
|
28
17
|
"""
|
|
29
18
|
unit_test = UnitTest()
|
|
30
19
|
# Assert that the loader is correctly initialized as a TestLoader
|
|
@@ -34,23 +23,11 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
34
23
|
|
|
35
24
|
async def testConfigureMethod(self) -> None:
|
|
36
25
|
"""
|
|
37
|
-
|
|
38
|
-
the internal configuration attributes based on the provided arguments.
|
|
39
|
-
|
|
40
|
-
Parameters
|
|
41
|
-
----------
|
|
42
|
-
self : TestTestingUnit
|
|
43
|
-
The test case instance.
|
|
26
|
+
Test that the `configure` method of `UnitTest` updates internal configuration attributes as expected.
|
|
44
27
|
|
|
45
28
|
Returns
|
|
46
29
|
-------
|
|
47
30
|
None
|
|
48
|
-
This method does not return any value.
|
|
49
|
-
|
|
50
|
-
Notes
|
|
51
|
-
-----
|
|
52
|
-
- Verifies that each configuration parameter is set to the expected value.
|
|
53
|
-
- Ensures the `configure` method returns the same `UnitTest` instance for chaining.
|
|
54
31
|
"""
|
|
55
32
|
unit_test = UnitTest()
|
|
56
33
|
# Configure the UnitTest instance with custom parameters
|
|
@@ -79,23 +56,11 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
79
56
|
|
|
80
57
|
async def testFlattenTestSuite(self) -> None:
|
|
81
58
|
"""
|
|
82
|
-
|
|
83
|
-
nested `TestSuite` instances into a single list of test cases.
|
|
84
|
-
|
|
85
|
-
Parameters
|
|
86
|
-
----------
|
|
87
|
-
self : TestTestingUnit
|
|
88
|
-
The test case instance.
|
|
59
|
+
Test that the `_flattenTestSuite` method of `UnitTest` flattens nested `TestSuite` instances into a list of test cases.
|
|
89
60
|
|
|
90
61
|
Returns
|
|
91
62
|
-------
|
|
92
63
|
None
|
|
93
|
-
This method does not return any value.
|
|
94
|
-
|
|
95
|
-
Notes
|
|
96
|
-
-----
|
|
97
|
-
- Verifies that all test cases within nested suites are extracted and returned in a flat list.
|
|
98
|
-
- Ensures that the flattened list contains all individual test cases from the nested structure.
|
|
99
64
|
"""
|
|
100
65
|
unit_test = UnitTest()
|
|
101
66
|
# Create mock test cases
|
|
@@ -117,24 +82,11 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
117
82
|
|
|
118
83
|
async def testMergeTestResults(self) -> None:
|
|
119
84
|
"""
|
|
120
|
-
|
|
121
|
-
the results from an individual `TestResult` into a combined `TestResult`.
|
|
122
|
-
|
|
123
|
-
Parameters
|
|
124
|
-
----------
|
|
125
|
-
self : TestTestingUnit
|
|
126
|
-
The test case instance.
|
|
85
|
+
Test that the `_mergeTestResults` method of `UnitTest` correctly aggregates results from an individual `TestResult` into a combined `TestResult`.
|
|
127
86
|
|
|
128
87
|
Returns
|
|
129
88
|
-------
|
|
130
89
|
None
|
|
131
|
-
This method does not return any value.
|
|
132
|
-
|
|
133
|
-
Notes
|
|
134
|
-
-----
|
|
135
|
-
- Verifies that the number of tests run, failures, and errors are correctly merged.
|
|
136
|
-
- Ensures that skipped, expected failures, and unexpected successes are also handled.
|
|
137
|
-
- The method under test does not return a value; it modifies the `combined` result in place.
|
|
138
90
|
"""
|
|
139
91
|
unit_test = UnitTest()
|
|
140
92
|
# Create a combined TestResult to aggregate results into
|
|
@@ -156,23 +108,11 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
156
108
|
|
|
157
109
|
async def testClearTests(self) -> None:
|
|
158
110
|
"""
|
|
159
|
-
|
|
160
|
-
removing all previously added test cases and leaving the suite empty.
|
|
161
|
-
|
|
162
|
-
Parameters
|
|
163
|
-
----------
|
|
164
|
-
self : TestTestingUnit
|
|
165
|
-
The test case instance.
|
|
111
|
+
Test that the `clearTests` method of `UnitTest` resets the test suite, removing all test cases.
|
|
166
112
|
|
|
167
113
|
Returns
|
|
168
114
|
-------
|
|
169
115
|
None
|
|
170
|
-
This method does not return any value.
|
|
171
|
-
|
|
172
|
-
Notes
|
|
173
|
-
-----
|
|
174
|
-
- Ensures that after calling `clearTests`, the internal test suite contains no test cases.
|
|
175
|
-
- Validates that the suite is properly cleared regardless of its previous state.
|
|
176
116
|
"""
|
|
177
117
|
unit_test = UnitTest()
|
|
178
118
|
# Add a mock test case to the suite
|
|
@@ -185,24 +125,11 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
185
125
|
|
|
186
126
|
async def testGetTestNames(self) -> None:
|
|
187
127
|
"""
|
|
188
|
-
|
|
189
|
-
the identifiers of all test cases present in the internal test suite.
|
|
190
|
-
|
|
191
|
-
Parameters
|
|
192
|
-
----------
|
|
193
|
-
self : TestTestingUnit
|
|
194
|
-
The test case instance.
|
|
128
|
+
Test that the `getTestNames` method of `UnitTest` returns a list of identifiers for all test cases in the suite.
|
|
195
129
|
|
|
196
130
|
Returns
|
|
197
131
|
-------
|
|
198
132
|
None
|
|
199
|
-
This method does not return any value.
|
|
200
|
-
|
|
201
|
-
Notes
|
|
202
|
-
-----
|
|
203
|
-
- Verifies that the method returns a list of test identifiers corresponding to each test case in the suite.
|
|
204
|
-
- Ensures that the returned list contains the expected test IDs as provided by the test case's `id()` method.
|
|
205
|
-
- The expected return value of `getTestNames` is a list of strings, where each string is the identifier of a test case.
|
|
206
133
|
"""
|
|
207
134
|
unit_test = UnitTest()
|
|
208
135
|
# Create a mock test case and set its id() method to return a specific identifier
|
|
@@ -217,24 +144,11 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
217
144
|
|
|
218
145
|
async def testGetTestCount(self) -> None:
|
|
219
146
|
"""
|
|
220
|
-
|
|
221
|
-
the total number of test cases present in the internal test suite.
|
|
222
|
-
|
|
223
|
-
Parameters
|
|
224
|
-
----------
|
|
225
|
-
self : TestTestingUnit
|
|
226
|
-
The test case instance.
|
|
147
|
+
Test that the `getTestCount` method of `UnitTest` returns the correct number of test cases in the suite.
|
|
227
148
|
|
|
228
149
|
Returns
|
|
229
150
|
-------
|
|
230
151
|
None
|
|
231
|
-
This method does not return any value.
|
|
232
|
-
|
|
233
|
-
Notes
|
|
234
|
-
-----
|
|
235
|
-
- Verifies that the method returns the correct count of test cases added to the suite.
|
|
236
|
-
- Ensures that the count matches the number of test cases present in the suite at the time of invocation.
|
|
237
|
-
- The expected return value of `getTestCount` is an integer representing the number of test cases in the suite.
|
|
238
152
|
"""
|
|
239
153
|
unit_test = UnitTest()
|
|
240
154
|
# Create two mock test cases
|
|
@@ -246,4 +160,4 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
246
160
|
# Retrieve the count of test cases using the method under test
|
|
247
161
|
count = unit_test.getTestCount()
|
|
248
162
|
# Assert that the returned count matches the number of test cases added
|
|
249
|
-
self.assertEqual(count, 2)
|
|
163
|
+
self.assertEqual(count, 2)
|
|
@@ -7,16 +7,15 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
7
7
|
|
|
8
8
|
async def testValidWorkers(self) -> None:
|
|
9
9
|
"""
|
|
10
|
-
|
|
10
|
+
Test the ValidWorkers validator for correct worker count validation.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
and raises OrionisTestValueError for invalid values such as zero, negative numbers,
|
|
14
|
-
exceeding the maximum
|
|
12
|
+
Validates that the ValidWorkers function accepts integer values within the allowed range
|
|
13
|
+
and raises OrionisTestValueError for invalid values such as zero, negative numbers,
|
|
14
|
+
values exceeding the maximum, or non-integer types.
|
|
15
15
|
|
|
16
16
|
Returns
|
|
17
17
|
-------
|
|
18
18
|
None
|
|
19
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
20
19
|
"""
|
|
21
20
|
# Get the maximum allowed number of workers from the Workers facade
|
|
22
21
|
max_allowed = Workers.calculate()
|
|
@@ -37,20 +36,14 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
37
36
|
|
|
38
37
|
async def testValidBasePath(self) -> None:
|
|
39
38
|
"""
|
|
40
|
-
|
|
39
|
+
Test the ValidBasePath validator for correct base path validation.
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
None, and non-path types raise OrionisTestValueError.
|
|
45
|
-
|
|
46
|
-
Parameters
|
|
47
|
-
----------
|
|
48
|
-
None
|
|
41
|
+
Checks that ValidBasePath accepts valid path strings and Path objects, returning a pathlib.Path instance.
|
|
42
|
+
Ensures that invalid inputs such as empty strings, None, and non-path types raise OrionisTestValueError.
|
|
49
43
|
|
|
50
44
|
Returns
|
|
51
45
|
-------
|
|
52
46
|
None
|
|
53
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
54
47
|
"""
|
|
55
48
|
from orionis.test.validators import ValidBasePath
|
|
56
49
|
from pathlib import Path
|
|
@@ -69,20 +62,15 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
69
62
|
|
|
70
63
|
async def testValidExecutionMode(self) -> None:
|
|
71
64
|
"""
|
|
72
|
-
|
|
65
|
+
Test the ValidExecutionMode validator for execution mode validation.
|
|
73
66
|
|
|
74
|
-
|
|
75
|
-
returning the corresponding string value.
|
|
67
|
+
Validates that ValidExecutionMode accepts valid execution mode strings and enum values,
|
|
68
|
+
returning the corresponding string value. Ensures that invalid inputs such as unknown strings
|
|
76
69
|
and non-enum types raise OrionisTestValueError.
|
|
77
70
|
|
|
78
|
-
Parameters
|
|
79
|
-
----------
|
|
80
|
-
None
|
|
81
|
-
|
|
82
71
|
Returns
|
|
83
72
|
-------
|
|
84
73
|
None
|
|
85
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
86
74
|
"""
|
|
87
75
|
from orionis.test.validators import ValidExecutionMode
|
|
88
76
|
from orionis.foundation.config.testing.enums.mode import ExecutionMode
|
|
@@ -99,20 +87,14 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
99
87
|
|
|
100
88
|
async def testValidFailFast(self) -> None:
|
|
101
89
|
"""
|
|
102
|
-
|
|
90
|
+
Test the ValidFailFast validator for fail-fast configuration validation.
|
|
103
91
|
|
|
104
|
-
|
|
105
|
-
boolean value.
|
|
106
|
-
OrionisTestValueError.
|
|
107
|
-
|
|
108
|
-
Parameters
|
|
109
|
-
----------
|
|
110
|
-
None
|
|
92
|
+
Ensures that ValidFailFast accepts valid boolean inputs and returns the corresponding
|
|
93
|
+
boolean value. Raises OrionisTestValueError for non-boolean types or None.
|
|
111
94
|
|
|
112
95
|
Returns
|
|
113
96
|
-------
|
|
114
97
|
None
|
|
115
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
116
98
|
"""
|
|
117
99
|
from orionis.test.validators import ValidFailFast
|
|
118
100
|
|
|
@@ -128,16 +110,15 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
128
110
|
|
|
129
111
|
async def testValidFolderPath(self) -> None:
|
|
130
112
|
"""
|
|
131
|
-
|
|
113
|
+
Test the ValidFolderPath validator for folder path validation.
|
|
132
114
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
115
|
+
Checks that ValidFolderPath accepts valid folder path strings, including those with whitespace,
|
|
116
|
+
and returns the normalized string path. Ensures that empty strings, None, or non-string types
|
|
117
|
+
raise OrionisTestValueError.
|
|
136
118
|
|
|
137
119
|
Returns
|
|
138
120
|
-------
|
|
139
121
|
None
|
|
140
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
141
122
|
"""
|
|
142
123
|
from orionis.test.validators import ValidFolderPath
|
|
143
124
|
|
|
@@ -155,20 +136,15 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
155
136
|
|
|
156
137
|
async def testValidModuleName(self) -> None:
|
|
157
138
|
"""
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
This method verifies that ValidModuleName accepts valid non-empty string module names,
|
|
161
|
-
returning the normalized string value. It also checks that invalid inputs such as empty strings,
|
|
162
|
-
None, or non-string types raise OrionisTestValueError.
|
|
139
|
+
Test the ValidModuleName validator for module name validation.
|
|
163
140
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
141
|
+
Validates that ValidModuleName accepts valid non-empty string module names and returns
|
|
142
|
+
the normalized string value. Ensures that empty strings, None, or non-string types
|
|
143
|
+
raise OrionisTestValueError.
|
|
167
144
|
|
|
168
145
|
Returns
|
|
169
146
|
-------
|
|
170
147
|
None
|
|
171
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
172
148
|
"""
|
|
173
149
|
from orionis.test.validators import ValidModuleName
|
|
174
150
|
|
|
@@ -185,20 +161,15 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
185
161
|
|
|
186
162
|
async def testValidNamePattern(self) -> None:
|
|
187
163
|
"""
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
This method verifies that ValidNamePattern accepts valid non-empty string patterns and None,
|
|
191
|
-
returning the normalized string pattern or None. It also checks that invalid inputs such as
|
|
192
|
-
empty strings or non-string types raise OrionisTestValueError.
|
|
164
|
+
Test the ValidNamePattern validator for name pattern validation.
|
|
193
165
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
166
|
+
Ensures that ValidNamePattern accepts valid non-empty string patterns and None,
|
|
167
|
+
returning the normalized string pattern or None. Raises OrionisTestValueError for
|
|
168
|
+
empty strings or non-string types.
|
|
197
169
|
|
|
198
170
|
Returns
|
|
199
171
|
-------
|
|
200
172
|
None
|
|
201
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
202
173
|
"""
|
|
203
174
|
from orionis.test.validators import ValidNamePattern
|
|
204
175
|
|
|
@@ -216,16 +187,15 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
216
187
|
|
|
217
188
|
async def testValidPattern(self) -> None:
|
|
218
189
|
"""
|
|
219
|
-
|
|
190
|
+
Test the ValidPattern validator for pattern string validation.
|
|
220
191
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
192
|
+
Validates that ValidPattern accepts valid non-empty string patterns and returns
|
|
193
|
+
the normalized string value. Ensures that empty strings, None, or non-string types
|
|
194
|
+
raise OrionisTestValueError.
|
|
224
195
|
|
|
225
196
|
Returns
|
|
226
197
|
-------
|
|
227
198
|
None
|
|
228
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
229
199
|
"""
|
|
230
200
|
from orionis.test.validators import ValidPattern
|
|
231
201
|
|
|
@@ -242,20 +212,15 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
242
212
|
|
|
243
213
|
async def testValidPersistentDriver(self) -> None:
|
|
244
214
|
"""
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
This method verifies that ValidPersistentDriver accepts valid persistent driver names as strings
|
|
248
|
-
and enum values, returning the corresponding normalized string value. It also checks that invalid
|
|
249
|
-
inputs, such as unknown driver names or non-enum types, raise OrionisTestValueError.
|
|
215
|
+
Test the ValidPersistentDriver validator for persistent driver validation.
|
|
250
216
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
217
|
+
Checks that ValidPersistentDriver accepts valid persistent driver names as strings
|
|
218
|
+
and enum values, returning the normalized string value. Ensures that unknown driver
|
|
219
|
+
names or non-enum types raise OrionisTestValueError.
|
|
254
220
|
|
|
255
221
|
Returns
|
|
256
222
|
-------
|
|
257
223
|
None
|
|
258
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
259
224
|
"""
|
|
260
225
|
from orionis.test.validators import ValidPersistentDriver
|
|
261
226
|
from orionis.foundation.config.testing.enums.drivers import PersistentDrivers
|
|
@@ -272,20 +237,14 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
272
237
|
|
|
273
238
|
async def testValidPersistent(self) -> None:
|
|
274
239
|
"""
|
|
275
|
-
|
|
240
|
+
Test the ValidPersistent validator for persistent configuration validation.
|
|
276
241
|
|
|
277
|
-
|
|
278
|
-
boolean value.
|
|
279
|
-
OrionisTestValueError.
|
|
280
|
-
|
|
281
|
-
Parameters
|
|
282
|
-
----------
|
|
283
|
-
None
|
|
242
|
+
Validates that ValidPersistent accepts valid boolean inputs and returns the corresponding
|
|
243
|
+
boolean value. Raises OrionisTestValueError for non-boolean types or None.
|
|
284
244
|
|
|
285
245
|
Returns
|
|
286
246
|
-------
|
|
287
247
|
None
|
|
288
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
289
248
|
"""
|
|
290
249
|
from orionis.test.validators import ValidPersistent
|
|
291
250
|
|
|
@@ -301,20 +260,14 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
301
260
|
|
|
302
261
|
async def testValidPrintResult(self) -> None:
|
|
303
262
|
"""
|
|
304
|
-
|
|
263
|
+
Test the ValidPrintResult validator for print result configuration validation.
|
|
305
264
|
|
|
306
|
-
|
|
307
|
-
boolean value.
|
|
308
|
-
OrionisTestValueError.
|
|
309
|
-
|
|
310
|
-
Parameters
|
|
311
|
-
----------
|
|
312
|
-
None
|
|
265
|
+
Ensures that ValidPrintResult accepts valid boolean inputs and returns the corresponding
|
|
266
|
+
boolean value. Raises OrionisTestValueError for non-boolean types or None.
|
|
313
267
|
|
|
314
268
|
Returns
|
|
315
269
|
-------
|
|
316
270
|
None
|
|
317
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
318
271
|
"""
|
|
319
272
|
from orionis.test.validators import ValidPrintResult
|
|
320
273
|
|
|
@@ -330,17 +283,16 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
330
283
|
|
|
331
284
|
async def testValidTags(self) -> None:
|
|
332
285
|
"""
|
|
333
|
-
|
|
286
|
+
Test the ValidTags validator for tag list validation.
|
|
334
287
|
|
|
335
|
-
|
|
336
|
-
and returns a list of cleaned tag strings.
|
|
337
|
-
|
|
338
|
-
|
|
288
|
+
Validates that ValidTags accepts a list of non-empty string tags, normalizes whitespace,
|
|
289
|
+
and returns a list of cleaned tag strings. Accepts None and returns None. Raises
|
|
290
|
+
OrionisTestValueError for empty lists, lists with empty strings or non-string types,
|
|
291
|
+
and non-list inputs.
|
|
339
292
|
|
|
340
293
|
Returns
|
|
341
294
|
-------
|
|
342
295
|
None
|
|
343
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
344
296
|
"""
|
|
345
297
|
from orionis.test.validators import ValidTags
|
|
346
298
|
|
|
@@ -368,20 +320,14 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
368
320
|
|
|
369
321
|
async def testValidThrowException(self) -> None:
|
|
370
322
|
"""
|
|
371
|
-
|
|
323
|
+
Test the ValidThrowException validator for throw exception configuration validation.
|
|
372
324
|
|
|
373
|
-
|
|
374
|
-
boolean value.
|
|
375
|
-
OrionisTestValueError.
|
|
376
|
-
|
|
377
|
-
Parameters
|
|
378
|
-
----------
|
|
379
|
-
None
|
|
325
|
+
Ensures that ValidThrowException accepts valid boolean inputs and returns the corresponding
|
|
326
|
+
boolean value. Raises OrionisTestValueError for non-boolean types or None.
|
|
380
327
|
|
|
381
328
|
Returns
|
|
382
329
|
-------
|
|
383
330
|
None
|
|
384
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
385
331
|
"""
|
|
386
332
|
from orionis.test.validators import ValidThrowException
|
|
387
333
|
|
|
@@ -397,16 +343,15 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
397
343
|
|
|
398
344
|
async def testValidVerbosity(self) -> None:
|
|
399
345
|
"""
|
|
400
|
-
|
|
346
|
+
Test the ValidVerbosity validator for verbosity mode validation.
|
|
401
347
|
|
|
402
|
-
|
|
403
|
-
integer values, returning the normalized integer value.
|
|
404
|
-
|
|
348
|
+
Validates that ValidVerbosity accepts valid verbosity mode enum values and their corresponding
|
|
349
|
+
integer values, returning the normalized integer value. Ensures that negative values, unknown
|
|
350
|
+
integers, or non-integer types raise OrionisTestValueError.
|
|
405
351
|
|
|
406
352
|
Returns
|
|
407
353
|
-------
|
|
408
354
|
None
|
|
409
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
410
355
|
"""
|
|
411
356
|
from orionis.test.validators import ValidVerbosity
|
|
412
357
|
from orionis.foundation.config.testing.enums.verbosity import VerbosityMode
|
|
@@ -425,16 +370,14 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
425
370
|
|
|
426
371
|
async def testValidWebReport(self) -> None:
|
|
427
372
|
"""
|
|
428
|
-
|
|
373
|
+
Test the ValidWebReport validator for web report configuration validation.
|
|
429
374
|
|
|
430
|
-
|
|
431
|
-
boolean value.
|
|
432
|
-
OrionisTestValueError.
|
|
375
|
+
Ensures that ValidWebReport accepts valid boolean inputs and returns the corresponding
|
|
376
|
+
boolean value. Raises OrionisTestValueError for non-boolean types or None.
|
|
433
377
|
|
|
434
378
|
Returns
|
|
435
379
|
-------
|
|
436
380
|
None
|
|
437
|
-
This method does not return any value. It asserts expected behavior using test assertions.
|
|
438
381
|
"""
|
|
439
382
|
from orionis.test.validators import ValidWebReport
|
|
440
383
|
|
|
@@ -446,4 +389,4 @@ class TestTestingDumper(AsyncTestCase):
|
|
|
446
389
|
with self.assertRaises(OrionisTestValueError):
|
|
447
390
|
ValidWebReport("not_bool")
|
|
448
391
|
with self.assertRaises(OrionisTestValueError):
|
|
449
|
-
ValidWebReport(None)
|
|
392
|
+
ValidWebReport(None)
|
|
@@ -5,16 +5,15 @@ class TestTestingRender(AsyncTestCase):
|
|
|
5
5
|
|
|
6
6
|
async def testMethodsExist(self):
|
|
7
7
|
"""
|
|
8
|
-
|
|
8
|
+
Test that required methods exist in the TestingResultRender class.
|
|
9
9
|
|
|
10
|
-
This test
|
|
11
|
-
|
|
12
|
-
class interface meets expectations.
|
|
10
|
+
This asynchronous test checks whether the specified methods are present
|
|
11
|
+
in the TestingResultRender class by asserting their existence using hasattr.
|
|
13
12
|
|
|
14
13
|
Returns
|
|
15
14
|
-------
|
|
16
15
|
None
|
|
17
|
-
This method does not return any value.
|
|
16
|
+
This method does not return any value.
|
|
18
17
|
"""
|
|
19
18
|
# List of method names that must exist in TestingResultRender
|
|
20
19
|
required_methods = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|