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.
- orionis/container/context/scope.py +1 -1
- orionis/metadata/framework.py +1 -1
- {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/METADATA +1 -1
- {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/RECORD +36 -35
- tests/container/context/test_manager.py +1 -0
- tests/container/context/test_scope.py +1 -0
- tests/container/core/__init__.py +0 -0
- tests/container/{test_container.py → core/test_container.py} +45 -1
- tests/container/{test_singleton.py → core/test_singleton.py} +5 -0
- tests/container/{test_thread_safety.py → core/test_thread_safety.py} +2 -0
- tests/container/mocks/mock_complex_classes.py +502 -192
- tests/container/mocks/mock_simple_classes.py +72 -6
- tests/container/validators/test_is_not_subclass.py +0 -1
- tests/container/validators/test_is_valid_alias.py +1 -1
- tests/foundation/config/database/test_foundation_config_database.py +54 -28
- tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +40 -22
- tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +75 -48
- tests/foundation/config/logging/test_foundation_config_logging_channels.py +49 -37
- tests/foundation/config/logging/test_foundation_config_logging_monthly.py +80 -42
- tests/foundation/config/logging/test_foundation_config_logging_stack.py +46 -22
- tests/foundation/config/queue/test_foundation_config_queue_brokers.py +1 -0
- tests/foundation/config/root/test_foundation_config_root_paths.py +37 -44
- tests/foundation/config/session/test_foundation_config_session.py +65 -20
- tests/foundation/config/startup/test_foundation_config_startup.py +37 -34
- tests/services/environment/test_services_environment.py +5 -4
- tests/services/introspection/dependencies/test_reflect_dependencies.py +77 -25
- tests/services/introspection/reflection/mock/fake_reflect_instance.py +750 -267
- tests/services/introspection/reflection/test_reflection_abstract.py +514 -83
- tests/services/introspection/reflection/test_reflection_callable.py +85 -35
- tests/services/introspection/reflection/test_reflection_concrete.py +345 -226
- tests/services/introspection/reflection/test_reflection_instance.py +627 -273
- tests/services/introspection/reflection/test_reflection_module.py +346 -175
- {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/WHEEL +0 -0
- {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.437.0.dist-info → orionis-0.439.0.dist-info}/top_level.txt +0 -0
- {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
|
-
|
|
11
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
32
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
55
|
-
|
|
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
|
-
|
|
59
|
-
|
|
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
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
the
|
|
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
|
|
94
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
174
|
+
Test asynchronous invocation of an async function using ReflectionCallable.
|
|
130
175
|
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
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
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
'unresolved' attributes.
|
|
195
|
+
Returns
|
|
196
|
+
-------
|
|
197
|
+
None
|
|
148
198
|
"""
|
|
149
199
|
def sample_function(a, b=2):
|
|
150
200
|
"""Sample docstring."""
|