orionis 0.436.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 (68) hide show
  1. orionis/console/contracts/kernel.py +16 -3
  2. orionis/console/dumper/contracts/dump.py +8 -9
  3. orionis/console/dynamic/progress_bar.py +21 -29
  4. orionis/console/output/console.py +12 -0
  5. orionis/container/context/manager.py +27 -17
  6. orionis/container/context/scope.py +8 -7
  7. orionis/container/contracts/service_provider.py +12 -8
  8. orionis/container/providers/service_provider.py +9 -16
  9. orionis/container/resolver/resolver.py +29 -22
  10. orionis/foundation/contracts/application.py +437 -47
  11. orionis/foundation/contracts/config.py +14 -6
  12. orionis/foundation/providers/console_provider.py +16 -15
  13. orionis/foundation/providers/dumper_provider.py +20 -8
  14. orionis/foundation/providers/logger_provider.py +19 -14
  15. orionis/foundation/providers/path_resolver_provider.py +17 -14
  16. orionis/foundation/providers/progress_bar_provider.py +15 -14
  17. orionis/foundation/providers/testing_provider.py +20 -14
  18. orionis/foundation/providers/workers_provider.py +19 -14
  19. orionis/metadata/framework.py +1 -1
  20. orionis/services/asynchrony/contracts/coroutines.py +1 -0
  21. orionis/services/asynchrony/coroutines.py +2 -0
  22. orionis/services/asynchrony/exceptions/exception.py +2 -0
  23. orionis/services/environment/core/dot_env.py +9 -0
  24. orionis/services/environment/dynamic/caster.py +31 -2
  25. orionis/services/environment/key/key_generator.py +1 -0
  26. orionis/services/environment/validators/key_name.py +1 -0
  27. orionis/services/environment/validators/types.py +5 -1
  28. orionis/services/introspection/abstract/contracts/reflection.py +188 -221
  29. orionis/services/introspection/abstract/reflection.py +311 -178
  30. orionis/services/introspection/callables/contracts/reflection.py +64 -21
  31. orionis/services/introspection/callables/reflection.py +98 -23
  32. orionis/services/introspection/concretes/reflection.py +278 -181
  33. orionis/services/introspection/dependencies/contracts/reflection.py +21 -18
  34. orionis/services/introspection/dependencies/entities/callable_dependencies.py +15 -16
  35. orionis/services/introspection/dependencies/entities/class_dependencies.py +24 -16
  36. orionis/services/introspection/dependencies/entities/known_dependencies.py +19 -13
  37. orionis/services/introspection/dependencies/entities/method_dependencies.py +22 -16
  38. orionis/services/introspection/dependencies/reflection.py +0 -3
  39. orionis/services/introspection/instances/reflection.py +16 -6
  40. orionis/services/log/contracts/log_service.py +4 -0
  41. orionis/services/log/handlers/filename.py +2 -0
  42. orionis/services/paths/contracts/resolver.py +0 -3
  43. orionis/services/paths/resolver.py +0 -3
  44. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/METADATA +1 -1
  45. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/RECORD +68 -67
  46. tests/container/core/__init__.py +0 -0
  47. tests/container/mocks/mock_complex_classes.py +502 -192
  48. tests/container/mocks/mock_simple_classes.py +72 -6
  49. tests/container/validators/test_is_valid_alias.py +1 -1
  50. tests/foundation/config/database/test_foundation_config_database.py +54 -28
  51. tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +40 -22
  52. tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +75 -48
  53. tests/foundation/config/logging/test_foundation_config_logging_channels.py +49 -37
  54. tests/foundation/config/logging/test_foundation_config_logging_monthly.py +80 -42
  55. tests/foundation/config/logging/test_foundation_config_logging_stack.py +46 -22
  56. tests/foundation/config/root/test_foundation_config_root_paths.py +37 -44
  57. tests/foundation/config/session/test_foundation_config_session.py +65 -20
  58. tests/foundation/config/startup/test_foundation_config_startup.py +37 -33
  59. tests/services/introspection/dependencies/test_reflect_dependencies.py +77 -25
  60. tests/services/introspection/reflection/test_reflection_abstract.py +403 -47
  61. /orionis/services/introspection/concretes/contracts/{concrete.py → reflection.py} +0 -0
  62. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/WHEEL +0 -0
  63. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/licenses/LICENCE +0 -0
  64. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/top_level.txt +0 -0
  65. {orionis-0.436.0.dist-info → orionis-0.438.0.dist-info}/zip-safe +0 -0
  66. /tests/container/{test_container.py → core/test_container.py} +0 -0
  67. /tests/container/{test_singleton.py → core/test_singleton.py} +0 -0
  68. /tests/container/{test_thread_safety.py → core/test_thread_safety.py} +0 -0
@@ -2,31 +2,97 @@ from abc import ABC, abstractmethod
2
2
 
3
3
  class ICar(ABC):
4
4
  """
5
- ICar is an interface that defines the structure for car objects.
6
- It includes methods for starting and stopping the car.
5
+ Interface for car objects.
6
+
7
+ Defines the required methods for car objects, including starting and stopping the car.
8
+
9
+ Methods
10
+ -------
11
+ start() -> str
12
+ Start the car and return a message indicating the car has started.
13
+ stop() -> str
14
+ Stop the car and return a message indicating the car has stopped.
7
15
  """
8
16
 
9
17
  @abstractmethod
10
18
  def start(self) -> str:
11
19
  """
12
- Starts the car and returns a message indicating the car has started.
20
+ Start the car.
21
+
22
+ Returns
23
+ -------
24
+ str
25
+ Message indicating the car has started.
13
26
  """
14
27
  pass
15
28
 
16
29
  @abstractmethod
17
30
  def stop(self) -> str:
18
31
  """
19
- Stops the car and returns a message indicating the car has stopped.
32
+ Stop the car.
33
+
34
+ Returns
35
+ -------
36
+ str
37
+ Message indicating the car has stopped.
20
38
  """
21
39
  pass
22
40
 
23
41
  class Car(ICar):
42
+ """
43
+ Concrete implementation of the ICar interface.
44
+
45
+ Parameters
46
+ ----------
47
+ brand : str, optional
48
+ The brand of the car (default is 'a').
49
+ model : str, optional
50
+ The model of the car (default is 'b').
51
+
52
+ Attributes
53
+ ----------
54
+ brand : str
55
+ The brand of the car.
56
+ model : str
57
+ The model of the car.
58
+ """
59
+
24
60
  def __init__(self, brand: str = 'a', model: str = 'b'):
25
- self.brand = brand
26
- self.model = model
61
+ """
62
+ Initialize a new Car instance with the specified brand and model.
63
+
64
+ Parameters
65
+ ----------
66
+ brand : str, optional
67
+ The brand of the car. Default is 'a'.
68
+ model : str, optional
69
+ The model of the car. Default is 'b'.
70
+
71
+ Notes
72
+ -----
73
+ This constructor sets the brand and model attributes for the Car object.
74
+ """
75
+ self.brand = brand # Set the brand of the car
76
+ self.model = model # Set the model of the car
27
77
 
28
78
  def start(self):
79
+ """
80
+ Start the car.
81
+
82
+ Returns
83
+ -------
84
+ str
85
+ Message indicating the car is starting.
86
+ """
29
87
  return f"{self.brand} {self.model} is starting."
30
88
 
31
89
  def stop(self):
90
+ """
91
+ Stop the car.
92
+
93
+ Returns
94
+ -------
95
+ str
96
+ Message indicating the car is stopping.
97
+ """
32
98
  return f"{self.brand} {self.model} is stopping."
@@ -80,7 +80,7 @@ class TestIsValidAlias(AsyncTestCase):
80
80
  This method does not return any value. It passes if the expected exception and message are raised.
81
81
  """
82
82
  invalid_aliases = [
83
- "invalid alias", # space
83
+ "invalid alias", # space
84
84
  "invalid\talias", # tab
85
85
  "invalid\nalias", # newline
86
86
  "invalid@alias", # special character
@@ -5,23 +5,24 @@ from orionis.test.cases.asynchronous import AsyncTestCase
5
5
 
6
6
  class TestFoundationConfigDatabase(AsyncTestCase):
7
7
  """
8
- Test cases for the Database configuration class.
8
+ Unit tests for the Database configuration class.
9
9
 
10
- This class contains unit tests for the `Database` configuration class,
11
- ensuring correct default values, validation, dictionary representation,
12
- custom values, hashability, and keyword-only initialization.
13
-
14
- Attributes
15
- ----------
16
- None
10
+ This class provides asynchronous test cases to verify the behavior,
11
+ validation, and integrity of the `Database` configuration class,
12
+ including default values, attribute validation, dictionary conversion,
13
+ custom values, hashability, and keyword-only initialization enforcement.
17
14
  """
18
15
 
19
16
  async def testDefaultValues(self):
20
17
  """
21
- Test creation of Database instance with default values.
18
+ Test that a Database instance initializes with correct default values.
19
+
20
+ Ensures that the `default` attribute is set to 'sqlite' and the
21
+ `connections` attribute is an instance of Connections.
22
22
 
23
- Ensures that the default connection is set to 'sqlite' and the
24
- connections attribute is properly initialized as a Connections instance.
23
+ Returns
24
+ -------
25
+ None
25
26
  """
26
27
  db = Database()
27
28
  self.assertEqual(db.default, 'sqlite')
@@ -29,11 +30,15 @@ class TestFoundationConfigDatabase(AsyncTestCase):
29
30
 
30
31
  async def testDefaultConnectionValidation(self):
31
32
  """
32
- Validate the default connection attribute.
33
+ Validate the `default` connection attribute for allowed values.
33
34
 
34
- Checks that only valid connection types are accepted as default.
35
- Also verifies that invalid, empty, or non-string defaults raise
35
+ Checks that only valid connection types are accepted for the `default`
36
+ attribute. Verifies that invalid, empty, or non-string values raise
36
37
  OrionisIntegrityException.
38
+
39
+ Returns
40
+ -------
41
+ None
37
42
  """
38
43
  # Test valid connection types
39
44
  valid_connections = ['sqlite', 'mysql', 'pgsql', 'oracle']
@@ -57,11 +62,15 @@ class TestFoundationConfigDatabase(AsyncTestCase):
57
62
 
58
63
  async def testConnectionsValidation(self):
59
64
  """
60
- Validate the connections attribute.
65
+ Validate the `connections` attribute for correct type.
61
66
 
62
67
  Ensures that only instances of Connections are accepted for the
63
- connections attribute. Invalid types or None should raise
68
+ `connections` attribute. Invalid types or None should raise
64
69
  OrionisIntegrityException.
70
+
71
+ Returns
72
+ -------
73
+ None
65
74
  """
66
75
  # Test invalid connections type
67
76
  with self.assertRaises(OrionisIntegrityException):
@@ -79,10 +88,15 @@ class TestFoundationConfigDatabase(AsyncTestCase):
79
88
 
80
89
  async def testToDictMethod(self):
81
90
  """
82
- Test the toDict method of Database.
91
+ Test the `toDict` method for dictionary representation.
83
92
 
84
- Ensures that the toDict method returns a dictionary representation
85
- of the Database instance, including all attributes.
93
+ Ensures that the `toDict` method returns a dictionary containing
94
+ all attributes of the Database instance, including `default` and
95
+ `connections`.
96
+
97
+ Returns
98
+ -------
99
+ None
86
100
  """
87
101
  db = Database()
88
102
  db_dict = db.toDict()
@@ -92,10 +106,14 @@ class TestFoundationConfigDatabase(AsyncTestCase):
92
106
 
93
107
  async def testCustomValues(self):
94
108
  """
95
- Test storage and validation of custom values.
109
+ Test handling and validation of custom attribute values.
110
+
111
+ Ensures that custom values for `default` and `connections` are
112
+ correctly stored and validated in the Database instance.
96
113
 
97
- Ensures that custom configurations for default and connections
98
- are correctly handled and validated.
114
+ Returns
115
+ -------
116
+ None
99
117
  """
100
118
  custom_connections = Connections()
101
119
  custom_db = Database(
@@ -107,10 +125,14 @@ class TestFoundationConfigDatabase(AsyncTestCase):
107
125
 
108
126
  async def testHashability(self):
109
127
  """
110
- Test hashability of Database instances.
128
+ Test that Database instances are hashable.
111
129
 
112
- Ensures that Database instances are hashable (due to unsafe_hash=True)
113
- and can be used in sets and as dictionary keys.
130
+ Verifies that Database instances can be used in sets and as dictionary
131
+ keys, and that identical instances are considered equal.
132
+
133
+ Returns
134
+ -------
135
+ None
114
136
  """
115
137
  db1 = Database()
116
138
  db2 = Database()
@@ -123,10 +145,14 @@ class TestFoundationConfigDatabase(AsyncTestCase):
123
145
 
124
146
  async def testKwOnlyInitialization(self):
125
147
  """
126
- Test keyword-only initialization enforcement.
148
+ Test enforcement of keyword-only initialization.
149
+
150
+ Ensures that Database raises TypeError when positional arguments are
151
+ used instead of keyword arguments during initialization.
127
152
 
128
- Ensures that Database enforces keyword-only initialization and
129
- raises TypeError when positional arguments are used.
153
+ Returns
154
+ -------
155
+ None
130
156
  """
131
157
  with self.assertRaises(TypeError):
132
158
  Database('sqlite', Connections())
@@ -4,18 +4,23 @@ from orionis.test.cases.asynchronous import AsyncTestCase
4
4
 
5
5
  class TestFoundationConfigFilesystemsAws(AsyncTestCase):
6
6
  """
7
- Test cases for the S3 storage configuration class.
7
+ Unit tests for the S3 storage configuration entity.
8
8
 
9
- This class contains unit tests for the S3 configuration entity, ensuring
10
- correct default values, field validation, custom value handling, dictionary
11
- conversion, hashability, and keyword-only initialization.
9
+ This test class validates the behavior of the S3 configuration entity, including
10
+ default value assignment, field validation, custom value handling, dictionary
11
+ conversion, hashability, and enforcement of keyword-only initialization.
12
12
  """
13
13
 
14
14
  async def testDefaultValues(self):
15
15
  """
16
- Test that S3 instance is created with correct default values.
16
+ Validate default values of S3 configuration fields.
17
17
 
18
- Verifies all default values match expected defaults from class definition.
18
+ Ensures that a newly created S3 instance has the expected default values
19
+ for all attributes as defined in the class.
20
+
21
+ Returns
22
+ -------
23
+ None
19
24
  """
20
25
  s3 = S3()
21
26
  self.assertEqual(s3.key, "")
@@ -29,9 +34,10 @@ class TestFoundationConfigFilesystemsAws(AsyncTestCase):
29
34
 
30
35
  async def testRequiredFieldValidation(self):
31
36
  """
32
- Test validation of required fields.
37
+ Validate required field constraints for S3 configuration.
33
38
 
34
- Ensures that the 'region' field must be a non-empty string.
39
+ Checks that the 'region' field must be a non-empty string and raises
40
+ OrionisIntegrityException if the constraint is violated.
35
41
 
36
42
  Raises
37
43
  ------
@@ -48,9 +54,10 @@ class TestFoundationConfigFilesystemsAws(AsyncTestCase):
48
54
 
49
55
  async def testOptionalFieldValidation(self):
50
56
  """
51
- Test validation of optional fields.
57
+ Validate optional field types for S3 configuration.
52
58
 
53
- Ensures that optional fields accept None or proper types.
59
+ Ensures that optional fields accept None or valid types, and raises
60
+ OrionisIntegrityException for invalid types.
54
61
 
55
62
  Raises
56
63
  ------
@@ -72,9 +79,10 @@ class TestFoundationConfigFilesystemsAws(AsyncTestCase):
72
79
 
73
80
  async def testBooleanFieldValidation(self):
74
81
  """
75
- Test validation of boolean fields.
82
+ Validate boolean field types for S3 configuration.
76
83
 
77
- Ensures that boolean fields only accept boolean values.
84
+ Ensures that boolean fields accept only boolean values and raises
85
+ OrionisIntegrityException for invalid types.
78
86
 
79
87
  Raises
80
88
  ------
@@ -91,10 +99,14 @@ class TestFoundationConfigFilesystemsAws(AsyncTestCase):
91
99
 
92
100
  async def testCustomValues(self):
93
101
  """
94
- Test that custom values are properly stored and validated.
102
+ Validate assignment and storage of custom values in S3 configuration.
95
103
 
96
- Ensures custom configuration values are correctly handled.
104
+ Ensures that custom values provided during initialization are correctly
105
+ stored and validated in the S3 instance.
97
106
 
107
+ Returns
108
+ -------
109
+ None
98
110
  """
