orionis 0.437.0__py3-none-any.whl → 0.439.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 (36) hide show
  1. orionis/container/context/scope.py +1 -1
  2. orionis/metadata/framework.py +1 -1
  3. {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/METADATA +1 -1
  4. {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/RECORD +36 -35
  5. tests/container/context/test_manager.py +1 -0
  6. tests/container/context/test_scope.py +1 -0
  7. tests/container/core/__init__.py +0 -0
  8. tests/container/{test_container.py → core/test_container.py} +45 -1
  9. tests/container/{test_singleton.py → core/test_singleton.py} +5 -0
  10. tests/container/{test_thread_safety.py → core/test_thread_safety.py} +2 -0
  11. tests/container/mocks/mock_complex_classes.py +502 -192
  12. tests/container/mocks/mock_simple_classes.py +72 -6
  13. tests/container/validators/test_is_not_subclass.py +0 -1
  14. tests/container/validators/test_is_valid_alias.py +1 -1
  15. tests/foundation/config/database/test_foundation_config_database.py +54 -28
  16. tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +40 -22
  17. tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +75 -48
  18. tests/foundation/config/logging/test_foundation_config_logging_channels.py +49 -37
  19. tests/foundation/config/logging/test_foundation_config_logging_monthly.py +80 -42
  20. tests/foundation/config/logging/test_foundation_config_logging_stack.py +46 -22
  21. tests/foundation/config/queue/test_foundation_config_queue_brokers.py +1 -0
  22. tests/foundation/config/root/test_foundation_config_root_paths.py +37 -44
  23. tests/foundation/config/session/test_foundation_config_session.py +65 -20
  24. tests/foundation/config/startup/test_foundation_config_startup.py +37 -34
  25. tests/services/environment/test_services_environment.py +5 -4
  26. tests/services/introspection/dependencies/test_reflect_dependencies.py +77 -25
  27. tests/services/introspection/reflection/mock/fake_reflect_instance.py +750 -267
  28. tests/services/introspection/reflection/test_reflection_abstract.py +514 -83
  29. tests/services/introspection/reflection/test_reflection_callable.py +85 -35
  30. tests/services/introspection/reflection/test_reflection_concrete.py +345 -226
  31. tests/services/introspection/reflection/test_reflection_instance.py +627 -273
  32. tests/services/introspection/reflection/test_reflection_module.py +346 -175
  33. {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/WHEEL +0 -0
  34. {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/licenses/LICENCE +0 -0
  35. {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/top_level.txt +0 -0
  36. {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/zip-safe +0 -0
@@ -7,7 +7,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
7
7
 
8
8
  async def testGetClass(self):
9
9
  """
10
- Verifies that getClass returns the correct class.
10
+ Test the getClass method of ReflectionAbstract.
11
+
12
+ Verifies that the getClass method correctly returns the class object
13
+ that was passed during ReflectionAbstract instantiation.
14
+
15
+ Assertions
16
+ ----------
17
+ The returned class object should be identical to the original class.
11
18
  """
12
19
  reflect = ReflectionAbstract(AbstractFakeClass)
13
20
  cls = reflect.getClass()
@@ -15,7 +22,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
15
22
 
16
23
  async def testGetClassName(self):
17
24
  """
18
- Verifies that getClassName returns the class name.
25
+ Test the getClassName method of ReflectionAbstract.
26
+
27
+ Verifies that the getClassName method correctly returns the name
28
+ of the class as a string.
29
+
30
+ Assertions
31
+ ----------
32
+ The returned string should match the actual class name.
19
33
  """
20
34
  reflect = ReflectionAbstract(AbstractFakeClass)
21
35
  class_name = reflect.getClassName()
@@ -23,7 +37,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
23
37
 
24
38
  async def testGetModuleName(self):
25
39
  """
26
- Verifies that getModuleName returns the module name.
40
+ Test the getModuleName method of ReflectionAbstract.
41
+
42
+ Verifies that the getModuleName method correctly returns the fully
43
+ qualified module name where the class is defined.
44
+
45
+ Assertions
46
+ ----------
47
+ The returned string should match the complete module path.
27
48
  """
28
49
  reflect = ReflectionAbstract(AbstractFakeClass)
29
50
  module_name = reflect.getModuleName()
@@ -31,7 +52,15 @@ class TestServiceReflectionAbstract(AsyncTestCase):
31
52
 
32
53
  async def testGetModuleWithClassName(self):
33
54
  """
34
- Verifies that getModuleWithClassName returns the module and class name.
55
+ Test the getModuleWithClassName method of ReflectionAbstract.
56
+
57
+ Verifies that the getModuleWithClassName method correctly returns
58
+ the fully qualified name combining module path and class name.
59
+
60
+ Assertions
61
+ ----------
62
+ The returned string should contain the complete module path followed
63
+ by the class name, separated by a dot.
35
64
  """
36
65
  reflect = ReflectionAbstract(AbstractFakeClass)
37
66
  module_with_class_name = reflect.getModuleWithClassName()
@@ -39,7 +68,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
39
68
 
40
69
  async def testGetDocstring(self):
41
70
  """
42
- Verifies that getDocstring returns the class docstring.
71
+ Test the getDocstring method of ReflectionAbstract.
72
+
73
+ Verifies that the getDocstring method correctly returns the class
74
+ docstring as it appears in the class definition.
75
+
76
+ Assertions
77
+ ----------
78
+ The returned docstring should be identical to the class's __doc__ attribute.
43
79
  """
44
80
  reflect = ReflectionAbstract(AbstractFakeClass)
45
81
  docstring = reflect.getDocstring()
@@ -47,7 +83,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
47
83
 
48
84
  async def testGetBaseClasses(self):
49
85
  """
50
- Verifies that getBaseClasses returns the base classes.
86
+ Test the getBaseClasses method of ReflectionAbstract.
87
+
88
+ Verifies that the getBaseClasses method correctly returns a collection
89
+ of base classes that the reflected class inherits from.
90
+
91
+ Assertions
92
+ ----------
93
+ The returned collection should contain the class's base class.
51
94
  """
52
95
  reflect = ReflectionAbstract(AbstractFakeClass)
53
96
  base_classes = reflect.getBaseClasses()
@@ -55,7 +98,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
55
98
 
56
99
  async def testGetSourceCode(self):
57
100
  """
58
- Verifies that getSourceCode returns the class source code.
101
+ Test the getSourceCode method of ReflectionAbstract.
102
+
103
+ Verifies that the getSourceCode method correctly returns the source
104
+ code of the class as a string.
105
+
106
+ Assertions
107
+ ----------
108
+ The returned source code should start with the class definition.
59
109
  """
60
110
  reflect = ReflectionAbstract(AbstractFakeClass)
61
111
  source_code = reflect.getSourceCode()
@@ -63,7 +113,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
63
113
 
64
114
  async def testGetFile(self):
65
115
  """
66
- Verifies that getFile returns the class file path.
116
+ Test the getFile method of ReflectionAbstract.
117
+
118
+ Verifies that the getFile method correctly returns the file path
119
+ where the class is defined.
120
+
121
+ Assertions
122
+ ----------
123
+ The returned file path should end with the expected filename.
67
124
  """
68
125
  reflect = ReflectionAbstract(AbstractFakeClass)
69
126
  file_path = reflect.getFile()
@@ -71,7 +128,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
71
128
 
72
129
  async def testGetAnnotations(self):
73
130
  """
74
- Verifies that getAnnotations returns the class annotations.
131
+ Test the getAnnotations method of ReflectionAbstract.
132
+
133
+ Verifies that the getAnnotations method correctly returns the type
134
+ annotations defined in the class.
135
+
136
+ Assertions
137
+ ----------
138
+ The returned annotations should contain the expected annotated attribute.
75
139
  """
76
140
  reflect = ReflectionAbstract(AbstractFakeClass)
77
141
  annotations = reflect.getAnnotations()
@@ -79,7 +143,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
79
143
 
80
144
  async def testHasAttribute(self):
81
145
  """
82
- Verifies that hasAttribute identifies existing attributes.
146
+ Test the hasAttribute method of ReflectionAbstract.
147
+
148
+ Verifies that the hasAttribute method correctly identifies whether
149
+ a specific attribute exists in the class.
150
+
151
+ Assertions
152
+ ----------
153
+ Should return True for existing attributes and False for non-existent ones.
83
154
  """
84
155
  reflect = ReflectionAbstract(AbstractFakeClass)
85
156
  self.assertTrue(reflect.hasAttribute('public_attr'))
@@ -87,7 +158,15 @@ class TestServiceReflectionAbstract(AsyncTestCase):
87
158
 
88
159
  async def testGetAttribute(self):
89
160
  """
90
- Verifies that getAttribute gets the correct value of an attribute.
161
+ Test the getAttribute method of ReflectionAbstract.
162
+
163
+ Verifies that the getAttribute method correctly retrieves the value
164
+ of existing attributes and returns None for non-existent ones.
165
+
166
+ Assertions
167
+ ----------
168
+ Should return the correct value for existing attributes and None
169
+ for non-existent attributes.
91
170
  """
92
171
  reflect = ReflectionAbstract(AbstractFakeClass)
93
172
  self.assertEqual(reflect.getAttribute('public_attr'), 42)
@@ -95,7 +174,15 @@ class TestServiceReflectionAbstract(AsyncTestCase):
95
174
 
96
175
  async def testSetAttribute(self):
97
176
  """
98
- Verifies that setAttribute modifies attributes correctly.
177
+ Test the setAttribute method of ReflectionAbstract.
178
+
179
+ Verifies that the setAttribute method correctly assigns values to
180
+ attributes, including public, protected, and private attributes.
181
+
182
+ Assertions
183
+ ----------
184
+ Should successfully set attributes with different visibility levels
185
+ and confirm the values are correctly assigned.
99
186
  """
100
187
  reflect = ReflectionAbstract(AbstractFakeClass)
101
188
  self.assertTrue(reflect.setAttribute('name', 'Orionis Framework'))
@@ -107,7 +194,15 @@ class TestServiceReflectionAbstract(AsyncTestCase):
107
194
 
108
195
  async def testRemoveAttribute(self):
109
196
  """
110
- Verifies that removeAttribute removes attributes correctly.
197
+ Test the removeAttribute method of ReflectionAbstract.
198
+
199
+ Verifies that the removeAttribute method correctly removes attributes
200
+ from the class and returns the appropriate boolean result.
201
+
202
+ Assertions
203
+ ----------
204
+ Should successfully remove existing attributes and return True,
205
+ then confirm the attribute no longer exists.
111
206
  """
112
207
  reflect = ReflectionAbstract(AbstractFakeClass)
113
208
  reflect.setAttribute('new_attr', 100)
@@ -116,7 +211,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
116
211
 
117
212
  async def testGetAttributes(self):
118
213
  """
119
- Verifies that getAttributes returns all attributes.
214
+ Test the getAttributes method of ReflectionAbstract.
215
+
216
+ Verifies that the getAttributes method correctly returns all attributes
217
+ from the class, regardless of their visibility level.
218
+
219
+ Assertions
220
+ ----------
221
+ The returned collection should contain public, protected, and private attributes.
120
222
  """
121
223
  reflect = ReflectionAbstract(AbstractFakeClass)
122
224
  attributes = reflect.getAttributes()
@@ -126,7 +228,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
126
228
 
127
229
  async def testGetPublicAttributes(self):
128
230
  """
129
- Verifies that getPublicAttributes returns only public attributes.
231
+ Test the getPublicAttributes method of ReflectionAbstract.
232
+
233
+ Verifies that the getPublicAttributes method correctly returns only
234
+ attributes with public visibility (no leading underscore).
235
+
236
+ Assertions
237
+ ----------
238
+ Should include public attributes and exclude protected and private attributes.
130
239
  """
131
240
  reflect = ReflectionAbstract(AbstractFakeClass)
132
241
  public_attributes = reflect.getPublicAttributes()
@@ -136,7 +245,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
136
245
 
137
246
  async def testGetProtectedAttributes(self):
138
247
  """
139
- Verifies that getProtectedAttributes returns only protected attributes.
248
+ Test the getProtectedAttributes method of ReflectionAbstract.
249
+
250
+ Verifies that the getProtectedAttributes method correctly returns only
251
+ attributes with protected visibility (single leading underscore).
252
+
253
+ Assertions
254
+ ----------
255
+ Should include protected attributes and exclude public and private attributes.
140
256
  """
141
257
  reflect = ReflectionAbstract(AbstractFakeClass)
142
258
  protected_attributes = reflect.getProtectedAttributes()
@@ -146,7 +262,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
146
262
 
147
263
  async def testGetPrivateAttributes(self):
148
264
  """
149
- Verifies that getPrivateAttributes returns only private attributes.
265
+ Test the getPrivateAttributes method of ReflectionAbstract.
266
+
267
+ Verifies that the getPrivateAttributes method correctly returns only
268
+ attributes with private visibility (double leading underscore).
269
+
270
+ Assertions
271
+ ----------
272
+ Should include private attributes and exclude public and protected attributes.
150
273
  """
151
274
  reflect = ReflectionAbstract(AbstractFakeClass)
152
275
  private_attributes = reflect.getPrivateAttributes()
@@ -156,7 +279,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
156
279
 
157
280
  async def testGetDunderAttributes(self):
158
281
  """
159
- Verifies that getDunderAttributes returns dunder attributes.
282
+ Test the getDunderAttributes method of ReflectionAbstract.
283
+
284
+ Verifies that the getDunderAttributes method correctly returns attributes
285
+ that follow the dunder (double underscore) naming convention.
286
+
287
+ Assertions
288
+ ----------
289
+ Should include attributes with double underscores at both ends.
160
290
  """
161
291
  reflect = ReflectionAbstract(AbstractFakeClass)
162
292
  dunder_attributes = reflect.getDunderAttributes()
@@ -164,7 +294,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
164
294
 
165
295
  async def testGetMagicAttributes(self):
166
296
  """
167
- Verifies that getMagicAttributes returns magic attributes.
297
+ Test the getMagicAttributes method of ReflectionAbstract.
298
+
299
+ Verifies that the getMagicAttributes method correctly returns attributes
300
+ that are considered magic methods or special attributes in Python.
301
+
302
+ Assertions
303
+ ----------
304
+ Should include magic attributes like dunder attributes.
168
305
  """
169
306
  reflect = ReflectionAbstract(AbstractFakeClass)
170
307
  magic_attributes = reflect.getMagicAttributes()
@@ -172,39 +309,29 @@ class TestServiceReflectionAbstract(AsyncTestCase):
172
309
 
173
310
  async def testHasMethod(self):
174
311
  """
175
- Verifies that hasMethod identifies existing methods.
312
+ Test the hasMethod method of ReflectionAbstract.
313
+
314
+ Verifies that the hasMethod method correctly identifies whether
315
+ a specific method exists in the class.
316
+
317
+ Assertions
318
+ ----------
319
+ Should return True for existing methods and False for non-existent ones.
176
320
  """
177
321
  reflect = ReflectionAbstract(AbstractFakeClass)
178
322
  self.assertTrue(reflect.hasMethod('instanceSyncMethod'))
179
323
  self.assertFalse(reflect.hasMethod('non_existent_method'))
180
324
 
181
- async def testCallMethod(self):
182
- """
183
- Verifies that callMethod executes methods correctly.
184
- """
185
- # No aplica para ReflectionAbstract, se omite
186
-
187
- async def testCallAsyncMethod(self):
188
- """
189
- Verifies that callMethod executes async methods correctly.
190
- """
191
- # No aplica para ReflectionAbstract, se omite
192
-
193
- async def testSetMethod(self):
194
- """
195
- Verifies that setMethod assigns methods correctly.
325
+ async def testGetMethodSignature(self):
196
326
  """
197
- # No aplica para ReflectionAbstract, se omite
327
+ Test the getMethodSignature method of ReflectionAbstract.
198
328
 
199
- async def testRemoveMethod(self):
200
- """
201
- Verifies that removeMethod removes methods correctly.
202
- """
203
- # No aplica para ReflectionAbstract, se omite
329
+ Verifies that the getMethodSignature method correctly returns the
330
+ method signature including parameters and return type annotations.
204
331
 
205
- async def testGetMethodSignature(self):
206
- """
207
- Verifies that getMethodSignature returns the method signature.
332
+ Assertions
333
+ ----------
334
+ The returned signature should match the expected method signature format.
208
335
  """
209
336
  reflect = ReflectionAbstract(AbstractFakeClass)
210
337
  signature = reflect.getMethodSignature('instanceSyncMethod')
@@ -212,7 +339,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
212
339
 
213
340
  async def testGetMethods(self):
214
341
  """
215
- Verifies that getMethods returns the class methods.
342
+ Test the getMethods method of ReflectionAbstract.
343
+
344
+ Verifies that the getMethods method correctly returns all methods
345
+ defined in the class, regardless of their visibility level.
346
+
347
+ Assertions
348
+ ----------
349
+ The returned collection should contain the expected class methods.
216
350
  """
217
351
  reflect = ReflectionAbstract(AbstractFakeClass)
218
352
  methods = reflect.getMethods()
@@ -221,7 +355,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
221
355
 
222
356
  async def testGetPublicMethods(self):
223
357
  """
224
- Verifies that getPublicMethods returns only public methods.
358
+ Test the getPublicMethods method of ReflectionAbstract.
359
+
360
+ Verifies that the getPublicMethods method correctly returns only
361
+ methods with public visibility (no leading underscore).
362
+
363
+ Assertions
364
+ ----------
365
+ Should include public methods and exclude protected and private methods.
225
366
  """
226
367
  reflect = ReflectionAbstract(AbstractFakeClass)
227
368
  public_methods = reflect.getPublicMethods()
@@ -231,7 +372,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
231
372
 
232
373
  async def testGetPublicSyncMethods(self):
233
374
  """
234
- Verifies that getPublicSyncMethods returns only public sync methods.
375
+ Test the getPublicSyncMethods method of ReflectionAbstract.
376
+
377
+ Verifies that the getPublicSyncMethods method correctly returns only
378
+ synchronous methods with public visibility.
379
+
380
+ Assertions
381
+ ----------
382
+ Should include public sync methods and exclude async, protected, and private methods.
235
383
  """
236
384
  reflect = ReflectionAbstract(AbstractFakeClass)
237
385
  public_sync_methods = reflect.getPublicSyncMethods()
@@ -241,7 +389,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
241
389
 
242
390
  async def testGetPublicAsyncMethods(self):
243
391
  """
244
- Verifies that getPublicAsyncMethods returns only public async methods.
392
+ Test the getPublicAsyncMethods method of ReflectionAbstract.
393
+
394
+ Verifies that the getPublicAsyncMethods method correctly returns only
395
+ asynchronous methods with public visibility.
396
+
397
+ Assertions
398
+ ----------
399
+ Should include public async methods and exclude sync, protected, and private methods.
245
400
  """
246
401
  reflect = ReflectionAbstract(AbstractFakeClass)
247
402
  public_async_methods = reflect.getPublicAsyncMethods()
@@ -251,7 +406,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
251
406
 
252
407
  async def testGetProtectedMethods(self):
253
408
  """
254
- Verifies that getProtectedMethods returns only protected methods.
409
+ Test the getProtectedMethods method of ReflectionAbstract.
410
+
411
+ Verifies that the getProtectedMethods method correctly returns only
412
+ methods with protected visibility (single leading underscore).
413
+
414
+ Assertions
415
+ ----------
416
+ Should include protected methods and exclude public and private methods.
255
417
  """
256
418
  reflect = ReflectionAbstract(AbstractFakeClass)
257
419
  protected_methods = reflect.getProtectedMethods()
@@ -261,7 +423,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
261
423
 
262
424
  async def testGetProtectedSyncMethods(self):
263
425
  """
264
- Verifies that getProtectedSyncMethods returns only protected sync methods.
426
+ Test the getProtectedSyncMethods method of ReflectionAbstract.
427
+
428
+ Verifies that the getProtectedSyncMethods method correctly returns only
429
+ synchronous methods with protected visibility.
430
+
431
+ Assertions
432
+ ----------
433
+ Should include protected sync methods and exclude async, public, and private methods.
265
434
  """
266
435
  reflect = ReflectionAbstract(AbstractFakeClass)
267
436
  protected_sync_methods = reflect.getProtectedSyncMethods()
@@ -271,7 +440,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
271
440
 
272
441
  async def testGetProtectedAsyncMethods(self):
273
442
  """
274
- Verifies that getProtectedAsyncMethods returns only protected async methods.
443
+ Test the getProtectedAsyncMethods method of ReflectionAbstract.
444
+
445
+ Verifies that the getProtectedAsyncMethods method correctly returns only
446
+ asynchronous methods with protected visibility.
447
+
448
+ Assertions
449
+ ----------
450
+ Should include protected async methods and exclude sync, public, and private methods.
275
451
  """
276
452
  reflect = ReflectionAbstract(AbstractFakeClass)
277
453
  protected_async_methods = reflect.getProtectedAsyncMethods()
@@ -281,7 +457,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
281
457
 
282
458
  async def testGetPrivateMethods(self):
283
459
  """
284
- Verifies that getPrivateMethods returns only private methods.
460
+ Test the getPrivateMethods method of ReflectionAbstract.
461
+
462
+ Verifies that the getPrivateMethods method correctly returns only
463
+ methods with private visibility (double leading underscore).
464
+
465
+ Assertions
466
+ ----------
467
+ Should include private methods and exclude public and protected methods.
285
468
  """
286
469
  reflect = ReflectionAbstract(AbstractFakeClass)
287
470
  private_methods = reflect.getPrivateMethods()
@@ -291,7 +474,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
291
474
 
292
475
  async def testGetPrivateSyncMethods(self):
293
476
  """
294
- Verifies that getPrivateSyncMethods returns only private sync methods.
477
+ Test the getPrivateSyncMethods method of ReflectionAbstract.
478
+
479
+ Verifies that the getPrivateSyncMethods method correctly returns only
480
+ synchronous methods with private visibility.
481
+
482
+ Assertions
483
+ ----------
484
+ Should include private sync methods and exclude async, public, and protected methods.
295
485
  """
296
486
  reflect = ReflectionAbstract(AbstractFakeClass)
297
487
  private_sync_methods = reflect.getPrivateSyncMethods()
@@ -301,7 +491,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
301
491
 
302
492
  async def testGetPrivateAsyncMethods(self):
303
493
  """
304
- Verifies that getPrivateAsyncMethods returns only private async methods.
494
+ Test the getPrivateAsyncMethods method of ReflectionAbstract.
495
+
496
+ Verifies that the getPrivateAsyncMethods method correctly returns only
497
+ asynchronous methods with private visibility.
498
+
499
+ Assertions
500
+ ----------
501
+ Should include private async methods and exclude sync, public, and protected methods.
305
502
  """
306
503
  reflect = ReflectionAbstract(AbstractFakeClass)
307
504
  private_async_methods = reflect.getPrivateAsyncMethods()
@@ -311,7 +508,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
311
508
 
312
509
  async def testGetPublicClassMethods(self):
313
510
  """
314
- Verifies that getPublicClassMethods returns only public class methods.
511
+ Test the getPublicClassMethods method of ReflectionAbstract.
512
+
513
+ Verifies that the getPublicClassMethods method correctly returns only
514
+ class methods with public visibility (no leading underscore).
515
+
516
+ Assertions
517
+ ----------
518
+ Should include public class methods and exclude protected and private class methods.
315
519
  """
316
520
  reflect = ReflectionAbstract(AbstractFakeClass)
317
521
  public_class_methods = reflect.getPublicClassMethods()
@@ -321,7 +525,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
321
525
 
322
526
  async def testGetPublicClassSyncMethods(self):
323
527
  """
324
- Verifies that getPublicClassSyncMethods returns only public class sync methods.
528
+ Test the getPublicClassSyncMethods method of ReflectionAbstract.
529
+
530
+ Verifies that the getPublicClassSyncMethods method correctly returns only
531
+ synchronous class methods with public visibility.
532
+
533
+ Assertions
534
+ ----------
535
+ Should include public class sync methods and exclude async, protected, and private methods.
325
536
  """
326
537
  reflect = ReflectionAbstract(AbstractFakeClass)
327
538
  public_class_sync_methods = reflect.getPublicClassSyncMethods()
@@ -331,7 +542,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
331
542
 
332
543
  async def testGetPublicClassAsyncMethods(self):
333
544
  """
334
- Verifies that getPublicClassAsyncMethods returns only public class async methods.
545
+ Test getPublicClassAsyncMethods for public class async methods.
546
+
547
+ Returns
548
+ -------
549
+ None
550
+
551
+ Notes
552
+ -----
553
+ Ensures that only public class asynchronous methods are returned by
554
+ getPublicClassAsyncMethods. Public methods have no leading underscores.
335
555
  """
336
556
  reflect = ReflectionAbstract(AbstractFakeClass)
337
557
  public_class_async_methods = reflect.getPublicClassAsyncMethods()
@@ -341,7 +561,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
341
561
 
342
562
  async def testGetProtectedClassMethods(self):
343
563
  """
344
- Verifies that getProtectedClassMethods returns only protected class methods.
564
+ Test getProtectedClassMethods for protected class methods.
565
+
566
+ Returns
567
+ -------
568
+ None
569
+
570
+ Notes
571
+ -----
572
+ Ensures that only protected class methods (single leading underscore)
573
+ are returned by getProtectedClassMethods.
345
574
  """
346
575
  reflect = ReflectionAbstract(AbstractFakeClass)
347
576
  protected_class_methods = reflect.getProtectedClassMethods()
@@ -351,7 +580,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
351
580
 
352
581
  async def testGetProtectedClassSyncMethods(self):
353
582
  """
354
- Verifies that getProtectedClassSyncMethods returns only protected class sync methods.
583
+ Test getProtectedClassSyncMethods for protected class sync methods.
584
+
585
+ Returns
586
+ -------
587
+ None
588
+
589
+ Notes
590
+ -----
591
+ Ensures that only protected synchronous class methods (single leading underscore)
592
+ are returned by getProtectedClassSyncMethods.
355
593
  """
356
594
  reflect = ReflectionAbstract(AbstractFakeClass)
357
595
  protected_class_sync_methods = reflect.getProtectedClassSyncMethods()
@@ -361,7 +599,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
361
599
 
362
600
  async def testGetProtectedClassAsyncMethods(self):
363
601
  """
364
- Verifies that getProtectedClassAsyncMethods returns only protected class async methods.
602
+ Test that getProtectedClassAsyncMethods returns only protected class asynchronous methods.
603
+
604
+ Returns
605
+ -------
606
+ None
607
+
608
+ Notes
609
+ -----
610
+ Ensures that only protected class async methods (single leading underscore)
611
+ are included in the result, while public and private class async methods are excluded.
365
612
  """
366
613
  reflect = ReflectionAbstract(AbstractFakeClass)
367
614
  protected_class_async_methods = reflect.getProtectedClassAsyncMethods()
@@ -371,7 +618,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
371
618
 
372
619
  async def testGetPrivateClassMethods(self):
373
620
  """
374
- Verifies that getPrivateClassMethods returns only private class methods.
621
+ Test that getPrivateClassMethods returns only private class methods.
622
+
623
+ Returns
624
+ -------
625
+ None
626
+
627
+ Notes
628
+ -----
629
+ Ensures that only private class methods (double leading underscore)
630
+ are included in the result, while public and protected class methods are excluded.
375
631
  """
376
632
  reflect = ReflectionAbstract(AbstractFakeClass)
377
633
  private_class_methods = reflect.getPrivateClassMethods()
@@ -381,7 +637,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
381
637
 
382
638
  async def testGetPrivateClassSyncMethods(self):
383
639
  """
384
- Verifies that getPrivateClassSyncMethods returns only private class sync methods.
640
+ Test that getPrivateClassSyncMethods returns only private synchronous class methods.
641
+
642
+ Returns
643
+ -------
644
+ None
645
+
646
+ Notes
647
+ -----
648
+ Ensures that only private synchronous class methods (double leading underscore)
649
+ are included in the result, while public and protected class sync methods are excluded.
385
650
  """
386
651
  reflect = ReflectionAbstract(AbstractFakeClass)
387
652
  private_class_methods = reflect.getPrivateClassSyncMethods()
@@ -391,7 +656,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
391
656
 
392
657
  async def testGetPrivateClassAsyncMethods(self):
393
658
  """
394
- Verifies that getPrivateClassAsyncMethods returns only private class async methods.
659
+ Test that getPrivateClassAsyncMethods returns only private class asynchronous methods.
660
+
661
+ Returns
662
+ -------
663
+ None
664
+
665
+ Notes
666
+ -----
667
+ Ensures that only private class async methods (double leading underscore)
668
+ are included in the result, while public and protected class async methods are excluded.
395
669
  """
396
670
  reflect = ReflectionAbstract(AbstractFakeClass)
397
671
  private_class_async_methods = reflect.getPrivateClassAsyncMethods()
@@ -401,7 +675,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
401
675
 
402
676
  async def testGetPublicStaticMethods(self):
403
677
  """
404
- Verifies that getPublicStaticMethods returns only public static methods.
678
+ Test that getPublicStaticMethods returns only public static methods.
679
+
680
+ Returns
681
+ -------
682
+ None
683
+
684
+ Notes
685
+ -----
686
+ Ensures that only public static methods (no leading underscore) are included in the result.
687
+ Both synchronous and asynchronous public static methods are considered.
405
688
  """
406
689
  reflect = ReflectionAbstract(AbstractFakeClass)
407
690
  public_static_methods = reflect.getPublicStaticMethods()
@@ -411,7 +694,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
411
694
 
412
695
  async def testGetPublicStaticSyncMethods(self):
413
696
  """
414
- Verifies that getPublicStaticSyncMethods returns only public static sync methods.
697
+ Test that getPublicStaticSyncMethods returns only public static synchronous methods.
698
+
699
+ Returns
700
+ -------
701
+ None
702
+
703
+ Notes
704
+ -----
705
+ Ensures that only public static synchronous methods (no leading underscore)
706
+ are included in the result, while async and non-public static methods are excluded.
415
707
  """
416
708
  reflect = ReflectionAbstract(AbstractFakeClass)
417
709
  public_static_sync_methods = reflect.getPublicStaticSyncMethods()
@@ -421,7 +713,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
421
713
 
422
714
  async def testGetPublicStaticAsyncMethods(self):
423
715
  """
424
- Verifies that getPublicStaticAsyncMethods returns only public static async methods.
716
+ Test that getPublicStaticAsyncMethods returns only public static asynchronous methods.
717
+
718
+ Returns
719
+ -------
720
+ None
721
+
722
+ Notes
723
+ -----
724
+ Ensures that only public static asynchronous methods (no leading underscore)
725
+ are included in the result, while synchronous and non-public static methods are excluded.
425
726
  """
426
727
  reflect = ReflectionAbstract(AbstractFakeClass)
427
728
  public_static_async_methods = reflect.getPublicStaticAsyncMethods()
@@ -431,7 +732,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
431
732
 
432
733
  async def testGetProtectedStaticMethods(self):
433
734
  """
434
- Verifies that getProtectedStaticMethods returns only protected static methods.
735
+ Test that getProtectedStaticMethods returns only protected static methods.
736
+
737
+ Returns
738
+ -------
739
+ None
740
+
741
+ Notes
742
+ -----
743
+ Ensures that only protected static methods (single leading underscore)
744
+ are included in the result, while public and private static methods are excluded.
435
745
  """
436
746
  reflect = ReflectionAbstract(AbstractFakeClass)
437
747
  protected_static_methods = reflect.getProtectedStaticMethods()
@@ -441,7 +751,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
441
751
 
442
752
  async def testGetProtectedStaticSyncMethods(self):
443
753
  """
444
- Verifies that getProtectedStaticSyncMethods returns only protected static sync methods.
754
+ Test that getProtectedStaticSyncMethods returns only protected static synchronous methods.
755
+
756
+ Returns
757
+ -------
758
+ None
759
+
760
+ Notes
761
+ -----
762
+ Ensures that only protected static synchronous methods (single leading underscore)
763
+ are included in the result, while async, public, and private static methods are excluded.
445
764
  """
446
765
  reflect = ReflectionAbstract(AbstractFakeClass)
447
766
  protected_static_sync_methods = reflect.getProtectedStaticSyncMethods()
@@ -451,7 +770,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
451
770
 
452
771
  async def testGetProtectedStaticAsyncMethods(self):
453
772
  """
454
- Verifies that getProtectedStaticAsyncMethods returns only protected static async methods.
773
+ Test that getProtectedStaticAsyncMethods returns only protected static asynchronous methods.
774
+
775
+ Returns
776
+ -------
777
+ None
778
+
779
+ Notes
780
+ -----
781
+ Ensures that only protected static asynchronous methods (single leading underscore)
782
+ are included in the result, while public and private static methods are excluded.
455
783
  """
456
784
  reflect = ReflectionAbstract(AbstractFakeClass)
457
785
  protected_static_async_methods = reflect.getProtectedStaticAsyncMethods()
@@ -461,7 +789,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
461
789
 
462
790
  async def testGetPrivateStaticMethods(self):
463
791
  """
464
- Verifies that getPrivateStaticMethods returns only private static methods.
792
+ Test that getPrivateStaticMethods returns only private static methods.
793
+
794
+ Returns
795
+ -------
796
+ None
797
+
798
+ Notes
799
+ -----
800
+ Ensures that only private static methods (double leading underscore)
801
+ are included in the result, while public and protected static methods are excluded.
465
802
  """
466
803
  reflect = ReflectionAbstract(AbstractFakeClass)
467
804
  private_static_methods = reflect.getPrivateStaticMethods()
@@ -471,7 +808,16 @@ class TestServiceReflectionAbstract(AsyncTestCase):
471
808
 
472
809
  async def testGetPrivateStaticSyncMethods(self):
473
810
  """
474
- Verifies that getPrivateStaticSyncMethods returns only private static sync methods.
811
+ Test that getPrivateStaticSyncMethods returns only private static synchronous methods.
812
+
813
+ Returns
814
+ -------
815
+ None
816
+
817
+ Notes
818
+ -----
819
+ Ensures that only private static synchronous methods (double leading underscore)
820
+ are included in the result, while public and protected static sync methods are excluded.
475
821
  """
476
822
  reflect = ReflectionAbstract(AbstractFakeClass)
477
823
  private_static_sync_methods = reflect.getPrivateStaticSyncMethods()
@@ -481,17 +827,39 @@ class TestServiceReflectionAbstract(AsyncTestCase):
481
827
 
482
828
  async def testGetPrivateStaticAsyncMethods(self):
483
829
  """
484
- Verifies that getPrivateStaticAsyncMethods returns only private static async methods.
830
+ Test that getPrivateStaticAsyncMethods returns only private static asynchronous methods.
831
+
832
+ Parameters
833
+ ----------
834
+ self : TestServiceReflectionAbstract
835
+ The test case instance.
836
+
837
+ Returns
838
+ -------
839
+ None
840
+
841
+ Notes
842
+ -----
843
+ Ensures that only private static asynchronous methods (double leading underscore)
844
+ are included in the result, while public and protected static async methods are excluded.
485
845
  """
486
846
  reflect = ReflectionAbstract(AbstractFakeClass)
487
847
  private_static_async_methods = reflect.getPrivateStaticAsyncMethods()
848
+ # Should include only double underscore (private) static async methods
488
849
  self.assertIn('__staticAsyncMethodPrivate', private_static_async_methods)
489
850
  self.assertNotIn('staticAsyncMethod', private_static_async_methods)
490
851
  self.assertNotIn('_staticAsyncMethodProtected', private_static_async_methods)
491
852
 
492
853
  async def testGetDunderMethods(self):
493
854
  """
494
- Verifies that getDunderMethods returns dunder methods.
855
+ Test the getDunderMethods method of ReflectionAbstract.
856
+
857
+ Verifies that the getDunderMethods method correctly returns methods
858
+ that follow the dunder (double underscore) naming convention.
859
+
860
+ Assertions
861
+ ----------
862
+ Should include methods with double underscores at both ends like __init__.
495
863
  """
496
864
  reflect = ReflectionAbstract(AbstractFakeClass)
497
865
  dunder_methods = reflect.getDunderMethods()
@@ -499,7 +867,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
499
867
 
500
868
  async def testGetMagicMethods(self):
501
869
  """
502
- Verifies that getMagicMethods returns magic methods.
870
+ Test the getMagicMethods method of ReflectionAbstract.
871
+
872
+ Verifies that the getMagicMethods method correctly returns methods
873
+ that are considered magic methods or special methods in Python.
874
+
875
+ Assertions
876
+ ----------
877
+ Should include magic methods like dunder methods.
503
878
  """
504
879
  reflect = ReflectionAbstract(AbstractFakeClass)
505
880
  magic_methods = reflect.getMagicMethods()
@@ -507,7 +882,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
507
882
 
508
883
  async def testGetProperties(self):
509
884
  """
510
- Verifies that getProperties returns the class properties.
885
+ Test the getProperties method of ReflectionAbstract.
886
+
887
+ Verifies that the getProperties method correctly returns all properties
888
+ defined in the class using the @property decorator.
889
+
890
+ Assertions
891
+ ----------
892
+ The returned collection should contain the expected class properties.
511
893
  """
512
894
  reflect = ReflectionAbstract(AbstractFakeClass)
513
895
  properties = reflect.getProperties()
@@ -517,7 +899,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
517
899
 
518
900
  async def testGetPublicProperties(self):
519
901
  """
520
- Verifies that getPublicProperties returns only public properties.
902
+ Test the getPublicProperties method of ReflectionAbstract.
903
+
904
+ Verifies that the getPublicProperties method correctly returns only
905
+ properties with public visibility (no leading underscore).
906
+
907
+ Assertions
908
+ ----------
909
+ Should include public properties and exclude protected and private properties.
521
910
  """
522
911
  reflect = ReflectionAbstract(AbstractFakeClass)
523
912
  public_properties = reflect.getPublicProperties()
@@ -527,7 +916,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
527
916
 
528
917
  async def testGetProtectedProperties(self):
529
918
  """
530
- Verifies that getProtectedProperties returns only protected properties.
919
+ Test the getProtectedProperties method of ReflectionAbstract.
920
+
921
+ Verifies that the getProtectedProperties method correctly returns only
922
+ properties with protected visibility (single leading underscore).
923
+
924
+ Assertions
925
+ ----------
926
+ Should include protected properties and exclude public and private properties.
531
927
  """
532
928
  reflect = ReflectionAbstract(AbstractFakeClass)
533
929
  protected_properties = reflect.getProtectedProperties()
@@ -537,7 +933,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
537
933
 
538
934
  async def testGetPrivateProperties(self):
539
935
  """
540
- Verifies that getPrivateProperties returns only private properties.
936
+ Test the getPrivateProperties method of ReflectionAbstract.
937
+
938
+ Verifies that the getPrivateProperties method correctly returns only
939
+ properties with private visibility (double leading underscore).
940
+
941
+ Assertions
942
+ ----------
943
+ Should include private properties and exclude public and protected properties.
541
944
  """
542
945
  reflect = ReflectionAbstract(AbstractFakeClass)
543
946
  private_properties = reflect.getPrivateProperties()
@@ -547,7 +950,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
547
950
 
548
951
  async def testGetPropertySignature(self):
549
952
  """
550
- Verifies that getPropertySignature returns the property signature.
953
+ Test the getPropertySignature method of ReflectionAbstract.
954
+
955
+ Verifies that the getPropertySignature method correctly returns the
956
+ signature of a property's getter method.
957
+
958
+ Assertions
959
+ ----------
960
+ The returned signature should match the expected property signature format.
551
961
  """
552
962
  reflect = ReflectionAbstract(AbstractFakeClass)
553
963
  signature = reflect.getPropertySignature('computed_public_property')
@@ -555,15 +965,29 @@ class TestServiceReflectionAbstract(AsyncTestCase):
555
965
 
556
966
  async def testGetPropertyDocstring(self):
557
967
  """
558
- Verifies that getPropertyDocstring returns the property docstring.
968
+ Test the getPropertyDocstring method of ReflectionAbstract.
969
+
970
+ Verifies that the getPropertyDocstring method correctly returns the
971
+ docstring of a property.
972
+
973
+ Assertions
974
+ ----------
975
+ The returned docstring should contain the expected property documentation.
559
976
  """
560
977
  reflect = ReflectionAbstract(AbstractFakeClass)
561
978
  docstring = reflect.getPropertyDocstring('computed_public_property')
562
- self.assertIn('Computes and returns the valu', docstring)
979
+ self.assertIn('Abstract property for a computed', docstring)
563
980
 
564
981
  async def testGetConstructorDependencies(self):
565
982
  """
566
- Verifies that getConstructorDependencies returns the constructor dependencies.
983
+ Test the getConstructorDependencies method of ReflectionAbstract.
984
+
985
+ Verifies that the getConstructorDependencies method correctly returns
986
+ the dependencies required by the class constructor.
987
+
988
+ Assertions
989
+ ----------
990
+ Should return a ClassDependency instance with constructor dependencies.
567
991
  """
568
992
  reflect = ReflectionAbstract(AbstractFakeClass)
569
993
  dependencies = reflect.getConstructorDependencies()
@@ -571,7 +995,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
571
995
 
572
996
  async def testGetMethodDependencies(self):
573
997
  """
574
- Verifies that getMethodDependencies returns the method dependencies.
998
+ Test the getMethodDependencies method of ReflectionAbstract.
999
+
1000
+ Verifies that the getMethodDependencies method correctly returns the
1001
+ dependencies and parameter information for a specific method.
1002
+
1003
+ Assertions
1004
+ ----------
1005
+ Should return method dependencies with correct parameter types and metadata.
575
1006
  """
576
1007
  reflect = ReflectionAbstract(AbstractFakeClass)
577
1008
  method_deps = reflect.getMethodDependencies('instanceSyncMethod')