Skip to content

Commit 13fe69d

Browse files
adds the logic to only run extended gcsfilesystem tests when experimental env variable is set (fsspec#712)
1 parent 47c2d76 commit 13fe69d

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ jobs:
4141
pytest -vv -s \
4242
--log-format="%(asctime)s %(levelname)s %(message)s" \
4343
--log-date-format="%H:%M:%S" \
44-
gcsfs/ \
45-
--ignore=gcsfs/tests/test_extended_gcsfs.py
44+
gcsfs/
4645
- name: Run Extended Tests
4746
run: |
4847
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/gcsfs/tests/fake-secret.json

gcsfs/tests/test_extended_gcsfs.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@
2020
lines = io.BytesIO(json_data).readlines()
2121
file_size = len(json_data)
2222

23+
REQUIRED_ENV_VAR = "GCSFS_EXPERIMENTAL_ZB_HNS_SUPPORT"
24+
25+
# If the condition is True, only then tests in this file are run.
26+
should_run = os.getenv(REQUIRED_ENV_VAR, "false").lower() in (
27+
"true",
28+
"1",
29+
)
30+
pytestmark = pytest.mark.skipif(
31+
not should_run, reason=f"Skipping tests: {REQUIRED_ENV_VAR} env variable is not set"
32+
)
33+
2334

2435
@pytest.fixture
2536
def zonal_mocks():

0 commit comments

Comments
 (0)