Skip to content

Commit fe8e231

Browse files
Update conftest.py
1 parent 06b0208 commit fe8e231

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

echopype/tests/conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
"""pytest configuration with minimal Pooch fallback for CI"""
22

33
import os
4-
import pytest
54
from pathlib import Path
65

7-
if os.getenv("USE_POOCH") == "True" and os.getenv("PYTEST_XDIST_WORKER") is None:
8-
import pooch
6+
import pytest
7+
import pooch
98

9+
ver = os.getenv("ECHOPYPE_DATA_VERSION", "v0.11.1a2")
10+
TEST_DATA_FOLDER = Path(pooch.os_cache("echopype")) / ver
11+
12+
if os.getenv("USE_POOCH") == "True" and os.getenv("PYTEST_XDIST_WORKER") is None:
1013
# Lock to the known-good assets release (can be overridden via env if needed)
11-
ver = os.getenv("ECHOPYPE_DATA_VERSION", "v0.11.1a2")
1214
base = os.getenv(
1315
"ECHOPYPE_DATA_BASEURL",
1416
"https://github.com/OSOceanAcoustics/echopype/releases/download/{version}/",
@@ -129,8 +131,6 @@ def _unpack(fname, action, pooch_instance):
129131
print(f"[echopype-ci] fetching bundle: {b}")
130132
print(f"[echopype-ci] → URL: {url}")
131133
EP.fetch(b, processor=_unpack, progressbar=False)
132-
133-
TEST_DATA_FOLDER = Path(cache_dir) / ver
134134

135135
print(
136136
"\n[echopype-ci] TEST_DATA_FOLDER\n"

0 commit comments

Comments
 (0)