99
111
  custom_s3 = S3(
100
112
  key="AKIAEXAMPLE",
@@ -118,14 +130,14 @@ class TestFoundationConfigFilesystemsAws(AsyncTestCase):
118
130
 
119
131
  async def testToDictMethod(self):
120
132
  """
121
- Test that toDict returns proper dictionary representation.
133
+ Validate dictionary conversion of S3 configuration.
122
134
 
123
- Ensures all attributes are correctly included in the dictionary.
135
+ Ensures that the toDict method returns a dictionary containing all
136
+ attributes of the S3 instance with correct values.
124
137
 
125
138
  Returns
126
139
  -------
127
- dict
128
- Dictionary representation of the S3 instance.
140
+ None
129
141
  """
130
142
  s3 = S3()
131
143
  s3_dict = s3.toDict()
@@ -142,9 +154,14 @@ class TestFoundationConfigFilesystemsAws(AsyncTestCase):
142
154
 
143
155
  async def testHashability(self):
144
156
  """
145
- Test that S3 maintains hashability due to unsafe_hash=True.
157
+ Validate hashability of S3 configuration instances.
158
+
159
+ Ensures that S3 instances are hashable and can be used in sets and as
160
+ dictionary keys due to unsafe_hash=True.
146
161
 
147
- Ensures that S3 instances can be used in sets and as dictionary keys.
162
+ Returns
163
+ -------
164
+ None
148
165
  """
149
166
  s3_1 = S3()
150
167
  s3_2 = S3()
@@ -158,9 +175,10 @@ class TestFoundationConfigFilesystemsAws(AsyncTestCase):
158
175
 
159
176
  async def testKwOnlyInitialization(self):
160
177
  """
161
- Test that S3 enforces keyword-only initialization.
178
+ Validate enforcement of keyword-only initialization for S3.
162
179
 
163
- Ensures that positional arguments are not allowed for initialization.
180
+ Ensures that S3 cannot be initialized with positional arguments and
181
+ raises TypeError if attempted.
164
182
 
165
183
  Raises
166
184
  ------
@@ -4,41 +4,23 @@ from orionis.test.cases.asynchronous import AsyncTestCase
4
4
 
5
5
  class TestFoundationConfigFilesystemsPublic(AsyncTestCase):
6
6
  """
7
- Test cases for the Public storage configuration class.
8
-
9
- This class contains asynchronous unit tests for the `Public` storage configuration,
10
- validating default values, custom values, input validation, dictionary conversion,
11
- whitespace handling, hashability, and keyword-only initialization.
12
-
13
- Methods
14
- -------
15
- testDefaultValues()
16
- Test that Public instance is created with correct default values.
17
- testCustomValues()
18
- Test that custom path and url can be set during initialization.
19
- testEmptyPathValidation()
20
- Test that empty paths are rejected.
21
- testEmptyUrlValidation()
22
- Test that empty URLs are rejected.
23
- testTypeValidation()
24
- Test that non-string values are rejected for both attributes.
25
- testToDictMethod()
26
- Test that toDict returns proper dictionary representation.
27
- testCustomValuesToDict()
28
- Test that custom values are properly included in dictionary representation.
29
- testWhitespaceHandling()
30
- Test that values with whitespace are accepted but not automatically trimmed.
31
- testHashability()
32
- Test that Public maintains hashability due to unsafe_hash=True.
33
- testKwOnlyInitialization()
34
- Test that Public enforces keyword-only initialization.
7
+ Asynchronous unit tests for the `Public` storage configuration class.
8
+
9
+ This class validates the behavior of the `Public` storage configuration, including
10
+ default and custom value assignment, input validation, dictionary conversion,
11
+ whitespace handling, hashability, and enforcement of keyword-only initialization.
35
12
  """
36
13
 
37
14
  async def testDefaultValues(self):
38
15
  """
39
- Test that Public instance is created with correct default values.
16
+ Test creation of a Public instance with default values.
17
+
18
+ Ensures that the default `path` and `url` attributes are set as defined
19
+ in the class.
40
20
 
41
- Verifies both default path and url match expected values from class definition.
21
+ Returns
22
+ -------
23
+ None
42
24
  """
43
25
  public = Public()
44
26
  self.assertEqual(public.path, "storage/app/public")
@@ -46,9 +28,14 @@ class TestFoundationConfigFilesystemsPublic(AsyncTestCase):
46
28
 
47
29
  async def testCustomValues(self):
48
30
  """
49
- Test that custom path and url can be set during initialization.
31
+ Test assignment of custom values to path and url.
32
+
33
+ Checks that custom `path` and `url` values are accepted and stored
34
+ correctly during initialization.
50
35
 
51
- Verifies both attributes accept and store valid custom values.
36
+ Returns
37
+ -------
38
+ None
52
39
  """
53
40
  custom_path = "custom/public/path"
54
41
  custom_url = "assets"
@@ -58,27 +45,42 @@ class TestFoundationConfigFilesystemsPublic(AsyncTestCase):
58
45
 
59
46
  async def testEmptyPathValidation(self):
60
47
  """
61
- Test that empty paths are rejected.
48
+ Test validation for empty path values.
62
49
 
63
- Verifies that an empty path raises OrionisIntegrityException.
50
+ Verifies that providing an empty string for `path` raises
51
+ OrionisIntegrityException.
52
+
53
+ Returns
54
+ -------
55
+ None
64
56
  """
65
57
  with self.assertRaises(OrionisIntegrityException):
66
58
  Public(path="")
67
59
 
68
60
  async def testEmptyUrlValidation(self):
69
61
  """
70
- Test that empty URLs are rejected.
62
+ Test validation for empty url values.
63
+
64
+ Verifies that providing an empty string for `url` raises
65
+ OrionisIntegrityException.
71
66
 
72
- Verifies that an empty url raises OrionisIntegrityException.
67
+ Returns
68
+ -------
69
+ None
73
70
  """
74
71
  with self.assertRaises(OrionisIntegrityException):
75
72
  Public(url="")
76
73
 
77
74
  async def testTypeValidation(self):
78
75
  """
79
- Test that non-string values are rejected for both attributes.
76
+ Test type validation for path and url attributes.
77
+
78
+ Ensures that non-string values for `path` and `url` raise
79
+ OrionisIntegrityException.
80
80
 
81
- Verifies that non-string values raise OrionisIntegrityException.
81
+ Returns
82
+ -------
83
+ None
82
84
  """
83
85
  # Test path validation
84
86
  with self.assertRaises(OrionisIntegrityException):
@@ -94,9 +96,14 @@ class TestFoundationConfigFilesystemsPublic(AsyncTestCase):
94
96
 
95
97
  async def testToDictMethod(self):
96
98
  """
97
- Test that toDict returns proper dictionary representation.
99
+ Test the toDict method for correct dictionary output.
98
100
 
99
- Verifies the returned dictionary contains both default values.
101
+ Ensures that the dictionary representation contains the correct
102
+ default values for `path` and `url`.
103
+
104
+ Returns
105
+ -------
106
+ None
100
107
  """
101
108
  public = Public()
102
109
  config_dict = public.toDict()
@@ -107,9 +114,14 @@ class TestFoundationConfigFilesystemsPublic(AsyncTestCase):
107
114
 
108
115
  async def testCustomValuesToDict(self):
109
116
  """
110
- Test that custom values are properly included in dictionary representation.
117
+ Test dictionary output with custom values.
118
+
119
+ Ensures that the dictionary representation includes custom
120
+ `path` and `url` values when specified.
111
121
 
112
- Verifies toDict() includes custom values when specified.
122
+ Returns
123
+ -------
124
+ None
113
125
  """
114
126
  custom_path = "public/assets"
115
127
  custom_url = "cdn"
@@ -121,9 +133,14 @@ class TestFoundationConfigFilesystemsPublic(AsyncTestCase):
121
133
 
122
134
  async def testWhitespaceHandling(self):
123
135
  """
124
- Test that values with whitespace are accepted but not automatically trimmed.
136
+ Test handling of whitespace in attribute values.
137
+
138
+ Verifies that values containing whitespace are accepted and
139
+ not automatically trimmed.
125
140
 
126
- Verifies the validation allows values containing whitespace characters.
141
+ Returns
142
+ -------
143
+ None
127
144
  """
128
145
  spaced_path = " public/storage "
129
146
  spaced_url = " static/files "
@@ -133,9 +150,14 @@ class TestFoundationConfigFilesystemsPublic(AsyncTestCase):
133
150
 
134
151
  async def testHashability(self):
135
152
  """
136
- Test that Public maintains hashability due to unsafe_hash=True.
153
+ Test hashability of Public instances.
137
154
 
138
- Verifies that Public instances can be used in sets and as dictionary keys.
155
+ Ensures that Public instances are hashable and can be used in sets
156
+ and as dictionary keys due to `unsafe_hash=True`.
157
+
158
+ Returns
159
+ -------
160
+ None
139
161
  """
140
162
  public1 = Public()
141
163
  public2 = Public()
@@ -149,9 +171,14 @@ class TestFoundationConfigFilesystemsPublic(AsyncTestCase):
149
171
 
150
172
  async def testKwOnlyInitialization(self):
151
173
  """
152
- Test that Public enforces keyword-only initialization.
174
+ Test enforcement of keyword-only initialization.
175
+
176
+ Verifies that positional arguments are not allowed when initializing
177
+ a Public instance.
153
178
 
154
- Verifies that positional arguments are not allowed for initialization.
179
+ Returns
180
+ -------
181
+ None
155
182
  """
156
183
  with self.assertRaises(TypeError):
157
184
  Public("storage/path", "static")