orionis 0.407.0__py3-none-any.whl → 0.409.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.
Files changed (37) hide show
  1. orionis/container/container.py +11 -9
  2. orionis/container/enums/lifetimes.py +2 -0
  3. orionis/container/validators/__init__.py +21 -0
  4. orionis/metadata/framework.py +1 -1
  5. orionis/services/log/contracts/log_service.py +56 -4
  6. orionis/services/log/handlers/filename.py +20 -12
  7. orionis/services/log/handlers/size_rotating.py +11 -3
  8. orionis/services/log/handlers/timed_rotating.py +11 -3
  9. orionis/services/log/log_service.py +122 -72
  10. orionis/services/paths/contracts/resolver.py +0 -1
  11. {orionis-0.407.0.dist-info → orionis-0.409.0.dist-info}/METADATA +1 -1
  12. {orionis-0.407.0.dist-info → orionis-0.409.0.dist-info}/RECORD +37 -35
  13. tests/container/context/test_manager.py +15 -5
  14. tests/container/context/test_scope.py +12 -4
  15. tests/container/entities/test_binding.py +130 -21
  16. tests/container/enums/test_lifetimes.py +52 -18
  17. tests/container/facades/test_facade.py +29 -12
  18. tests/container/providers/test_providers.py +17 -10
  19. tests/container/resolver/test_resolver.py +14 -7
  20. tests/container/test_container.py +226 -71
  21. tests/container/test_singleton.py +43 -24
  22. tests/container/test_thread_safety.py +28 -156
  23. tests/container/validators/test_implements.py +59 -13
  24. tests/container/validators/test_is_abstract_class.py +73 -25
  25. tests/container/validators/test_is_callable.py +55 -26
  26. tests/container/validators/test_is_concrete_class.py +80 -17
  27. tests/container/validators/test_is_instance.py +67 -22
  28. tests/container/validators/test_is_not_subclass.py +28 -95
  29. tests/container/validators/test_is_subclass.py +84 -21
  30. tests/container/validators/test_is_valid_alias.py +46 -12
  31. tests/container/validators/test_lifetime.py +45 -14
  32. tests/services/log/__init__.py +0 -0
  33. tests/services/log/test_log.py +97 -0
  34. {orionis-0.407.0.dist-info → orionis-0.409.0.dist-info}/WHEEL +0 -0
  35. {orionis-0.407.0.dist-info → orionis-0.409.0.dist-info}/licenses/LICENCE +0 -0
  36. {orionis-0.407.0.dist-info → orionis-0.409.0.dist-info}/top_level.txt +0 -0
  37. {orionis-0.407.0.dist-info → orionis-0.409.0.dist-info}/zip-safe +0 -0
@@ -114,7 +114,7 @@ orionis/console/output/contracts/console.py,sha256=phaQhCLWa81MLzB5ydOSaUfEIdDq7
114
114
  orionis/console/output/enums/__init__.py,sha256=LAaAxg-DpArCjf_jqZ0_9s3p8899gntDYkSU_ppTdC8,66
115
115
  orionis/console/output/enums/styles.py,sha256=6a4oQCOBOKMh2ARdeq5GlIskJ3wjiylYmh66tUKKmpQ,4053
116
116
  orionis/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
- orionis/container/container.py,sha256=mnhvm_PZEyHik1rQYBkSrvF-_40hMuWk5mBlRRaHqZU,23174
117
+ orionis/container/container.py,sha256=ICKSeaXA_IL15jV6Ofe1wIb1QyX-F-8oaGuk7hj955I,22773
118
118
  orionis/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
119
  orionis/container/context/manager.py,sha256=9yODWkHBoJ2kgJZ5ONLqcEcex50vaWuMcxsvmDgnQo4,2437
120
120
  orionis/container/context/scope.py,sha256=jhRGGO6oZcWNa3eCaurGwPngTUsCuMm7asIa24d6q3Q,962
@@ -125,7 +125,7 @@ orionis/container/contracts/service_provider.py,sha256=qYBWCw55pudk8QnbjX0_FRKsz
125
125
  orionis/container/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
126
126
  orionis/container/entities/binding.py,sha256=sY0ioHbRcjp9TSQjfrFHxkO3vRn_VOrbHK62_QEGe1U,3717
127
127
  orionis/container/enums/__init__.py,sha256=BRpTC9sY0dWlGsGfE96uZ8TZqU28kXTP0HEH8DdC9c8,65
128
- orionis/container/enums/lifetimes.py,sha256=4TNXtj3rqQRuJ0XRmJN1yBD0hIXrI2A1I9gmmRDxfaA,1043
128
+ orionis/container/enums/lifetimes.py,sha256=ntvF_cmmOWA0ujyxwdUmgJK7O6M9kCYlmrfcEmhwarM,1047
129
129
  orionis/container/exceptions/__init__.py,sha256=uJU8ncq66d26tWRFZfxBzs6AyYu5eIuDe-N3mcFg4vw,354
130
130
  orionis/container/exceptions/attribute.py,sha256=ysYKvXfunH-bywK_e02inY94s8aZ3vUZA6jATbDcQmk,480
131
131
  orionis/container/exceptions/exception.py,sha256=goTDEwC70xTMD2qppN8KV-xyR0Nps218OD4D1LZ2-3s,470
@@ -137,7 +137,7 @@ orionis/container/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
137
137
  orionis/container/providers/service_provider.py,sha256=j0-8p7210YKb1HhI9Bug1TZ165rcrpdyEGenw-dfCPY,1946
138
138
  orionis/container/resolver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
139
139
  orionis/container/resolver/resolver.py,sha256=8mTouPo9hhMwz1CxZcqmzZlg3vHoLCs5HEWtreZ-KWk,23523
140
- orionis/container/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
140
+ orionis/container/validators/__init__.py,sha256=iJ_cY8U0EkpnZOU4_LANGKHFkvHeV0vH5bjbYr1fdSg,609
141
141
  orionis/container/validators/implements.py,sha256=xDXK7yhG5GGGRT9Mj1UbbVrcVTgifmjFZdaAJG4Ke8o,3110
142
142
  orionis/container/validators/is_abstract_class.py,sha256=vJqUPn610YZS0sEkV8c_gPZskIgWmFHjg3D3MF2OTs8,1141
143
143
  orionis/container/validators/is_callable.py,sha256=ZW-e3ljJGXbD9GUEfPNqVcyBbpVHFlfYaTf9rSmJmBk,824
@@ -258,7 +258,7 @@ orionis/foundation/providers/progress_bar_provider.py,sha256=WW3grNgH-yV2meSSTeO
258
258
  orionis/foundation/providers/testing_provider.py,sha256=iJSN2RIChbYIL-1ue6vmPmDMCSrvERDkti4Er9MPiLA,1102
259
259
  orionis/foundation/providers/workers_provider.py,sha256=kiQjQRyUEyiBX2zcbF_KmqRgvc7Bvxsvg5oMtIvYniM,1075
260
260
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
261
- orionis/metadata/framework.py,sha256=sxmczNtZqJR0Rs5IYehyU1JvfxRfRsuHwLo1m8wI70g,4960
261
+ orionis/metadata/framework.py,sha256=gDHNRNaGwPg6hB5oPpbTWnhoaub6TUsKO_Q5kDfk_kE,4960
262
262
  orionis/metadata/package.py,sha256=tqLfBRo-w1j_GN4xvzUNFyweWYFS-qhSgAEc-AmCH1M,5452
263
263
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
264
264
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -328,19 +328,19 @@ orionis/services/introspection/modules/contracts/reflection.py,sha256=YLqKg5Ehad
328
328
  orionis/services/introspection/objects/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
329
329
  orionis/services/introspection/objects/types.py,sha256=vNKWc2b7K-X7B2X8RCimgAWQqbQlVT-aL24nUB8t_yQ,6343
330
330
  orionis/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
331
- orionis/services/log/log_service.py,sha256=IrqAXR4uMlR1kjvh6quPUgf_wJdR9oPe_sQKSoQMQCE,8148
331
+ orionis/services/log/log_service.py,sha256=DsbU8HVf035HxumFm4Xjo7kYhuXf0D57Xhuz7uzKhGo,11344
332
332
  orionis/services/log/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
333
- orionis/services/log/contracts/log_service.py,sha256=ky7T2EIvJQMV0tKMSwFsUxDBoA24xYro8ChC6-7iUtY,546
333
+ orionis/services/log/contracts/log_service.py,sha256=nTJaj32CbtAEliEdCa6fx-hekAHYEka-hEFiPkven6o,1691
334
334
  orionis/services/log/exceptions/__init__.py,sha256=PPn_LBV3U-0Yi69ZLDQmlkbmlL1iLTleLw-s88Ipg9o,84
335
335
  orionis/services/log/exceptions/runtime.py,sha256=LnaK0w0WlgxtZ9Zjn9RYIgp6fbQZmXZ_1fy9dkuA2jQ,468
336
336
  orionis/services/log/handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
337
- orionis/services/log/handlers/filename.py,sha256=nq9eqwFt60oVA5CSsIwO-At37mQgxTd08aYSOpvnIrs,1989
338
- orionis/services/log/handlers/size_rotating.py,sha256=oE2dQ7GWeKRq5X4j6030mg_ZKZ1urUFXY-ZOG6lSquI,690
339
- orionis/services/log/handlers/timed_rotating.py,sha256=9wPf-dSt3E-KG8BGusnMp3gXu2oy_RWGGkqDm9zO5FU,701
337
+ orionis/services/log/handlers/filename.py,sha256=2BSW8_gQ-1GKccqC7FIGh_QnIxHgi2e-CarL2C0DGI8,2477
338
+ orionis/services/log/handlers/size_rotating.py,sha256=SLg7r-XW1NWyVxN8wJxeI8jhypzdXw_jq2zg5uy3iaQ,1131
339
+ orionis/services/log/handlers/timed_rotating.py,sha256=UJicPwHcIVl2FPRPjuiKwH3-zuiPG1YV7UYLLMPm4To,1128
340
340
  orionis/services/paths/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
341
341
  orionis/services/paths/resolver.py,sha256=9PXTawN3QV142Fhe7C2EqXyAlf984Hc05A_M2cqXAps,3217
342
342
  orionis/services/paths/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
343
- orionis/services/paths/contracts/resolver.py,sha256=DzaA0ThOJXHh0xkQigayPPAvpheknulz_xCdezfuCQA,1290
343
+ orionis/services/paths/contracts/resolver.py,sha256=--kmKOX0m9Wt1ZkWUdFOJIJ58c4--KlD9NweH7UR0G4,1261
344
344
  orionis/services/paths/exceptions/__init__.py,sha256=r5b4D4XWNK07zLtqaXBk_PNYszScqbp_8kUN37cOk4E,184
345
345
  orionis/services/paths/exceptions/exception.py,sha256=cK-TbUT02X2lvbAP4yFdfHx4S45wBOcYl3_tiWd67UM,472
346
346
  orionis/services/paths/exceptions/file.py,sha256=bsK0QoXwRFyDeHvITxwmgaBuwiO2eoRUhRzNizmX1No,475
@@ -428,38 +428,38 @@ orionis/test/validators/web_report.py,sha256=-h3Fe9jY93_kzUhd2NBIqEfCcBpu-8Ei9x3
428
428
  orionis/test/validators/workers.py,sha256=LGffDKtK6SKixFKzIYPQpI5aFeQPAGXpv_LUtmEu6g4,1102
429
429
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
430
430
  orionis/test/view/render.py,sha256=3ICz68l-WF3BtnYqH5m-ktN9UD00MELMbmMnyJDV74A,4768
431
- orionis-0.407.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
431
+ orionis-0.409.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
432
432
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
433
433
  tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
434
- tests/container/test_container.py,sha256=INLMHbcQzB7SQi6W0xO_nKCMUw50VK7NQMPRDuYnU5Q,10781
435
- tests/container/test_singleton.py,sha256=ZLFtoR0VJa_PJVp9Gzh9NdhvpquTAqxlGYr_CZ90Bbg,3741
436
- tests/container/test_thread_safety.py,sha256=BfFMKggQmRqfVo1KdGVP6jD3wP1Pqoh0FEEmNjI4GTw,7934
434
+ tests/container/test_container.py,sha256=asv8TkkupVoex6SWod74NBl4dSs7wb9mLmu_glNdNy8,14815
435
+ tests/container/test_singleton.py,sha256=GkwFaLtRvOQCNMpaCXfQiPu6tJWRm3gkDaJ0vzQn1ko,4689
436
+ tests/container/test_thread_safety.py,sha256=0gn6kawiSMSMP1iTGWZP-4cQcO2RWXo9Ay4skcihKEM,3740
437
437
  tests/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
438
- tests/container/context/test_manager.py,sha256=jj7c7TPUU8EkvI0I4uiWgts-Ahl53rcHd-H307KiDOk,862
439
- tests/container/context/test_scope.py,sha256=xqRvoon0FY2ECymuAqrTGdpcHiziZ8RtxifG6M8zY64,769
438
+ tests/container/context/test_manager.py,sha256=QfzhzkK5LFmtI7AEE-dzceBROTo7VNnQfL3EGgYqK64,1354
439
+ tests/container/context/test_scope.py,sha256=2ykGAmey5xu3cXASseIiOHosJ4QwABbQqRU3_WahO8c,1221
440
440
  tests/container/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
441
- tests/container/entities/test_binding.py,sha256=ESM8nk0_YNnCSmEqDO9bH6FfhofyCQfbV2z1Uu7cwBs,4754
441
+ tests/container/entities/test_binding.py,sha256=AZ5jUF0MMwTXueevZnYbLpF73g7qrAcvx51jlKMfqkg,9708
442
442
  tests/container/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
443
- tests/container/enums/test_lifetimes.py,sha256=tLiWZCeMtcvhX9mCfn5Ug2kDeVdjf5f-CPzQsaAsMB8,2479
443
+ tests/container/enums/test_lifetimes.py,sha256=JFb4q1rgo10C5ibQ6LS-776NevxCMNLSq_cd7D1O8Ps,3511
444
444
  tests/container/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
445
- tests/container/facades/test_facade.py,sha256=EBhxxecOYZxQCaoDe7fz11jm4920w-9FFZDaA6eSz9I,2503
445
+ tests/container/facades/test_facade.py,sha256=aCy0S6YaaiswGoodJEAhNkqJrMaEQL-CcWh2AgXMvvQ,2938
446
446
  tests/container/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
447
447
  tests/container/mocks/mock_complex_classes.py,sha256=DKBD2Wd8n_dDPXRo-HepEOy3L6w7ACfFpeQKVuIFlRA,15026
448
448
  tests/container/mocks/mock_simple_classes.py,sha256=rvHFEYAzEnLvL79WWS-YCNwIEPsx14FEo2v3wrdibzE,841
449
449
  tests/container/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
450
- tests/container/providers/test_providers.py,sha256=4BujCYLHoesG5jpArknplBi0rqiA4DAKcB_sjGWcFFw,1914
450
+ tests/container/providers/test_providers.py,sha256=qGh2vtrLYp_S7u3U64I22Fzr86NsDZw0tXtJioSDdms,2149
451
451
  tests/container/resolver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
452
- tests/container/resolver/test_resolver.py,sha256=_QGfGYiA-DubioBkuH6HOFBnrFB6aS_ughYFurKT_qk,2175
452
+ tests/container/resolver/test_resolver.py,sha256=6p3XMIme53QLEbPpTBfs3dLzESMK_5fGYbr2TNPolTI,2313
453
453
  tests/container/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
454
- tests/container/validators/test_implements.py,sha256=B85sAAqzoIbI-i4ZsjDm1pTGsFbLJQJFJKYbKUvh0Mc,5025
455
- tests/container/validators/test_is_abstract_class.py,sha256=9QqKHZ3pKVsjvvsPn3vkiwL6bDdB0GWCsxrWaRHDoRI,4464
456
- tests/container/validators/test_is_callable.py,sha256=d8ZsPFriZtoqNPlZIU-1bgwy6sqXc5-swahjgEoP7ds,2284
457
- tests/container/validators/test_is_concrete_class.py,sha256=76gDFaXKD0LSiEro-KPsjERfVKQYiFQ_dSqeSidG6z8,3638
458
- tests/container/validators/test_is_instance.py,sha256=wanHMUebe8MxW0TuK_mwg63q_EsVbOm6ixvMNuNMH3Q,3540
459
- tests/container/validators/test_is_not_subclass.py,sha256=t1spircP5AYQbaQyoKT8oXflSAxoA0FgF7PWbCw9xAg,3996
460
- tests/container/validators/test_is_subclass.py,sha256=iid5n1B6GDYqwtSlmRG0lJBH6gXeZ4legcOqiAM8EL0,3750
461
- tests/container/validators/test_is_valid_alias.py,sha256=mRkdDLHZuM0ogJn38lV35gwnxXP3J-a-1EWaoij-qUM,3957
462
- tests/container/validators/test_lifetime.py,sha256=2iOO8Leo7VHb9ZrbiwaTptFC4hHv3QStomcFMO3qSH0,3191
454
+ tests/container/validators/test_implements.py,sha256=XquLuD3WGRPfSj2Jfd5uBTV48h8FPU0E-cJeEjZohEo,6759
455
+ tests/container/validators/test_is_abstract_class.py,sha256=_xW8NrnrmG5tKocaGs83r118S-t-YbaMTal-cWXtM0k,6868
456
+ tests/container/validators/test_is_callable.py,sha256=VbQNKZ4sVQeWnqAIZ7R2E-6uFnT78Gcdaxf7Gq-qWlw,3767
457
+ tests/container/validators/test_is_concrete_class.py,sha256=bD8F_fbeWLf61I-7sCeapugvXl1-oSx8iVawuYF4tY4,6362
458
+ tests/container/validators/test_is_instance.py,sha256=skRLexi-31IxJrW0nSYwTW84iqXvi0IVqxHm0X-YfC0,5255
459
+ tests/container/validators/test_is_not_subclass.py,sha256=1OCPtCRuysm7OKL6XhuXJPZQPumtZZqfoiYtC4HzNFA,1983
460
+ tests/container/validators/test_is_subclass.py,sha256=0Uc8uIR69ZX7G5Nrex0LMQXrueTdncdDxfQoila3h3U,5834
461
+ tests/container/validators/test_is_valid_alias.py,sha256=egVf6IfSXurIdu8hKo03rwsM1P-bxGOFd1_9JjDHJIk,5657
462
+ tests/container/validators/test_lifetime.py,sha256=5PequjXAcIcp0Q4TIki7THSU31XftGpI0u1mVGqHmpU,4692
463
463
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
464
464
  tests/example/test_example.py,sha256=XJEcsro3vCO5m4zvMiWUGphvd0C7oIkBtUfQgTDsdUU,25568
465
465
  tests/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -539,6 +539,8 @@ tests/services/inspection/reflection/test_reflection_instance.py,sha256=xaCLsTbl
539
539
  tests/services/inspection/reflection/test_reflection_module.py,sha256=NbHJT0BokFjgC4Jw6Ax0YP5QVircXmwC6uAO33CeIeM,19765
540
540
  tests/services/inspection/reflection/mock/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
541
541
  tests/services/inspection/reflection/mock/fake_reflect_instance.py,sha256=iqWoT6tNym3OijK0wcF0iKMp3HTlq5kAoztzC4fdTlM,18595
542
+ tests/services/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
543
+ tests/services/log/test_log.py,sha256=fCI2gX9-YN1z-xPMwIlggUFHeBlqfUajQoyQu4dmao0,2868
542
544
  tests/services/path/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
543
545
  tests/services/path/test_services_resolver.py,sha256=aWSSFgV_D10t3llUeCWEBB1mF3dWrZbFn5XbJy2sQME,3903
544
546
  tests/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -559,8 +561,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=nTNrvJkMSPx_aopEQ9
559
561
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
560
562
  tests/testing/test_testing_result.py,sha256=aWOOJiHji_U7gcJHbDukgMmfBEEQCLQdyqpXJD5q4BE,4643
561
563
  tests/testing/test_testing_unit.py,sha256=Krz0Bw1toI9qvLtKtYe_slNvi7fYmZbHK1i4DRPMfUM,7952
