orionis 0.244.0__py3-none-any.whl → 0.246.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 (37) hide show
  1. orionis/framework.py +1 -1
  2. orionis/luminate/config/contracts/__init__.py +0 -0
  3. orionis/luminate/config/contracts/config.py +27 -0
  4. orionis/luminate/config/entities/__init__.py +0 -0
  5. orionis/luminate/config/entities/testing.py +37 -0
  6. orionis/luminate/support/environment/env.py +1 -0
  7. orionis/luminate/support/introspection/abstracts/entities/__init__.py +0 -0
  8. orionis/luminate/support/introspection/abstracts/entities/abstract_class_attributes.py +11 -0
  9. orionis/luminate/support/introspection/abstracts/reflect_abstract.py +154 -16
  10. orionis/luminate/support/introspection/instances/reflection_instance.py +2 -2
  11. orionis/luminate/test/core/contracts/test_unit.py +100 -60
  12. orionis/luminate/test/core/test_suite.py +52 -45
  13. orionis/luminate/test/core/test_unit.py +774 -197
  14. orionis/luminate/test/entities/test_result.py +6 -2
  15. orionis/luminate/test/enums/test_mode.py +16 -0
  16. orionis/luminate/test/exceptions/test_config_exception.py +28 -0
  17. orionis/luminate/test/exceptions/test_exception.py +40 -33
  18. orionis/luminate/test/output/test_std_out.py +55 -13
  19. {orionis-0.244.0.dist-info → orionis-0.246.0.dist-info}/METADATA +1 -1
  20. {orionis-0.244.0.dist-info → orionis-0.246.0.dist-info}/RECORD +37 -29
  21. tests/support/inspection/fakes/fake_reflect_abstract.py +61 -5
  22. tests/support/inspection/test_reflect_abstract.py +62 -1
  23. tests/support/inspection/test_reflect_instance.py +0 -1
  24. /orionis/luminate/config/{app.py → entities/app.py} +0 -0
  25. /orionis/luminate/config/{auth.py → entities/auth.py} +0 -0
  26. /orionis/luminate/config/{cache.py → entities/cache.py} +0 -0
  27. /orionis/luminate/config/{cors.py → entities/cors.py} +0 -0
  28. /orionis/luminate/config/{database.py → entities/database.py} +0 -0
  29. /orionis/luminate/config/{filesystems.py → entities/filesystems.py} +0 -0
  30. /orionis/luminate/config/{logging.py → entities/logging.py} +0 -0
  31. /orionis/luminate/config/{mail.py → entities/mail.py} +0 -0
  32. /orionis/luminate/config/{queue.py → entities/queue.py} +0 -0
  33. /orionis/luminate/config/{session.py → entities/session.py} +0 -0
  34. {orionis-0.244.0.dist-info → orionis-0.246.0.dist-info}/LICENCE +0 -0
  35. {orionis-0.244.0.dist-info → orionis-0.246.0.dist-info}/WHEEL +0 -0
  36. {orionis-0.244.0.dist-info → orionis-0.246.0.dist-info}/entry_points.txt +0 -0
  37. {orionis-0.244.0.dist-info → orionis-0.246.0.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
2
+ from typing import Any, Optional
3
3
  from orionis.luminate.test.enums.test_status import TestStatus
4
4
 
5
5
  @dataclass(frozen=True)
@@ -22,9 +22,13 @@ class TestResult:
22
22
  file_path : str, optional
23
23
  The file path where the test is located, by default None.
24
24
  """
25
+ id: Any
25
26
  name: str
26
27
  status: TestStatus
27
28
  execution_time: float
28
29
  error_message: Optional[str] = None
29
30
  traceback: Optional[str] = None
30
- file_path: Optional[str] = None
31
+ class_name : Optional[str] = None
32
+ method : Optional[str] = None
33
+ module : Optional[str] = None
34
+ file_path: Optional[str] = None
@@ -0,0 +1,16 @@
1
+ from enum import Enum
2
+
3
+ class ExecutionMode(Enum):
4
+ """
5
+ ExecutionMode is an enumeration that defines the modes of execution
6
+ for a process or task.
7
+
8
+ Attributes
9
+ ----------
10
+ SEQUENTIAL : str
11
+ Represents sequential execution mode, where tasks are executed one after another.
12
+ PARALLEL : str
13
+ Represents parallel execution mode, where tasks are executed concurrently.
14
+ """
15
+ SEQUENTIAL = "sequential"
16
+ PARALLEL = "parallel"
@@ -0,0 +1,28 @@
1
+ class OrionisTestConfigException(Exception):
2
+ """
3
+ Custom exception for test configuration errors in the Orionis framework.
4
+
5
+ This exception is raised when there is an issue with the test configuration,
6
+ providing a clear and descriptive error message to aid in debugging.
7
+ """
8
+
9
+ def __init__(self, msg: str):
10
+ """
11
+ Initializes the OrionisTestConfigException with a specific error message.
12
+
13
+ Args:
14
+ msg (str): A descriptive error message explaining the cause of the exception.
15
+ """
16
+ super().__init__(msg)
17
+
18
+ def __str__(self) -> str:
19
+ """
20
+ Returns a formatted string representation of the exception.
21
+
22
+ The string includes the exception name and the error message, providing
23
+ a clear and concise description of the issue.
24
+
25
+ Returns:
26
+ str: A formatted string describing the exception.
27
+ """
28
+ return f"{self.__class__.__name__}: {self.args[0]}"
@@ -1,45 +1,52 @@
1
+ import unittest
2
+
1
3
  class OrionisTestFailureException(Exception):
2
4
  """
3
- Custom exception raised when test execution results in one or more failures.
4
-
5
- This exception is used to indicate that a test suite run has encountered failures.
6
- It stores a response message detailing the number of failed tests or other relevant
7
- error information.
8
-
9
- Parameters
10
- ----------
11
- response : str
12
- A message describing the reason for the test failure.
13
-
14
- Attributes
15
- ----------
16
- response : str
17
- Stores the response message describing the failure.
18
-
19
- Methods
20
- -------
21
- __str__() -> str
22
- Returns a string representation of the exception, including the response message.
5
+ OrionisTestFailureException is a custom exception class used to handle test failures and errors
6
+ in a structured manner. It provides detailed information about the failed and errored tests,
7
+ including their IDs and formatted error messages.
8
+ Methods:
9
+ __init__(result: unittest.TestResult):
10
+ __str__() -> str:
23
11
  """
24
12
 
25
- def __init__(self, response: str):
13
+ def __init__(self, result: unittest.TestResult):
26
14
  """
27
- Initializes the exception with a response message.
28
-
29
- Parameters
30
- ----------
31
- response : str
32
- The message describing the test failure.
15
+ Initializes the exception with details about failed and errored tests.
16
+ Args:
17
+ result (unittest.TestResult): The test result object containing information
18
+ about test failures and errors.
19
+ Attributes:
20
+ failed_tests (list): A list of IDs for tests that failed.
21
+ errored_tests (list): A list of IDs for tests that encountered errors.
22
+ error_messages (list): A list of formatted error messages for failed and errored tests.
23
+ text (str): A formatted string summarizing the test failures and errors.
24
+ Raises:
25
+ Exception: An exception with a message summarizing the number of failed
26
+ and errored tests along with their details.
33
27
  """
34
- super().__init__(response)
28
+ failed_tests = [test.id() for test, _ in result.failures]
29
+ errored_tests = [test.id() for test, _ in result.errors]
30
+
31
+ error_messages = []
32
+ for test in failed_tests:
33
+ error_messages.append(f"Test Fail: {test}")
34
+ for test in errored_tests:
35
+ error_messages.append(f"Test Error: {test}")
36
+
37
+ text = "\n".join(error_messages)
38
+
39
+ super().__init__(f"{len(failed_tests) + len(errored_tests)} test(s) failed or errored:\n{text}")
35
40
 
36
41
  def __str__(self) -> str:
37
42
  """
38
- Returns a human-readable string representation of the exception.
43
+ Returns a string representation of the exception.
44
+
45
+ The string includes the exception name and the first argument
46
+ passed to the exception, providing a clear description of the
47
+ test failure.
39
48
 
40
- Returns
41
- -------
42
- str
43
- A formatted string containing the exception name and response message.
49
+ Returns:
50
+ str: A formatted string describing the exception.
44
51
  """
45
52
  return f"OrionisTestFailureException: {self.args[0]}"
@@ -5,19 +5,61 @@ from orionis.luminate.test.output.contracts.test_std_out import ITestStdOut
5
5
 
6
6
  class TestStdOut(ITestStdOut):
7
7
  """
8
- A utility class for printing debug information during testing. This class temporarily
9
- redirects the standard output and error streams to their original states to ensure
10
- proper console output, and provides contextual information about the file and line
11
- number where the print call was made.
12
- Methods
13
- -------
14
- print(*args)
15
- Prints the provided arguments to the console with contextual information
16
- about the file and line number of the caller. If no arguments are provided,
17
- the method does nothing.
8
+ TestStdOut is a class that provides methods for printing messages to the console
9
+ and exiting the program. It is designed to be used in a testing environment where
10
+ console output is important for debugging and reporting purposes.
11
+ It includes methods for printing messages with contextual information about the
12
+ file, line number, and method name of the caller. The class also provides a method
13
+ for forcefully exiting the program with a specified exit code.
18
14
  """
19
15
 
20
- def print(*args):
16
+ def console(self):
17
+ """
18
+ Returns an instance of the Console class for printing messages to the console.
19
+ Ensures that the original stdout and stderr streams are used during the operation.
20
+ """
21
+ original_stdout = sys.stdout
22
+ original_stderr = sys.stderr
23
+ try:
24
+ sys.stdout = sys.__stdout__
25
+ sys.stderr = sys.__stderr__
26
+ return Console
27
+ finally:
28
+ # Restore the original stdout and stderr streams
29
+ sys.stdout = original_stdout
30
+ sys.stderr = original_stderr
31
+
32
+ def exit(self) -> None:
33
+ """
34
+ Force close the program with the specified exit code. This method is a wrapper
35
+ around `os._exit(1)` to ensure that the program terminates immediately without
36
+ """
37
+ os._exit(1)
38
+
39
+ def dd(self, *args) -> None:
40
+ """
41
+ Prints the provided arguments to the console with contextual information
42
+ about the file and line number of the caller, and then exits the program.
43
+ Parameters
44
+ ----------
45
+ *args : tuple
46
+ The arguments to be printed. The first argument is ignored, and the
47
+ remaining arguments are printed. If no arguments are provided, the
48
+ method does nothing.
49
+ Notes
50
+ -----
51
+ - The method temporarily redirects `sys.stdout` and `sys.stderr` to their
52
+ original states (`sys.__stdout__` and `sys.__stderr__`) to ensure proper
53
+ console output.
54
+ - The contextual information includes the file path and line number of the
55
+ caller, which is displayed in a muted text format.
56
+ - After printing, the method restores the original `sys.stdout` and
57
+ `sys.stderr` streams.
58
+ """
59
+ self.dump(*args)
60
+ self.exit()
61
+
62
+ def dump(*args):
21
63
  """
22
64
  Prints the provided arguments to the console with contextual information
23
65
  about the file and line number of the caller. The output is formatted with
@@ -57,8 +99,8 @@ class TestStdOut(ITestStdOut):
57
99
  _line = sys._getframe(1).f_lineno
58
100
 
59
101
  # Print the contextual information and the provided arguments
60
- Console.textMuted(f"[Printout] File: {_file}, Line: {_line}, Method: {_method}")
61
- print(*args[1:], end='\n')
102
+ Console.textMuted(f"File: {_file}, Line: {_line}, Method: {_method}")
103
+ print(*args, end='\n')
62
104
  Console.newLine()
63
105
 
64
106
  # Restore the original stdout and stderr streams
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: orionis
3
- Version: 0.244.0
3
+ Version: 0.246.0
4
4
  Summary: Orionis Framework – Elegant, Fast, and Powerful.
5
5
  Home-page: https://github.com/orionis-framework/framework
6
6
  Author: Raul Mauricio Uñate Castro
@@ -1,6 +1,6 @@
1
1
  orionis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  orionis/console.py,sha256=4gYWxf0fWYgJ4RKwARvnTPh06FL3GJ6SAZ7R2NzOICw,1342
3
- orionis/framework.py,sha256=gLxDF0GNUJs96VDqKeW6mIf1lKRqRrGhWkbHV2JNIYo,1458
3
+ orionis/framework.py,sha256=dKRDGDAVMq3aFJsdj4yleU3LoWT9ynsUyVhwfX8YnOY,1458
4
4
  orionis/installer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  orionis/installer/manager.py,sha256=Li4TVziRXWfum02xNG4JHwbnLk-u8xzHjdqKz-D894k,2755
6
6
  orionis/installer/output.py,sha256=7O9qa2xtXMB_4ZvVi-Klneom9YazwygAd_4uYAoxhbU,8548
@@ -12,16 +12,20 @@ orionis/installer/contracts/setup.py,sha256=aWYkCv-z48bXXZynYapc3uMIE1gyO6XnkTw3
12
12
  orionis/luminate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  orionis/luminate/application.py,sha256=6pnmBJVjiTY8O0MXfCXt1nX7PzslBPTFyol_3uwjqnQ,9475
14
14
  orionis/luminate/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- orionis/luminate/config/app.py,sha256=o-Ons0LMp77_E18e_dx_DqGVbjaY2l-5RdVSCILxgfg,1655
16
- orionis/luminate/config/auth.py,sha256=ivAUgoEYEtfdC49vDwOl_MXFUVAQnUJTc8iG3Lu0Stc,430
17
- orionis/luminate/config/cache.py,sha256=nBKmDFDb91sbBriEsVLjMhrNb__j7YsRzZGQRDdALtA,1338
18
- orionis/luminate/config/cors.py,sha256=zWKUylPiaUzGXTJM3eLmwY0HcAD7iOLp9QiAoTyAL08,2275
19
- orionis/luminate/config/database.py,sha256=9PrAOIcM4QrkYCIm7g-gN3p-yZn9JuolLlyjxLPkTJ0,5539
20
- orionis/luminate/config/filesystems.py,sha256=yr_bB4jQbk3yAU-tqcAPII4nUQpwR31sY_MTzyy1fSw,2354
21
- orionis/luminate/config/logging.py,sha256=aKfM8Get5G4k-N7MtyPuTg8Lt4-I206PFE6JEiP9ms4,3953
22
- orionis/luminate/config/mail.py,sha256=i7von352c0hujaIATEvlNBHlpWRZYNAeT3lbwA59dxk,2010
23
- orionis/luminate/config/queue.py,sha256=4ww3OA4V0nCO93llKW3J3aeV29JSsWoi5lqA_sFLUUY,1653
24
- orionis/luminate/config/session.py,sha256=xppot_rPAajfGR9o-wfMDwRyWMDSnI2Q7PDyutyEVcI,1809
15
+ orionis/luminate/config/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ orionis/luminate/config/contracts/config.py,sha256=rbeojO2gm8XhSXIPY8EnUt4e0wO633OKF9Nx_tN5y60,785
17
+ orionis/luminate/config/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ orionis/luminate/config/entities/app.py,sha256=o-Ons0LMp77_E18e_dx_DqGVbjaY2l-5RdVSCILxgfg,1655
19
+ orionis/luminate/config/entities/auth.py,sha256=ivAUgoEYEtfdC49vDwOl_MXFUVAQnUJTc8iG3Lu0Stc,430
20
+ orionis/luminate/config/entities/cache.py,sha256=nBKmDFDb91sbBriEsVLjMhrNb__j7YsRzZGQRDdALtA,1338
21
+ orionis/luminate/config/entities/cors.py,sha256=zWKUylPiaUzGXTJM3eLmwY0HcAD7iOLp9QiAoTyAL08,2275
22
+ orionis/luminate/config/entities/database.py,sha256=9PrAOIcM4QrkYCIm7g-gN3p-yZn9JuolLlyjxLPkTJ0,5539
23
+ orionis/luminate/config/entities/filesystems.py,sha256=yr_bB4jQbk3yAU-tqcAPII4nUQpwR31sY_MTzyy1fSw,2354
24
+ orionis/luminate/config/entities/logging.py,sha256=aKfM8Get5G4k-N7MtyPuTg8Lt4-I206PFE6JEiP9ms4,3953
25
+ orionis/luminate/config/entities/mail.py,sha256=i7von352c0hujaIATEvlNBHlpWRZYNAeT3lbwA59dxk,2010
26
+ orionis/luminate/config/entities/queue.py,sha256=4ww3OA4V0nCO93llKW3J3aeV29JSsWoi5lqA_sFLUUY,1653
27
+ orionis/luminate/config/entities/session.py,sha256=xppot_rPAajfGR9o-wfMDwRyWMDSnI2Q7PDyutyEVcI,1809
28
+ orionis/luminate/config/entities/testing.py,sha256=9SKFQdxWd793_7_rewQ4E76q5Ezji8YyH-tcR1Nb-rg,1900
25
29
  orionis/luminate/console/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
30
  orionis/luminate/console/command_filter.py,sha256=y13ZMEvUqSXOUtT6jXvKlzfMXZt3_UJOwLrAFhxz3yM,1219
27
31
  orionis/luminate/console/kernel.py,sha256=knzOpbsHJJpAbCSrnFXgRHK9Uk4OisEW_jiylaR-PLA,891
@@ -161,7 +165,7 @@ orionis/luminate/support/asynchrony/async_io.py,sha256=IkgVrJnnvNExkhy9brfZpTq2E
161
165
  orionis/luminate/support/asynchrony/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
162
166
  orionis/luminate/support/asynchrony/contracts/async_coroutine.py,sha256=lwtDa6r7I6qbxzKr5MyJtMRaYW6e5j2dbymEPNaNIEo,614
163
167
  orionis/luminate/support/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
164
- orionis/luminate/support/environment/env.py,sha256=smBVhxIJr4U0RO6CzqtQJLEu_il2Exjpa_564o2PTcI,4085
168
+ orionis/luminate/support/environment/env.py,sha256=ZblRCtq8Pe8kl8GG7aapryNuZw3F1N-Q9F3S7DqZdl4,4156
165
169
  orionis/luminate/support/environment/functions.py,sha256=L6gL4z3c89ZU17IWvOXyQ2_GdzA3XOmXeQpIpnQRios,1330
166
170
  orionis/luminate/support/environment/helper.py,sha256=G1670w1xkI1pj-rW_inv6D3XmU4oliwnWnrJO5CBm2E,818
167
171
  orionis/luminate/support/environment/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -176,7 +180,9 @@ orionis/luminate/support/introspection/reflexion_instance_with_abstract.py,sha25
176
180
  orionis/luminate/support/introspection/reflexion_module.py,sha256=OgBXpqNJHkmq-gX4rqFStv-WVNe9R38RsgUgfHpak8k,405
177
181
  orionis/luminate/support/introspection/reflexion_module_with_classname.py,sha256=YZHZI0XUZkSWnq9wrGxrIXtI64nY9yVSZoMe7PZXq8Y,620
178
182
  orionis/luminate/support/introspection/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
179
- orionis/luminate/support/introspection/abstracts/reflect_abstract.py,sha256=MiLkkX0WIIOoP8vU2hM-4FYS2oNVuqwtGn6Ys0Y9bgE,12761
183
+ orionis/luminate/support/introspection/abstracts/reflect_abstract.py,sha256=JeePK8VWDgs70wG4pQ0xP46HTKXRWqmiWJEJM-xAvF8,17867
184
+ orionis/luminate/support/introspection/abstracts/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
185
+ orionis/luminate/support/introspection/abstracts/entities/abstract_class_attributes.py,sha256=CPuN_16fVJe6bY9laY-naVdcgi-ShZqh3-rCOYktZvc,297
180
186
  orionis/luminate/support/introspection/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
181
187
  orionis/luminate/support/introspection/contracts/reflection.py,sha256=zF9OLiEdgWJtJWvfrmWCQhbDjgYmm-QvAkFv9OLb3rE,4959
182
188
  orionis/luminate/support/introspection/contracts/reflexion_abstract.py,sha256=3m0DTIFpbRyYMcqTPt_qtPdOEpM1Zpx0FbnTAruXPhU,6384
@@ -191,7 +197,7 @@ orionis/luminate/support/introspection/dependencies/entities/resolved_dependenci
191
197
  orionis/luminate/support/introspection/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
192
198
  orionis/luminate/support/introspection/helpers/functions.py,sha256=JC2_t732LqcJn3zoRZwFAqcm6kT6HvsJmupysjH3aiY,8537
193
199
  orionis/luminate/support/introspection/instances/__init__.py,sha256=R6dZ6yPk-4m2IaW74ceM4-Sba52aeAryfmIK4pAVWpc,144
194
- orionis/luminate/support/introspection/instances/reflection_instance.py,sha256=Kr9KXI6-XS5do8zldVi039S3iRb9eYHXUiYtLeexXQk,24482
200
+ orionis/luminate/support/introspection/instances/reflection_instance.py,sha256=LKO1btXTY7GvcHJd2tZU-H_saa5RVmo7hEHa-hZMJDA,24480
195
201
  orionis/luminate/support/introspection/instances/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
196
202
  orionis/luminate/support/introspection/instances/contracts/reflection_instance.py,sha256=uXHbvwFUhAyXopY2ONa_BDthBYR1Hw23vSQ10OOJ2NE,17146
197
203
  orionis/luminate/support/introspection/instances/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -219,19 +225,21 @@ orionis/luminate/test/cases/test_async.py,sha256=1wbeGkzlD4Q_e1BsSzhkiEjffIWx7d1
219
225
  orionis/luminate/test/cases/test_case.py,sha256=YhhPxOBd-_eZz8xBtbcKtnQxEhEU151IHc3bL6aCSiA,922
220
226
  orionis/luminate/test/cases/test_sync.py,sha256=XnA3eC6xvfBXD3h7xqt6db5rIhYbhSlYaUWotatBxdg,380
221
227
  orionis/luminate/test/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
222
- orionis/luminate/test/core/test_suite.py,sha256=fY_fWDDKGgN2i-SFZ__kT4yVx2VewTZyPRm6Nz5YWok,3292
223
- orionis/luminate/test/core/test_unit.py,sha256=J1h2gu8SH0Ss4Iw5BZMkOQyj3XiyOBXyT4n_B6AE0jo,12189
228
+ orionis/luminate/test/core/test_suite.py,sha256=Xw_x4FL2TW1AaqJO1smv63Nfzj5OobpohX0ZusGCsw0,4482
229
+ orionis/luminate/test/core/test_unit.py,sha256=tepNlb_gjWBpoV1LW8F8iO0LzQh3cZvw76ueXPwXJ44,43309
224
230
  orionis/luminate/test/core/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
225
231
  orionis/luminate/test/core/contracts/test_suite.py,sha256=TOIys-Z1HllUJe-qMY9mOfZGiZPXlKRuAZtJ-B2iDz8,1375
226
- orionis/luminate/test/core/contracts/test_unit.py,sha256=CD4FHslmWt1yPbfBhZBsG1QPzGmwKQPkL5cFvJgeilo,2624
232
+ orionis/luminate/test/core/contracts/test_unit.py,sha256=ipLnKOu8B5usX2En1KhPfzY96XFbgwDdtUUS2IXzNv8,5040
227
233
  orionis/luminate/test/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
- orionis/luminate/test/entities/test_result.py,sha256=RhnB6m7iJNsygmrhkwa04ZY2dx9vWTmIMKhr24Tg_VU,1018
234
+ orionis/luminate/test/entities/test_result.py,sha256=GffqWyjNG107-OdHU6cwXZy4CMXh5XzQtdxfp26faMI,1147
229
235
  orionis/luminate/test/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
236
+ orionis/luminate/test/enums/test_mode.py,sha256=CHstYZ180MEX84AjZIoyA1l8gKxFLp_eciLOj2in57E,481
230
237
  orionis/luminate/test/enums/test_status.py,sha256=vNKRmp1lud_ZGTayf3A8wO_0vEYdFABy_oMw-RcEc1c,673
231
238
  orionis/luminate/test/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
232
- orionis/luminate/test/exceptions/test_exception.py,sha256=21PILTXnMuL5-wT3HGKjIklt8VeIYDcQDN346i-BbJw,1336
239
+ orionis/luminate/test/exceptions/test_config_exception.py,sha256=yJv0JUTkZcF0Z4J8UHtffUipNgwNgmLhaqlOnnXFLyQ,995
240
+ orionis/luminate/test/exceptions/test_exception.py,sha256=JmSYQzIb1HiL_Sp5_XLwQfhK7LL1r3MBmUSyXrqZHh4,2201
233
241
  orionis/luminate/test/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
234
- orionis/luminate/test/output/test_std_out.py,sha256=IPYaCH_iwDjdc-dz99cR7X1U7fnGo5uBekF8RUfyANQ,2858
242
+ orionis/luminate/test/output/test_std_out.py,sha256=eZYiG_J4wtAcQYUyXArsMyWbdh6PnmgkjOAdfUMYrjI,4634
235
243
  orionis/luminate/test/output/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
236
244
  orionis/luminate/test/output/contracts/test_std_out.py,sha256=ryvMotj-rpVKOsyGqW0B0IEHuF8DdQj1Rn0K8xiyBOE,489
237
245
  orionis/static/ascii/icon.ascii,sha256=IgrlVjcYxcCrr0cJuJkOnEz0aEdAQBTyLzO5ainKsWc,398
@@ -250,14 +258,14 @@ tests/support/async_io/test_async_coroutine.py,sha256=rMpjIH3DDjMDIqZkaDGv1q1yGl
250
258
  tests/support/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
251
259
  tests/support/environment/test_env.py,sha256=fcMyvGnDnP2qamhG7yDRN9MyUDjeYN-oSmlno2mc7dQ,2652
252
260
  tests/support/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
253
- tests/support/inspection/test_reflect_abstract.py,sha256=0qjK1vzDu6jt_F16esoxxMVvYF7s-ThC0oYE_oK7UgA,10590
261
+ tests/support/inspection/test_reflect_abstract.py,sha256=VwUWHHjoWa_BSXdG5mWklx1EBe0JAm0E13XLFO9Nps4,13466
254
262
  tests/support/inspection/test_reflect_dependencies.py,sha256=frROd9NDbzwmEpb7TEOpikshFJKbPN5NvJ62ZWUm11E,3686
255
- tests/support/inspection/test_reflect_instance.py,sha256=z24MP-6a58NkWXGWlreR4hvIrsdBfDgf3HI1Owq2FmU,14096
263
+ tests/support/inspection/test_reflect_instance.py,sha256=cuC75IMFs2x3VSRd1XakRW7l5-gcHA3lfmEqmhmPGjw,14064
256
264
  tests/support/inspection/test_reflection_concrete.py,sha256=OXUG4EDW0Xa8c7TWeUuGdwRc3eQ4hoP67ZGbevg8BdU,6778
257
265
  tests/support/inspection/test_reflection_concrete_with_abstract.py,sha256=7QPHwZZOpBaRTlpiXWIQ4DPYQBlnD1-XxNMtjEfMPu4,4673
258
266
  tests/support/inspection/test_reflection_instance_with_abstract.py,sha256=GmY2W9S84uFCBIRsEjAAVhWbqWR7ZgOPD-AN8sAmhSM,4082
259
267
  tests/support/inspection/fakes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
260
- tests/support/inspection/fakes/fake_reflect_abstract.py,sha256=P1Zp39YNxuCI4G3coNbxqU_lSY9vZnk02UmREJgU5rg,5156
268
+ tests/support/inspection/fakes/fake_reflect_abstract.py,sha256=woE15uLmoD3fLgPBMjNh5XkwvMDmW2VDbADYPIS_88o,6387
261
269
  tests/support/inspection/fakes/fake_reflect_dependencies.py,sha256=TgLnBm31I8CE2qL-BkU_vo2XdBILfF5FvLe9VIr5J_E,797
262
270
  tests/support/inspection/fakes/fake_reflect_instance.py,sha256=P5lSFiGPLLAPOIRmw4VE3YWctxlqmXARRiWMSGLrg3E,1382
263
271
  tests/support/inspection/fakes/fake_reflection_concrete.py,sha256=j6gzsxE3xq5oJ30H_Hm1RsUwEY3jOYBu4sclxtD1ayo,1047
@@ -273,9 +281,9 @@ tests/support/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
273
281
  tests/support/patterns/test_singleton.py,sha256=I0Cawq0C5mV5v2I1mLmxJeXw9Vt3B1iq1RgLePsG30I,624
274
282
  tests/support/standard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
275
283
  tests/support/standard/test_std.py,sha256=g_iU9Pa6W9XDnxwdLB_NAmD60547VAReXe_Vhyrhf4M,2032
276
- orionis-0.244.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
277
- orionis-0.244.0.dist-info/METADATA,sha256=MJtg4XwJQ9Zr87CNYB6drQj-30Ecl68EurckcpNf1As,3003
278
- orionis-0.244.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
279
- orionis-0.244.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
280
- orionis-0.244.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
281
- orionis-0.244.0.dist-info/RECORD,,
284
+ orionis-0.246.0.dist-info/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
285
+ orionis-0.246.0.dist-info/METADATA,sha256=cQEcTgWppzM1HwJ0-wMt5Mu6TG-LneJFkWkiopbElaw,3003
286
+ orionis-0.246.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
287
+ orionis-0.246.0.dist-info/entry_points.txt,sha256=a_e0faeSqyUCVZd0MqljQ2oaHHdlsz6g9sU_bMqi5zQ,49
288
+ orionis-0.246.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
289
+ orionis-0.246.0.dist-info/RECORD,,
@@ -50,7 +50,6 @@ def another_decorator(func: Callable) -> Callable:
50
50
  return f"Decorated: {func(*args, **kwargs)}"
51
51
  return wrapper
52
52
 
53
-
54
53
  class FakeAbstractClass(ABC):
55
54
  """A fake abstract class for testing reflection capabilities.
56
55
 
@@ -72,9 +71,9 @@ class FakeAbstractClass(ABC):
72
71
  Protected attribute used by computed_property setter
73
72
  """
74
73
 
75
- class_attr: str = "class_value"
76
- _portected_class_attr: str = "protected_class_attr"
77
- __private_class_attr: str = "private_class_attr"
74
+ public_class_attribute: str = "class_value"
75
+ _protected_class_attribute: str = "protected_class_attr"
76
+ __private_class_attribute: str = "private_class_attr"
78
77
 
79
78
  @abstractmethod
80
79
  def abstract_method(self, x: int, y: int) -> int:
@@ -217,4 +216,61 @@ class FakeAbstractClass(ABC):
217
216
  str
218
217
  Constant string "private"
219
218
  """
220
- return "private"
219
+ return "private"
220
+
221
+ async def asynchronous(self) -> str:
222
+ """Asynchronous method example.
223
+
224
+ Returns
225
+ -------
226
+ str
227
+ Constant string "asynchronous"
228
+ """
229
+ return "asynchronous"
230
+
231
+ @staticmethod
232
+ async def asynchronous_static() -> str:
233
+ """Asynchronous static method example.
234
+
235
+ Returns
236
+ -------
237
+ str
238
+ Constant string "asynchronous static"
239
+ """
240
+ return "asynchronous static"
241
+
242
+ @property
243
+ @abstractmethod
244
+ def abstract_properties(self) -> str:
245
+ """Abstract property example.
246
+
247
+ Returns
248
+ -------
249
+ str
250
+ Abstract property value
251
+ """
252
+ pass
253
+
254
+ @classmethod
255
+ @abstractmethod
256
+ def abstract_class_method(cls) -> str:
257
+ """Abstract class method example.
258
+
259
+ Returns
260
+ -------
261
+ str
262
+ Abstract class method value
263
+ """
264
+ pass
265
+
266
+ @staticmethod
267
+ @abstractmethod
268
+ def abstract_static_method() -> str:
269
+ """Abstract static method example.
270
+
271
+ Returns
272
+ -------
273
+ str
274
+ Abstract static method value
275
+ """
276
+ pass
@@ -1,4 +1,5 @@
1
1
  from abc import ABC
2
+ import json
2
3
  from orionis.luminate.support.introspection.reflection import Reflection
3
4
  from orionis.luminate.test import TestCase
4
5
  from tests.support.inspection.fakes.fake_reflect_abstract import FakeAbstractClass
@@ -62,10 +63,70 @@ class TestReflectAbstract(TestCase):
62
63
  - Return type is correct
63
64
  """
64
65
  attributes = Reflection.abstract(FakeAbstractClass).getAllAttributes()
65
- self.print(attributes)
66
+ self.assertIn('__private_class_attribute', attributes.private)
67
+ self.assertIn('_protected_class_attribute', attributes.protected)
68
+ self.assertIn('public_class_attribute', attributes.public)
66
69
 
70
+ async def testReflectionAbstractGetAttribute(self):
71
+ """Test getAttribute() method.
67
72
 
73
+ Verifies that:
74
+ - Correct attribute is returned
75
+ - Attribute type is correct
76
+ """
77
+ attr = Reflection.abstract(FakeAbstractClass).getAttributes()
78
+ self.assertIn('__private_class_attribute', attr)
79
+ self.assertIn('_protected_class_attribute', attr)
80
+ self.assertIn('public_class_attribute', attr)
81
+
82
+ async def testReflectionAbstractGetPublicAttributes(self):
83
+ """Test getPublicAttributes() method.
84
+
85
+ Verifies that:
86
+ - Only public attributes are returned
87
+ - No private/protected attributes are included
88
+ """
89
+ public_attributes = Reflection.abstract(FakeAbstractClass).getPublicAttributes()
90
+ self.assertIn('public_class_attribute', public_attributes)
91
+ self.assertNotIn('_protected_class_attribute', public_attributes)
92
+ self.assertNotIn('__private_class_attribute', public_attributes)
93
+
94
+ async def testReflectionAbstractGetProtectedAttributes(self):
95
+ """Test getProtectedAttributes() method.
68
96
 
97
+ Verifies that:
98
+ - Only protected attributes are returned
99
+ - No private/public attributes are included
100
+ """
101
+ protected_attributes = Reflection.abstract(FakeAbstractClass).getProtectedAttributes()
102
+ self.assertIn('_protected_class_attribute', protected_attributes)
103
+ self.assertNotIn('__private_class_attribute', protected_attributes)
104
+ self.assertNotIn('public_class_attribute', protected_attributes)
105
+
106
+ async def testReflectionAbstractGetPrivateAttributes(self):
107
+ """Test getPrivateAttributes() method.
108
+
109
+ Verifies that:
110
+ - Only private attributes are returned
111
+ - No protected/public attributes are included
112
+ """
113
+ private_attributes = Reflection.abstract(FakeAbstractClass).getPrivateAttributes()
114
+ self.assertIn('__private_class_attribute', private_attributes)
115
+ self.assertNotIn('_protected_class_attribute', private_attributes)
116
+ self.assertNotIn('public_class_attribute', private_attributes)
117
+
118
+ async def testReflectionAbstractGetAllMethods(self):
119
+ """Test getAllMethods() method.
120
+
121
+ Verifies that:
122
+ - All methods are detected
123
+ - No private/protected methods are included
124
+ - Return type is correct
125
+ """
126
+ methods = Reflection.abstract(FakeAbstractClass).getAllMethods()
127
+ self.console().info(message="Hola")
128
+ # self.print(Reflection.abstract(FakeAbstractClass).getAllAttributes())
129
+ # self.dd(json.dumps(methods, indent=4))
69
130
 
70
131
 
71
132
 
@@ -37,7 +37,6 @@ class TestReflectInstance(TestCase):
37
37
  """Check that getAllAttributes returns all attributes of the class."""
38
38
  reflex = Reflection.instance(FakeClass())
39
39
  attributes = reflex.getAllAttributes()
40
- self.print(attributes)
41
40
  self.assertTrue("public_attr" in attributes.public)
42
41
  self.assertTrue("__private_attr" in attributes.private)
43
42
  self.assertTrue("_protected_attr" in attributes.protected)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes