mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
implement 'is_in_tests' in lib
This commit is contained in:
parent
6aa2b73bbb
commit
9ce795dced
2 changed files with 12 additions and 0 deletions
|
|
@ -158,6 +158,7 @@ from .ayon_info import (
|
|||
is_running_from_build,
|
||||
is_staging_enabled,
|
||||
is_dev_mode_enabled,
|
||||
is_in_tests,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -278,6 +279,7 @@ __all__ = [
|
|||
"is_running_from_build",
|
||||
"is_staging_enabled",
|
||||
"is_dev_mode_enabled",
|
||||
"is_in_tests",
|
||||
|
||||
"requests_get",
|
||||
"requests_post"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,16 @@ def is_staging_enabled():
|
|||
return os.getenv("AYON_USE_STAGING") == "1"
|
||||
|
||||
|
||||
def is_in_tests():
|
||||
"""Process is running in automatic tests mode.
|
||||
|
||||
Returns:
|
||||
bool: True if running in tests.
|
||||
|
||||
"""
|
||||
return os.environ.get("AYON_IN_TESTS") == "1"
|
||||
|
||||
|
||||
def is_dev_mode_enabled():
|
||||
"""Dev mode is enabled in AYON.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue