orionis 0.406.0__py3-none-any.whl → 0.408.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 (52) 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/asynchrony/contracts/coroutines.py +13 -5
  6. orionis/services/asynchrony/coroutines.py +33 -29
  7. orionis/services/asynchrony/exceptions/exception.py +9 -1
  8. orionis/services/environment/core/dot_env.py +46 -34
  9. orionis/services/environment/enums/__init__.py +0 -0
  10. orionis/services/environment/enums/cast_type.py +42 -0
  11. orionis/services/environment/serializer/__init__.py +0 -0
  12. orionis/services/environment/serializer/values.py +21 -0
  13. orionis/services/environment/validators/__init__.py +0 -0
  14. orionis/services/environment/validators/key_name.py +46 -0
  15. orionis/services/environment/validators/types.py +45 -0
  16. orionis/services/system/contracts/imports.py +38 -18
  17. orionis/services/system/contracts/workers.py +29 -12
  18. orionis/services/system/imports.py +65 -25
  19. orionis/services/system/runtime/imports.py +18 -9
  20. orionis/services/system/workers.py +49 -16
  21. orionis/test/output/dumper.py +1 -0
  22. {orionis-0.406.0.dist-info → orionis-0.408.0.dist-info}/METADATA +1 -1
  23. {orionis-0.406.0.dist-info → orionis-0.408.0.dist-info}/RECORD +52 -45
  24. tests/container/context/test_manager.py +15 -5
  25. tests/container/context/test_scope.py +12 -4
  26. tests/container/entities/test_binding.py +130 -21
  27. tests/container/enums/test_lifetimes.py +52 -18
  28. tests/container/facades/test_facade.py +29 -12
  29. tests/container/providers/test_providers.py +17 -10
  30. tests/container/resolver/test_resolver.py +14 -7
  31. tests/container/test_container.py +226 -71
  32. tests/container/test_singleton.py +43 -24
  33. tests/container/test_thread_safety.py +28 -156
  34. tests/container/validators/test_implements.py +59 -13
  35. tests/container/validators/test_is_abstract_class.py +73 -25
  36. tests/container/validators/test_is_callable.py +55 -26
  37. tests/container/validators/test_is_concrete_class.py +80 -17
  38. tests/container/validators/test_is_instance.py +67 -22
  39. tests/container/validators/test_is_not_subclass.py +28 -95
  40. tests/container/validators/test_is_subclass.py +84 -21
  41. tests/container/validators/test_is_valid_alias.py +46 -12
  42. tests/container/validators/test_lifetime.py +45 -14
  43. tests/example/test_example.py +2 -2
  44. tests/metadata/test_metadata_framework.py +71 -6
  45. tests/metadata/test_metadata_package.py +55 -10
  46. tests/services/asynchrony/test_services_asynchrony_coroutine.py +52 -7
  47. tests/services/system/test_services_system_imports.py +119 -16
  48. tests/services/system/test_services_system_workers.py +71 -30
  49. {orionis-0.406.0.dist-info → orionis-0.408.0.dist-info}/WHEEL +0 -0
  50. {orionis-0.406.0.dist-info → orionis-0.408.0.dist-info}/licenses/LICENCE +0 -0
  51. {orionis-0.406.0.dist-info → orionis-0.408.0.dist-info}/top_level.txt +0 -0
  52. {orionis-0.406.0.dist-info → orionis-0.408.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,24 +258,26 @@ 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=7tsbyNrZzvwa53bbYPFKynkVczIn2llFfSswwTIClaM,4960
261
+ orionis/metadata/framework.py,sha256=lyVpWF0MG5Xr2V2hDnMRTAMzJ-rQJ2v7c8oWkA1Dmno,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
265
- orionis/services/asynchrony/coroutines.py,sha256=GkTyv-uHo-MOzwo8akwIS2HDSkTaL3CpnaRPG-4iXUY,2365
265
+ orionis/services/asynchrony/coroutines.py,sha256=Aj5a1LTosnGUA0meSHivC1OJBYOQ7xq3US_PzWTc91w,3113
266
266
  orionis/services/asynchrony/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
267
- orionis/services/asynchrony/contracts/coroutines.py,sha256=Wuwp2k4HXAX-tQ3waVIT8AmzX_HeIbjliRchKIqy2k0,688
267
+ orionis/services/asynchrony/contracts/coroutines.py,sha256=BOMDd84mZB2IndaTbGdQOAvil-KAsO6YcX5tv0A1FKo,1145
268
268
  orionis/services/asynchrony/exceptions/__init__.py,sha256=COm6RhSiuwWqy3YcJ_0gVu6XHjn5P3zVaiUp5Pw_h48,99
269
- orionis/services/asynchrony/exceptions/exception.py,sha256=eopQpl-2chut-iN1drBy-53EDKava1icwtcWUF4S1Cc,472
269
+ orionis/services/asynchrony/exceptions/exception.py,sha256=yAVsjZ2lLAoFgNIiMcOtCYnwGI1y8GoYdUAxTQwLtTY,820
270
270
  orionis/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
271
271
  orionis/services/environment/env.py,sha256=vKx9zO2DpUK089fL17qxQ4X4tLYzN3exGAKg3d-rp3c,2272
272
272
  orionis/services/environment/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
273
273
  orionis/services/environment/contracts/env.py,sha256=7lezGxABAG63pEEvzAmHXgr9izBI6TCp05Trx_SRvc4,2054
274
274
  orionis/services/environment/contracts/types.py,sha256=n0USxUblz0Ofbo1ef0hnGHGkuGjSiWk-SBWVPXv33mE,1994
275
275
  orionis/services/environment/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
276
- orionis/services/environment/core/dot_env.py,sha256=EZZTI-SuwCXgEXXmGOKhAARQIWxUSjYVIhWsMbE3TMI,10157
276
+ orionis/services/environment/core/dot_env.py,sha256=Dgkmy0juaFKZPEkv7nN7VvdYryX8fDs0JgRGOIHj7PM,10090
277
277
  orionis/services/environment/dynamic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
278
278
  orionis/services/environment/dynamic/types.py,sha256=nf7HJjm-1S-BH2YnuBQNNWvb3Aqu-QYPUTfJRgVYZ1Y,18336
279
+ orionis/services/environment/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
280
+ orionis/services/environment/enums/cast_type.py,sha256=hoZhljXHNn03VYbg6VTauGyppmcoRjaepylrOKSBvu8,1217
279
281
  orionis/services/environment/exceptions/__init__.py,sha256=YwLc8GsB0swlwu9T9Qt2vevaCoq5V2vmPUSlEUAqg2Q,199
280
282
  orionis/services/environment/exceptions/exception.py,sha256=NnxWmgoSca7LXi7GLDa95HSBPKotFfy8u729d1OAmCc,479
281
283
  orionis/services/environment/exceptions/value.py,sha256=Pe1qNHRrM9T0AzESN284CzA3GQYxzokfXPMOVqOTlyQ,475
@@ -283,6 +285,11 @@ orionis/services/environment/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
283
285
  orionis/services/environment/helpers/functions.py,sha256=MtlDTA1W8KVJu0cohh4TsuPg8CPcnySf36cp9E9tpJI,595
284
286
  orionis/services/environment/key/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
285
287
  orionis/services/environment/key/key_generator.py,sha256=BHvcFiPOmJHQotstMNkUdoEwb0mNxQk5iyvQU3JlJ94,1134
288
+ orionis/services/environment/serializer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
289
+ orionis/services/environment/serializer/values.py,sha256=ERnQWgCAljhJ9pRSd-knnGD5i6ne5Ho-4bh93pgDtwY,364
290
+ orionis/services/environment/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
291
+ orionis/services/environment/validators/key_name.py,sha256=heMQoMY4vF9sIYAlET7noTQz383daGPvJnJOb62nxFo,1577
292
+ orionis/services/environment/validators/types.py,sha256=AQvIZzBWxZ6-iJhzRkroim5CKBvWq2lTttRyXzc-6GU,1922
286
293
  orionis/services/introspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
287
294
  orionis/services/introspection/reflection.py,sha256=_Wdy8Wtt3RKXAqg9o5rvYa_Hyu-Z4674LKnNVg7u7pU,11467
288
295
  orionis/services/introspection/abstract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -338,13 +345,13 @@ orionis/services/paths/exceptions/__init__.py,sha256=r5b4D4XWNK07zLtqaXBk_PNYszS
338
345
  orionis/services/paths/exceptions/exception.py,sha256=cK-TbUT02X2lvbAP4yFdfHx4S45wBOcYl3_tiWd67UM,472
339
346
  orionis/services/paths/exceptions/file.py,sha256=bsK0QoXwRFyDeHvITxwmgaBuwiO2eoRUhRzNizmX1No,475
340
347
  orionis/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
341
- orionis/services/system/imports.py,sha256=5j2Rkf6vMLnCQjqcox4-0y0tZoxgPfv7EP8eruG7vnA,4990
342
- orionis/services/system/workers.py,sha256=QO5IXjH8BXWUlHzH1TiRKt3vn4LZklRI02nSL17hWPo,2199
348
+ orionis/services/system/imports.py,sha256=aSXG9879ur91d6OsqV2DUYWmmwbwFHX8CHb99cPfFcU,7057
349
+ orionis/services/system/workers.py,sha256=EfGxU_w42xRnZ1yslsui3wVG8pfe__V3GYGEIyo8JxQ,3144
343
350
  orionis/services/system/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
344
- orionis/services/system/contracts/imports.py,sha256=nE2fDS2bDbwltHCmzOsEMhUymYy092zoGX-NOXLE4J4,1167
345
- orionis/services/system/contracts/workers.py,sha256=plst9CcYqwkEcy-LPdfJbdKPKaeq8hmtWk0B5mlH2wo,1017
351
+ orionis/services/system/contracts/imports.py,sha256=wTlr0ck1vcrAoBU91_rgu8cN4dCRnWixsq-ovwXQOn0,2767
352
+ orionis/services/system/contracts/workers.py,sha256=T7P48btql90IaPugMVUmR0Gl2-r9DnuOwTpJZkRvg0Q,1837
346
353
  orionis/services/system/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
347
- orionis/services/system/runtime/imports.py,sha256=eWp_MmrvxWHl-lsNO0M5FC9OsCcY1BXsiJTlPk0cfRU,2550
354
+ orionis/services/system/runtime/imports.py,sha256=iIwIx8RjBHaiveCdj_WPiMMbWsKGbIs02qpAzL_L3Z0,3158
348
355
  orionis/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
349
356
  orionis/support/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
350
357
  orionis/support/entities/base.py,sha256=4WuAzrk_sfWp8Wv5Yl9IUF6kTctlAXlSxHGh5mdu3MQ,3982
@@ -399,7 +406,7 @@ orionis/test/exceptions/persistence.py,sha256=GbNwpUfrtZ-VstX_Amflg8OwQ3WEWOnDmn
399
406
  orionis/test/exceptions/runtime.py,sha256=yLLBtDR61k53OIAwi5wVLxap79Agh2khXrhRb4bTe9k,778
400
407
  orionis/test/exceptions/value.py,sha256=P9SD64EWATKneV-QP-yhfJ2GxyypKxqgmk5MqiguxV0,1001
401
408
  orionis/test/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
402
- orionis/test/output/dumper.py,sha256=GSWWAWIW_OfN9HOORhn_AsEzYEJFgGstfwBp14hudDg,7094
409
+ orionis/test/output/dumper.py,sha256=vagHHjTaRdffCBO7pjylsYqSSoh11MnavZcCmr8RLPs,7148
403
410
  orionis/test/output/printer.py,sha256=cpElVLaK94JtQeHpgN-HTSuE8dJhPhZMt51L7Lramz8,29080
404
411
  orionis/test/records/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
405
412
  orionis/test/records/logs.py,sha256=WhOmRJhQck76vx8l_c_7M-H8_RS9p3yB_jJ39Rnx-Lc,19050
@@ -421,40 +428,40 @@ orionis/test/validators/web_report.py,sha256=-h3Fe9jY93_kzUhd2NBIqEfCcBpu-8Ei9x3
421
428
  orionis/test/validators/workers.py,sha256=LGffDKtK6SKixFKzIYPQpI5aFeQPAGXpv_LUtmEu6g4,1102
422
429
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
423
430
  orionis/test/view/render.py,sha256=3ICz68l-WF3BtnYqH5m-ktN9UD00MELMbmMnyJDV74A,4768
424
- orionis-0.406.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
431
+ orionis-0.408.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
425
432
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
426
433
  tests/container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
427
- tests/container/test_container.py,sha256=INLMHbcQzB7SQi6W0xO_nKCMUw50VK7NQMPRDuYnU5Q,10781
428
- tests/container/test_singleton.py,sha256=ZLFtoR0VJa_PJVp9Gzh9NdhvpquTAqxlGYr_CZ90Bbg,3741
429
- 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
430
437
  tests/container/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
431
- tests/container/context/test_manager.py,sha256=jj7c7TPUU8EkvI0I4uiWgts-Ahl53rcHd-H307KiDOk,862
432
- 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
433
440
  tests/container/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
434
- tests/container/entities/test_binding.py,sha256=ESM8nk0_YNnCSmEqDO9bH6FfhofyCQfbV2z1Uu7cwBs,4754
441
+ tests/container/entities/test_binding.py,sha256=AZ5jUF0MMwTXueevZnYbLpF73g7qrAcvx51jlKMfqkg,9708
435
442
  tests/container/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
436
- tests/container/enums/test_lifetimes.py,sha256=tLiWZCeMtcvhX9mCfn5Ug2kDeVdjf5f-CPzQsaAsMB8,2479
443
+ tests/container/enums/test_lifetimes.py,sha256=JFb4q1rgo10C5ibQ6LS-776NevxCMNLSq_cd7D1O8Ps,3511
437
444
  tests/container/facades/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
438
- tests/container/facades/test_facade.py,sha256=EBhxxecOYZxQCaoDe7fz11jm4920w-9FFZDaA6eSz9I,2503
445
+ tests/container/facades/test_facade.py,sha256=aCy0S6YaaiswGoodJEAhNkqJrMaEQL-CcWh2AgXMvvQ,2938
439
446
  tests/container/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
440
447
  tests/container/mocks/mock_complex_classes.py,sha256=DKBD2Wd8n_dDPXRo-HepEOy3L6w7ACfFpeQKVuIFlRA,15026
441
448
  tests/container/mocks/mock_simple_classes.py,sha256=rvHFEYAzEnLvL79WWS-YCNwIEPsx14FEo2v3wrdibzE,841
442
449
  tests/container/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
443
- tests/container/providers/test_providers.py,sha256=4BujCYLHoesG5jpArknplBi0rqiA4DAKcB_sjGWcFFw,1914
450
+ tests/container/providers/test_providers.py,sha256=qGh2vtrLYp_S7u3U64I22Fzr86NsDZw0tXtJioSDdms,2149
444
451
  tests/container/resolver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
445
- tests/container/resolver/test_resolver.py,sha256=_QGfGYiA-DubioBkuH6HOFBnrFB6aS_ughYFurKT_qk,2175
452
+ tests/container/resolver/test_resolver.py,sha256=6p3XMIme53QLEbPpTBfs3dLzESMK_5fGYbr2TNPolTI,2313
446
453
  tests/container/validators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
447
- tests/container/validators/test_implements.py,sha256=B85sAAqzoIbI-i4ZsjDm1pTGsFbLJQJFJKYbKUvh0Mc,5025
448
- tests/container/validators/test_is_abstract_class.py,sha256=9QqKHZ3pKVsjvvsPn3vkiwL6bDdB0GWCsxrWaRHDoRI,4464
449
- tests/container/validators/test_is_callable.py,sha256=d8ZsPFriZtoqNPlZIU-1bgwy6sqXc5-swahjgEoP7ds,2284
450
- tests/container/validators/test_is_concrete_class.py,sha256=76gDFaXKD0LSiEro-KPsjERfVKQYiFQ_dSqeSidG6z8,3638
451
- tests/container/validators/test_is_instance.py,sha256=wanHMUebe8MxW0TuK_mwg63q_EsVbOm6ixvMNuNMH3Q,3540
452
- tests/container/validators/test_is_not_subclass.py,sha256=t1spircP5AYQbaQyoKT8oXflSAxoA0FgF7PWbCw9xAg,3996
453
- tests/container/validators/test_is_subclass.py,sha256=iid5n1B6GDYqwtSlmRG0lJBH6gXeZ4legcOqiAM8EL0,3750
454
- tests/container/validators/test_is_valid_alias.py,sha256=mRkdDLHZuM0ogJn38lV35gwnxXP3J-a-1EWaoij-qUM,3957
455
- 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
456
463
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
457
- tests/example/test_example.py,sha256=yctjQT5ocYEu__kNvJxmQJ-l5yxRMkohwcfYWSjWDVo,25566
464
+ tests/example/test_example.py,sha256=XJEcsro3vCO5m4zvMiWUGphvd0C7oIkBtUfQgTDsdUU,25568
458
465
  tests/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
459
466
  tests/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
460
467
  tests/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -509,11 +516,11 @@ tests/foundation/config/testing/test_foundation_config_testing.py,sha256=BQsQVGm
509
516
  tests/foundation/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
510
517
  tests/foundation/exceptions/test_foundation_config_exceptions.py,sha256=tiXKxGSP8majXpLPyoGR0WGvDE1LoLXQK6NpcQNqz_A,4091
511
518
  tests/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
512
- tests/metadata/test_metadata_framework.py,sha256=S0eujj2Z3PWpPBzpoqShs4rkfD4Frna4geUoS_uZfTE,3380
513
- tests/metadata/test_metadata_package.py,sha256=WaBnp0ufj9NKbLzMOCBdt5OAWr-WCA_j8Y05vgC_8Ek,2870
519
+ tests/metadata/test_metadata_framework.py,sha256=1tCNciuPVgZPK-V8PzENJCXN-1bTktWPN9u03N4Eelw,5499
520
+ tests/metadata/test_metadata_package.py,sha256=gXIX-N9toEHJsmFkdhAvJRnz2T5e6pbgK37I1eFYTGM,4770
514
521
  tests/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
515
522
  tests/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
516
- tests/services/asynchrony/test_services_asynchrony_coroutine.py,sha256=KijsHjPiia1w5_yJJWjJrFocjQEfbMT9kj1F4nY-Kbs,1659
523
+ tests/services/asynchrony/test_services_asynchrony_coroutine.py,sha256=34Y0D6w2bVo_dm3oj0wzedMIJuSYieUG9Y2J1EQmZeo,3439
517
524
  tests/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
518
525
  tests/services/environment/test_services_environment.py,sha256=6UH3g2Z2DQYtGnyySCRnT35VCENlL-PQWHIdH6zA9rw,3767
519
526
  tests/services/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -535,8 +542,8 @@ tests/services/inspection/reflection/mock/fake_reflect_instance.py,sha256=iqWoT6
535
542
  tests/services/path/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
536
543
  tests/services/path/test_services_resolver.py,sha256=aWSSFgV_D10t3llUeCWEBB1mF3dWrZbFn5XbJy2sQME,3903
537
544
  tests/services/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
538
- tests/services/system/test_services_system_imports.py,sha256=RI7DHZUJSbtlL7xDSmbUtCMrIdE417qaMCJlL5H9IHQ,2967
539
- tests/services/system/test_services_system_workers.py,sha256=7WFs3u52kXs3FTWsqT7V3US4fqdQ6Cmd2pb8W_Mn7wk,3050
545
+ tests/services/system/test_services_system_imports.py,sha256=jbtIQkw_4DI6x2E-4Lg3evnLAgCgDIBWE63LdJTLkxc,7507
546
+ tests/services/system/test_services_system_workers.py,sha256=wITbpJHKW_OXqTaFeteNRFuw5Q3_7d9lWNJnFE2r6to,5052
540
547
  tests/support/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
541
548
  tests/support/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
542
549
  tests/support/parsers/test_services_parser_exceptions.py,sha256=3q2koa73YRaQXDUWp7GAX1e-rgeazwP7mSNhMkJLoQA,2672
@@ -552,8 +559,8 @@ tests/support/wrapper/test_services_wrapper_docdict.py,sha256=nTNrvJkMSPx_aopEQ9
552
559
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
553
560
  tests/testing/test_testing_result.py,sha256=aWOOJiHji_U7gcJHbDukgMmfBEEQCLQdyqpXJD5q4BE,4643
554
561
  tests/testing/test_testing_unit.py,sha256=Krz0Bw1toI9qvLtKtYe_slNvi7fYmZbHK1i4DRPMfUM,7952
555
- orionis-0.406.0.dist-info/METADATA,sha256=rmI1fb0IoWTgG06IaCrA7FP5_1RSTPE6HfE034kJfc0,4772
556
- orionis-0.406.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
557
- orionis-0.406.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
558
- orionis-0.406.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
559
- orionis-0.406.0.dist-info/RECORD,,
562
+ orionis-0.408.0.dist-info/METADATA,sha256=n5ql9Cat7kQbHjFV3goNTgyUPgouORkrqTgZuMIwjjE,4772
563
+ orionis-0.408.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
564
+ orionis-0.408.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
565
+ orionis-0.408.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
566
+ orionis-0.408.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)