Skip to content

Commit 2f8fb5c

Browse files
committed
Improve imports for tests
1 parent 3534cbe commit 2f8fb5c

7 files changed

Lines changed: 36 additions & 0 deletions

File tree

tests/functional/test_auth.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
python tests/functional/test_auth.py
55
"""
66
import asyncio
7+
import sys
8+
from pathlib import Path
9+
10+
# Add repo root to path for package imports
11+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
12+
713
from tests.utils.read_credentials import read_credentials
814

915
async def main():

tests/functional/test_commands.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
"""
2323
import asyncio
2424
import sys
25+
from pathlib import Path
26+
27+
# Add repo root to path for package imports
28+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
29+
2530
from tests.utils.read_credentials import read_credentials
2631

2732
async def main():

tests/functional/test_device.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"""
66
import asyncio
77
import sys
8+
from pathlib import Path
9+
10+
# Add repo root to path for package imports
11+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
12+
813
from tests.utils.read_credentials import read_credentials
914

1015
async def main():

tests/functional/test_export.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"""
66
import asyncio
77
import sys
8+
from pathlib import Path
9+
10+
# Add repo root to path for package imports
11+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
12+
813
from tests.utils.read_credentials import read_credentials
914

1015
async def main():

tests/functional/test_locations.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
import asyncio
88
import json
99
import sys
10+
from pathlib import Path
11+
12+
# Add repo root to path for package imports
13+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
14+
1015
from tests.utils.read_credentials import read_credentials
1116

1217
async def main():

tests/functional/test_pictures.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
import asyncio
77
import base64
88
import sys
9+
from pathlib import Path
10+
11+
# Add repo root to path for package imports
12+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
13+
914
from tests.utils.read_credentials import read_credentials
1015

1116
async def main():

tests/functional/test_request_location.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
import asyncio
99
import json
1010
import sys
11+
from pathlib import Path
12+
13+
# Add repo root to path for package imports
14+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
15+
1116
from tests.utils.read_credentials import read_credentials
1217

1318
async def main():

0 commit comments

Comments
 (0)