File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,12 +61,6 @@ ClassMethod TestBO() As %Status
6161 Return sc
6262}
6363
64- /// List
65- ClassMethod PythonList () [ Language = python ]
66- {
67- return [ 1 , 3 ]
68- }
69-
7064Storage Default
7165{
7266<Data name =" TestDefaultData" >
Original file line number Diff line number Diff line change 1010 IOP_NAMESPACE default: USER
1111
1212Or set IOP_SETTINGS pointing to a settings.py with REMOTE_SETTINGS.
13+
14+ Environment variables can also be provided via a .env.remote file at the
15+ project root, which is loaded automatically before the tests run.
1316"""
1417import os
18+ import sys
19+ from pathlib import Path
20+
1521import pytest
22+ from dotenv import load_dotenv
23+
24+ from os .path import dirname as d , abspath
25+
26+ # src/tests/ root
27+ _tests_dir = d (d (d (abspath (__file__ ))))
28+ sys .path .append (d (_tests_dir )) # src/
1629
1730from iop ._remote import get_remote_settings
1831
32+ _ENV_FILE = Path (__file__ ).parents [4 ] / ".env.remote"
33+
34+
35+ def pytest_configure (config ):
36+ """Load .env.remote from the project root if it exists."""
37+ if _ENV_FILE .exists ():
38+ load_dotenv (_ENV_FILE , override = False )
39+
1940
2041def pytest_collection_modifyitems (config , items ):
2142 skip_remote = pytest .mark .skip (
You can’t perform that action at this time.
0 commit comments