orionis 0.282.0__py3-none-any.whl → 0.284.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/application.py +2 -7
- orionis/foundation/config/testing/entities/testing.py +25 -0
- orionis/metadata/framework.py +1 -1
- orionis/services/asynchrony/{async_io.py → coroutines.py} +2 -1
- orionis/services/asynchrony/exceptions/__init__.py +0 -0
- orionis/services/asynchrony/exceptions/coroutine_exception.py +26 -0
- orionis/services/environment/dot_env.py +44 -14
- orionis/services/environment/env.py +60 -12
- orionis/services/environment/exceptions/__init__.py +0 -0
- orionis/services/environment/exceptions/value_exception.py +27 -0
- orionis/services/introspection/exceptions/__init__.py +0 -0
- orionis/services/introspection/exceptions/types.py +0 -0
- orionis/services/introspection/helpers/__init__.py +0 -0
- orionis/services/introspection/helpers/functions.py +285 -0
- orionis/services/introspection/reflection.py +216 -0
- orionis/services/parsers/exceptions/__init__.py +0 -0
- orionis/services/parsers/serializer.py +1 -1
- orionis/services/paths/exceptions/__init__.py +0 -0
- orionis/services/paths/exceptions/not_found_exceptions.py +28 -0
- orionis/services/paths/exceptions/path_value_exceptions.py +28 -0
- orionis/services/paths/resolver.py +6 -4
- orionis/services/standard/exceptions/__init__.py +0 -0
- orionis/services/standard/exceptions/path_value_exceptions.py +28 -0
- orionis/services/standard/std.py +4 -3
- orionis/test/entities/test_result.py +14 -1
- orionis/test/exceptions/test_persistence_error.py +34 -0
- orionis/test/exceptions/test_runtime_error.py +26 -0
- orionis/test/exceptions/test_value_error.py +26 -0
- orionis/test/logs/contracts/__init__.py +0 -0
- orionis/test/logs/contracts/history.py +54 -0
- orionis/test/logs/history.py +372 -0
- orionis/test/output/contracts/dumper.py +24 -8
- orionis/test/output/dumper.py +52 -21
- orionis/test/suites/contracts/test_suite.py +27 -13
- orionis/test/suites/contracts/test_unit.py +101 -61
- orionis/test/suites/test_suite.py +57 -25
- orionis/test/suites/test_unit.py +559 -290
- orionis/unittesting.py +13 -1
- {orionis-0.282.0.dist-info → orionis-0.284.0.dist-info}/METADATA +1 -1
- {orionis-0.282.0.dist-info → orionis-0.284.0.dist-info}/RECORD +47 -27
- tests/services/asynchrony/test_async_io.py +3 -2
- tests/services/environment/test_env.py +3 -3
- orionis/test/logs/log_test.py +0 -211
- /orionis/services/parsers/{exception.py → exceptions/exception_parser.py} +0 -0
- {orionis-0.282.0.dist-info → orionis-0.284.0.dist-info}/WHEEL +0 -0
- {orionis-0.282.0.dist-info → orionis-0.284.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.282.0.dist-info → orionis-0.284.0.dist-info}/top_level.txt +0 -0
- {orionis-0.282.0.dist-info → orionis-0.284.0.dist-info}/zip-safe +0 -0
orionis/unittesting.py
CHANGED
@@ -3,6 +3,9 @@ from orionis.test.cases.test_case import TestCase
|
|
3
3
|
from orionis.test.cases.test_sync import SyncTestCase
|
4
4
|
from orionis.test.cases.test_async import AsyncTestCase
|
5
5
|
|
6
|
+
# Import the custom TestHistory class for logging test results
|
7
|
+
from orionis.test.logs.history import TestHistory
|
8
|
+
|
6
9
|
# Import the custom TestResult entity
|
7
10
|
from orionis.test.entities.test_result import TestResult
|
8
11
|
|
@@ -12,6 +15,10 @@ from orionis.test.enums.test_status import TestStatus
|
|
12
15
|
|
13
16
|
# Import custom exception for test failures
|
14
17
|
from orionis.test.exceptions.test_failure_exception import OrionisTestFailureException
|
18
|
+
from orionis.test.exceptions.test_config_exception import OrionisTestConfigException
|
19
|
+
from orionis.test.exceptions.test_persistence_error import OrionisTestPersistenceError
|
20
|
+
from orionis.test.exceptions.test_runtime_error import OrionisTestRuntimeError
|
21
|
+
from orionis.test.exceptions.test_value_error import OrionisTestValueError
|
15
22
|
|
16
23
|
# Import configuration and suite classes for organizing tests
|
17
24
|
from orionis.test.suites.test_suite import Configuration, TestSuite
|
@@ -40,6 +47,10 @@ __all__ = [
|
|
40
47
|
"ExecutionMode",
|
41
48
|
"TestStatus",
|
42
49
|
"OrionisTestFailureException",
|
50
|
+
"OrionisTestConfigException",
|
51
|
+
"OrionisTestPersistenceError",
|
52
|
+
"OrionisTestRuntimeError",
|
53
|
+
"OrionisTestValueError",
|
43
54
|
"Configuration",
|
44
55
|
"TestSuite",
|
45
56
|
"UnitTest",
|
@@ -48,5 +59,6 @@ __all__ = [
|
|
48
59
|
"UnittestTestResult",
|
49
60
|
"UnittestMock",
|
50
61
|
"UnittestMagicMock",
|
62
|
+
"TestHistory",
|
51
63
|
"unittest_mock_patch",
|
52
|
-
]
|
64
|
+
]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
orionis/_application.py,sha256=dMjJ0nFcIIOBGb5zr-tHNzcgTOZ1vJ7iMdFAlqSQph0,9405
|
3
|
-
orionis/application.py,sha256=
|
4
|
-
orionis/unittesting.py,sha256=
|
3
|
+
orionis/application.py,sha256=Off5uOUj-IYvvR8DcqLUoBW_98opWa7MQrtqTr0SZGc,292
|
4
|
+
orionis/unittesting.py,sha256=hVUVkHOggsqXWZKBy-Ht8pcRKrvDmbh_cxpcSaguUac,2224
|
5
5
|
orionis/_container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
orionis/_container/container.py,sha256=0AOqTNwpN_OtWbq9mBI99qfJ7LMkN71y0lP0JWKzut0,18289
|
7
7
|
orionis/_container/container_integrity.py,sha256=vrqZrkJaP6ghbiAzr-nEul9f_lEWVa2nMUSugQXDfWk,10095
|
@@ -222,24 +222,29 @@ orionis/foundation/config/session/enums/same_site_policy.py,sha256=Oo05CJ-5keJWz
|
|
222
222
|
orionis/foundation/config/session/helpers/secret_key.py,sha256=yafjzQ9KVQdXzCQCMthpgizlNCo5F5UTLtAnInipUMk,447
|
223
223
|
orionis/foundation/config/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
224
224
|
orionis/foundation/config/testing/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
225
|
-
orionis/foundation/config/testing/entities/testing.py,sha256=
|
225
|
+
orionis/foundation/config/testing/entities/testing.py,sha256=m_i9jZlOXs_AzNKNNf0a3ByS7jDGaRz_2FO1ScV577Q,11293
|
226
226
|
orionis/foundation/config/testing/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
227
227
|
orionis/foundation/config/testing/enums/test_mode.py,sha256=IbFpauu7J-iSAfmC8jDbmTEYl8eZr-AexL-lyOh8_74,337
|
228
228
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
229
|
-
orionis/metadata/framework.py,sha256=
|
229
|
+
orionis/metadata/framework.py,sha256=osSZr4RKeCdHWazaIlRXgmttatBLyyyvCpq5vO1gbCQ,4960
|
230
230
|
orionis/metadata/package.py,sha256=5p4fxjPpaktsreJ458pAl-Oi1363MWACPQvqXi_N6oA,6704
|
231
231
|
orionis/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
232
232
|
orionis/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
233
233
|
orionis/patterns/singleton/meta_class.py,sha256=YN5mSSQeIX_Gh_TK5HD-ms6IYBTRsRcuzoUtpX-9kYY,2134
|
234
234
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
235
235
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
236
|
-
orionis/services/asynchrony/
|
236
|
+
orionis/services/asynchrony/coroutines.py,sha256=WEggmA0TnoizwtRfWtv0TJfQoHQGBZV0w9PwUsrJ6e4,1137
|
237
|
+
orionis/services/asynchrony/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
238
|
+
orionis/services/asynchrony/exceptions/coroutine_exception.py,sha256=zMdv8akwFbvyXY8Co-9PS7Nk9DEtvwX6X4tW-9MTmsY,1082
|
237
239
|
orionis/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
238
|
-
orionis/services/environment/dot_env.py,sha256=
|
239
|
-
orionis/services/environment/env.py,sha256=
|
240
|
+
orionis/services/environment/dot_env.py,sha256=TrsVB4_XnJ7c0z0FgSkJsHzpqnWvGwdTkhSpP65N3rQ,10115
|
241
|
+
orionis/services/environment/env.py,sha256=CbD1yjGB_RqU8PnAdjr0RN5hmaFTQYby--PA7nYu8Gc,4181
|
240
242
|
orionis/services/environment/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
241
243
|
orionis/services/environment/contracts/env.py,sha256=5g7jppzR5_ln8HlxJu2r0sSxLOkvBfSk3t4x_BKkYYk,1811
|
244
|
+
orionis/services/environment/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
245
|
+
orionis/services/environment/exceptions/value_exception.py,sha256=1eUFPfldsOvLUiZztXTHSxsjM2lVh4cU7ACzsc7_cjs,1257
|
242
246
|
orionis/services/introspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
247
|
+
orionis/services/introspection/reflection.py,sha256=tQtE5WnmdNOpZN8BIyAnfrGHXz7wgy8YE-yaurYfIz8,7763
|
243
248
|
orionis/services/introspection/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
244
249
|
orionis/services/introspection/abstracts/reflect_abstract.py,sha256=JM0jqNIxXAn00K4qYmogGZqNIhg6c3tonAk0wwwyh_c,17859
|
245
250
|
orionis/services/introspection/abstracts/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -252,19 +257,29 @@ orionis/services/introspection/dependencies/entities/__init__.py,sha256=47DEQpj8
|
|
252
257
|
orionis/services/introspection/dependencies/entities/class_dependencies.py,sha256=tLskzBMhrAx4OmZUJXXB_5Z41nhdhtqD4y4m5RfWdJQ,1715
|
253
258
|
orionis/services/introspection/dependencies/entities/method_dependencies.py,sha256=WHypDCpugtsa5ge1nqVlykHbA0Wo_X7XchDwQpGiM0c,1780
|
254
259
|
orionis/services/introspection/dependencies/entities/resolved_dependencies.py,sha256=lrPr-tOx2IPaDlPNyhJ7uXUdnLjKybfntTKTCu7WXJg,1899
|
260
|
+
orionis/services/introspection/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
261
|
+
orionis/services/introspection/exceptions/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
262
|
+
orionis/services/introspection/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
263
|
+
orionis/services/introspection/helpers/functions.py,sha256=-UhQ53o4IU3XwpA2I0e0m8gZaH1DoDKaU_yH2XYqT54,8541
|
255
264
|
orionis/services/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
256
|
-
orionis/services/parsers/
|
257
|
-
orionis/services/parsers/serializer.py,sha256=8ehKJ-ygAXz2sVvU0gA9wuoxslUS2dPFf7X5yy3QTz8,513
|
265
|
+
orionis/services/parsers/serializer.py,sha256=mxWlzqgkoO7EeIr3MZ5gdzQUuSfjqWDMau85PEqlBQY,531
|
258
266
|
orionis/services/parsers/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
259
267
|
orionis/services/parsers/contracts/exception_parser.py,sha256=HcWN7nJrvD7xLREPKEnBhyG30IkkAB7Bx_hGpcfb0ZE,912
|
268
|
+
orionis/services/parsers/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
269
|
+
orionis/services/parsers/exceptions/exception_parser.py,sha256=hKL2-ZzZvC_nuRB0KrdoIzOy_n-hR26jFYABNPnQrwo,3634
|
260
270
|
orionis/services/paths/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
261
|
-
orionis/services/paths/resolver.py,sha256=
|
271
|
+
orionis/services/paths/resolver.py,sha256=Qx_A95FRnnFnjko5XerfrBxOU1j-K8ym1S1J0OWr2RU,3065
|
262
272
|
orionis/services/paths/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
263
273
|
orionis/services/paths/contracts/resolver.py,sha256=v7uTgByE2nQS2ZM_b1rtMzY6HH03MNKfAYQoTswPf9o,1627
|
274
|
+
orionis/services/paths/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
275
|
+
orionis/services/paths/exceptions/not_found_exceptions.py,sha256=pe2tnZUA5BhbdDWv84VvX3eILG0UZp89I0IY0Po5v9Y,894
|
276
|
+
orionis/services/paths/exceptions/path_value_exceptions.py,sha256=kTkILRMqmOPJv3q9H8VvnWqTpCTMKpzxWt3P9pXd43E,891
|
264
277
|
orionis/services/standard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
265
|
-
orionis/services/standard/std.py,sha256=
|
278
|
+
orionis/services/standard/std.py,sha256=Y86ilUyd0BKI3zAzHCFaQ6dVRWwmjFS9gFl1LYY220U,3704
|
266
279
|
orionis/services/standard/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
267
280
|
orionis/services/standard/contracts/std.py,sha256=x9sVir2yg4hve56cCklIdVSr8utruIO_sUdlTNfZ1Ds,3109
|
281
|
+
orionis/services/standard/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
282
|
+
orionis/services/standard/exceptions/path_value_exceptions.py,sha256=sE_zCweo5zzx9UCdo0QYtxiX7IB2AvVAXXS4TPlzcL8,895
|
268
283
|
orionis/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
269
284
|
orionis/services/system/imports.py,sha256=mp8TB-s4gxLQRvl06Tr8XkiWvAPz6OFLZwx-HbcZgnw,4639
|
270
285
|
orionis/services/system/runtime_imports.py,sha256=Ry4sVoQvFm39IyYedZNVyNuCeTRftTWSvFLNrPzfIgE,2366
|
@@ -305,28 +320,33 @@ orionis/test/cases/test_async.py,sha256=YwycimGfUx9-kd_FFO8BZXyVayYwOBOzxbu3WZU_
|
|
305
320
|
orionis/test/cases/test_case.py,sha256=GVN3cxYuE47uPOEqFUiMreLdXjTyqzHjjxfyEM5_D4w,1446
|
306
321
|
orionis/test/cases/test_sync.py,sha256=FekXNQDq5pOQB2YpvP7E9jAqIJH9uZhTMoPz-qx8FO0,742
|
307
322
|
orionis/test/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
308
|
-
orionis/test/entities/test_result.py,sha256=
|
323
|
+
orionis/test/entities/test_result.py,sha256=hz_0NXX5lSVSf4OWhHktrn1kFD43WiL5HugNuHvYRtg,3035
|
309
324
|
orionis/test/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
310
325
|
orionis/test/enums/test_mode.py,sha256=CHstYZ180MEX84AjZIoyA1l8gKxFLp_eciLOj2in57E,481
|
311
326
|
orionis/test/enums/test_status.py,sha256=vNKRmp1lud_ZGTayf3A8wO_0vEYdFABy_oMw-RcEc1c,673
|
312
327
|
orionis/test/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
313
328
|
orionis/test/exceptions/test_config_exception.py,sha256=yJv0JUTkZcF0Z4J8UHtffUipNgwNgmLhaqlOnnXFLyQ,995
|
314
329
|
orionis/test/exceptions/test_failure_exception.py,sha256=pcMhzF1Z5kkJm4yM7gZiQI0SvGjKFixJkRd6VBE03AY,2199
|
330
|
+
orionis/test/exceptions/test_persistence_error.py,sha256=S-5-rwZnxJOcj3rPe_0ajH7UUkLYcB--wi06ZuohoJg,1228
|
331
|
+
orionis/test/exceptions/test_runtime_error.py,sha256=AdYh6Kl-6I2w7-kVtt9AT9q0ArNvXPPmxKOTElQ-7IM,989
|
332
|
+
orionis/test/exceptions/test_value_error.py,sha256=iOMeMOVy7NdqzUH6QpPow9DCDSlHJkbTzXBguJzvfKA,973
|
315
333
|
orionis/test/logs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
316
|
-
orionis/test/logs/
|
334
|
+
orionis/test/logs/history.py,sha256=YxWcY8hJK2eRk8BxBKti8WpWZSvv6g_uwHKAEPGZJAY,13230
|
335
|
+
orionis/test/logs/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
336
|
+
orionis/test/logs/contracts/history.py,sha256=v3vjWmvn73DF_C8Ur-aWdHUMrztX584mXKwYgsYQgCE,1435
|
317
337
|
orionis/test/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
318
|
-
orionis/test/output/dumper.py,sha256=
|
338
|
+
orionis/test/output/dumper.py,sha256=y-6du3n1IU2Cd2MFbMuEiLcpMqEOqENkuAXwMMhcsEI,4287
|
319
339
|
orionis/test/output/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
320
|
-
orionis/test/output/contracts/dumper.py,sha256=
|
340
|
+
orionis/test/output/contracts/dumper.py,sha256=5OqGc4GEXCXX76sCX185giQMyKwwZvlOv3I7tTwV2fQ,1324
|
321
341
|
orionis/test/suites/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
322
|
-
orionis/test/suites/test_suite.py,sha256=
|
323
|
-
orionis/test/suites/test_unit.py,sha256=
|
342
|
+
orionis/test/suites/test_suite.py,sha256=fdVmC56PJfWDuYeekY7oN-04AEHMqxwLI5mZNJAuOZI,5261
|
343
|
+
orionis/test/suites/test_unit.py,sha256=ZkpRyUEHsxnbto3FBmvPfFHHRyOgv4NBIcS2LF1-Y_s,49374
|
324
344
|
orionis/test/suites/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
325
|
-
orionis/test/suites/contracts/test_suite.py,sha256=
|
326
|
-
orionis/test/suites/contracts/test_unit.py,sha256=
|
345
|
+
orionis/test/suites/contracts/test_suite.py,sha256=eluzYwkNBbKjxYStj_tHN_Fm3YDPpGQdqMu5eiluh-E,1059
|
346
|
+
orionis/test/suites/contracts/test_unit.py,sha256=l1LQllODyvcSByXMl1lGrUkoLsXbBHZZLWZI4A-mlQg,5881
|
327
347
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
328
348
|
orionis/test/view/index.html,sha256=U4XYO4hA-mAJCK1gcVRgIysmISK3g3Vgi2ntLofFAhE,6592
|
329
|
-
orionis-0.
|
349
|
+
orionis-0.284.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
330
350
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
331
351
|
tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
332
352
|
tests/example/test_example.py,sha256=DUZU6lWVFsyHtBEXx0cBxMrSCpOtAOL3PUoi9-tXAas,583
|
@@ -388,9 +408,9 @@ tests/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
|
|
388
408
|
tests/patterns/singleton/test_singleton.py,sha256=eShiB9gD7J9p0DQw0qjtU5rQXfHxw7zkGds-1EC4d_o,609
|
389
409
|
tests/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
390
410
|
tests/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
391
|
-
tests/services/asynchrony/test_async_io.py,sha256=
|
411
|
+
tests/services/asynchrony/test_async_io.py,sha256=UzEgg1ZRF78eoGSDysTJ_vEubBX3HIvacFs_TCEIEO8,1642
|
392
412
|
tests/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
393
|
-
tests/services/environment/test_env.py,sha256=
|
413
|
+
tests/services/environment/test_env.py,sha256=Fg4NejwmTdTTj4FezrWkJc639CzodGEgmdFa4EPlmqk,7084
|
394
414
|
tests/services/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
395
415
|
tests/services/inspection/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
396
416
|
tests/services/inspection/dependencies/test_reflect_dependencies.py,sha256=z0C9KkhV27Y7jKpLSCN9XCmHbjJDCPbBb7NkRFs3oMI,5803
|
@@ -424,8 +444,8 @@ tests/support/inspection/fakes/fake_reflection_instance_with_abstract.py,sha256=
|
|
424
444
|
tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
425
445
|
tests/testing/test_testing_result.py,sha256=54QDn6_v9feIcDcA6LPXcvYhlt_X8JqLGTYWS9XjKXM,3029
|
426
446
|
tests/testing/test_testing_unit.py,sha256=MeVL4gc4cGRPXdVOOKJx6JPKducrZ8cN7F52Iiciixg,5443
|
427
|
-
orionis-0.
|
428
|
-
orionis-0.
|
429
|
-
orionis-0.
|
430
|
-
orionis-0.
|
431
|
-
orionis-0.
|
447
|
+
orionis-0.284.0.dist-info/METADATA,sha256=3jH5mr5d23B7EkJMNyUiiJtksjWodinm5BaXiArsUlM,4772
|
448
|
+
orionis-0.284.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
449
|
+
orionis-0.284.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
450
|
+
orionis-0.284.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
451
|
+
orionis-0.284.0.dist-info/RECORD,,
|
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
|
-
from orionis.services.asynchrony.
|
2
|
+
from orionis.services.asynchrony.coroutines import run_coroutine
|
3
|
+
from orionis.services.asynchrony.exceptions.coroutine_exception import OrionisCoroutineException
|
3
4
|
from orionis.unittesting import TestCase
|
4
5
|
|
5
6
|
class TestsAsyncIO(TestCase):
|
@@ -35,5 +36,5 @@ class TestsAsyncIO(TestCase):
|
|
35
36
|
def sample_no_coroutine():
|
36
37
|
return "Hello, World!"
|
37
38
|
|
38
|
-
with self.assertRaises(
|
39
|
+
with self.assertRaises(OrionisCoroutineException):
|
39
40
|
run_coroutine(sample_no_coroutine())
|
@@ -14,7 +14,7 @@ class TestEnv(TestCase):
|
|
14
14
|
"""
|
15
15
|
with unittest_mock_patch.object(DotEnv, 'get', return_value='test_value') as mock_get:
|
16
16
|
result = Env.get('TEST_KEY')
|
17
|
-
mock_get.assert_called_once_with('TEST_KEY', None)
|
17
|
+
mock_get.assert_called_once_with('TEST_KEY', None, False)
|
18
18
|
self.assertEqual(result, 'test_value')
|
19
19
|
|
20
20
|
async def testGetMethodWithDefault(self):
|
@@ -24,7 +24,7 @@ class TestEnv(TestCase):
|
|
24
24
|
"""
|
25
25
|
with unittest_mock_patch.object(DotEnv, 'get', return_value='default_value') as mock_get:
|
26
26
|
result = Env.get('NON_EXISTENT_KEY', 'default_value')
|
27
|
-
mock_get.assert_called_once_with('NON_EXISTENT_KEY', 'default_value')
|
27
|
+
mock_get.assert_called_once_with('NON_EXISTENT_KEY', 'default_value', False)
|
28
28
|
self.assertEqual(result, 'default_value')
|
29
29
|
|
30
30
|
async def testSetMethod(self):
|
@@ -34,7 +34,7 @@ class TestEnv(TestCase):
|
|
34
34
|
"""
|
35
35
|
with unittest_mock_patch.object(DotEnv, 'set', return_value=True) as mock_set:
|
36
36
|
result = Env.set('TEST_KEY', 'test_value')
|
37
|
-
mock_set.assert_called_once_with('TEST_KEY', 'test_value')
|
37
|
+
mock_set.assert_called_once_with('TEST_KEY', 'test_value', False)
|
38
38
|
self.assertTrue(result)
|
39
39
|
|
40
40
|
async def testUnsetMethod(self):
|
orionis/test/logs/log_test.py
DELETED
@@ -1,211 +0,0 @@
|
|
1
|
-
import json
|
2
|
-
import sqlite3
|
3
|
-
from pathlib import Path
|
4
|
-
from typing import Dict, List, Tuple, Optional
|
5
|
-
from contextlib import closing
|
6
|
-
from orionis.services.environment.env import Env
|
7
|
-
|
8
|
-
class LogTest:
|
9
|
-
"""
|
10
|
-
A utility class for managing test execution reports using a local SQLite database.
|
11
|
-
|
12
|
-
This class provides methods to create a report table, insert new test reports,
|
13
|
-
retrieve stored reports, reset the database, and close the connection.
|
14
|
-
|
15
|
-
Each test report is stored as a JSON string along with individual statistical fields
|
16
|
-
for easier filtering and analysis.
|
17
|
-
|
18
|
-
Attributes
|
19
|
-
----------
|
20
|
-
TABLE_NAME : str
|
21
|
-
The name of the database table where reports are stored.
|
22
|
-
DB_NAME : str
|
23
|
-
The filename of the SQLite database.
|
24
|
-
FIELDS : List[str]
|
25
|
-
List of expected keys in the report dictionary.
|
26
|
-
_conn : sqlite3.Connection or None
|
27
|
-
SQLite database connection instance.
|
28
|
-
"""
|
29
|
-
|
30
|
-
TABLE_NAME = "reportes"
|
31
|
-
DB_NAME = "tests.sqlite"
|
32
|
-
FIELDS = [
|
33
|
-
"json", "total_tests", "passed", "failed", "errors",
|
34
|
-
"skipped", "total_time", "success_rate", "timestamp"
|
35
|
-
]
|
36
|
-
|
37
|
-
def __init__(self, test_path_root: Optional[str] = None) -> None:
|
38
|
-
"""
|
39
|
-
Initialize the LogTest instance and configure the database path.
|
40
|
-
|
41
|
-
Parameters
|
42
|
-
----------
|
43
|
-
test_path_root : str, optional
|
44
|
-
Absolute or relative path to the directory where the SQLite file will be stored.
|
45
|
-
If None, the path is derived from the current file location.
|
46
|
-
|
47
|
-
Raises
|
48
|
-
------
|
49
|
-
ValueError
|
50
|
-
If the path cannot be resolved correctly.
|
51
|
-
"""
|
52
|
-
if test_path_root:
|
53
|
-
db_dir = Path(test_path_root).resolve()
|
54
|
-
else:
|
55
|
-
env_path = Env.get("TEST_PATH_ROOT")
|
56
|
-
if env_path:
|
57
|
-
db_dir = Path(env_path).resolve()
|
58
|
-
else:
|
59
|
-
db_dir = Path(__file__).resolve().parent
|
60
|
-
|
61
|
-
dbPath = db_dir.joinpath(self.DB_NAME)
|
62
|
-
Env.set("TEST_PATH_ROOT", str(dbPath).replace("\\", "\\\\"))
|
63
|
-
self._conn: Optional[sqlite3.Connection] = None
|
64
|
-
|
65
|
-
def __connect(self) -> None:
|
66
|
-
"""
|
67
|
-
Establish a connection to the SQLite database.
|
68
|
-
|
69
|
-
Raises
|
70
|
-
------
|
71
|
-
ConnectionError
|
72
|
-
If the connection to the database cannot be established.
|
73
|
-
"""
|
74
|
-
if self._conn is None:
|
75
|
-
try:
|
76
|
-
self._conn = sqlite3.connect(Env.get("TEST_PATH_ROOT"))
|
77
|
-
except sqlite3.Error as e:
|
78
|
-
raise ConnectionError(f"Database connection error: {e}")
|
79
|
-
|
80
|
-
def createTableIfNotExists(self) -> None:
|
81
|
-
"""
|
82
|
-
Create the 'reportes' table if it does not already exist.
|
83
|
-
|
84
|
-
The table includes fields for the full JSON report and individual
|
85
|
-
statistics for querying and filtering.
|
86
|
-
|
87
|
-
Raises
|
88
|
-
------
|
89
|
-
RuntimeError
|
90
|
-
If table creation fails due to a database error.
|
91
|
-
"""
|
92
|
-
self.__connect()
|
93
|
-
try:
|
94
|
-
with closing(self._conn.cursor()) as cursor:
|
95
|
-
cursor.execute(f'''
|
96
|
-
CREATE TABLE IF NOT EXISTS {self.TABLE_NAME} (
|
97
|
-
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
98
|
-
json TEXT NOT NULL,
|
99
|
-
total_tests INTEGER,
|
100
|
-
passed INTEGER,
|
101
|
-
failed INTEGER,
|
102
|
-
errors INTEGER,
|
103
|
-
skipped INTEGER,
|
104
|
-
total_time REAL,
|
105
|
-
success_rate REAL,
|
106
|
-
timestamp TEXT
|
107
|
-
)
|
108
|
-
''')
|
109
|
-
self._conn.commit()
|
110
|
-
except sqlite3.Error as e:
|
111
|
-
raise RuntimeError(f"Failed to create table: {e}")
|
112
|
-
|
113
|
-
def insertReport(self, report: Dict) -> None:
|
114
|
-
"""
|
115
|
-
Insert a test report into the database.
|
116
|
-
|
117
|
-
Parameters
|
118
|
-
----------
|
119
|
-
report : dict
|
120
|
-
Dictionary containing test statistics and metadata.
|
121
|
-
|
122
|
-
Required keys:
|
123
|
-
- total_tests : int
|
124
|
-
- passed : int
|
125
|
-
- failed : int
|
126
|
-
- errors : int
|
127
|
-
- skipped : int
|
128
|
-
- total_time : float
|
129
|
-
- success_rate : float
|
130
|
-
- timestamp : str (ISO format)
|
131
|
-
|
132
|
-
Raises
|
133
|
-
------
|
134
|
-
ValueError
|
135
|
-
If required keys are missing from the report.
|
136
|
-
RuntimeError
|
137
|
-
If insertion into the database fails.
|
138
|
-
"""
|
139
|
-
self.__connect()
|
140
|
-
missing = [key for key in self.FIELDS if key != "json" and key not in report]
|
141
|
-
if missing:
|
142
|
-
raise ValueError(f"Missing report fields: {missing}")
|
143
|
-
|
144
|
-
try:
|
145
|
-
with closing(self._conn.cursor()) as cursor:
|
146
|
-
cursor.execute(f'''
|
147
|
-
INSERT INTO {self.TABLE_NAME} (
|
148
|
-
json, total_tests, passed, failed, errors,
|
149
|
-
skipped, total_time, success_rate, timestamp
|
150
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
151
|
-
''', (
|
152
|
-
json.dumps(report),
|
153
|
-
report["total_tests"],
|
154
|
-
report["passed"],
|
155
|
-
report["failed"],
|
156
|
-
report["errors"],
|
157
|
-
report["skipped"],
|
158
|
-
report["total_time"],
|
159
|
-
report["success_rate"],
|
160
|
-
report["timestamp"]
|
161
|
-
))
|
162
|
-
self._conn.commit()
|
163
|
-
except sqlite3.Error as e:
|
164
|
-
raise RuntimeError(f"Failed to insert report: {e}")
|
165
|
-
|
166
|
-
def getReports(self) -> List[Tuple]:
|
167
|
-
"""
|
168
|
-
Retrieve all test reports from the database.
|
169
|
-
|
170
|
-
Returns
|
171
|
-
-------
|
172
|
-
List[Tuple]
|
173
|
-
A list of tuples representing each row in the `reportes` table.
|
174
|
-
|
175
|
-
Raises
|
176
|
-
------
|
177
|
-
RuntimeError
|
178
|
-
If retrieval fails due to a database error.
|
179
|
-
"""
|
180
|
-
self.__connect()
|
181
|
-
try:
|
182
|
-
with closing(self._conn.cursor()) as cursor:
|
183
|
-
cursor.execute(f'SELECT * FROM {self.TABLE_NAME}')
|
184
|
-
return cursor.fetchall()
|
185
|
-
except sqlite3.Error as e:
|
186
|
-
raise RuntimeError(f"Failed to retrieve reports: {e}")
|
187
|
-
|
188
|
-
def resetDatabase(self) -> None:
|
189
|
-
"""
|
190
|
-
Drop the `reportes` table, effectively clearing the report history.
|
191
|
-
|
192
|
-
Raises
|
193
|
-
------
|
194
|
-
RuntimeError
|
195
|
-
If table deletion fails.
|
196
|
-
"""
|
197
|
-
self.__connect()
|
198
|
-
try:
|
199
|
-
with closing(self._conn.cursor()) as cursor:
|
200
|
-
cursor.execute(f'DROP TABLE IF EXISTS {self.TABLE_NAME}')
|
201
|
-
self._conn.commit()
|
202
|
-
except sqlite3.Error as e:
|
203
|
-
raise RuntimeError(f"Failed to reset database: {e}")
|
204
|
-
|
205
|
-
def close(self) -> None:
|
206
|
-
"""
|
207
|
-
Close the SQLite database connection gracefully.
|
208
|
-
"""
|
209
|
-
if self._conn:
|
210
|
-
self._conn.close()
|
211
|
-
self._conn = None
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|