orionis 0.431.0__py3-none-any.whl → 0.434.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 (82) hide show
  1. orionis/app.py +17 -0
  2. orionis/console/commands/version.py +2 -2
  3. orionis/console/core/reactor.py +1 -1
  4. orionis/foundation/config/roots/paths.py +2 -2
  5. orionis/metadata/framework.py +38 -65
  6. orionis/metadata/package.py +280 -54
  7. orionis/support/entities/base.py +18 -37
  8. orionis/support/facades/console.py +3 -9
  9. orionis/support/facades/dumper.py +3 -9
  10. orionis/support/facades/logger.py +3 -9
  11. orionis/support/facades/path_resolver.py +3 -10
  12. orionis/support/facades/progress_bar.py +3 -10
  13. orionis/support/facades/testing.py +4 -10
  14. orionis/support/facades/workers.py +4 -9
  15. orionis/support/formatter/exceptions/contracts/parser.py +10 -7
  16. orionis/support/formatter/exceptions/parser.py +28 -26
  17. orionis/support/formatter/serializer.py +12 -5
  18. orionis/support/patterns/singleton/meta.py +17 -21
  19. orionis/support/standard/contracts/std.py +25 -24
  20. orionis/support/standard/exceptions/value.py +2 -2
  21. orionis/support/standard/std.py +26 -24
  22. orionis/support/wrapper/dot_dict.py +16 -51
  23. orionis/test/cases/asynchronous.py +17 -81
  24. orionis/test/cases/synchronous.py +17 -73
  25. orionis/test/contracts/dumper.py +17 -21
  26. orionis/test/contracts/kernel.py +5 -12
  27. orionis/test/contracts/logs.py +16 -21
  28. orionis/test/contracts/printer.py +70 -8
  29. orionis/test/contracts/render.py +7 -13
  30. orionis/test/contracts/test_result.py +58 -27
  31. orionis/test/contracts/unit_test.py +18 -18
  32. orionis/test/core/unit_test.py +162 -519
  33. orionis/test/entities/result.py +49 -21
  34. orionis/test/enums/status.py +11 -17
  35. orionis/test/exceptions/config.py +4 -8
  36. orionis/test/exceptions/failure.py +2 -18
  37. orionis/test/exceptions/persistence.py +4 -8
  38. orionis/test/exceptions/runtime.py +4 -8
  39. orionis/test/exceptions/value.py +5 -13
  40. orionis/test/kernel.py +14 -42
  41. orionis/test/output/dumper.py +21 -43
  42. orionis/test/output/printer.py +6 -146
  43. orionis/test/records/logs.py +57 -121
  44. orionis/test/validators/base_path.py +8 -6
  45. orionis/test/validators/execution_mode.py +2 -3
  46. orionis/test/validators/fail_fast.py +4 -8
  47. orionis/test/validators/folder_path.py +5 -7
  48. orionis/test/validators/module_name.py +3 -3
  49. orionis/test/validators/name_pattern.py +4 -9
  50. orionis/test/validators/pattern.py +4 -9
  51. orionis/test/validators/persistent.py +4 -14
  52. orionis/test/validators/persistent_driver.py +7 -12
  53. orionis/test/validators/print_result.py +4 -9
  54. orionis/test/validators/tags.py +6 -7
  55. orionis/test/validators/throw_exception.py +7 -14
  56. orionis/test/validators/verbosity.py +15 -5
  57. orionis/test/validators/web_report.py +6 -10
  58. orionis/test/validators/workers.py +9 -4
  59. orionis/test/view/render.py +9 -26
  60. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/METADATA +1 -1
  61. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/RECORD +82 -81
  62. tests/metadata/test_metadata_framework.py +64 -90
  63. tests/metadata/test_metadata_package.py +31 -31
  64. tests/support/entities/mock_dataclass.py +16 -10
  65. tests/support/entities/test_base.py +6 -14
  66. tests/support/patterns/singleton/test_patterns_singleton.py +7 -8
  67. tests/support/standard/test_services_std.py +113 -37
  68. tests/support/wrapper/test_services_wrapper_docdict.py +25 -40
  69. tests/testing/cases/test_testing_asynchronous.py +14 -14
  70. tests/testing/cases/test_testing_synchronous.py +12 -14
  71. tests/testing/entities/test_testing_result.py +12 -51
  72. tests/testing/enums/test_testing_status.py +8 -13
  73. tests/testing/output/test_testing_dumper.py +3 -6
  74. tests/testing/output/test_testing_printer.py +5 -5
  75. tests/testing/records/test_testing_records.py +16 -26
  76. tests/testing/test_testing_unit.py +8 -94
  77. tests/testing/validators/test_testing_validators.py +55 -112
  78. tests/testing/view/test_render.py +4 -5
  79. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/WHEEL +0 -0
  80. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/licenses/LICENCE +0 -0
  81. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/top_level.txt +0 -0
  82. {orionis-0.431.0.dist-info → orionis-0.434.0.dist-info}/zip-safe +0 -0
@@ -5,7 +5,7 @@ class OrionisStdValueException(Exception):
5
5
  Parameters
6
6
  ----------
7
7
  msg : str
8
- Descriptive error message explaining the cause of the exception.
8
+ The error message that describes the reason for the exception.
9
9
  """
10
10
  super().__init__(msg)
11
11
 
@@ -14,6 +14,6 @@ class OrionisStdValueException(Exception):
14
14
  Returns
15
15
  -------
16
16
  str
17
- Formatted string describing the exception.
17
+ The error message associated with this exception.
18
18
  """
19
19
  return str(self.args[0])
@@ -3,56 +3,59 @@ from orionis.support.standard.exceptions import OrionisStdValueException
3
3
 
4
4
  class StdClass(IStdClass):
5
5
  """
6
- A dynamic class that allows setting arbitrary attributes,
7
- similar to PHP's stdClass.
6
+ A dynamic class for storing arbitrary attributes, similar to PHP's stdClass.
7
+
8
+ Attributes
9
+ ----------
10
+ Any attribute can be dynamically set via keyword arguments or the `update` method.
8
11
  """
9
12
 
10
13
  def __init__(self, **kwargs):
11
14
  """
12
- Initializes the StdClass with optional keyword arguments.
15
+ Initialize a StdClass instance with optional attributes.
13
16
 
14
17
  Parameters
15
18
  ----------
16
- kwargs : dict
17
- Key-value pairs to set as attributes.
19
+ **kwargs : dict, optional
20
+ Arbitrary keyword arguments to set as attributes.
18
21
  """
19
22
  self.update(**kwargs)
20
23
 
21
24
  def __repr__(self):
22
25
  """
23
- Returns an unambiguous string representation of the object.
26
+ Return an unambiguous string representation of the object.
24
27
 
25
28
  Returns
26
29
  -------
27
30
  str
28
- A string that could be used to recreate the object.
31
+ String representation suitable for debugging.
29
32
  """
30
33
  return f"{self.__class__.__name__}({self.__dict__})"
31
34
 
32
35
  def __str__(self):
33
36
  """
34
- Returns a readable string representation of the object.
37
+ Return a readable string representation of the object.
35
38
 
36
39
  Returns
37
40
  -------
38
41
  str
39
- A user-friendly string showing the object's attributes.
42
+ String showing the object's attributes.
40
43
  """
41
44
  return str(self.__dict__)
42
45
 
43
46
  def __eq__(self, other):
44
47
  """
45
- Compares two StdClass objects for equality based on their attributes.
48
+ Compare two StdClass objects for equality based on their attributes.
46
49
 
47
50
  Parameters
48
51
  ----------
49
52
  other : object
50
- The object to compare with.
53
+ Object to compare with.
51
54
 
52
55
  Returns
53
56
  -------
54
57
  bool
55
- True if both objects have the same attributes and values.
58
+ True if both objects have the same attributes and values, False otherwise.
56
59
  """
57
60
  if not isinstance(other, StdClass):
