orionis 0.437.0__py3-none-any.whl → 0.438.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 (25) hide show
  1. orionis/metadata/framework.py +1 -1
  2. {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/METADATA +1 -1
  3. {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/RECORD +25 -24
  4. tests/container/core/__init__.py +0 -0
  5. tests/container/mocks/mock_complex_classes.py +502 -192
  6. tests/container/mocks/mock_simple_classes.py +72 -6
  7. tests/container/validators/test_is_valid_alias.py +1 -1
  8. tests/foundation/config/database/test_foundation_config_database.py +54 -28
  9. tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +40 -22
  10. tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +75 -48
  11. tests/foundation/config/logging/test_foundation_config_logging_channels.py +49 -37
  12. tests/foundation/config/logging/test_foundation_config_logging_monthly.py +80 -42
  13. tests/foundation/config/logging/test_foundation_config_logging_stack.py +46 -22
  14. tests/foundation/config/root/test_foundation_config_root_paths.py +37 -44
  15. tests/foundation/config/session/test_foundation_config_session.py +65 -20
  16. tests/foundation/config/startup/test_foundation_config_startup.py +37 -33
  17. tests/services/introspection/dependencies/test_reflect_dependencies.py +77 -25
  18. tests/services/introspection/reflection/test_reflection_abstract.py +403 -47
  19. {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/WHEEL +0 -0
  20. {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/licenses/LICENCE +0 -0
  21. {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/top_level.txt +0 -0
  22. {orionis-0.437.0.dist-info → orionis-0.438.0.dist-info}/zip-safe +0 -0
  23. /tests/container/{test_container.py → core/test_container.py} +0 -0
  24. /tests/container/{test_singleton.py → core/test_singleton.py} +0 -0
  25. /tests/container/{test_thread_safety.py → core/test_thread_safety.py} +0 -0
@@ -4,10 +4,40 @@ from tests.services.introspection.reflection.mock.fake_reflect_instance import A
4
4
  from orionis.test.cases.asynchronous import AsyncTestCase
5
5
 
6
6
  class TestServiceReflectionAbstract(AsyncTestCase):
7
+ """
8
+ Test suite for the ReflectionAbstract class functionality.
9
+
10
+ This test class provides comprehensive testing for the ReflectionAbstract
11
+ service, which offers introspection capabilities for Python classes including
12
+ attribute inspection, method discovery, dependency analysis, and metadata extraction.
13
+
14
+ The tests verify that the reflection service correctly handles:
15
+ - Class metadata retrieval (name, module, docstring, etc.)
16
+ - Attribute management and visibility filtering
17
+ - Method discovery and categorization (public/protected/private, sync/async)
18
+ - Property introspection
19
+ - Dependency analysis for constructors and methods
20
+ - Source code and file information access
21
+
22
+ Test Target
23
+ -----------
24
+ orionis.services.introspection.abstract.reflection.ReflectionAbstract
25
+
26
+ Mock Objects
27
+ ------------
28
+ AbstractFakeClass : Mock class for testing reflection capabilities
29
+ """
7
30
 
8
31
  async def testGetClass(self):
9
32
  """
10
- Verifies that getClass returns the correct class.
33
+ Test the getClass method of ReflectionAbstract.
34
+
35
+ Verifies that the getClass method correctly returns the class object
36
+ that was passed during ReflectionAbstract instantiation.
37
+
38
+ Assertions
39
+ ----------
40
+ The returned class object should be identical to the original class.
11
41
  """
12
42
  reflect = ReflectionAbstract(AbstractFakeClass)
13
43
  cls = reflect.getClass()
@@ -15,7 +45,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
15
45
 
16
46
  async def testGetClassName(self):
17
47
  """
18
- Verifies that getClassName returns the class name.
48
+ Test the getClassName method of ReflectionAbstract.
49
+
50
+ Verifies that the getClassName method correctly returns the name
51
+ of the class as a string.
52
+
53
+ Assertions
54
+ ----------
55
+ The returned string should match the actual class name.
19
56
  """
20
57
  reflect = ReflectionAbstract(AbstractFakeClass)
21
58
  class_name = reflect.getClassName()
@@ -23,7 +60,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
23
60
 
24
61
  async def testGetModuleName(self):
25
62
  """
26
- Verifies that getModuleName returns the module name.
63
+ Test the getModuleName method of ReflectionAbstract.
64
+
65
+ Verifies that the getModuleName method correctly returns the fully
66
+ qualified module name where the class is defined.
67
+
68
+ Assertions
69
+ ----------
70
+ The returned string should match the complete module path.
27
71
  """
28
72
  reflect = ReflectionAbstract(AbstractFakeClass)
29
73
  module_name = reflect.getModuleName()
@@ -31,7 +75,15 @@ class TestServiceReflectionAbstract(AsyncTestCase):
31
75
 
32
76
  async def testGetModuleWithClassName(self):
33
77
  """
34
- Verifies that getModuleWithClassName returns the module and class name.
78
+ Test the getModuleWithClassName method of ReflectionAbstract.
79
+
80
+ Verifies that the getModuleWithClassName method correctly returns
81
+ the fully qualified name combining module path and class name.
82
+
83
+ Assertions
84
+ ----------
85
+ The returned string should contain the complete module path followed
86
+ by the class name, separated by a dot.
35
87
  """
36
88
  reflect = ReflectionAbstract(AbstractFakeClass)
37
89
  module_with_class_name = reflect.getModuleWithClassName()
@@ -39,7 +91,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
39
91
 
40
92
  async def testGetDocstring(self):
41
93
  """
42
- Verifies that getDocstring returns the class docstring.
94
+ Test the getDocstring method of ReflectionAbstract.
95
+
96
+ Verifies that the getDocstring method correctly returns the class
97
+ docstring as it appears in the class definition.
98
+
99
+ Assertions
100
+ ----------
101
+ The returned docstring should be identical to the class's __doc__ attribute.
43
102
  """
44
103
  reflect = ReflectionAbstract(AbstractFakeClass)
45
104
  docstring = reflect.getDocstring()
@@ -47,7 +106,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
47
106
 
48
107
  async def testGetBaseClasses(self):
49
108
  """
50
- Verifies that getBaseClasses returns the base classes.
109
+ Test the getBaseClasses method of ReflectionAbstract.
110
+
111
+ Verifies that the getBaseClasses method correctly returns a collection
112
+ of base classes that the reflected class inherits from.
113
+
114
+ Assertions
115
+ ----------
116
+ The returned collection should contain the class's base class.
51
117
  """
52
118
  reflect = ReflectionAbstract(AbstractFakeClass)
53
119
  base_classes = reflect.getBaseClasses()
@@ -55,7 +121,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
55
121
 
56
122
  async def testGetSourceCode(self):
57
123
  """
58
- Verifies that getSourceCode returns the class source code.
124
+ Test the getSourceCode method of ReflectionAbstract.
125
+
126
+ Verifies that the getSourceCode method correctly returns the source
127
+ code of the class as a string.
128
+
129
+ Assertions
130
+ ----------
131
+ The returned source code should start with the class definition.
59
132
  """
60
133
  reflect = ReflectionAbstract(AbstractFakeClass)
61
134
  source_code = reflect.getSourceCode()
@@ -63,7 +136,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
63
136
 
64
137
  async def testGetFile(self):
65
138
  """
66
- Verifies that getFile returns the class file path.
139
+ Test the getFile method of ReflectionAbstract.
140
+
141
+ Verifies that the getFile method correctly returns the file path
142
+ where the class is defined.
143
+
144
+ Assertions
145
+ ----------
146
+ The returned file path should end with the expected filename.
67
147
  """
68
148
  reflect = ReflectionAbstract(AbstractFakeClass)
69
149
  file_path = reflect.getFile()
@@ -71,7 +151,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
71
151
 
72
152
  async def testGetAnnotations(self):
73
153
  """
74
- Verifies that getAnnotations returns the class annotations.
154
+ Test the getAnnotations method of ReflectionAbstract.
155
+
156
+ Verifies that the getAnnotations method correctly returns the type
157
+ annotations defined in the class.
158
+
159
+ Assertions
160
+ ----------
161
+ The returned annotations should contain the expected annotated attribute.
75
162
  """
76
163
  reflect = ReflectionAbstract(AbstractFakeClass)
77
164
  annotations = reflect.getAnnotations()
@@ -79,7 +166,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
79
166
 
80
167
  async def testHasAttribute(self):
81
168
  """
82
- Verifies that hasAttribute identifies existing attributes.
169
+ Test the hasAttribute method of ReflectionAbstract.
170
+
171
+ Verifies that the hasAttribute method correctly identifies whether
172
+ a specific attribute exists in the class.
173
+
174
+ Assertions
175
+ ----------
176
+ Should return True for existing attributes and False for non-existent ones.
83
177
  """
84
178
  reflect = ReflectionAbstract(AbstractFakeClass)
85
179
  self.assertTrue(reflect.hasAttribute('public_attr'))
@@ -87,7 +181,15 @@ class TestServiceReflectionAbstract(AsyncTestCase):
87
181
 
88
182
  async def testGetAttribute(self):
89
183
  """
90
- Verifies that getAttribute gets the correct value of an attribute.
184
+ Test the getAttribute method of ReflectionAbstract.
185
+
186
+ Verifies that the getAttribute method correctly retrieves the value
187
+ of existing attributes and returns None for non-existent ones.
188
+
189
+ Assertions
190
+ ----------
191
+ Should return the correct value for existing attributes and None
192
+ for non-existent attributes.
91
193
  """
92
194
  reflect = ReflectionAbstract(AbstractFakeClass)
93
195
  self.assertEqual(reflect.getAttribute('public_attr'), 42)
@@ -95,7 +197,15 @@ class TestServiceReflectionAbstract(AsyncTestCase):
95
197
 
96
198
  async def testSetAttribute(self):
97
199
  """
98
- Verifies that setAttribute modifies attributes correctly.
200
+ Test the setAttribute method of ReflectionAbstract.
201
+
202
+ Verifies that the setAttribute method correctly assigns values to
203
+ attributes, including public, protected, and private attributes.
204
+
205
+ Assertions
206
+ ----------
207
+ Should successfully set attributes with different visibility levels
208
+ and confirm the values are correctly assigned.
99
209
  """
100
210
  reflect = ReflectionAbstract(AbstractFakeClass)
101
211
  self.assertTrue(reflect.setAttribute('name', 'Orionis Framework'))
@@ -107,7 +217,15 @@ class TestServiceReflectionAbstract(AsyncTestCase):
107
217
 
108
218
  async def testRemoveAttribute(self):
109
219
  """
110
- Verifies that removeAttribute removes attributes correctly.
220
+ Test the removeAttribute method of ReflectionAbstract.
221
+
222
+ Verifies that the removeAttribute method correctly removes attributes
223
+ from the class and returns the appropriate boolean result.
224
+
225
+ Assertions
226
+ ----------
227
+ Should successfully remove existing attributes and return True,
228
+ then confirm the attribute no longer exists.
111
229
  """
112
230
  reflect = ReflectionAbstract(AbstractFakeClass)
113
231
  reflect.setAttribute('new_attr', 100)
@@ -116,7 +234,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
116
234
 
117
235
  async def testGetAttributes(self):
118
236
  """
119
- Verifies that getAttributes returns all attributes.
237
+ Test the getAttributes method of ReflectionAbstract.
238
+
239
+ Verifies that the getAttributes method correctly returns all attributes
240
+ from the class, regardless of their visibility level.
241
+
242
+ Assertions
243
+ ----------
244
+ The returned collection should contain public, protected, and private attributes.
120
245
  """
121
246
  reflect = ReflectionAbstract(AbstractFakeClass)
122
247
  attributes = reflect.getAttributes()
@@ -126,7 +251,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
126
251
 
127
252
  async def testGetPublicAttributes(self):
128
253
  """
129
- Verifies that getPublicAttributes returns only public attributes.
254
+ Test the getPublicAttributes method of ReflectionAbstract.
255
+
256
+ Verifies that the getPublicAttributes method correctly returns only
257
+ attributes with public visibility (no leading underscore).
258
+
259
+ Assertions
260
+ ----------
261
+ Should include public attributes and exclude protected and private attributes.
130
262
  """
131
263
  reflect = ReflectionAbstract(AbstractFakeClass)
132
264
  public_attributes = reflect.getPublicAttributes()
@@ -136,7 +268,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
136
268
 
137
269
  async def testGetProtectedAttributes(self):
138
270
  """
139
- Verifies that getProtectedAttributes returns only protected attributes.
271
+ Test the getProtectedAttributes method of ReflectionAbstract.
272
+
273
+ Verifies that the getProtectedAttributes method correctly returns only
274
+ attributes with protected visibility (single leading underscore).
275
+
276
+ Assertions
277
+ ----------
278
+ Should include protected attributes and exclude public and private attributes.
140
279
  """
141
280
  reflect = ReflectionAbstract(AbstractFakeClass)
142
281
  protected_attributes = reflect.getProtectedAttributes()
@@ -146,7 +285,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
146
285
 
147
286
  async def testGetPrivateAttributes(self):
148
287
  """
149
- Verifies that getPrivateAttributes returns only private attributes.
288
+ Test the getPrivateAttributes method of ReflectionAbstract.
289
+
290
+ Verifies that the getPrivateAttributes method correctly returns only
291
+ attributes with private visibility (double leading underscore).
292
+
293
+ Assertions
294
+ ----------
295
+ Should include private attributes and exclude public and protected attributes.
150
296
  """
151
297
  reflect = ReflectionAbstract(AbstractFakeClass)
152
298
  private_attributes = reflect.getPrivateAttributes()
@@ -156,7 +302,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
156
302
 
157
303
  async def testGetDunderAttributes(self):
158
304
  """
159
- Verifies that getDunderAttributes returns dunder attributes.
305
+ Test the getDunderAttributes method of ReflectionAbstract.
306
+
307
+ Verifies that the getDunderAttributes method correctly returns attributes
308
+ that follow the dunder (double underscore) naming convention.
309
+
310
+ Assertions
311
+ ----------
312
+ Should include attributes with double underscores at both ends.
160
313
  """
161
314
  reflect = ReflectionAbstract(AbstractFakeClass)
162
315
  dunder_attributes = reflect.getDunderAttributes()
@@ -164,7 +317,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
164
317
 
165
318
  async def testGetMagicAttributes(self):
166
319
  """
167
- Verifies that getMagicAttributes returns magic attributes.
320
+ Test the getMagicAttributes method of ReflectionAbstract.
321
+
322
+ Verifies that the getMagicAttributes method correctly returns attributes
323
+ that are considered magic methods or special attributes in Python.
324
+
325
+ Assertions
326
+ ----------
327
+ Should include magic attributes like dunder attributes.
168
328
  """
169
329
  reflect = ReflectionAbstract(AbstractFakeClass)
170
330
  magic_attributes = reflect.getMagicAttributes()
@@ -172,7 +332,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
172
332
 
173
333
  async def testHasMethod(self):
174
334
  """
175
- Verifies that hasMethod identifies existing methods.
335
+ Test the hasMethod method of ReflectionAbstract.
336
+
337
+ Verifies that the hasMethod method correctly identifies whether
338
+ a specific method exists in the class.
339
+
340
+ Assertions
341
+ ----------
342
+ Should return True for existing methods and False for non-existent ones.
176
343
  """
177
344
  reflect = ReflectionAbstract(AbstractFakeClass)
178
345
  self.assertTrue(reflect.hasMethod('instanceSyncMethod'))
@@ -180,31 +347,66 @@ class TestServiceReflectionAbstract(AsyncTestCase):
180
347
 
181
348
  async def testCallMethod(self):
182
349
  """
183
- Verifies that callMethod executes methods correctly.
350
+ Test the callMethod method of ReflectionAbstract.
351
+
352
+ This test method is not applicable for ReflectionAbstract as it only
353
+ provides introspection capabilities without method execution.
354
+
355
+ Notes
356
+ -----
357
+ ReflectionAbstract is designed for reflection, not execution.
184
358
  """
185
359
  # No aplica para ReflectionAbstract, se omite
186
360
 
187
361
  async def testCallAsyncMethod(self):
188
362
  """
189
- Verifies that callMethod executes async methods correctly.
363
+ Test the callAsyncMethod method of ReflectionAbstract.
364
+
365
+ This test method is not applicable for ReflectionAbstract as it only
366
+ provides introspection capabilities without method execution.
367
+
368
+ Notes
369
+ -----
370
+ ReflectionAbstract is designed for reflection, not execution.
190
371
  """
191
372
  # No aplica para ReflectionAbstract, se omite
192
373
 
193
374
  async def testSetMethod(self):
194
375
  """
195
- Verifies that setMethod assigns methods correctly.
376
+ Test the setMethod method of ReflectionAbstract.
377
+
378
+ This test method is not applicable for ReflectionAbstract as it only
379
+ provides introspection capabilities without method modification.
380
+
381
+ Notes
382
+ -----
383
+ ReflectionAbstract is designed for reflection, not modification.
196
384
  """
197
385
  # No aplica para ReflectionAbstract, se omite
198
386
 
199
387
  async def testRemoveMethod(self):
200
388
  """
201
- Verifies that removeMethod removes methods correctly.
389
+ Test the removeMethod method of ReflectionAbstract.
390
+
391
+ This test method is not applicable for ReflectionAbstract as it only
392
+ provides introspection capabilities without method removal.
393
+
394
+ Notes
395
+ -----
396
+ ReflectionAbstract is designed for reflection, not modification.
202
397
  """
203
398
  # No aplica para ReflectionAbstract, se omite
204
399
 
205
400
  async def testGetMethodSignature(self):
206
401
  """
207
- Verifies that getMethodSignature returns the method signature.
402
+ Test the getMethodSignature method of ReflectionAbstract.
403
+
404
+ Verifies that the getMethodSignature method correctly returns the
405
+ method signature including parameters and return type annotations.
406
+
407
+ Assertions
408
+ ----------
409
+ The returned signature should match the expected method signature format.
208
410
  """
209
411
  reflect = ReflectionAbstract(AbstractFakeClass)
210
412
  signature = reflect.getMethodSignature('instanceSyncMethod')
@@ -212,7 +414,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
212
414
 
213
415
  async def testGetMethods(self):
214
416
  """
215
- Verifies that getMethods returns the class methods.
417
+ Test the getMethods method of ReflectionAbstract.
418
+
419
+ Verifies that the getMethods method correctly returns all methods
420
+ defined in the class, regardless of their visibility level.
421
+
422
+ Assertions
423
+ ----------
424
+ The returned collection should contain the expected class methods.
216
425
  """
217
426
  reflect = ReflectionAbstract(AbstractFakeClass)
218
427
  methods = reflect.getMethods()
@@ -221,7 +430,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
221
430
 
222
431
  async def testGetPublicMethods(self):
223
432
  """
224
- Verifies that getPublicMethods returns only public methods.
433
+ Test the getPublicMethods method of ReflectionAbstract.
434
+
435
+ Verifies that the getPublicMethods method correctly returns only
436
+ methods with public visibility (no leading underscore).
437
+
438
+ Assertions
439
+ ----------
440
+ Should include public methods and exclude protected and private methods.
225
441
  """
226
442
  reflect = ReflectionAbstract(AbstractFakeClass)
227
443
  public_methods = reflect.getPublicMethods()
@@ -231,7 +447,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
231
447
 
232
448
  async def testGetPublicSyncMethods(self):
233
449
  """
234
- Verifies that getPublicSyncMethods returns only public sync methods.
450
+ Test the getPublicSyncMethods method of ReflectionAbstract.
451
+
452
+ Verifies that the getPublicSyncMethods method correctly returns only
453
+ synchronous methods with public visibility.
454
+
455
+ Assertions
456
+ ----------
457
+ Should include public sync methods and exclude async, protected, and private methods.
235
458
  """
236
459
  reflect = ReflectionAbstract(AbstractFakeClass)
237
460
  public_sync_methods = reflect.getPublicSyncMethods()
@@ -241,7 +464,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
241
464
 
242
465
  async def testGetPublicAsyncMethods(self):
243
466
  """
244
- Verifies that getPublicAsyncMethods returns only public async methods.
467
+ Test the getPublicAsyncMethods method of ReflectionAbstract.
468
+
469
+ Verifies that the getPublicAsyncMethods method correctly returns only
470
+ asynchronous methods with public visibility.
471
+
472
+ Assertions
473
+ ----------
474
+ Should include public async methods and exclude sync, protected, and private methods.
245
475
  """
246
476
  reflect = ReflectionAbstract(AbstractFakeClass)
247
477
  public_async_methods = reflect.getPublicAsyncMethods()
@@ -251,7 +481,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
251
481
 
252
482
  async def testGetProtectedMethods(self):
253
483
  """
254
- Verifies that getProtectedMethods returns only protected methods.
484
+ Test the getProtectedMethods method of ReflectionAbstract.
485
+
486
+ Verifies that the getProtectedMethods method correctly returns only
487
+ methods with protected visibility (single leading underscore).
488
+
489
+ Assertions
490
+ ----------
491
+ Should include protected methods and exclude public and private methods.
255
492
  """
256
493
  reflect = ReflectionAbstract(AbstractFakeClass)
257
494
  protected_methods = reflect.getProtectedMethods()
@@ -261,7 +498,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
261
498
 
262
499
  async def testGetProtectedSyncMethods(self):
263
500
  """
264
- Verifies that getProtectedSyncMethods returns only protected sync methods.
501
+ Test the getProtectedSyncMethods method of ReflectionAbstract.
502
+
503
+ Verifies that the getProtectedSyncMethods method correctly returns only
504
+ synchronous methods with protected visibility.
505
+
506
+ Assertions
507
+ ----------
508
+ Should include protected sync methods and exclude async, public, and private methods.
265
509
  """
266
510
  reflect = ReflectionAbstract(AbstractFakeClass)
267
511
  protected_sync_methods = reflect.getProtectedSyncMethods()
@@ -271,7 +515,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
271
515
 
272
516
  async def testGetProtectedAsyncMethods(self):
273
517
  """
274
- Verifies that getProtectedAsyncMethods returns only protected async methods.
518
+ Test the getProtectedAsyncMethods method of ReflectionAbstract.
519
+
520
+ Verifies that the getProtectedAsyncMethods method correctly returns only
521
+ asynchronous methods with protected visibility.
522
+
523
+ Assertions
524
+ ----------
525
+ Should include protected async methods and exclude sync, public, and private methods.
275
526
  """
276
527
  reflect = ReflectionAbstract(AbstractFakeClass)
277
528
  protected_async_methods = reflect.getProtectedAsyncMethods()
@@ -281,7 +532,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
281
532
 
282
533
  async def testGetPrivateMethods(self):
283
534
  """
284
- Verifies that getPrivateMethods returns only private methods.
535
+ Test the getPrivateMethods method of ReflectionAbstract.
536
+
537
+ Verifies that the getPrivateMethods method correctly returns only
538
+ methods with private visibility (double leading underscore).
539
+
540
+ Assertions
541
+ ----------
542
+ Should include private methods and exclude public and protected methods.
285
543
  """
286
544
  reflect = ReflectionAbstract(AbstractFakeClass)
287
545
  private_methods = reflect.getPrivateMethods()
@@ -291,7 +549,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
291
549
 
292
550
  async def testGetPrivateSyncMethods(self):
293
551
  """
294
- Verifies that getPrivateSyncMethods returns only private sync methods.
552
+ Test the getPrivateSyncMethods method of ReflectionAbstract.
553
+
554
+ Verifies that the getPrivateSyncMethods method correctly returns only
555
+ synchronous methods with private visibility.
556
+
557
+ Assertions
558
+ ----------
559
+ Should include private sync methods and exclude async, public, and protected methods.
295
560
  """
296
561
  reflect = ReflectionAbstract(AbstractFakeClass)
297
562
  private_sync_methods = reflect.getPrivateSyncMethods()
@@ -301,7 +566,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
301
566
 
302
567
  async def testGetPrivateAsyncMethods(self):
303
568
  """
304
- Verifies that getPrivateAsyncMethods returns only private async methods.
569
+ Test the getPrivateAsyncMethods method of ReflectionAbstract.
570
+
571
+ Verifies that the getPrivateAsyncMethods method correctly returns only
572
+ asynchronous methods with private visibility.
573
+
574
+ Assertions
575
+ ----------
576
+ Should include private async methods and exclude sync, public, and protected methods.
305
577
  """
306
578
  reflect = ReflectionAbstract(AbstractFakeClass)
307
579
  private_async_methods = reflect.getPrivateAsyncMethods()
@@ -311,7 +583,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
311
583
 
312
584
  async def testGetPublicClassMethods(self):
313
585
  """
314
- Verifies that getPublicClassMethods returns only public class methods.
586
+ Test the getPublicClassMethods method of ReflectionAbstract.
587
+
588
+ Verifies that the getPublicClassMethods method correctly returns only
589
+ class methods with public visibility (no leading underscore).
590
+
591
+ Assertions
592
+ ----------
593
+ Should include public class methods and exclude protected and private class methods.
315
594
  """
316
595
  reflect = ReflectionAbstract(AbstractFakeClass)
317
596
  public_class_methods = reflect.getPublicClassMethods()
@@ -321,7 +600,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
321
600
 
322
601
  async def testGetPublicClassSyncMethods(self):
323
602
  """
324
- Verifies that getPublicClassSyncMethods returns only public class sync methods.
603
+ Test the getPublicClassSyncMethods method of ReflectionAbstract.
604
+
605
+ Verifies that the getPublicClassSyncMethods method correctly returns only
606
+ synchronous class methods with public visibility.
607
+
608
+ Assertions
609
+ ----------
610
+ Should include public class sync methods and exclude async, protected, and private methods.
325
611
  """
326
612
  reflect = ReflectionAbstract(AbstractFakeClass)
327
613
  public_class_sync_methods = reflect.getPublicClassSyncMethods()
@@ -491,7 +777,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
491
777
 
492
778
  async def testGetDunderMethods(self):
493
779
  """
494
- Verifies that getDunderMethods returns dunder methods.
780
+ Test the getDunderMethods method of ReflectionAbstract.
781
+
782
+ Verifies that the getDunderMethods method correctly returns methods
783
+ that follow the dunder (double underscore) naming convention.
784
+
785
+ Assertions
786
+ ----------
787
+ Should include methods with double underscores at both ends like __init__.
495
788
  """
496
789
  reflect = ReflectionAbstract(AbstractFakeClass)
497
790
  dunder_methods = reflect.getDunderMethods()
@@ -499,7 +792,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
499
792
 
500
793
  async def testGetMagicMethods(self):
501
794
  """
502
- Verifies that getMagicMethods returns magic methods.
795
+ Test the getMagicMethods method of ReflectionAbstract.
796
+
797
+ Verifies that the getMagicMethods method correctly returns methods
798
+ that are considered magic methods or special methods in Python.
799
+
800
+ Assertions
801
+ ----------
802
+ Should include magic methods like dunder methods.
503
803
  """
504
804
  reflect = ReflectionAbstract(AbstractFakeClass)
505
805
  magic_methods = reflect.getMagicMethods()
@@ -507,7 +807,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
507
807
 
508
808
  async def testGetProperties(self):
509
809
  """
510
- Verifies that getProperties returns the class properties.
810
+ Test the getProperties method of ReflectionAbstract.
811
+
812
+ Verifies that the getProperties method correctly returns all properties
813
+ defined in the class using the @property decorator.
814
+
815
+ Assertions
816
+ ----------
817
+ The returned collection should contain the expected class properties.
511
818
  """
512
819
  reflect = ReflectionAbstract(AbstractFakeClass)
513
820
  properties = reflect.getProperties()
@@ -517,7 +824,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
517
824
 
518
825
  async def testGetPublicProperties(self):
519
826
  """
520
- Verifies that getPublicProperties returns only public properties.
827
+ Test the getPublicProperties method of ReflectionAbstract.
828
+
829
+ Verifies that the getPublicProperties method correctly returns only
830
+ properties with public visibility (no leading underscore).
831
+
832
+ Assertions
833
+ ----------
834
+ Should include public properties and exclude protected and private properties.
521
835
  """
522
836
  reflect = ReflectionAbstract(AbstractFakeClass)
523
837
  public_properties = reflect.getPublicProperties()
@@ -527,7 +841,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
527
841
 
528
842
  async def testGetProtectedProperties(self):
529
843
  """
530
- Verifies that getProtectedProperties returns only protected properties.
844
+ Test the getProtectedProperties method of ReflectionAbstract.
845
+
846
+ Verifies that the getProtectedProperties method correctly returns only
847
+ properties with protected visibility (single leading underscore).
848
+
849
+ Assertions
850
+ ----------
851
+ Should include protected properties and exclude public and private properties.
531
852
  """
532
853
  reflect = ReflectionAbstract(AbstractFakeClass)
533
854
  protected_properties = reflect.getProtectedProperties()
@@ -537,7 +858,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
537
858
 
538
859
  async def testGetPrivateProperties(self):
539
860
  """
540
- Verifies that getPrivateProperties returns only private properties.
861
+ Test the getPrivateProperties method of ReflectionAbstract.
862
+
863
+ Verifies that the getPrivateProperties method correctly returns only
864
+ properties with private visibility (double leading underscore).
865
+
866
+ Assertions
867
+ ----------
868
+ Should include private properties and exclude public and protected properties.
541
869
  """
542
870
  reflect = ReflectionAbstract(AbstractFakeClass)
543
871
  private_properties = reflect.getPrivateProperties()
@@ -547,7 +875,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
547
875
 
548
876
  async def testGetPropertySignature(self):
549
877
  """
550
- Verifies that getPropertySignature returns the property signature.
878
+ Test the getPropertySignature method of ReflectionAbstract.
879
+
880
+ Verifies that the getPropertySignature method correctly returns the
881
+ signature of a property's getter method.
882
+
883
+ Assertions
884
+ ----------
885
+ The returned signature should match the expected property signature format.
551
886
  """
552
887
  reflect = ReflectionAbstract(AbstractFakeClass)
553
888
  signature = reflect.getPropertySignature('computed_public_property')
@@ -555,7 +890,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
555
890
 
556
891
  async def testGetPropertyDocstring(self):
557
892
  """
558
- Verifies that getPropertyDocstring returns the property docstring.
893
+ Test the getPropertyDocstring method of ReflectionAbstract.
894
+
895
+ Verifies that the getPropertyDocstring method correctly returns the
896
+ docstring of a property.
897
+
898
+ Assertions
899
+ ----------
900
+ The returned docstring should contain the expected property documentation.
559
901
  """
560
902
  reflect = ReflectionAbstract(AbstractFakeClass)
561
903
  docstring = reflect.getPropertyDocstring('computed_public_property')
@@ -563,7 +905,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
563
905
 
564
906
  async def testGetConstructorDependencies(self):
565
907
  """
566
- Verifies that getConstructorDependencies returns the constructor dependencies.
908
+ Test the getConstructorDependencies method of ReflectionAbstract.
909
+
910
+ Verifies that the getConstructorDependencies method correctly returns
911
+ the dependencies required by the class constructor.
912
+
913
+ Assertions
914
+ ----------
915
+ Should return a ClassDependency instance with constructor dependencies.
567
916
  """
568
917
  reflect = ReflectionAbstract(AbstractFakeClass)
569
918
  dependencies = reflect.getConstructorDependencies()
@@ -571,7 +920,14 @@ class TestServiceReflectionAbstract(AsyncTestCase):
571
920
 
572
921
  async def testGetMethodDependencies(self):
573
922
  """
574
- Verifies that getMethodDependencies returns the method dependencies.
923
+ Test the getMethodDependencies method of ReflectionAbstract.
924
+
925
+ Verifies that the getMethodDependencies method correctly returns the
926
+ dependencies and parameter information for a specific method.
927
+
928
+ Assertions
929
+ ----------
930
+ Should return method dependencies with correct parameter types and metadata.
575
931
  """
576
932
  reflect = ReflectionAbstract(AbstractFakeClass)
577
933
  method_deps = reflect.getMethodDependencies('instanceSyncMethod')