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
@@ -10,47 +10,48 @@ from orionis.test.cases.asynchronous import AsyncTestCase
10
10
 
11
11
  class TestFoundationConfigLoggingChannels(AsyncTestCase):
12
12
  """
13
- Test cases for the Channels logging configuration class.
13
+ Unit tests for the `Channels` logging configuration class.
14
14
 
15
- This class contains unit tests for the `Channels` class, ensuring correct
16
- initialization, type validation, custom configuration, dictionary conversion,
17
- hashability, and keyword-only initialization.
18
-
19
- Attributes
20
- ----------
21
- None
15
+ This test class validates the correct initialization, type enforcement,
16
+ custom configuration, dictionary conversion, hashability, and keyword-only
17
+ initialization of the `Channels` class.
22
18
 
23
19
  Methods
24
20
  -------
25
21
  testDefaultValues()
26
- Test that Channels instance is created with correct default values.
22
+ Verify that a Channels instance is initialized with the correct default values.
27
23
  testStackValidation()
28
- Test stack attribute type validation.
24
+ Ensure that only Stack instances are accepted for the stack attribute.
29
25
  testHourlyValidation()
30
- Test hourly attribute type validation.
26
+ Ensure that only Hourly instances are accepted for the hourly attribute.
31
27
  testDailyValidation()
32
- Test daily attribute type validation.
28
+ Ensure that only Daily instances are accepted for the daily attribute.
33
29
  testWeeklyValidation()
34
- Test weekly attribute type validation.
30
+ Ensure that only Weekly instances are accepted for the weekly attribute.
35
31
  testMonthlyValidation()
36
- Test monthly attribute type validation.
32
+ Ensure that only Monthly instances are accepted for the monthly attribute.
37
33
  testChunkedValidation()
38
- Test chunked attribute type validation.
34
+ Ensure that only Chunked instances are accepted for the chunked attribute.
39
35
  testCustomConfigurations()
40
- Test that custom channel configurations are properly stored and validated.
36
+ Validate that custom channel configurations are correctly assigned and validated.
41
37
  testToDictMethod()
42
- Test that toDict returns proper dictionary representation.
38
+ Check that the toDict method returns the correct dictionary representation.
43
39
  testHashability()
44
- Test that Channels maintains hashability due to unsafe_hash=True.
40
+ Confirm that Channels instances are hashable due to unsafe_hash=True.
45
41
  testKwOnlyInitialization()
46
- Test that Channels enforces keyword-only initialization.
42
+ Ensure that Channels enforces keyword-only initialization.
47
43
  """
48
44
 
49
45
  async def testDefaultValues(self):
50
46
  """
51
- Test that Channels instance is created with correct default values.
47
+ Verify that a Channels instance is initialized with the correct default values.
48
+
49
+ Ensures that all channel configuration attributes are instances of their
50
+ respective classes upon default initialization.
52
51
 
53
- Ensures all channel configurations are properly initialized with their default values.
52
+ Returns
53
+ -------
54
+ None
54
55
  """
55
56
  channels = Channels()
56
57
  self.assertIsInstance(channels.stack, Stack)
@@ -62,9 +63,7 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
62
63
 
63
64
  async def testStackValidation(self):
64
65
  """
65
- Test stack attribute type validation.
66
-
67
- Verifies that only Stack instances are accepted for the stack attribute.
66
+ Ensure that only Stack instances are accepted for the stack attribute.
68
67
 
69
68
  Raises
70
69
  ------
@@ -82,7 +81,7 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
82
81
 
83
82
  async def testHourlyValidation(self):
84
83
  """
85
- Test hourly attribute type validation.
84
+ Ensure that only Hourly instances are accepted for the hourly attribute.
86
85
 
87
86
  Raises
88
87
  ------
@@ -98,7 +97,7 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
98
97
 
99
98
  async def testDailyValidation(self):
100
99
  """
101
- Test daily attribute type validation.
100
+ Ensure that only Daily instances are accepted for the daily attribute.
102
101
 
103
102
  Raises
104
103
  ------
@@ -114,7 +113,7 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
114
113
 
115
114
  async def testWeeklyValidation(self):
116
115
  """
117
- Test weekly attribute type validation.
116
+ Ensure that only Weekly instances are accepted for the weekly attribute.
118
117
 
119
118
  Raises