58
61
  return False
@@ -60,30 +63,29 @@ class StdClass(IStdClass):
60
63
 
61
64
  def toDict(self):
62
65
  """
63
- Converts the object's attributes to a dictionary.
66
+ Convert the object's attributes to a dictionary.
64
67
 
65
68
  Returns
66
69
  -------
67
70
  dict
68
- A dictionary representation of the object's attributes.
71
+ A shallow copy of the object's attributes.
69
72
  """
70
-
71
73
  # Return a copy to avoid external modifications
72
74
  return self.__dict__.copy()
73
75
 
74
76
  def update(self, **kwargs):
75
77
  """
76
- Updates the object's attributes dynamically.
78
+ Update the object's attributes dynamically.
77
79
 
78
80
  Parameters
79
81
  ----------
80
- kwargs : dict
81
- Key-value pairs to update attributes.
82
+ **kwargs : dict
83
+ Key-value pairs to update or add as attributes.
82
84
 
83
85
  Raises
84
86
  ------
85
87
  OrionisStdValueException
86
- If an attribute name is invalid or conflicts with existing methods.
88
+ If an attribute name is reserved or conflicts with a class method.
87
89
  """
88
90
  for key, value in kwargs.items():
89
91
  if key.startswith('__') and key.endswith('__'):
@@ -94,7 +96,7 @@ class StdClass(IStdClass):
94
96
 
95
97
  def remove(self, *attributes):
96
98
  """
97
- Removes one or more attributes from the object.
99
+ Remove one or more attributes from the object.
98
100
 
99
101
  Parameters
100
102
  ----------
@@ -104,7 +106,7 @@ class StdClass(IStdClass):
104
106
  Raises
105
107
  ------
106
108
  AttributeError
107
- If any of the attributes doesn't exist.
109
+ If any of the specified attributes do not exist.
108
110
  """
109
111
  for attr in attributes:
110
112
  if not hasattr(self, attr):
@@ -114,16 +116,16 @@ class StdClass(IStdClass):
114
116
  @classmethod
115
117
  def fromDict(cls, dictionary):
116
118
  """
117
- Creates a StdClass instance from a dictionary.
119
+ Create a StdClass instance from a dictionary.
118
120
 
119
121
  Parameters
120
122
  ----------
121
123
  dictionary : dict
122
- Dictionary to create the object from.
124
+ Dictionary containing attribute names and values.
123
125
 
124
126
  Returns
125
127
  -------
126
128
  StdClass
127
- A new StdClass instance with the dictionary's key-value pairs as attributes.
129
+ A new StdClass instance with attributes set from the dictionary.
128
130
  """
129
131
  return cls(**dictionary)
@@ -8,9 +8,6 @@ class DotDict(dict):
8
8
  """
9
9
  Retrieve the value associated with the given key as an attribute.
10
10
 
11
- If the value is a dictionary (but not already a DotDict), it is converted
12
- to a DotDict and updated in-place. If the key does not exist, returns None.
13
-
14
11
  Parameters
15
12
  ----------
16
13
  key : str
@@ -24,8 +21,8 @@ class DotDict(dict):
24
21
 
25
22
  Notes
26
23
  -----
27
- This method allows attribute-style access to dictionary keys. If the value
28
- is a plain dictionary, it is automatically wrapped as a DotDict for consistency.
24
+ Allows attribute-style access to dictionary keys. If the value is a plain
25
+ dictionary, it is automatically wrapped as a DotDict for consistency.
29
26
  """
30
27
  try:
31
28
  value = self[key] # Attempt to retrieve the value by key
@@ -42,10 +39,6 @@ class DotDict(dict):
42
39
  """
43
40
  Assign a value to an attribute of the DotDict instance.
44
41
 
45
- This method enables attribute-style assignment for dictionary keys. If the
46
- assigned value is a plain dictionary (not a DotDict), it is automatically
47
- converted to a DotDict for consistency and recursive attribute access.
48
-
49
42
  Parameters
50
43
  ----------
51
44
  key : str
@@ -57,14 +50,13 @@ class DotDict(dict):
57
50
  Returns
58
51
  -------
59
52
  None
60
- This method does not return a value.
61
53
 
62
54
  Notes
63
55
  -----
64
- The attribute is stored as a key-value pair in the underlying dictionary.
65
- This allows seamless attribute-style access and assignment for dictionary keys.
56
+ Enables attribute-style assignment for dictionary keys. If the assigned value
57
+ is a plain dictionary (not a DotDict), it is automatically converted to a
58
+ DotDict for consistency and recursive attribute access.
66
59
  """
67
-
68
60
  # Convert plain dicts to DotDict for recursive attribute access
69
61
  if isinstance(value, dict) and not isinstance(value, DotDict):
70
62
  value = DotDict(value)
@@ -76,9 +68,6 @@ class DotDict(dict):
76
68
  """
77
69
  Remove an attribute from the DotDict instance.
78
70
 
79
- This method deletes the key-value pair corresponding to the given attribute name
80
- from the underlying dictionary. If the key does not exist, an AttributeError is raised.
81
-
82
71
  Parameters
83
72
  ----------
84
73
  key : str
@@ -87,7 +76,6 @@ class DotDict(dict):
87
76
  Returns
88
77
  -------
89
78
  None
90
- This method does not return a value.
91
79
 
92
80
  Raises
93
81
  ------
@@ -96,7 +84,7 @@ class DotDict(dict):
96
84
 
97
85
  Notes
98
86
  -----
99
- This method enables attribute-style deletion for dictionary keys, allowing
87
+ Enables attribute-style deletion for dictionary keys, allowing
100
88
  seamless removal of items using dot notation.
101
89
  """
102
90
  try:
@@ -110,10 +98,6 @@ class DotDict(dict):
110
98
  """
111
99
  Retrieve the value associated with the given key, returning a default value if the key is not found.
112
100
 
113
- If the retrieved value is a plain dictionary (not a DotDict), it is converted to a DotDict,
114
- stored back in the dictionary, and then returned. This ensures consistent attribute-style access
115
- for nested dictionaries.
116
-
117
101
  Parameters
118
102
  ----------
119
103
  key : str
@@ -129,7 +113,7 @@ class DotDict(dict):
129
113
 
130
114
  Notes
131
115
  -----
132
- This method overrides the standard dict.get() to provide automatic conversion of nested
116
+ Overrides the standard dict.get() to provide automatic conversion of nested
133
117
  dictionaries to DotDict instances, enabling recursive attribute-style access.
134
118
  """
135
119
  # Retrieve the value using the base dict's get method
@@ -144,27 +128,17 @@ class DotDict(dict):
144
128
  """
145
129
  Recursively export the contents of the DotDict as a standard Python dictionary.
146
130
 
147
- This method traverses the DotDict and converts all nested DotDict instances
148
- into regular dictionaries by recursively calling their `export` method.
149
- Non-DotDict values are included as-is. This ensures that the returned object
150
- is composed entirely of built-in Python types, making it suitable for serialization
151
- or interoperability with code expecting standard dictionaries.
152
-
153
- Parameters
154
- ----------
155
- None
156
-
157
131
  Returns
158
132
  -------
159
- result : dict
133
+ dict
160
134
  A dictionary representation of the DotDict, where all nested DotDict instances
161
135
  are recursively converted to dictionaries. Non-DotDict values are returned unchanged.
162
136
 
163
137
  Notes
164
138
  -----
165
- This method is useful for converting a DotDict (which supports attribute-style access)
166
- into a plain dictionary for use with APIs, serialization, or other libraries that
167
- require standard dict objects.
139
+ Converts all nested DotDict instances into regular dictionaries by recursively
140
+ calling their `export` method. Useful for serialization or interoperability
141
+ with code expecting standard dictionaries.
168
142
  """
169
143
  result = {}
170
144
  # Iterate through all key-value pairs in the DotDict
