orionis 0.285.0__py3-none-any.whl → 0.286.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.
@@ -5,7 +5,7 @@
5
5
  NAME = "orionis"
6
6
 
7
7
  # Current version of the framework
8
- VERSION = "0.285.0"
8
+ VERSION = "0.286.0"
9
9
 
10
10
  # Full name of the author or maintainer of the project
11
11
  AUTHOR = "Raul Mauricio Uñate Castro"
File without changes
@@ -0,0 +1,24 @@
1
+ from abc import ABC, abstractmethod
2
+ import asyncio
3
+ from typing import TypeVar, Union
4
+
5
+ T = TypeVar("T")
6
+
7
+ class ICoroutine(ABC):
8
+
9
+ @abstractmethod
10
+ def run(self) -> Union[T, asyncio.Future]:
11
+ """
12
+ Execute the wrapped coroutine.
13
+
14
+ Returns
15
+ -------
16
+ result : T or asyncio.Future
17
+ The result of the coroutine if run synchronously, or a Future if run in an event loop.
18
+
19
+ Notes
20
+ -----
21
+ - If called from outside an event loop, this method will run the coroutine synchronously.
22
+ - If called from within an event loop, it will schedule the coroutine and return a Future.
23
+ """
24
+ pass
@@ -1,32 +1,71 @@
1
1
  import asyncio
2
- from typing import Any, Coroutine, TypeVar, Union
2
+ from inspect import iscoroutine
3
+ from typing import Any, Coroutine as TypingCoroutine, TypeVar, Union
4
+ from orionis.services.asynchrony.contracts.coroutines import ICoroutine
3
5
  from orionis.services.asynchrony.exceptions.coroutine_exception import OrionisCoroutineException
4
6
 
5
7
  T = TypeVar("T")
6
8
 
7
- def run_coroutine(coro: Coroutine[Any, Any, T]) -> Union[T, asyncio.Future]:
9
+ class Coroutine(ICoroutine):
8
10
  """
9
- Executes the given coroutine object, adapting to the current execution context.
10
- If there is an active event loop, it uses `asyncio.ensure_future` to schedule the coroutine.
11
- If there is no active event loop, it uses `asyncio.run` to run the coroutine directly.
12
- If the coroutine is already running, it returns a `Future` object that can be awaited.
11
+ Wrapper class for coroutine objects to facilitate execution in both synchronous
12
+ and asynchronous contexts.
13
13
 
14
14
  Parameters
15
15
  ----------
16
- coro : Coroutine[Any, Any, T]
17
- The coroutine object
16
+ func : Coroutine
17
+ The coroutine object to be wrapped.
18
+
19
+ Raises
20
+ ------
21
+ OrionisCoroutineException
22
+ If the provided object is not a coroutine.
18
23
  """
19
- from inspect import iscoroutine
20
24
 
21
- if not iscoroutine(coro):
22
- raise OrionisCoroutineException("Expected a coroutine object.")
25
+ def __init__(self, func: TypingCoroutine[Any, Any, T]) -> None:
26
+ """
27
+ Initialize the Coroutine wrapper.
28
+
29
+ Parameters
30
+ ----------
31
+ func : Coroutine
32
+ The coroutine object to be wrapped.
33
+
34
+ Raises
35
+ ------
36
+ OrionisCoroutineException
37
+ If the provided object is not a coroutine.
38
+ """
39
+ if not iscoroutine(func):
40
+ raise OrionisCoroutineException(
41
+ f"Expected a coroutine object, but got {type(func).__name__}."
42
+ )
43
+ self.__func = func
44
+
45
+ def run(self) -> Union[T, asyncio.Future]:
46
+ """
47
+ Execute the wrapped coroutine.
48
+
49
+ Returns
50
+ -------
51
+ result : T or asyncio.Future
52
+ The result of the coroutine if run synchronously, or a Future if run in an event loop.
23
53
 
24
- try:
25
- loop = asyncio.get_running_loop()
26
- except RuntimeError:
27
- return asyncio.run(coro)
54
+ Notes
55
+ -----
56
+ - If called from outside an event loop, this method will run the coroutine synchronously.
57
+ - If called from within an event loop, it will schedule the coroutine and return a Future.
58
+ """
59
+ try:
60
+ # Get the current event loop
61
+ loop = asyncio.get_running_loop()
62
+ except RuntimeError:
63
+ # No running event loop, run synchronously
64
+ return asyncio.run(self.__func)
28
65
 
29
- if loop.is_running():
30
- return asyncio.ensure_future(coro)
31
- else:
32
- return loop.run_until_complete(coro)
66
+ if loop.is_running():
67
+ # Inside an event loop, schedule as a Future
68
+ return asyncio.ensure_future(self.__func)
69
+ else:
70
+ # No running loop, run synchronously
71
+ return loop.run_until_complete(self.__func)
@@ -1,26 +1,19 @@
1
1
  class OrionisCoroutineException(Exception):
2
- """
3
- Exception raised for errors related to coroutine operations in the Orionis framework.
4
- This exception is intended to signal issues encountered during asynchronous
5
- operations, providing a clear and descriptive error message to facilitate debugging.
6
- msg (str): A detailed message describing the cause of the exception.
7
- Example:
8
- raise OrionisCoroutineException("Coroutine execution failed due to timeout.")
9
- """
10
2
 
11
3
  def __init__(self, msg: str):
12
4
  """
13
- Initialize the exception with a custom error message.
14
- Args:
15
- msg (str): The error message describing the exception.
5
+ Parameters
6
+ ----------
7
+ msg : str
8
+ The error message describing the exception.
16
9
  """
17
10
  super().__init__(msg)
18
11
 
19
12
  def __str__(self) -> str:
20
13
  """
21
- Return a string representation of the exception, including the class name and the first argument.
22
-
23
- Returns:
24
- str: A formatted string with the exception class name and its first argument.
14
+ Returns
15
+ -------
16
+ str
17
+ A formatted string with the exception class name and its first argument.
25
18
  """
26
19
  return f"{self.__class__.__name__}: {self.args[0]}"
@@ -1,28 +1,19 @@
1
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
2
 
9
3
  def __init__(self, msg: str):
10
4
  """
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.
5
+ Parameters
6
+ ----------
7
+ msg : str
8
+ Descriptive error message explaining the cause of the exception.
15
9
  """
16
10
  super().__init__(msg)
17
11
 
18
12
  def __str__(self) -> str:
19
13
  """
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.
14
+ Returns
15
+ -------
16
+ str
17
+ Formatted string describing the exception, including the exception name and error message.
27
18
  """
28
19
  return f"{self.__class__.__name__}: {self.args[0]}"
@@ -1,29 +1,31 @@
1
1
  import unittest
2
2
 
3
3
  class OrionisTestFailureException(Exception):
4
- """
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:
11
- """
12
4
 
13
5
  def __init__(self, result: unittest.TestResult):
14
6
  """
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.
7
+ Initialize the exception with details about failed and errored tests.
8
+
9
+ Parameters
10
+ ----------
11
+ result : unittest.TestResult
12
+ The test result object containing information about test failures and errors.
13
+
14
+ Attributes
15
+ ----------
16
+ failed_tests : list
17
+ List of IDs for tests that failed.
18
+ errored_tests : list
19
+ List of IDs for tests that encountered errors.
20
+ error_messages : list
21
+ List of formatted error messages for failed and errored tests.
22
+ text : str
23
+ Formatted string summarizing the test failures and errors.
24
+
25
+ Raises
26
+ ------
27
+ Exception
28
+ If there are failed or errored tests, raises an exception with a summary message.
27
29
  """
28
30
  failed_tests = [test.id() for test, _ in result.failures]
29
31
  errored_tests = [test.id() for test, _ in result.errors]
@@ -40,13 +42,11 @@ class OrionisTestFailureException(Exception):
40
42
 
41
43
  def __str__(self) -> str:
42
44
  """
43
- Returns a string representation of the exception.
45
+ Return a string representation of the exception.
44
46
 
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.
48
-
49
- Returns:
50
- str: A formatted string describing the exception.
47
+ Returns
48
+ -------
49
+ str
50
+ A formatted string describing the exception, including the exception name and the message.
51
51
  """
52
52
  return f"{self.__class__.__name__}: {self.args[0]}"
@@ -1,23 +1,13 @@
1
1
  class OrionisTestPersistenceError(Exception):
2
- """
3
- Custom exception for persistence errors in tests within the Orionis framework.
4
-
5
- This exception is used to indicate issues related to data persistence during test execution,
6
- providing a descriptive message to help identify and resolve the error.
7
-
8
- Args:
9
- msg (str): A descriptive message explaining the cause of the persistence error.
10
-
11
- Example:
12
- raise OrionisTestPersistenceError("Failed to save test state to the database.")
13
- """
14
2
 
15
3
  def __init__(self, msg: str):
16
4
  """
17
- Initializes the OrionisTestConfigException with a specific error message.
5
+ Initialize the OrionisTestPersistenceError with a specific error message.
18
6
 
19
- Args:
20
- msg (str): A descriptive error message explaining the cause of the exception.
7
+ Parameters
8
+ ----------
9
+ msg : str
10
+ Descriptive error message explaining the cause of the exception.
21
11
  """
22
12
  super().__init__(msg)
23
13
 
@@ -25,10 +15,10 @@ class OrionisTestPersistenceError(Exception):
25
15
  """
26
16
  Returns a formatted string representation of the exception.
27
17
 
28
- The string includes the exception name and the error message, providing
29
- a clear and concise description of the issue.
30
-
31
- Returns:
32
- str: A formatted string describing the exception.
18
+ Returns
19
+ -------
20
+ str
21
+ A formatted string describing the exception, including the exception
22
+ name and the error message.
33
23
  """
34
24
  return f"{self.__class__.__name__}: {self.args[0]}"
@@ -1,26 +1,19 @@
1
1
  class OrionisTestRuntimeError(Exception):
2
- """
3
- Exception raised for errors that occur during the runtime of Orionis tests.
4
- This exception is intended to provide a clear and descriptive error message
5
- when a runtime error is encountered in the Orionis testing framework.
6
- Attributes:
7
- Example:
8
- raise OrionisTestRuntimeError("An unexpected runtime error occurred during testing.")
9
- """
10
2
 
11
3
  def __init__(self, msg: str):
12
4
  """
13
- Initializes the exception with a given error message.
14
- Args:
15
- msg (str): The error message describing the runtime error.
5
+ Parameters
6
+ ----------
7
+ msg : str
8
+ The error message describing the runtime error.
16
9
  """
17
10
  super().__init__(msg)
18
11
 
19
12
  def __str__(self) -> str:
20
13
  """
21
- Return a string representation of the exception, including the class name and the first argument.
22
-
23
- Returns:
24
- str: A string in the format '<ClassName>: <first argument>'.
14
+ Returns
15
+ -------
16
+ str
17
+ String representation of the exception in the format '<ClassName>: <first argument>'.
25
18
  """
26
19
  return f"{self.__class__.__name__}: {self.args[0]}"
@@ -1,26 +1,19 @@
1
1
  class OrionisTestValueError(Exception):
2
- """
3
- Custom exception class for handling value errors in the Orionis test framework.
4
- This exception should be raised when a value-related error occurs during testing.
5
- It provides a formatted string representation that includes the class name and the error message.
6
- Example:
7
- raise OrionisTestValueError("Invalid value provided.")
8
- """
9
2
 
10
3
  def __init__(self, msg: str):
11
4
  """
12
- Initializes the exception with a custom error message.
13
-
14
- Args:
15
- msg (str): The error message describing the exception.
5
+ Parameters
6
+ ----------
7
+ msg : str
8
+ The error message describing the exception.
16
9
  """
17
10
  super().__init__(msg)
18
11
 
19
12
  def __str__(self) -> str:
20
13
  """
21
- Return a string representation of the exception, including the class name and the first argument.
22
-
23
- Returns:
24
- str: A formatted string in the form 'ClassName: message'.
14
+ Returns
15
+ -------
16
+ str
17
+ A formatted string in the form 'ClassName: message', including the class name and the first argument.
25
18
  """
26
19
  return f"{self.__class__.__name__}: {self.args[0]}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orionis
3
- Version: 0.285.0
3
+ Version: 0.286.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
@@ -226,16 +226,18 @@ orionis/foundation/config/testing/entities/testing.py,sha256=m_i9jZlOXs_AzNKNNf0
226
226
  orionis/foundation/config/testing/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
227
227
  orionis/foundation/config/testing/enums/test_mode.py,sha256=IbFpauu7J-iSAfmC8jDbmTEYl8eZr-AexL-lyOh8_74,337
228
228
  orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
229
- orionis/metadata/framework.py,sha256=bi4V9fVwcUDbl6C-vHazRb4b82o1n37CNVmVq1JvV2A,4960
229
+ orionis/metadata/framework.py,sha256=hem620M1oywPbB24VR9-FaMOGSc0QKz9hfuOK_ke8pA,4960
230
230
  orionis/metadata/package.py,sha256=5p4fxjPpaktsreJ458pAl-Oi1363MWACPQvqXi_N6oA,6704