120
119
  ------
@@ -130,7 +129,7 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
130
129
 
131
130
  async def testMonthlyValidation(self):
132
131
  """
133
- Test monthly attribute type validation.
132
+ Ensure that only Monthly instances are accepted for the monthly attribute.
134
133
 
135
134
  Raises
136
135
  ------
@@ -146,7 +145,7 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
146
145
 
147
146
  async def testChunkedValidation(self):
148
147
  """
149
- Test chunked attribute type validation.
148
+ Ensure that only Chunked instances are accepted for the chunked attribute.
150
149
 
151
150
  Raises
152
151
  ------
@@ -162,10 +161,14 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
162
161
 
163
162
  async def testCustomConfigurations(self):
164
163
  """
165
- Test that custom channel configurations are properly stored and validated.
164
+ Validate that custom channel configurations are correctly assigned and validated.
166
165
 
167
- Ensures that custom channel instances are correctly assigned and their
168
- properties are properly set.
166
+ Ensures that custom channel instances are properly set and their properties
167
+ are accurately assigned.
168
+
169
+ Returns
170
+ -------
171
+ None
169
172
  """
170
173
  custom_stack = Stack(path="custom/stack.log")
171
174
  custom_hourly = Hourly(path="custom/hourly.log")
@@ -191,9 +194,14 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
191
194
 
192
195
  async def testToDictMethod(self):
193
196
  """
194
- Test that toDict returns proper dictionary representation.
197
+ Check that the toDict method returns the correct dictionary representation.
198
+
199
+ Ensures that the `toDict` method produces a dictionary with the expected
200
+ structure and types for each channel.
195
201
 
196
- Ensures that the `toDict` method returns a dictionary with the correct structure.
202
+ Returns
203
+ -------
204
+ None
197
205
  """
198
206
  channels = Channels()
199
207
  channels_dict = channels.toDict()
@@ -207,9 +215,13 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
207
215
 
208
216
  async def testHashability(self):
209
217
  """
210
- Test that Channels maintains hashability due to unsafe_hash=True.
218
+ Confirm that Channels instances are hashable due to unsafe_hash=True.
219
+
220
+ Ensures that Channels objects can be used in sets and as dictionary keys.
211
221
 
212
- Ensures that Channels instances can be used in sets and as dictionary keys.
222
+ Returns
223
+ -------
224
+ None
213
225
  """
214
226
  channels1 = Channels()
215
227
  channels2 = Channels()
@@ -223,7 +235,7 @@ class TestFoundationConfigLoggingChannels(AsyncTestCase):
223
235
 
224
236
  async def testKwOnlyInitialization(self):
225
237
  """
226
- Test that Channels enforces keyword-only initialization.
238
+ Ensure that Channels enforces keyword-only initialization.
227
239
 
228
240
  Raises
229
241
  ------
@@ -5,24 +5,26 @@ from orionis.test.cases.asynchronous import AsyncTestCase
5
5
 
6
6
  class TestFoundationConfigLoggingMonthly(AsyncTestCase):
7
7
  """
8
- Test cases for the Monthly logging configuration class.
8
+ Test suite for the `Monthly` logging configuration class.
9
9
 
10
- Notes
11
- -----
12
- This test suite verifies the correct behavior of the `Monthly` logging configuration,
13
- including default values, attribute validation, dictionary conversion, hashability,
14
- and keyword-only initialization.
10
+ This class contains asynchronous test cases to validate the behavior of the
11
+ `Monthly` logging configuration, including default values, attribute validation,
12
+ dictionary conversion, hashability, and keyword-only initialization.
15
13
  """
16
14
 
17
15
  async def testDefaultValues(self):
18
16
  """
19
- Test that Monthly instance is created with correct default values.
17
+ Test the default attribute values of a Monthly instance.
20
18
 
21
- Verifies
22
- --------
23
- - Default path is "storage/log/application.log".
24
- - Default level is `Level.INFO.value`.
25
- - Default retention_months is 4.
19
+ Returns
20
+ -------
21
+ None
22
+
23
+ Asserts
24
+ -------
25
+ - The default path is "storage/log/monthly.log".
26
+ - The default level is `Level.INFO.value`.
27
+ - The default retention_months is 4.
26
28
  """
27
29
  monthly = Monthly()
28
30
  self.assertEqual(monthly.path, "storage/log/monthly.log")
@@ -31,12 +33,16 @@ class TestFoundationConfigLoggingMonthly(AsyncTestCase):
31
33
 
32
34
  async def testPathValidation(self):
33
35
  """
34
- Test path attribute validation.
36
+ Validate the `path` attribute for correct and incorrect values.
37
+
38
+ Returns
39
+ -------
40
+ None
35
41
 
36
- Verifies
37
- --------
38
- - Empty or non-string paths raise `OrionisIntegrityException`.
39
- - Valid string paths do not raise exceptions.
42
+ Asserts
43
+ -------
44
+ - Raises OrionisIntegrityException for empty or non-string paths.
45
+ - Does not raise for valid string paths.
40
46
  """
41
47
  with self.assertRaises(OrionisIntegrityException):
42
48
  Monthly(path="")
@@ -49,12 +55,16 @@ class TestFoundationConfigLoggingMonthly(AsyncTestCase):
49
55
 
50
56
  async def testLevelValidation(self):
51
57
  """
52
- Test level attribute validation with different input types.
58
+ Validate the `level` attribute with various input types.
59
+
60
+ Returns
61
+ -------
62
+ None
53
63
 
54
- Verifies
55
- --------
64
+ Asserts
65
+ -------
56
66
  - Accepts string, int, and enum values for level.
57
- - Invalid level values raise `OrionisIntegrityException`.
67
+ - Raises OrionisIntegrityException for invalid level values.
58
68
  """
59
69
  # Test string level
60
70
  monthly = Monthly(level="debug")
@@ -78,12 +88,16 @@ class TestFoundationConfigLoggingMonthly(AsyncTestCase):
78
88
 
79
89
  async def testRetentionMonthsValidation(self):
80
90
  """
81
- Test retention_months attribute validation.
91
+ Validate the `retention_months` attribute for correct and incorrect values.
82
92
 
83
- Verifies
84
- --------
93
+ Returns
94
+ -------
95
+ None
96
+
97
+ Asserts
98
+ -------
85
99
  - Accepts valid integer values for retention_months.
86
- - Invalid values raise `OrionisIntegrityException`.
100
+ - Raises OrionisIntegrityException for invalid values.
87
101
  """
88
102
  # Test valid values
89
103
  try:
@@ -105,9 +119,16 @@ class TestFoundationConfigLoggingMonthly(AsyncTestCase):
105
119
 
106
120
  async def testWhitespaceHandling(self):
107
121
  """
108
- Test whitespace handling in path and level attributes.
109
- """
122
+ Test handling of leading and trailing whitespace in `path` and `level` attributes.
123
+
124
+ Returns
125
+ -------
126
+ None
110
127
 
128
+ Asserts
129
+ -------
130
+ - Raises OrionisIntegrityException if whitespace is not properly handled.
131
+ """
111
132
  with self.assertRaises(OrionisIntegrityException):
112
133
  monthly = Monthly(path=" logs/app.log ", level=" debug ")
113
134
  self.assertEqual(monthly.path, " logs/app.log ")
@@ -115,11 +136,15 @@ class TestFoundationConfigLoggingMonthly(AsyncTestCase):
115
136
 
116
137
  async def testToDictMethod(self):
117
138
  """
118
- Test that toDict returns proper dictionary representation.
139
+ Test the `toDict` method for correct dictionary representation.
140
+
141
+ Returns
142
+ -------
143
+ None
119
144
 
120
- Verifies
121
- --------
122
- - Output is a dictionary with correct keys and values.
145
+ Asserts
146
+ -------
147
+ - The output is a dictionary with correct keys and values.
123
148
  """
124
149
  monthly = Monthly()
125
150
  monthly_dict = monthly.toDict()
@@ -130,11 +155,15 @@ class TestFoundationConfigLoggingMonthly(AsyncTestCase):
130
155
 
131
156
  async def testCustomValuesToDict(self):
132
157
  """
133
- Test that custom values are properly included in dictionary.
158
+ Test that custom attribute values are reflected in the dictionary output.
159
+
160
+ Returns
161
+ -------
162
+ None
134
163
 
135
- Verifies
136
- --------
137
- - Custom path, level, and retention_months are reflected in the output dictionary.
164
+ Asserts
165
+ -------
166
+ - Custom path, level, and retention_months are present in the output dictionary.
138
167
  """
139
168
  custom_monthly = Monthly(
140
169
  path="custom/logs/app.log",
@@ -148,11 +177,16 @@ class TestFoundationConfigLoggingMonthly(AsyncTestCase):
148
177
 
149
178
  async def testHashability(self):
150
179
  """
151
- Test that Monthly maintains hashability due to unsafe_hash=True.
180
+ Test that Monthly instances are hashable and can be used in sets.
152
181
 
153
- Verifies
154
- --------
155
- - Monthly instances can be added to a set and compared by value.
182
+ Returns
183
+ -------
184
+ None
185
+
186
+ Asserts
187
+ -------
188
+ - Monthly instances with identical attributes are considered equal in a set.
189
+ - Monthly instances with different attributes are considered distinct.
156
190
  """
157
191
  monthly1 = Monthly()
158
192
  monthly2 = Monthly()
@@ -168,9 +202,13 @@ class TestFoundationConfigLoggingMonthly(AsyncTestCase):
168
202
  """
169
203
  Test that Monthly enforces keyword-only initialization.
170
204
 
171
- Verifies
172
- --------
173
- - Positional arguments raise TypeError.
205
+ Returns
206
+ -------
207
+ None
208
+
209
+ Asserts
210
+ -------
211
+ - Raises TypeError when positional arguments are used.
174
212
  """
175
213
  with self.assertRaises(TypeError):
176
214
  Monthly("path.log", "info", 4)
@@ -5,19 +5,23 @@ from orionis.test.cases.asynchronous import AsyncTestCase
5
5
 
6
6
  class TestFoundationConfigLoggingStack(AsyncTestCase):
7
7
  """
8
- Test cases for the Stack logging configuration class.
8
+ Asynchronous unit tests for the Stack logging configuration class.
9
9
 
10
- This class contains asynchronous unit tests for the Stack class,
11
- validating default values, attribute validation, dictionary representation,
12
- hashability, and keyword-only initialization.
10
+ This test class validates the behavior of the Stack class, including default values,
11
+ attribute validation, dictionary conversion, hashability, and enforcement of keyword-only
12
+ initialization.
13
13
  """
14
14
 
15
15
  async def testDefaultValues(self):
16
16
  """
17
- Test default values of Stack.
17
+ Test that Stack initializes with correct default values.
18
18
 
19
- Ensures that a Stack instance is created with the correct default values.
20
- Verifies that the default path and level match the expected values from the class definition.
19
+ Checks that the default path and level attributes of a Stack instance match
20
+ the expected class defaults.
21
+
22
+ Returns
23
+ -------
24
+ None
21
25
  """
22
26
  stack = Stack()
23
27
  self.assertEqual(stack.path, "storage/log/stack.log")
@@ -25,9 +29,10 @@ class TestFoundationConfigLoggingStack(AsyncTestCase):
25
29
 
26
30
  async def testPathValidation(self):
27
31
  """
28
- Test validation of the path attribute.
32
+ Validate the path attribute for correct type and non-emptiness.
29
33
 
30
- Checks that empty or non-string paths raise exceptions, and that valid paths are accepted.
34
+ Ensures that providing an empty string or a non-string value for the path
35
+ raises an OrionisIntegrityException, while a valid string path is accepted.
31
36
 
32
37
  Raises
33
38
  ------
@@ -48,9 +53,10 @@ class TestFoundationConfigLoggingStack(AsyncTestCase):
48
53
 
49
54
  async def testLevelValidation(self):
50
55
  """
51
- Test validation of the level attribute with different input types.
56
+ Validate the level attribute with various input types.
52
57
 
53
- Verifies that string, int, and enum level values are properly handled.
58
+ Verifies that the level attribute accepts string, integer, and enum values
59
+ corresponding to valid logging levels, and raises exceptions for invalid values.
54
60
 
55
61
  Raises
56
62
  ------
@@ -84,8 +90,15 @@ class TestFoundationConfigLoggingStack(AsyncTestCase):
84
90
  async def testWhitespaceHandling(self):
85
91
  """
86
92
  Test handling of whitespace in path and level attributes.
87
- """
88
93
 
94
+ Ensures that leading or trailing whitespace in the path attribute is not accepted
95
+ and raises an OrionisIntegrityException.
96
+
97
+ Raises
98
+ ------
99
+ OrionisIntegrityException
100
+ If the path contains leading or trailing whitespace.
101
+ """
89
102
  with self.assertRaises(OrionisIntegrityException):
90
103
  spaced_path = " logs/app.log "
91
104
  stack = Stack(path=spaced_path)
@@ -93,14 +106,14 @@ class TestFoundationConfigLoggingStack(AsyncTestCase):
93
106
 
94
107
  async def testToDictMethod(self):
95
108
  """
96
- Test the toDict method for dictionary representation.
109
+ Test the toDict method for correct dictionary representation.
97
110
 
98
- Ensures that both path and level are correctly included in the dictionary.
111
+ Verifies that the dictionary returned by toDict contains the correct path and
112
+ level values for a Stack instance with default attributes.
99
113
 
100
114
  Returns
101
115
  -------
102
- dict
103
- Dictionary representation of the Stack instance.
116
+ None
104
117
  """
105
118
  stack = Stack()
106
119
  stack_dict = stack.toDict()
@@ -111,9 +124,14 @@ class TestFoundationConfigLoggingStack(AsyncTestCase):
111
124
 
112
125
  async def testCustomValuesToDict(self):
113
126
  """
114
- Test custom values in dictionary representation.
127
+ Test dictionary representation with custom attribute values.
128
+
129
+ Ensures that custom path and level values are accurately reflected in the
130
+ dictionary returned by toDict.
115
131
 
116
- Ensures that custom path and level values are properly included in the dictionary.
132
+ Returns
133
+ -------
134
+ None
117
135
  """
118
136
  custom_stack = Stack(
119
137
  path="custom/logs/app.log",
@@ -125,9 +143,14 @@ class TestFoundationConfigLoggingStack(AsyncTestCase):
125
143
 
126
144
  async def testHashability(self):
127
145
  """
128
- Test hashability of Stack instances.
146
+ Test that Stack instances are hashable.
129
147
 
130
- Ensures that Stack instances can be used in sets and as dictionary keys due to unsafe_hash=True.
148
+ Verifies that Stack instances can be added to sets and used as dictionary keys,
149
+ and that instances with identical attributes are considered equal.
150
+
151
+ Returns
152
+ -------
153
+ None
131
154
  """
132
155
  stack1 = Stack()
133
156
  stack2 = Stack()
@@ -141,9 +164,10 @@ class TestFoundationConfigLoggingStack(AsyncTestCase):
141
164
 
142
165
  async def testKwOnlyInitialization(self):
143
166
  """
144
- Test enforcement of keyword-only initialization.
167
+ Test enforcement of keyword-only initialization for Stack.
145
168
 
146
- Ensures that Stack cannot be initialized with positional arguments.
169
+ Ensures that attempting to initialize Stack with positional arguments raises
170
+ a TypeError.
147
171
 
148
172
  Raises
149
173
  ------
@@ -4,6 +4,7 @@ from orionis.foundation.exceptions.integrity import OrionisIntegrityException
4
4
  from orionis.test.cases.asynchronous import AsyncTestCase
5
5
 
6
6
  class TestFoundationConfigQueueBrokers(AsyncTestCase):
7
+
7
8
  async def testDefaultInitialization(self):
8
9
  """
9
10
  Test that Brokers instance is initialized with correct default values.
@@ -4,42 +4,36 @@ from orionis.test.cases.asynchronous import AsyncTestCase
4
4
 
5
5
  class TestFoundationConfigRootPaths(AsyncTestCase):
6
6
  """
7
- Test suite for the Paths dataclass which defines the project directory structure.
8
-
9
- This class verifies the integrity of path definitions, default values,
10
- and the behavior of accessor methods.
11
-
12
- Methods
13
- -------
14
- testDefaultPathsInstantiation()
15
- Test that a Paths instance can be created with default values.
16
- testAllPathsAreStrings()
17
- Test that all path attributes are strings.
18
- testPathValidationRejectsNonStringValues()
19
- Test that non-string path values raise OrionisIntegrityException.
20
- testToDictReturnsCompleteDictionary()
21
- Test that toDict() returns a complete dictionary of all paths.
22
- testFrozenDataclassBehavior()
23
- Test that the dataclass is truly frozen (immutable).
24
- testPathMetadataIsAccessible()
25
- Test that path metadata is properly defined and accessible.
7
+ Test suite for the `Paths` dataclass, which defines the project directory structure.
8
+
9
+ This class contains asynchronous unit tests to verify the integrity, default values,
10
+ type constraints, immutability, and metadata accessibility of the `Paths` dataclass.
26
11
  """
27
12
 
28
13
  def testDefaultPathsInstantiation(self):
29
14
  """
30
- Test that a Paths instance can be created with default values.
15
+ Test instantiation of `Paths` with default values.
16
+
17
+ Ensures that a `Paths` instance can be created using default arguments and
18
+ that the resulting object is an instance of `Paths`.
31
19
 
32
- Ensures that all default paths are correctly initialized and
33
- the instance is properly constructed.
20
+ Returns
21
+ -------
22
+ None
34
23
  """
35
24
  paths = Paths()
36
25
  self.assertIsInstance(paths, Paths)
37
26
 
38
27
  def testAllPathsAreStrings(self):
39
28
  """
40
- Test that all path attributes are strings.
29
+ Verify that all attributes of `Paths` are strings.
30
+
31
+ Iterates through all fields of the `Paths` dataclass and asserts that each
32
+ attribute is a non-empty string.
41
33
 
42
- Ensures that every field in Paths is a string by default.
34
+ Returns
35
+ -------
36
+ None
43
37
  """
44
38
  paths = Paths()
45
39
  for field_name in paths.__dataclass_fields__:
@@ -49,25 +43,24 @@ class TestFoundationConfigRootPaths(AsyncTestCase):
49
43
 
50
44
  def testPathValidationRejectsNonStringValues(self):
51
45
  """
52
- Test that non-string path values raise OrionisIntegrityException.
46
+ Ensure non-string path values raise `OrionisIntegrityException`.
53
47
 
54
- Verifies that the __post_init__ validation rejects non-string values
55
- for all path fields.
48
+ Attempts to instantiate `Paths` with a non-string value for a path field
49
+ and asserts that an `OrionisIntegrityException` is raised.
56
50
 
57
- Raises
58
- ------
59
- OrionisIntegrityException
60
- If a non-string value is provided.
51
+ Returns
52
+ -------
53
+ None
61
54
  """
62
55
  with self.assertRaises(OrionisIntegrityException):
63
56
  Paths(console_scheduler=123)
64
57
 
65
58
  def testToDictReturnsCompleteDictionary(self):
66
59
  """
67
- Test that toDict() returns a complete dictionary of all paths.
60
+ Test that `toDict()` returns a complete dictionary of all path fields.
68
61
 
69
- Verifies that the returned dictionary contains all path fields
70
- with their current values.
62
+ Asserts that the dictionary returned by `toDict()` contains all fields
63
+ defined in the `Paths` dataclass and that the dictionary has the correct length.
71
64
 
72
65
  Returns
73
66
  -------
@@ -82,15 +75,14 @@ class TestFoundationConfigRootPaths(AsyncTestCase):
82
75
 
83
76
  def testFrozenDataclassBehavior(self):
84
77
  """
85
- Test that the dataclass is truly frozen (immutable).
78
+ Verify that the `Paths` dataclass is immutable (frozen).
86
79
 
87
- Verifies that attempts to modify attributes after creation
88
- raise exceptions.
80
+ Attempts to modify an attribute of a `Paths` instance after creation and
81
+ asserts that an exception is raised due to immutability.
89
82
 
90
- Raises
91
- ------
92
- Exception
93
- If an attempt is made to modify a frozen dataclass.
83
+ Returns
84
+ -------
85
+ None
94
86
  """
95
87
  paths = Paths()
96
88
  with self.assertRaises(Exception):
@@ -98,10 +90,11 @@ class TestFoundationConfigRootPaths(AsyncTestCase):
98
90
 
99
91
  def testPathMetadataIsAccessible(self):
100
92
  """
101
- Test that path metadata is properly defined and accessible.
93
+ Check accessibility and structure of path field metadata.
102
94
 
103
- Verifies that each path field has the expected metadata structure
104
- with description and default fields.
95
+ Iterates through all fields of the `Paths` dataclass and asserts that each
96
+ field's metadata contains both 'description' and 'default' keys, and that
97
+ their values are of the expected types.
105
98
 
106
99
  Returns
107
100
  -------