@@ -181,10 +155,6 @@ class DotDict(dict):
181
155
  """
182
156
  Create a deep copy of the DotDict instance, recursively copying all nested DotDict and dict objects.
183
157
 
184
- This method traverses the DotDict and ensures that all nested DotDict and dict instances are
185
- copied recursively, so that the returned DotDict is fully independent of the original. Non-dict
186
- values are copied by reference.
187
-
188
158
  Returns
189
159
  -------
190
160
  DotDict
@@ -193,8 +163,8 @@ class DotDict(dict):
193
163
 
194
164
  Notes
195
165
  -----
196
- This method is useful when you need a completely independent copy of a DotDict, including all
197
- nested structures, to avoid unintended side effects from shared references.
166
+ Ensures that all nested DotDict and dict instances are copied recursively,
167
+ so that the returned DotDict is fully independent of the original.
198
168
  """
199
169
  copied = {}
200
170
  # Iterate through all key-value pairs in the DotDict
@@ -215,11 +185,6 @@ class DotDict(dict):
215
185
  """
216
186
  Return a string representation of the DotDict instance.
217
187
 
218
- This method overrides the default `__repr__` implementation to provide a concise
219
- and informative string that displays the class name (`DotDict`) and the contents
220
- of the underlying dictionary. This is useful for debugging and logging, as it
221
- clearly distinguishes DotDict objects from regular dictionaries.
222
-
223
188
  Returns
224
189
  -------
225
190
  str
@@ -228,8 +193,8 @@ class DotDict(dict):
228
193
 
229
194
  Notes
230
195
  -----
231
- The returned string uses the base dictionary's representation, but is prefixed
232
- with the DotDict class name for clarity.
196
+ Uses the base dict's __repr__ for the contents, but keeps the DotDict class name
197
+ for clarity and distinction from regular dictionaries.
233
198
  """
234
199
  # Use the base dict's __repr__ for the contents, but keep DotDict class name
235
- return super().__repr__()
200
+ return super().__repr__()
@@ -3,132 +3,68 @@ from orionis.test.output.dumper import TestDumper
3
3
 
4
4
  class AsyncTestCase(unittest.IsolatedAsyncioTestCase, TestDumper):
5
5
  """
6
- Base test case class for asynchronous unit testing.
6
+ Base class for asynchronous unit tests in the Orionis framework.
7
7
 
8
- This class provides a foundation for writing asynchronous unit tests within
9
- the Orionis framework. It extends unittest.IsolatedAsyncioTestCase and includes
10
- TestDumper functionality for enhanced test output and debugging capabilities.
11
-
12
- The class provides hooks for custom async setup and teardown logic through the
13
- onAsyncSetup() and onAsyncTeardown() methods, which can be overridden by subclasses
14
- to implement test-specific asynchronous initialization and cleanup procedures.
15
-
16
- Each test method runs in its own isolated asyncio event loop, ensuring proper
17
- isolation and preventing side effects between tests.
8
+ Inherits from `unittest.IsolatedAsyncioTestCase` and `TestDumper`, providing
9
+ a structure for writing asynchronous tests with isolated event loops and
10
+ enhanced output capabilities. Subclasses can override `onAsyncSetup` and
11
+ `onAsyncTeardown` for custom asynchronous setup and teardown logic.
18
12
 
19
13
  Attributes
20
14
  ----------
21
15
  None
22
-
23
- Methods
24
- -------
25
- asyncSetUp()
26
- Initialize test environment before each async test method execution.
27
- asyncTearDown()
28
- Clean up test environment after each async test method execution.
29
- onAsyncSetup()
30
- Hook method for subclass-specific async setup logic.
31
- onAsyncTeardown()
32
- Hook method for subclass-specific async teardown logic.
33
16
  """
34
17
 
35
18
  async def asyncSetUp(self):