231
231
  orionis/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
232
232
  orionis/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
233
233
  orionis/patterns/singleton/meta_class.py,sha256=YN5mSSQeIX_Gh_TK5HD-ms6IYBTRsRcuzoUtpX-9kYY,2134
234
234
  orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
235
235
  orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
236
- orionis/services/asynchrony/coroutines.py,sha256=WEggmA0TnoizwtRfWtv0TJfQoHQGBZV0w9PwUsrJ6e4,1137
236
+ orionis/services/asynchrony/coroutines.py,sha256=i-r6P_-kA-7TTUhfXBS2XStbvaF7_9kpuB15ScScwYg,2294
237
+ orionis/services/asynchrony/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
238
+ orionis/services/asynchrony/contracts/coroutines.py,sha256=Wuwp2k4HXAX-tQ3waVIT8AmzX_HeIbjliRchKIqy2k0,688
237
239
  orionis/services/asynchrony/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
238
- orionis/services/asynchrony/exceptions/coroutine_exception.py,sha256=zMdv8akwFbvyXY8Co-9PS7Nk9DEtvwX6X4tW-9MTmsY,1082
240
+ orionis/services/asynchrony/exceptions/coroutine_exception.py,sha256=sZxC6tabTcq0HUJfKmeduYoe2C_NGzTMXf3nWrnobsU,508
239
241
  orionis/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
240
242
  orionis/services/environment/dot_env.py,sha256=TrsVB4_XnJ7c0z0FgSkJsHzpqnWvGwdTkhSpP65N3rQ,10115
241
243
  orionis/services/environment/env.py,sha256=CbD1yjGB_RqU8PnAdjr0RN5hmaFTQYby--PA7nYu8Gc,4181
@@ -325,11 +327,11 @@ orionis/test/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
325
327
  orionis/test/enums/test_mode.py,sha256=CHstYZ180MEX84AjZIoyA1l8gKxFLp_eciLOj2in57E,481
326
328
  orionis/test/enums/test_status.py,sha256=vNKRmp1lud_ZGTayf3A8wO_0vEYdFABy_oMw-RcEc1c,673
327
329
  orionis/test/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
328
- orionis/test/exceptions/test_config_exception.py,sha256=yJv0JUTkZcF0Z4J8UHtffUipNgwNgmLhaqlOnnXFLyQ,995
329
- orionis/test/exceptions/test_failure_exception.py,sha256=pcMhzF1Z5kkJm4yM7gZiQI0SvGjKFixJkRd6VBE03AY,2199
330
- orionis/test/exceptions/test_persistence_error.py,sha256=S-5-rwZnxJOcj3rPe_0ajH7UUkLYcB--wi06ZuohoJg,1228
331
- orionis/test/exceptions/test_runtime_error.py,sha256=AdYh6Kl-6I2w7-kVtt9AT9q0ArNvXPPmxKOTElQ-7IM,989
332
- orionis/test/exceptions/test_value_error.py,sha256=iOMeMOVy7NdqzUH6QpPow9DCDSlHJkbTzXBguJzvfKA,973
330
+ orionis/test/exceptions/test_config_exception.py,sha256=v7LhxqrUUTqx-42yCCAAWIFb_Ut6rqcGPKCVRZ_Ib4w,548
331
+ orionis/test/exceptions/test_failure_exception.py,sha256=IwmBRiDMAJ4Jk75-kfQh5mWfX3HHzx4pP-ZM_EwRcaE,1787
332
+ orionis/test/exceptions/test_persistence_error.py,sha256=QJ2hdVAl6ngZEko0mSavU7nui8si7ZXR9PUXfU9cOY0,724
333
+ orionis/test/exceptions/test_runtime_error.py,sha256=QahR7qHhvzR1I8CS-qWsxL_c0lSzWWE1rCiwf47YRQc,523
334
+ orionis/test/exceptions/test_value_error.py,sha256=XZmxiZmmMoYoh8O4V97GLB-Ooh-IRVagKW9bWPvtoeo,533
333
335
  orionis/test/logs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
334
336
  orionis/test/logs/history.py,sha256=YxWcY8hJK2eRk8BxBKti8WpWZSvv6g_uwHKAEPGZJAY,13230