562
- orionis-0.407.0.dist-info/METADATA,sha256=x5LuteMx1-CBNPvZWGQE24vZVBlrwoXIfo-QOGJDJFw,4772
563
- orionis-0.407.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
564
- orionis-0.407.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
565
- orionis-0.407.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
566
- orionis-0.407.0.dist-info/RECORD,,
564
+ orionis-0.409.0.dist-info/METADATA,sha256=iEyS0RyKrDuwXTfiq4cbNkO2eEQtShI75BY8NrSTDJg,4772
565
+ orionis-0.409.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
566
+ orionis-0.409.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
567
+ orionis-0.409.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
568
+ orionis-0.409.0.dist-info/RECORD,,
@@ -2,14 +2,23 @@ from orionis.container.context.manager import ScopeManager
2
2
  from orionis.test.cases.asynchronous import AsyncTestCase
3
3
 
4
4
  class TestScopeManagerMethods(AsyncTestCase):
5
- """
6
- Test suite to ensure all required methods exist in ScopeManager and their signatures are preserved.
7
- """
8
5
 
9
6
  def testMethodsExist(self):
10
7
  """
11
- Verify that all required methods exist in the ScopeManager class.
8
+ Checks that all required methods are present in the ScopeManager class.
9
+
10
+ This test verifies the existence of a predefined list of methods that are
11
+ essential for the correct functioning of ScopeManager. The methods checked
12
+ include initialization, item access, containment, clearing, and context
13
+ management methods.
14
+
15
+ Returns
16
+ -------
17
+ None
18
+ This method does not return any value. It asserts the existence of methods
19
+ and fails the test if any are missing.
12
20
  """
21
+ # List of expected method names in ScopeManager
13
22
  expected_methods = [
14
23
  "__init__",
15
24
  "__getitem__",
@@ -20,8 +29,9 @@ class TestScopeManagerMethods(AsyncTestCase):
20
29
  "__exit__"
21
30
  ]
22
31
 
32
+ # Check each method for existence in ScopeManager
23
33
  for method in expected_methods:
24
34
  self.assertTrue(
25
- hasattr(ScopeManager, method),
35
+ hasattr(ScopeManager, method), # Assert method exists
26
36
  f"Method '{method}' does not exist in ScopeManager class."
27
37
  )
@@ -2,20 +2,28 @@ from orionis.container.context.scope import ScopedContext
2
2
  from orionis.test.cases.asynchronous import AsyncTestCase
3
3
 
4
4
  class TestScopedContextMethods(AsyncTestCase):
5
- """
6
- Test suite to ensure all required methods exist in ScopedContext and their signatures are preserved.
7
- """
8
5
 
9
6
  def testMethodsExist(self):
10
7
  """
11
- Verify that all required methods exist in the ScopedContext class.
8
+ Checks that all required methods are present in the ScopedContext class.
9
+
10
+ This test verifies the existence of specific methods that are essential for the correct
11
+ operation of ScopedContext. It ensures that the class interface is complete and that
12
+ method names have not been changed or removed.
13
+
14
+ Returns
15
+ -------
16
+ None
17
+ This method does not return anything. It asserts the existence of methods and fails the test if any are missing.
12
18
  """
19
+ # List of method names expected to be present in ScopedContext
13
20
  expected_methods = [
14
21
  "getCurrentScope",
15
22
  "setCurrentScope",
16
23
  "clear"
17
24
  ]
18
25
 
26
+ # Iterate through each expected method and assert its existence
19
27
  for method in expected_methods:
20
28
  self.assertTrue(
21
29
  hasattr(ScopedContext, method),
@@ -7,37 +7,73 @@ class TestBinding(AsyncTestCase):
7
7
 
8
8
  async def testBindingInitialization(self):
9
9
  """
10
- Test that a Binding can be initialized with default values.
10
+ Test initialization of a Binding object with default values.
11
+
12
+ This test verifies that when a Binding instance is created without any arguments,
13
+ all attributes are set to their expected default values.
14
+
15
+ Parameters
16
+ ----------
17
+ self : TestBinding
18
+ The test case instance.
19
+
20
+ Returns
21
+ -------
22
+ None
23
+ This method does not return anything. Assertions are used to validate behavior.
11
24
 
12
25
  Raises
13
26
  ------
14
27
  AssertionError
15
- If the Binding initialization fails or default values are incorrect.
28
+ If any of the default values are incorrect or the Binding initialization fails.
16
29
  """
30
+
31
+ # Create a Binding instance with default parameters
17
32
  binding: Binding = Binding()
18
- self.assertIsNone(binding.contract)
19
- self.assertIsNone(binding.concrete)
20
- self.assertIsNone(binding.instance)
21
- self.assertIsNone(binding.function)
22
- self.assertEqual(binding.lifetime, Lifetime.TRANSIENT)
23
- self.assertFalse(binding.enforce_decoupling)
24
- self.assertIsNone(binding.alias)
33
+
34
+ # Assert that all attributes are set to their default values
35
+ self.assertIsNone(binding.contract) # Default contract should be None
36
+ self.assertIsNone(binding.concrete) # Default concrete should be None
37
+ self.assertIsNone(binding.instance) # Default instance should be None
38
+ self.assertIsNone(binding.function) # Default function should be None
39
+ self.assertEqual(binding.lifetime, Lifetime.TRANSIENT) # Default lifetime should be TRANSIENT
40
+ self.assertFalse(binding.enforce_decoupling) # Default enforce_decoupling should be False
41
+ self.assertIsNone(binding.alias) # Default alias should be None
25
42
 
26
43
  async def testBindingCustomValues(self):
27
44
  """
28
- Test that a Binding can be initialized with custom values.
45
+ Test initialization of a Binding object with custom values.
46
+
47
+ This test verifies that when a Binding instance is created with explicit arguments,
48
+ all attributes are set to the provided custom values, and the object reflects the intended configuration.
49
+
50
+ Parameters
51
+ ----------
52
+ self : TestBinding
53
+ The test case instance.
54
+
55
+ Returns
56
+ -------
57
+ None
58
+ This method does not return anything. Assertions are used to validate correct attribute assignment.
29
59
 
30
60
  Raises
31
61
  ------
32
62
  AssertionError
33
63
  If the Binding initialization fails or custom values are not set correctly.
34
64
  """
65
+
66
+ # Define dummy contract and concrete classes for testing
35
67
  class TestContract: pass
36
68
  class TestConcrete: pass
37
69
 
70
+ # Create an instance for the 'instance' attribute
38
71
  instance = TestConcrete()
72
+
73
+ # Define a factory function for the 'function' attribute
39
74
  factory_func = lambda: TestConcrete()
40
75
 
76
+ # Initialize Binding with custom values
41
77
  binding = Binding(
42
78
  contract=TestContract,
43
79
  concrete=TestConcrete,
@@ -48,6 +84,7 @@ class TestBinding(AsyncTestCase):
48
84
  alias="test_binding"
49
85
  )
50
86
 
87
+ # Assert that all attributes are set to the provided custom values
51
88
  self.assertIs(binding.contract, TestContract)
52
89
  self.assertIs(binding.concrete, TestConcrete)
53
90
  self.assertIs(binding.instance, instance)
@@ -58,37 +95,72 @@ class TestBinding(AsyncTestCase):
58
95
 
59
96
  async def testBindingPostInitValidation(self):
60
97
  """
61
- Test that __post_init__ validation works correctly.
98
+ Validates that the `__post_init__` method of the `Binding` class raises appropriate
99
+ exceptions when invalid types are provided for certain attributes.
100
+
101
+ This test ensures that type validation is enforced for the `lifetime`, `enforce_decoupling`,
102
+ and `alias` attributes during initialization. If an invalid type is passed, the
103
+ `OrionisContainerTypeError` should be raised.
104
+
105
+ Parameters
106
+ ----------
107
+ self : TestBinding
108
+ The test case instance.
109
+
110
+ Returns
111
+ -------
112
+ None
113
+ This method does not return anything. Assertions are used to validate that
114
+ exceptions are raised for invalid input types.
62
115
 
63
116
  Raises
64
117
  ------
65
118
  AssertionError
66
- If validation errors are not raised appropriately.
119
+ If the expected `OrionisContainerTypeError` is not raised when invalid types
120
+ are provided for the attributes.
67
121
  """
68
- # Test invalid lifetime
122
+
123
+ # Attempt to initialize Binding with an invalid lifetime type (should raise exception)
69
124
  with self.assertRaises(OrionisContainerTypeError):
70
125
  Binding(lifetime="not_a_lifetime")
71
126
 
72
- # Test invalid enforce_decoupling
127
+ # Attempt to initialize Binding with an invalid enforce_decoupling type (should raise exception)
73
128
  with self.assertRaises(OrionisContainerTypeError):
74
129
  Binding(enforce_decoupling="not_a_bool")
75
130
 
76
- # Test invalid alias
131
+ # Attempt to initialize Binding with an invalid alias type (should raise exception)
77
132
  with self.assertRaises(OrionisContainerTypeError):
78
133
  Binding(alias=123)
79
134
 
80
135
  async def testToDictMethod(self):
81
136
  """
82
- Test that toDict method returns a correct dictionary representation.
137
+ Tests the `toDict` method of the `Binding` class to ensure it returns a correct dictionary representation
138
+ of the binding's attributes.
139
+
140
+ This test verifies that the dictionary contains all expected keys and that their values match the attributes
141
+ set during initialization. It also checks that the types and values are correctly preserved.
142
+
143
+ Parameters
144
+ ----------
145
+ self : TestBinding
146
+ The test case instance.
147
+
148
+ Returns
149
+ -------
150
+ None
151
+ This method does not return anything. Assertions are used to validate the correctness of the dictionary representation.
83
152
 
84
153
  Raises
85
154
  ------
86
155
  AssertionError
87
- If the dictionary representation is incorrect.
156
+ If the dictionary representation is incorrect or any attribute does not match the expected value.
88
157
  """
158
+
159
+ # Define dummy contract and concrete classes for testing
89
160
  class TestContract: pass
90
161
  class TestConcrete: pass
91
162
 
163
+ # Create a Binding instance with custom values
92
164
  binding = Binding(
93
165
  contract=TestContract,
94
166
  concrete=TestConcrete,
@@ -97,37 +169,74 @@ class TestBinding(AsyncTestCase):
97
169
  alias="test_binding"
98
170
  )
99
171
 
172
+ # Get the dictionary representation of the binding
100
173
  result = binding.toDict()
101
174
 
175
+ # Assert that the result is a dictionary
102
176
  self.assertIsInstance(result, dict)
177
+
178
+ # Assert that contract and concrete are correctly set
103
179
  self.assertIs(result["contract"], TestContract)
104
180
  self.assertIs(result["concrete"], TestConcrete)
181
+
182
+ # Assert that instance and function are None by default
105
183
  self.assertIsNone(result["instance"])
106
184
  self.assertIsNone(result["function"])
185
+
186
+ # Assert that lifetime, enforce_decoupling, and alias are correctly set
107
187
  self.assertEqual(result["lifetime"], Lifetime.SINGLETON)
108
188
  self.assertTrue(result["enforce_decoupling"])
109
189
  self.assertEqual(result["alias"], "test_binding")
110
190
 
111
191
  async def testGetFieldsMethod(self):
112
192
  """
113
- Test that getFields method returns correct field information.
193
+ Tests the `getFields` method of the `Binding` class to ensure it returns accurate field metadata.
194
+
195
+ This test verifies that the returned list contains the expected number of fields, that all expected
196
+ field names are present, and that specific field metadata (such as default values and descriptions)
197
+ are correctly provided for the `lifetime` field.
198
+
199
+ Parameters
200
+ ----------
201
+ self : TestBinding
202
+ The test case instance.
203
+
204
+ Returns
205
+ -------
206
+ None
207
+ This method does not return anything. Assertions are used to validate the correctness of the
208
+ field metadata returned by `getFields`.
114
209
 
115
210
  Raises
116
211
  ------
117
212
  AssertionError
118
- If the field information is incorrect.
213
+ If the field information is incorrect, such as missing fields, incorrect defaults, or missing metadata.
119
214
  """
215
+
216
+ # Create a Binding instance with default parameters
120
217
  binding = Binding()
218
+
219
+ # Retrieve field metadata using getFields
121
220
  fields_info = binding.getFields()
122
221
 
222
+ # Assert that the returned value is a list
123
223
  self.assertIsInstance(fields_info, list)
224
+
225
+ # Assert that there are exactly 7 fields
124
226
  self.assertEqual(len(fields_info), 7)
125
227
 
228
+ # Extract field names from the metadata
126
229
  field_names = [field["name"] for field in fields_info]
127
- expected_names = ["contract", "concrete", "instance", "function","lifetime", "enforce_decoupling", "alias"]
230
+ expected_names = ["contract", "concrete", "instance", "function", "lifetime", "enforce_decoupling", "alias"]
231
+
232
+ # Assert that all expected field names are present
128
233
  self.assertTrue(all(name in field_names for name in expected_names))
129
234
 
130
- # Test specific field information
235
+ # Find the metadata for the 'lifetime' field
131
236
  lifetime_field = next(field for field in fields_info if field["name"] == "lifetime")
237
+
238
+ # Assert that the default value for 'lifetime' is correct
132
239
  self.assertEqual(lifetime_field["default"], Lifetime.TRANSIENT.value)
240
+
241
+ # Assert that the 'lifetime' field contains a description in its metadata
133
242
  self.assertIn("description", lifetime_field["metadata"])
@@ -2,62 +2,96 @@ from orionis.container.enums.lifetimes import Lifetime
2
2
  from orionis.test.cases.asynchronous import AsyncTestCase
3
3
 
4
4
  class TestLifetime(AsyncTestCase):
5
- """
6
- Test cases for the Lifetime enum in orionis.container.enums.lifetimes.
7
-
8
- Notes
9
- -----
10
- This test suite validates the enumeration values and behavior of the Lifetime enum
11
- which defines the lifecycle types for dependency injection.
12
- """
13
5
 
14
6
  async def testLifetimeValuesExist(self) -> None:
15
7
  """
16
- Test that the Lifetime enum contains the expected values.
8
+ Checks that the `Lifetime` enum contains the expected lifecycle values.
9
+
10
+ This test verifies the presence of the following enum members:
11
+ - `TRANSIENT`
12
+ - `SINGLETON`
13
+ - `SCOPED`
17
14
 
18
- Verifies that TRANSIENT, SINGLETON, and SCOPED values are present in the enum.
15
+ Returns
16
+ -------
17
+ None
18
+ This method does not return any value. It asserts the existence of enum members.
19
19
  """
20
+
21
+ # Assert that each expected enum member exists in Lifetime
20
22
  self.assertIn(Lifetime.TRANSIENT, Lifetime)
21
23
  self.assertIn(Lifetime.SINGLETON, Lifetime)
22
24
  self.assertIn(Lifetime.SCOPED, Lifetime)
23
25
 
24
26
  async def testLifetimeValuesAreUnique(self) -> None:
25
27
  """
26
- Test that all Lifetime enum values are unique.
28
+ Ensures that all `Lifetime` enum values are unique.
27
29
 
28
- Ensures that each enum value has a distinct integer value.
30
+ This test collects the integer values of all enum members and checks that
31
+ there are no duplicates.
32
+
33
+ Returns
34
+ -------
35
+ None
36
+ This method does not return any value. It asserts uniqueness of enum values.
29
37
  """
38
+
39
+ # Gather all enum values
30
40
  values = [member.value for member in Lifetime]
41
+
42
+ # Assert that all values are unique
31
43
  self.assertEqual(len(values), len(set(values)))
32
44
 
33
45
  async def testLifetimeCount(self) -> None:
34
46
  """
35
- Test that the Lifetime enum has exactly 3 members.
47
+ Validates that the `Lifetime` enum defines exactly three lifecycle types.
36
48
 
37
- Verifies that no additional or missing lifecycle types exist.
49
+ This test ensures that no additional or missing enum members exist.
50
+
51
+ Returns
52
+ -------
53
+ None
54
+ This method does not return any value. It asserts the count of enum members.
38
55
  """
56
+
57
+ # Assert that there are exactly three members in the Lifetime enum
39
58
  self.assertEqual(len(list(Lifetime)), 3)
40
59
 
41
60
  async def testLifetimeStringRepresentation(self) -> None:
42
61
  """
43
- Test the string representation of Lifetime enum values.
62
+ Verifies the string representation of `Lifetime` enum members.
63
+
64
+ This test checks that converting each enum member to a string yields the expected format.
44
65
 
45
- Verifies that the string representation of enum values matches their names.
66
+ Returns
67
+ -------
68
+ None
69
+ This method does not return any value. It asserts string representations.
46
70
  """
71
+
72
+ # Assert that string representations match expected format
47
73
  self.assertEqual(str(Lifetime.TRANSIENT), "Lifetime.TRANSIENT")
48
74
  self.assertEqual(str(Lifetime.SINGLETON), "Lifetime.SINGLETON")
49
75
  self.assertEqual(str(Lifetime.SCOPED), "Lifetime.SCOPED")
50
76
 
51
77
  async def testLifetimeComparison(self) -> None:
52
78
  """
53
- Test comparison operations between Lifetime enum values.
79
+ Tests comparison operations between `Lifetime` enum members.
80
+
81
+ This test verifies that each enum member is only equal to itself and not to others.
54
82
 
55
- Verifies that enum values can be correctly compared with each other.
83
+ Returns
84
+ -------
85
+ None
86
+ This method does not return any value. It asserts comparison results.
56
87
  """
88
+
89
+ # Assert that different enum members are not equal
57
90
  self.assertNotEqual(Lifetime.TRANSIENT, Lifetime.SINGLETON)
58
91
  self.assertNotEqual(Lifetime.SINGLETON, Lifetime.SCOPED)
59
92
  self.assertNotEqual(Lifetime.TRANSIENT, Lifetime.SCOPED)
60
93
 
94
+ # Assert that each enum member is equal to itself
61
95
  self.assertEqual(Lifetime.TRANSIENT, Lifetime.TRANSIENT)
62
96
  self.assertEqual(Lifetime.SINGLETON, Lifetime.SINGLETON)
63
97
  self.assertEqual(Lifetime.SCOPED, Lifetime.SCOPED)
@@ -8,22 +8,31 @@ class TestFacadeMethods(AsyncTestCase):
8
8
  """
9
9
  Verify the existence of essential methods in the Facade and FacadeMeta classes.
10
10
 
11
- This test ensures that the following methods are implemented:
12
- - 'getFacadeAccessor' in the Facade class
13
- - 'resolve' in the Facade class
14
- - '__getattr__' in the FacadeMeta class
11
+ This test checks for the implementation of the following methods:
12
+ - 'getFacadeAccessor' in the Facade class
13
+ - 'resolve' in the Facade class
14
+ - '__getattr__' in the FacadeMeta class
15
15
 
16
- Returns:
17
- None. The method asserts the presence of required methods and raises AssertionError if any are missing.
16
+ The method asserts the presence of these required methods and raises an AssertionError if any are missing.
17
+
18
+ Parameters
19
+ ----------
20
+ None
21
+
22
+ Returns
23
+ -------
24
+ None
25
+ Returns None. The method performs assertions to validate method existence.
18
26
  """
19
27
 
28
+ # List of expected methods and their corresponding classes
20
29
  expected_methods = [
21
30
  ("getFacadeAccessor", Facade),
22
31
  ("resolve", Facade),
23
32
  ("__getattr__", FacadeMeta),
24
33
  ]
25
34
 
26
- # Check each expected method for existence in its respective class
35
+ # Iterate through each expected method and assert its existence
27
36
  for method_name, cls in expected_methods:
28
37
  self.assertTrue(
29
38
  hasattr(cls, method_name),
@@ -35,12 +44,20 @@ class TestFacadeMethods(AsyncTestCase):
35
44
  Validate the method signatures of key Facade and FacadeMeta class methods.
36
45
 
37
46
  This test checks that:
38
- - 'getFacadeAccessor' in Facade accepts no parameters.
39
- - 'resolve' in Facade accepts variable positional and keyword arguments.
40
- - '__getattr__' in FacadeMeta accepts 'cls' and 'name' as parameters.
47
+ - 'getFacadeAccessor' in Facade accepts no parameters.
48
+ - 'resolve' in Facade accepts variable positional and keyword arguments.
49
+ - '__getattr__' in FacadeMeta accepts 'cls' and 'name' as parameters.
50
+
51
+ The method asserts correct method signatures and raises AssertionError if any signature does not match expectations.
52
+
53
+ Parameters
54
+ ----------
55
+ None
41
56
 
42
- Returns:
43
- None. The method asserts correct method signatures and raises AssertionError if any signature does not match expectations.
57
+ Returns
58
+ -------
59
+ None
60
+ Returns None. The method performs assertions to validate method signatures.
44
61
  """
45
62
 
46
63
  # Check that getFacadeAccessor has no parameters