36
19
  """
37
- Initialize the test environment before each async test method.
38
-
39
- This method is automatically called by the unittest framework before
40
- each async test method execution. It performs the standard unittest
41
- async setup and then calls the onAsyncSetup() hook for custom
42
- asynchronous initialization.
20
+ Asynchronous setup executed before each test method.
43
21
 
44
- Parameters
45
- ----------
46
- None
22
+ Calls the parent class's asyncSetUp and then invokes the
23
+ `onAsyncSetup` hook for additional subclass-specific setup.
47
24
 
48
25
  Returns
49
26
  -------
50
27
  None
51
-
52
- Notes
53
- -----
54
- This method should not be overridden directly. Use onAsyncSetup() instead
55
- for custom async setup logic. The method runs in the isolated event loop
56
- created for each test.
57
28
  """
58
29
  await super().asyncSetUp()
59
30
  await self.onAsyncSetup()
60
31
 
61
32
  async def asyncTearDown(self):
62
33
  """
63
- Clean up the test environment after each async test method.
34
+ Asynchronous teardown executed after each test method.
64
35
 
65
- This method is automatically called by the unittest framework after
66
- each async test method execution. It calls the onAsyncTeardown() hook
67
- for custom cleanup and then performs the standard unittest async teardown.
68
-
69
- Parameters
70
- ----------
71
- None
36
+ Invokes the `onAsyncTeardown` hook for subclass-specific cleanup,
37
+ then calls the parent class's asyncTearDown.
72
38
 
73
39
  Returns
74
40
  -------
75
41
  None
76
-
77
- Notes
78
- -----
79
- This method should not be overridden directly. Use onAsyncTeardown() instead
80
- for custom async teardown logic. The method runs in the same isolated event
81
- loop as the test.
82
42
  """
83
43
  await self.onAsyncTeardown()
84
44
  await super().asyncTearDown()
85
45
 
86
46
  async def onAsyncSetup(self):
87
47
  """
88
- Hook method for subclass-specific async setup logic.
89
-
90
- This method is called during the asyncSetUp() phase and is intended to be
91
- overridden by subclasses that need to perform custom asynchronous
92
- initialization before each test method execution.
48
+ Hook for subclass-specific asynchronous setup logic.
93
49
 
94
- Parameters
95
- ----------
96
- None
50
+ Intended to be overridden by subclasses to perform custom
51
+ asynchronous initialization before each test.
97
52
 
98
53
  Returns
99
54
  -------
100
55
  None
101
-
102
- Examples
103
- --------
104
- >>> async def onAsyncSetup(self):
105
- ... self.db_connection = await create_async_connection()
106
- ... self.mock_service = AsyncMockService()
107
- ... await self.mock_service.initialize()
108
56
  """
109
57
  pass
110
58
 
111
59
  async def onAsyncTeardown(self):
112
60
  """
113
- Hook method for subclass-specific async teardown logic.
61
+ Hook for subclass-specific asynchronous teardown logic.
114
62
 
115
- This method is called during the asyncTearDown() phase and is intended to be
116
- overridden by subclasses that need to perform custom asynchronous cleanup
117
- after each test method execution.
118
-
119
- Parameters
120
- ----------
121
- None
63
+ Intended to be overridden by subclasses to perform custom
64
+ asynchronous cleanup after each test.
122
65
 
123
66
  Returns
124
67
  -------
125
68
  None
126
-
127
- Examples
128
- --------
129
- >>> async def onAsyncTeardown(self):
130
- ... await self.db_connection.close()
131
- ... await self.mock_service.cleanup()
132
- ... del self.test_data
133
69
  """
134
70
  pass
@@ -3,52 +3,28 @@ from orionis.test.output.dumper import TestDumper
3
3
 
4
4
  class SyncTestCase(unittest.TestCase, TestDumper):
5
5
  """
6
- Base test case class for synchronous unit testing.
6
+ Base class for synchronous unit tests in the Orionis framework.
7
7
 
8
- This class provides a foundation for writing synchronous unit tests within
9
- the Orionis framework. It extends unittest.TestCase and includes TestDumper
10
- functionality for enhanced test output and debugging capabilities.
11
-
12
- The class provides hooks for custom setup and teardown logic through the
13
- onSetup() and onTeardown() methods, which can be overridden by subclasses
14
- to implement test-specific initialization and cleanup procedures.
8
+ Inherits from `unittest.TestCase` and `TestDumper`, providing
9
+ hooks for custom setup and teardown logic via `onSetup()` and
10
+ `onTeardown()` methods. Subclasses should override these hooks
11
+ to implement test-specific initialization and cleanup.
15
12
 
16
13
  Attributes
17
14
  ----------
18
15
  None
19
-
20
- Methods
21
- -------
22
- setUp()
23
- Initialize test environment before each test method execution.
24
- tearDown()
25
- Clean up test environment after each test method execution.
26
- onSetup()
27
- Hook method for subclass-specific setup logic.
28
- onTeardown()
29
- Hook method for subclass-specific teardown logic.
30
16
  """
31
17
 
32
18
  def setUp(self):
33
19
  """
34
- Initialize the test environment before each test method.
20
+ Set up the test environment before each test method.
35
21
 
36
- This method is automatically called by the unittest framework before
37
- each test method execution. It performs the standard unittest setup
38
- and then calls the onSetup() hook for custom initialization.
39
-
40
- Parameters
41
- ----------
42
- None
22
+ Calls the superclass `setUp()` and then invokes the
23
+ `onSetup()` hook for additional initialization.
43
24
 
44
25
  Returns
45
26
  -------
46
27
  None
47
-
48
- Notes
49
- -----
50
- This method should not be overridden directly. Use onSetup() instead
51
- for custom setup logic.
52
28
  """
53
29
  super().setUp()
54
30
  self.onSetup()
@@ -57,70 +33,38 @@ class SyncTestCase(unittest.TestCase, TestDumper):
57
33
  """
58
34
  Clean up the test environment after each test method.
59
35
 
60
- This method is automatically called by the unittest framework after
61
- each test method execution. It calls the onTeardown() hook for custom
62
- cleanup and then performs the standard unittest teardown.
63
-
64
- Parameters
65
- ----------
66
- None
36
+ Invokes the `onTeardown()` hook for custom cleanup and
37
+ then calls the superclass `tearDown()`.
67
38
 
68
39
  Returns
69
40
  -------
70
41
  None
71
-
72
- Notes
73
- -----
74
- This method should not be overridden directly. Use onTeardown() instead
75
- for custom teardown logic.
76
42
  """
77
43
  self.onTeardown()
78
44
  super().tearDown()
79
45
 
80
46
  def onSetup(self):
81
47
  """
82
- Hook method for subclass-specific setup logic.
48
+ Hook for subclass-specific setup logic.
83
49
 
84
- This method is called during the setUp() phase and is intended to be
85
- overridden by subclasses that need to perform custom initialization
86
- before each test method execution.
87
-
88
- Parameters
89
- ----------
90
- None
50
+ Intended to be overridden by subclasses to perform
51
+ custom initialization before each test.
91
52
 
92
53
  Returns
93
54
  -------
94
55
  None
95
-
96
- Examples
97
- --------
98
- >>> def onSetup(self):
99
- ... self.mock_service = MockService()
100
- ... self.test_data = {"key": "value"}
101
56
  """
102
57
  pass
103
58
 
104
59
  def onTeardown(self):
105
60
  """
106
- Hook method for subclass-specific teardown logic.
61
+ Hook for subclass-specific teardown logic.
107
62
 
108
- This method is called during the tearDown() phase and is intended to be
109
- overridden by subclasses that need to perform custom cleanup after
110
- each test method execution.
111
-
112
- Parameters
113
- ----------
114
- None
63
+ Intended to be overridden by subclasses to perform
64
+ custom cleanup after each test.
115
65
 
116
66
  Returns
117
67
  -------
118
68
  None
119
-
120
- Examples
121
- --------
122
- >>> def onTeardown(self):
123
- ... self.mock_service.cleanup()
124
- ... del self.test_data
125
69
  """
126
- pass
70
+ pass