335
337
  orionis/test/logs/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -346,7 +348,7 @@ orionis/test/suites/contracts/test_suite.py,sha256=eluzYwkNBbKjxYStj_tHN_Fm3YDPp
346
348
  orionis/test/suites/contracts/test_unit.py,sha256=l1LQllODyvcSByXMl1lGrUkoLsXbBHZZLWZI4A-mlQg,5881
347
349
  orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
348
350
  orionis/test/view/index.html,sha256=U4XYO4hA-mAJCK1gcVRgIysmISK3g3Vgi2ntLofFAhE,6592
349
- orionis-0.285.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
351
+ orionis-0.286.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
350
352
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
351
353
  tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
352
354
  tests/example/test_example.py,sha256=DUZU6lWVFsyHtBEXx0cBxMrSCpOtAOL3PUoi9-tXAas,583
@@ -408,7 +410,7 @@ tests/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
408
410
  tests/patterns/singleton/test_singleton.py,sha256=eShiB9gD7J9p0DQw0qjtU5rQXfHxw7zkGds-1EC4d_o,609
409
411
  tests/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
410
412
  tests/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
411
- tests/services/asynchrony/test_async_io.py,sha256=UzEgg1ZRF78eoGSDysTJ_vEubBX3HIvacFs_TCEIEO8,1642
413
+ tests/services/asynchrony/test_async_io.py,sha256=RnsL7S5rNaijMK8aUJCzZvfha9pqAqxsqxd32x03r7E,1638
412
414
  tests/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
413
415
  tests/services/environment/test_env.py,sha256=Fg4NejwmTdTTj4FezrWkJc639CzodGEgmdFa4EPlmqk,7084
414
416
  tests/services/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -444,8 +446,8 @@ tests/support/inspection/fakes/fake_reflection_instance_with_abstract.py,sha256=
444
446
  tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
445
447
  tests/testing/test_testing_result.py,sha256=54QDn6_v9feIcDcA6LPXcvYhlt_X8JqLGTYWS9XjKXM,3029
446
448
  tests/testing/test_testing_unit.py,sha256=MeVL4gc4cGRPXdVOOKJx6JPKducrZ8cN7F52Iiciixg,5443
447
- orionis-0.285.0.dist-info/METADATA,sha256=zaEGsYqUBNolrX-mxMOzAT54-7oJ08nxfxQKnneRM8E,4772
448
- orionis-0.285.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
449
- orionis-0.285.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
450
- orionis-0.285.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
451
- orionis-0.285.0.dist-info/RECORD,,
449
+ orionis-0.286.0.dist-info/METADATA,sha256=61sqFJQCRpZca6cWFMWps-lXByNSaGviR-T8kFJ2mIU,4772
450
+ orionis-0.286.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
451
+ orionis-0.286.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
452
+ orionis-0.286.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
453
+ orionis-0.286.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
 
2
- from orionis.services.asynchrony.coroutines import run_coroutine
2
+ from orionis.services.asynchrony.coroutines import Coroutine
3
3
  from orionis.services.asynchrony.exceptions.coroutine_exception import OrionisCoroutineException
4
4
  from orionis.unittesting import TestCase
5
5
 
@@ -14,7 +14,7 @@ class TestsAsyncIO(TestCase):
14
14
  async def sample_coroutine():
15
15
  return "Hello, World!"
16
16
 
17
- result = await run_coroutine(sample_coroutine())
17
+ result = await Coroutine(sample_coroutine()).run()
18
18
  self.assertEqual(result, "Hello, World!")
19
19
 
20
20
  def testExecuteWithoutActiveEventLoop(self):
@@ -25,7 +25,7 @@ class TestsAsyncIO(TestCase):
25
25
  async def sample_coroutine():
26
26
  return "Hello, World!"
27
27
 
28
- result = run_coroutine(sample_coroutine())
28
+ result = Coroutine(sample_coroutine()).run()
29
29
  self.assertEqual(result, "Hello, World!")
30
30
 
31
31
  def testExecuteWithNonCoroutine(self):
@@ -37,4 +37,4 @@ class TestsAsyncIO(TestCase):
37
37
  return "Hello, World!"
38
38
 
39
39
  with self.assertRaises(OrionisCoroutineException):
40
- run_coroutine(sample_no_coroutine())
40
+ Coroutine(sample_no_coroutine())