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,8 +7,14 @@ class TestReflectionCallable(AsyncTestCase):
7
7
 
8
8
  async def testInitValidFunction(self):
9
9
  """
10
- Tests that a ReflectionCallable object can be correctly initialized with a valid function.
11
- Verifies that the callable stored in the ReflectionCallable instance matches the original function.
10
+ Test initialization of ReflectionCallable with a valid function.
11
+
12
+ Validates that a ReflectionCallable instance can be created with a standard function
13
+ and that the stored callable matches the original function.
14
+
15
+ Returns
16
+ -------
17
+ None
12
18
  """
13
19
  def sample_function(a, b=2):
14
20
  """Sample docstring."""
@@ -18,18 +24,27 @@ class TestReflectionCallable(AsyncTestCase):
18
24
 
19
25
  async def testInitInvalid(self):
20
26
  """
21
- Test that initializing ReflectionCallable with an invalid argument (e.g., an integer)
27
+ Test initialization of ReflectionCallable with an invalid argument.
28
+
29
+ Ensures that passing a non-callable object (e.g., an integer) to ReflectionCallable
22
30
  raises a ReflectionTypeError.
31
+
32
+ Returns
33
+ -------
34
+ None
23
35
  """
24
36
  with self.assertRaises(ReflectionTypeError):
25
37
  ReflectionCallable(123)
26
38
 
27
39
  async def testGetName(self):
28
40
  """
29
- Tests that the ReflectionCallable.getName() method correctly returns the name of the provided function.
41
+ Test retrieval of the function name from ReflectionCallable.
42
+
43
+ Checks that the getName() method returns the correct name of the wrapped function.
30
44
 
31
- This test defines a sample function, wraps it with ReflectionCallable, and asserts that getName()
32
- returns the function's name as a string.
45
+ Returns
46
+ -------
47
+ None
33
48
  """
34
49
  def sample_function(a, b=2):
35
50
  """Sample docstring."""
@@ -39,9 +54,13 @@ class TestReflectionCallable(AsyncTestCase):
39
54
 
40
55
  async def testGetModuleName(self):
41
56
  """
42
- Tests that the getModuleName method of ReflectionCallable returns the correct module name
43
- for a given function. It verifies that the module name returned matches the __module__ attribute
44
- of the sample function.
57
+ Test retrieval of the module name from ReflectionCallable.
58
+
59
+ Verifies that getModuleName() returns the module name where the function is defined.
60
+
61
+ Returns
62
+ -------
63
+ None
45
64
  """
46
65
  def sample_function(a, b=2):
47
66
  """Sample docstring."""
@@ -51,12 +70,14 @@ class TestReflectionCallable(AsyncTestCase):
51
70
 
52
71
  async def testGetModuleWithCallableName(self):
53
72
  """
54
- Tests that the `getModuleWithCallableName` method of the `ReflectionCallable` class
55
- correctly returns the fully qualified name of a given callable, including its module
56
- and function name.
73
+ Test retrieval of the fully qualified name from ReflectionCallable.
74
+
75
+ Ensures that getModuleWithCallableName() returns the module and function name
76
+ in the format "<module>.<function_name>".
57
77
 
58
- The test defines a sample function, wraps it with `ReflectionCallable`, and asserts
59
- that the returned string matches the expected format: "<module>.<function_name>".
78
+ Returns
79
+ -------
80
+ None
60
81
  """
61
82
  def sample_function(a, b=2):
62
83
  """Sample docstring."""
@@ -67,7 +88,13 @@ class TestReflectionCallable(AsyncTestCase):
67
88
 
68
89
  async def testGetDocstring(self):
69
90
  """
70
- Tests that the getDocstring method of ReflectionCallable correctly retrieves the docstring from a given function.
91
+ Test retrieval of the docstring from ReflectionCallable.
92
+
93
+ Confirms that getDocstring() returns the docstring of the wrapped function.
94
+
95
+ Returns
96
+ -------
97
+ None
71
98
  """
72
99
  def sample_function(a, b=2):
73
100
  """Sample docstring."""
@@ -77,9 +104,14 @@ class TestReflectionCallable(AsyncTestCase):
77
104
 
78
105
  async def testGetSourceCode(self):
79
106
  """
80
- Tests that the getSourceCode method of ReflectionCallable correctly retrieves
81
- the source code of a given function. Verifies that the returned code contains
82
- the function definition for 'sample_function'.
107
+ Test retrieval of source code from ReflectionCallable.
108
+
109
+ Checks that getSourceCode() returns the source code of the wrapped function,
110
+ and that the code contains the function definition.
111
+
112
+ Returns
113
+ -------
114
+ None
83
115
  """
84
116
  def sample_function(a, b=2):
85
117
  """Sample docstring."""
@@ -90,8 +122,14 @@ class TestReflectionCallable(AsyncTestCase):
90
122
 
91
123
  async def testGetSourceCodeError(self):
92
124
  """
93
- Test that ReflectionCallable.getSourceCode() raises a ReflectionTypeError
94
- when called on a built-in function (e.g., len) that does not have accessible source code.
125
+ Test error handling when retrieving source code from a built-in function.
126
+
127
+ Ensures that getSourceCode() raises a ReflectionTypeError when called on a
128
+ built-in function (e.g., len) that lacks accessible source code.
129
+
130
+ Returns
131
+ -------
132
+ None
95
133
  """
96
134
  with self.assertRaises(ReflectionTypeError):
97
135
  rc = ReflectionCallable(len)
@@ -99,9 +137,14 @@ class TestReflectionCallable(AsyncTestCase):
99
137
 
100
138
  async def testGetFile(self):
101
139
  """
102
- Tests that the getFile() method of the ReflectionCallable class returns the correct file path
103
- for a given callable. Verifies that the returned file path ends with '.py', indicating it is a
104
- Python source file.
140
+ Test retrieval of the file path from ReflectionCallable.
141
+
142
+ Verifies that getFile() returns the file path of the wrapped function and that
143
+ the path ends with '.py', indicating a Python source file.
144
+
145
+ Returns
146
+ -------
147
+ None
105
148
  """
106
149
  def sample_function(a, b=2):
107
150
  """Sample docstring."""
@@ -112,11 +155,13 @@ class TestReflectionCallable(AsyncTestCase):
112
155
 
113
156
  async def testCallSync(self):
114
157
  """
115
- Tests the synchronous call functionality of the ReflectionCallable class.
158
+ Test synchronous invocation of the wrapped function using ReflectionCallable.
159
+
160
+ Validates that calling the wrapped function with arguments returns the expected result.
116
161
 
117
- This test defines a sample function with one required and one optional argument,
118
- wraps it with ReflectionCallable, and asserts that calling it with specific arguments
119
- returns the expected result.
162
+ Returns
163
+ -------
164
+ None
120
165
  """
121
166
  def sample_function(a, b=2):
122
167
  """Sample docstring."""
@@ -126,10 +171,13 @@ class TestReflectionCallable(AsyncTestCase):
126
171
 
127
172
  async def testCallAsync(self):
128
173
  """
129
- Tests the ReflectionCallable's ability to call an asynchronous function synchronously.
174
+ Test asynchronous invocation of an async function using ReflectionCallable.
130
175
 
131
- This test defines an asynchronous function `sample_async_function` that takes two arguments and returns their sum.
132
- It then wraps this function with `ReflectionCallable` and asserts that calling it with arguments (1, 2) returns 3.
176
+ Ensures that an asynchronous function can be called and awaited, returning the correct result.
177
+
178
+ Returns
179
+ -------
180
+ None
133
181
  """
134
182
  async def sample_async_function(a, b=2):
135
183
  """Async docstring."""
@@ -139,12 +187,14 @@ class TestReflectionCallable(AsyncTestCase):
139
187
 
140
188
  async def testGetDependencies(self):
141
189
  """
142
- Tests the getDependencies method of the ReflectionCallable class.
190
+ Test retrieval of callable dependencies from ReflectionCallable.
191
+
192
+ Checks that getDependencies() returns a CallableDependency object with
193
+ 'resolved' and 'unresolved' attributes for the wrapped function.
143
194
 
144
- This test defines a sample function with one required and one default argument,
145
- creates a ReflectionCallable instance for it, and retrieves its dependencies.
146
- It then asserts that the returned dependencies object has both 'resolved' and
147
- 'unresolved' attributes.
195
+ Returns
196
+ -------
197
+ None
148
198
  """
149
199
  def sample_function(a, b=2):
150
200
  """Sample docstring."""