From f232d6d4ee56757c1cb16c827c7c93d8ac0a0acc Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 9 Jan 2023 15:30:26 -0500 Subject: [PATCH] Add `ci_env` detector fixture --- tests/conftest.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 114812bd..2ad6f624 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -83,6 +83,15 @@ def travis(confdir): trio.run(ensure_config) +_ci_env: bool = os.environ.get('CI', False) + + +@pytest.fixture(scope='session') +def ci_env() -> bool: + """Detect CI envoirment. + """ + return _ci_env + @pytest.fixture def us_symbols(): return ['TSLA', 'AAPL', 'CGC', 'CRON'] @@ -96,3 +105,4 @@ def tmx_symbols(): @pytest.fixture def cse_symbols(): return ['TRUL.CN', 'CWEB.CN', 'SNN.CN'] +