From 095054042a46ef3ab58eff81ed66e1401e33f068 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Thu, 21 Nov 2024 11:27:12 -0600 Subject: [PATCH] More --- .github/workflows/main.yaml | 2 +- fsspec/tests/test_spec.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 653eb8084..18a6fb41e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -40,7 +40,7 @@ jobs: shell: bash -l {0} run: | pip install -e .[test_full] - pytest -v + pytest -v fsspec/tests/test_spec.py win: name: pytest-win diff --git a/fsspec/tests/test_spec.py b/fsspec/tests/test_spec.py index 42a557f2c..798e162b2 100644 --- a/fsspec/tests/test_spec.py +++ b/fsspec/tests/test_spec.py @@ -747,11 +747,15 @@ def test_cache(): def test_cache_not_pickled(server): - fs = fsspec.filesystem("http") + fs = fsspec.filesystem( + "http", + cache_type="readahead", + headers={"give_length": "true", "head_ok": "true"}, + ) # fs = fsspec.filesystem("readahead", target_protocol="http") filepath = server.realfile length = 3 - f = fs.open(filepath, mode="rb", cache_type="readahead") + f = fs.open(filepath, mode="rb") assert not f.cache.cache # No cache initially assert f.read(length=length) == data[:length] assert f.cache.cache == data # Cache is populated