orionis 0.416.0__py3-none-any.whl → 0.417.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/metadata/framework.py +1 -1
- {orionis-0.416.0.dist-info → orionis-0.417.0.dist-info}/METADATA +1 -1
- {orionis-0.416.0.dist-info → orionis-0.417.0.dist-info}/RECORD +8 -8
- tests/testing/test_testing_unit.py +147 -8
- {orionis-0.416.0.dist-info → orionis-0.417.0.dist-info}/WHEEL +0 -0
- {orionis-0.416.0.dist-info → orionis-0.417.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.416.0.dist-info → orionis-0.417.0.dist-info}/top_level.txt +0 -0
- {orionis-0.416.0.dist-info → orionis-0.417.0.dist-info}/zip-safe +0 -0
orionis/metadata/framework.py
CHANGED
|
@@ -313,7 +313,7 @@ orionis/foundation/providers/progress_bar_provider.py,sha256=WW3grNgH-yV2meSSTeO
|
|
|
313
313
|
orionis/foundation/providers/testing_provider.py,sha256=iJSN2RIChbYIL-1ue6vmPmDMCSrvERDkti4Er9MPiLA,1102
|
|
314
314
|
orionis/foundation/providers/workers_provider.py,sha256=kiQjQRyUEyiBX2zcbF_KmqRgvc7Bvxsvg5oMtIvYniM,1075
|
|
315
315
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
316
|
-
orionis/metadata/framework.py,sha256=
|
|
316
|
+
orionis/metadata/framework.py,sha256=mgSuf0lS1a_bBnjhqeXaV2Y7ZfnUu4h2gWcRaoYMTmI,4960
|
|
317
317
|
orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
|
|
318
318
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
319
319
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -483,7 +483,7 @@ orionis/test/validators/web_report.py,sha256=-h3Fe9jY93_kzUhd2NBIqEfCcBpu-8Ei9x3
|
|
|
483
483
|
orionis/test/validators/workers.py,sha256=LGffDKtK6SKixFKzIYPQpI5aFeQPAGXpv_LUtmEu6g4,1102
|
|
484
484
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
485
485
|
orionis/test/view/render.py,sha256=3ICz68l-WF3BtnYqH5m-ktN9UD00MELMbmMnyJDV74A,4768
|
|
486
|
-
orionis-0.
|
|
486
|
+
orionis-0.417.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
|
487
487
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
488
488
|
tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
489
489
|
tests/container/test_container.py,sha256=asv8TkkupVoex6SWod74NBl4dSs7wb9mLmu_glNdNy8,14815
|
|
@@ -558,7 +558,7 @@ tests/support/standard/test_services_std.py,sha256=U0hNF50YE4aLE3Z9yWB2awl9owFQR
|
|
|
558
558
|
tests/support/wrapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
559
559
|
tests/support/wrapper/test_services_wrapper_docdict.py,sha256=Q_qyqZodLiTQ6Pv9zILfIoZj6l-WPzNWuIoRf1GTGY0,7535
|
|
560
560
|
tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
561
|
-
tests/testing/test_testing_unit.py,sha256=
|
|
561
|
+
tests/testing/test_testing_unit.py,sha256=Y7CBIs8n7GO_Grd9XLNz0BDT5ULSEbKK1zOUWkp3Vio,10207
|
|
562
562
|
tests/testing/cases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
563
563
|
tests/testing/cases/test_testing_asynchronous.py,sha256=gBcUyx1gmhulC-51BLtJOCwQOK6EMBaUws8eG8nxYOs,2218
|
|
564
564
|
tests/testing/cases/test_testing_synchronous.py,sha256=n7btUA-2cXPx-HLRfyI7YtVuJvcSuYVC-z843SktPCk,2427
|
|
@@ -573,8 +573,8 @@ tests/testing/records/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
573
573
|
tests/testing/records/test_testing_records.py,sha256=1MY5bCzY9yapjlOPB8t2SJz63V2_iGczqTmtnyHpnlE,6446
|
|
574
574
|
tests/testing/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
575
575
|
tests/testing/validators/test_testing_validators.py,sha256=QdcF0Vhnnl_kD-PzceHJbUYOqwPTB1Td7YaTv8LTr30,19612
|
|
576
|
-
orionis-0.
|
|
577
|
-
orionis-0.
|
|
578
|
-
orionis-0.
|
|
579
|
-
orionis-0.
|
|
580
|
-
orionis-0.
|
|
576
|
+
orionis-0.417.0.dist-info/METADATA,sha256=XLg_D-73TO_1-kXgtzAsdiwUPMvcOcRLbdK8rl3a1BA,4772
|
|
577
|
+
orionis-0.417.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
578
|
+
orionis-0.417.0.dist-info/top_level.txt,sha256=nkPWzvqkAzAmwPMPo3_iiUgzWMFOGfz6hVwdASslEGE,37
|
|
579
|
+
orionis-0.417.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
580
|
+
orionis-0.417.0.dist-info/RECORD,,
|
|
@@ -9,17 +9,51 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
9
9
|
|
|
10
10
|
async def testDefaultConfiguration(self) -> None:
|
|
11
11
|
"""
|
|
12
|
-
|
|
12
|
+
Tests the initialization of the `UnitTest` class to ensure it sets up
|
|
13
|
+
the default configuration values and internal attributes correctly.
|
|
14
|
+
|
|
15
|
+
Parameters
|
|
16
|
+
----------
|
|
17
|
+
self : TestTestingUnit
|
|
18
|
+
The test case instance.
|
|
19
|
+
|
|
20
|
+
Returns
|
|
21
|
+
-------
|
|
22
|
+
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.
|
|
13
28
|
"""
|
|
14
29
|
unit_test = UnitTest()
|
|
30
|
+
# Assert that the loader is correctly initialized as a TestLoader
|
|
15
31
|
self.assertIsInstance(unit_test._UnitTest__loader, unittest.TestLoader)
|
|
32
|
+
# Assert that the suite is correctly initialized as a TestSuite
|
|
16
33
|
self.assertIsInstance(unit_test._UnitTest__suite, unittest.TestSuite)
|
|
17
34
|
|
|
18
35
|
async def testConfigureMethod(self) -> None:
|
|
19
36
|
"""
|
|
20
|
-
Tests the `configure` method of the `UnitTest` class
|
|
37
|
+
Tests the `configure` method of the `UnitTest` class to ensure it correctly updates
|
|
38
|
+
the internal configuration attributes based on the provided arguments.
|
|
39
|
+
|
|
40
|
+
Parameters
|
|
41
|
+
----------
|
|
42
|
+
self : TestTestingUnit
|
|
43
|
+
The test case instance.
|
|
44
|
+
|
|
45
|
+
Returns
|
|
46
|
+
-------
|
|
47
|
+
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.
|
|
21
54
|
"""
|
|
22
55
|
unit_test = UnitTest()
|
|
56
|
+
# Configure the UnitTest instance with custom parameters
|
|
23
57
|
configured = unit_test.configure(
|
|
24
58
|
verbosity=1,
|
|
25
59
|
execution_mode=ExecutionMode.PARALLEL,
|
|
@@ -31,6 +65,7 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
31
65
|
persistent_driver=PersistentDrivers.JSON,
|
|
32
66
|
web_report=False
|
|
33
67
|
)
|
|
68
|
+
# Assert that each internal attribute matches the configured value
|
|
34
69
|
self.assertEqual(unit_test._UnitTest__verbosity, 1)
|
|
35
70
|
self.assertEqual(unit_test._UnitTest__execution_mode, ExecutionMode.PARALLEL.value)
|
|
36
71
|
self.assertEqual(unit_test._UnitTest__max_workers, 8)
|
|
@@ -39,31 +74,72 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
39
74
|
self.assertFalse(unit_test._UnitTest__persistent)
|
|
40
75
|
self.assertEqual(unit_test._UnitTest__persistent_driver, PersistentDrivers.JSON.value)
|
|
41
76
|
self.assertFalse(unit_test._UnitTest__web_report)
|
|
77
|
+
# Ensure the configure method returns the same instance for chaining
|
|
42
78
|
self.assertIs(configured, unit_test)
|
|
43
79
|
|
|
44
80
|
async def testFlattenTestSuite(self) -> None:
|
|
45
81
|
"""
|
|
46
|
-
Tests the `_flattenTestSuite` method of the `UnitTest` class
|
|
82
|
+
Tests the `_flattenTestSuite` method of the `UnitTest` class to ensure it correctly flattens
|
|
83
|
+
nested `TestSuite` instances into a single list of test cases.
|
|
84
|
+
|
|
85
|
+
Parameters
|
|
86
|
+
----------
|
|
87
|
+
self : TestTestingUnit
|
|
88
|
+
The test case instance.
|
|
89
|
+
|
|
90
|
+
Returns
|
|
91
|
+
-------
|
|
92
|
+
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.
|
|
47
99
|
"""
|
|
48
100
|
unit_test = UnitTest()
|
|
101
|
+
# Create mock test cases
|
|
49
102
|
test_case1 = MagicMock()
|
|
50
103
|
test_case2 = MagicMock()
|
|
104
|
+
# Create a nested TestSuite containing the mock test cases
|
|
51
105
|
nested_suite = unittest.TestSuite()
|
|
52
106
|
nested_suite.addTest(test_case1)
|
|
53
107
|
nested_suite.addTest(test_case2)
|
|
108
|
+
# Create the main TestSuite and add the nested suite to it
|
|
54
109
|
main_suite = unittest.TestSuite()
|
|
55
110
|
main_suite.addTest(nested_suite)
|
|
111
|
+
# Flatten the main suite using the method under test
|
|
56
112
|
flattened = unit_test._UnitTest__flattenTestSuite(main_suite)
|
|
113
|
+
# Assert that the flattened list contains both test cases
|
|
57
114
|
self.assertEqual(len(flattened), 2)
|
|
58
115
|
self.assertIn(test_case1, flattened)
|
|
59
116
|
self.assertIn(test_case2, flattened)
|
|
60
117
|
|
|
61
118
|
async def testMergeTestResults(self) -> None:
|
|
62
119
|
"""
|
|
63
|
-
Tests the `_mergeTestResults` method of the `UnitTest` class
|
|
120
|
+
Tests the `_mergeTestResults` method of the `UnitTest` class to ensure it correctly aggregates
|
|
121
|
+
the results from an individual `TestResult` into a combined `TestResult`.
|
|
122
|
+
|
|
123
|
+
Parameters
|
|
124
|
+
----------
|
|
125
|
+
self : TestTestingUnit
|
|
126
|
+
The test case instance.
|
|
127
|
+
|
|
128
|
+
Returns
|
|
129
|
+
-------
|
|
130
|
+
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.
|
|
64
138
|
"""
|
|
65
139
|
unit_test = UnitTest()
|
|
140
|
+
# Create a combined TestResult to aggregate results into
|
|
66
141
|
combined = unittest.TestResult()
|
|
142
|
+
# Create an individual TestResult with sample data
|
|
67
143
|
individual = unittest.TestResult()
|
|
68
144
|
individual.testsRun = 2
|
|
69
145
|
individual.failures = [('test1', 'failure')]
|
|
@@ -71,40 +147,103 @@ class TestTestingUnit(AsyncTestCase):
|
|
|
71
147
|
individual.skipped = []
|
|
72
148
|
individual.expectedFailures = []
|
|
73
149
|
individual.unexpectedSuccesses = []
|
|
150
|
+
# Merge the individual results into the combined result
|
|
74
151
|
unit_test._UnitTest__mergeTestResults(combined, individual)
|
|
152
|
+
# Assert that the combined result reflects the merged data
|
|
75
153
|
self.assertEqual(combined.testsRun, 2)
|
|
76
154
|
self.assertEqual(len(combined.failures), 1)
|
|
77
155
|
self.assertEqual(len(combined.errors), 1)
|
|
78
156
|
|
|
79
157
|
async def testClearTests(self) -> None:
|
|
80
158
|
"""
|
|
81
|
-
Tests the `clearTests` method of the `UnitTest` class to
|
|
159
|
+
Tests the `clearTests` method of the `UnitTest` class to verify that it correctly resets the test suite,
|
|
160
|
+
removing all previously added test cases and leaving the suite empty.
|
|
161
|
+
|
|
162
|
+
Parameters
|
|
163
|
+
----------
|
|
164
|
+
self : TestTestingUnit
|
|
165
|
+
The test case instance.
|
|
166
|
+
|
|
167
|
+
Returns
|
|
168
|
+
-------
|
|
169
|
+
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.
|
|
82
176
|
"""
|
|
83
177
|
unit_test = UnitTest()
|
|
178
|
+
# Add a mock test case to the suite
|
|
84
179
|
mock_test = MagicMock()
|
|
85
180
|
unit_test._UnitTest__suite.addTest(mock_test)
|
|
181
|
+
# Clear all tests from the suite
|
|
86
182
|
unit_test.clearTests()
|
|
183
|
+
# Assert that the suite is now empty
|
|
87
184
|
self.assertEqual(len(unit_test._UnitTest__suite._tests), 0)
|
|
88
185
|
|
|
89
186
|
async def testGetTestNames(self) -> None:
|
|
90
187
|
"""
|
|
91
|
-
Tests the `getTestNames` method of the `UnitTest` class
|
|
188
|
+
Tests the `getTestNames` method of the `UnitTest` class to ensure it accurately retrieves
|
|
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.
|
|
195
|
+
|
|
196
|
+
Returns
|
|
197
|
+
-------
|
|
198
|
+
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.
|
|
92
206
|
"""
|
|
93
207
|
unit_test = UnitTest()
|
|
208
|
+
# Create a mock test case and set its id() method to return a specific identifier
|
|
94
209
|
mock_test = MagicMock()
|
|
95
210
|
mock_test.id.return_value = 'test_id'
|
|
211
|
+
# Add the mock test case to the UnitTest's internal suite
|
|
96
212
|
unit_test._UnitTest__suite.addTest(mock_test)
|
|
213
|
+
# Retrieve the list of test names using the method under test
|
|
97
214
|
names = unit_test.getTestNames()
|
|
215
|
+
# Assert that the returned list contains the expected test identifier
|
|
98
216
|
self.assertEqual(names, ['test_id'])
|
|
99
217
|
|
|
100
218
|
async def testGetTestCount(self) -> None:
|
|
101
219
|
"""
|
|
102
|
-
Tests the `getTestCount` method of the `UnitTest` class
|
|
220
|
+
Tests the `getTestCount` method of the `UnitTest` class to ensure it accurately returns
|
|
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.
|
|
227
|
+
|
|
228
|
+
Returns
|
|
229
|
+
-------
|
|
230
|
+
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.
|
|
103
238
|
"""
|
|
104
239
|
unit_test = UnitTest()
|
|
240
|
+
# Create two mock test cases
|
|
105
241
|
mock_test1 = MagicMock()
|
|
106
242
|
mock_test2 = MagicMock()
|
|
243
|
+
# Add the mock test cases to the UnitTest's internal suite
|
|
107
244
|
unit_test._UnitTest__suite.addTest(mock_test1)
|
|
108
245
|
unit_test._UnitTest__suite.addTest(mock_test2)
|
|
246
|
+
# Retrieve the count of test cases using the method under test
|
|
109
247
|
count = unit_test.getTestCount()
|
|
110
|
-
|
|
248
|
+
# Assert that the returned count matches the number of test cases added
|
|
249
|
+
self.assertEqual(count, 2)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|