Closed kloczek closed 5 months ago
The DBFS tests use HTTP mocking to work. That should be OK when there is no network, but apparently there is something amiss. I'd be happy to simply skip these tests in such a situation; do you happen to have an idea of how to best detect from within the python test module that HTTP is likely to fail?
I've tested that on the box with full access to public network and fails are exactly the same.
Thanks for looking into it, @kloczek ; I'll try to figure out what's going on.
If you have a moment: can you please check if the YAML files fsspec/implementations/tests/cassettes/test_dbfs/test_dbfs*.yaml exist in the test install?
In case of your module on packaging I'm using tar ball autogenerated from git tag in which those yaml files are included.. BTW it would be good to move fsspec/implementations/tests/ and fsspec/tests/ to tests/ to avoid include those files in generated .whl because now test suite is part of the installed resources.
https://github.com/fsspec/filesystem_spec/pull/1611 discussed removing test files (this was an artefact of moving the build system to hatch)
Easiest way to do that separation is move all to tests/
Just tested 2024.6.0 and looks like pytest is OK now with few warnigs
OK, weird :) Thanks for trying the new version.
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesinstaller
modulecut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-fsspec-2024.3.1-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-fsspec-2024.3.1-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0 rootdir: /home/tkloczko/rpmbuild/BUILD/filesystem_spec-2024.3.1 configfile: pyproject.toml plugins: vcr-1.0.2, mock-3.14.0, asyncio-0.23.6 asyncio: mode=strict collected 1618 items / 8 skipped fsspec/implementations/tests/local/local_test.py ....................... [ 1%] ........................................................................ [ 5%] ........................................ [ 8%] fsspec/implementations/tests/memory/memory_test.py ..................... [ 9%] ........................................................................ [ 14%] .......................................... [ 16%] fsspec/implementations/tests/test_archive.py ........................... [ 18%] ..........................................................ssssssssssssss [ 22%] sss [ 22%] fsspec/implementations/tests/test_cached.py ............................ [ 24%] ..............ssssss............................... [ 27%] fsspec/implementations/tests/test_common.py ssss [ 28%] fsspec/implementations/tests/test_data.py .. [ 28%] fsspec/implementations/tests/test_dbfs.py FFFFFss [ 28%] fsspec/implementations/tests/test_dirfs.py ............................. [ 30%] ........................................................................ [ 34%] ...................... [ 36%] fsspec/implementations/tests/test_ftp.py ............. [ 37%] fsspec/implementations/tests/test_http.py .............................. [ 38%] ........................ [ 40%] fsspec/implementations/tests/test_libarchive.py s [ 40%] fsspec/implementations/tests/test_local.py .s........................... [ 42%] .s......................................................... [ 45%] fsspec/implementations/tests/test_memory.py ............................ [ 47%] [ 47%] fsspec/implementations/tests/test_reference.py ................s.....ss. [ 49%] .s [ 49%] fsspec/implementations/tests/test_sftp.py ssssssssssss [ 50%] fsspec/implementations/tests/test_tar.py ......................... [ 51%] fsspec/implementations/tests/test_webhdfs.py sssssssssss [ 52%] fsspec/implementations/tests/test_zip.py ......... [ 52%] fsspec/tests/test_api.py ...............x...... [ 54%] fsspec/tests/test_async.py .........s... [ 55%] fsspec/tests/test_caches.py ............................................ [ 57%] ........................................................................ [ 62%] ............................ [ 63%] fsspec/tests/test_callbacks.py ........ [ 64%] fsspec/tests/test_compression.py .....s [ 64%] fsspec/tests/test_config.py ....... [ 65%] fsspec/tests/test_core.py .............................................. [ 68%] ..s....... [ 68%] fsspec/tests/test_file.py ........... [ 69%] fsspec/tests/test_generic.py ...... [ 69%] fsspec/tests/test_mapping.py ................. [ 70%] fsspec/tests/test_parquet.py sssssssssssssssssssssssssssssssssssssssssss [ 73%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 77%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 82%] sssss [ 82%] fsspec/tests/test_registry.py .......s [ 83%] fsspec/tests/test_spec.py ....................x......................... [ 85%] ........................................................................ [ 90%] ........................................................................ [ 94%] .......................... [ 96%] fsspec/tests/test_utils.py ............................................. [ 99%] ............ [100%] =================================== FAILURES =================================== ____________________________ test_dbfs_file_listing ____________________________ self =List of installed modules in build env:
```console Package Version ----------------------------- ----------- aiohttp 3.9.3 aiosignal 1.3.1 alabaster 0.7.16 async-timeout 4.0.3 attrs 23.2.0 Babel 2.14.0 bcrypt 4.1.2 build 1.2.1 cffi 1.16.0 charset-normalizer 3.3.2 cryptography 42.0.5 docutils 0.20.1 exceptiongroup 1.1.3 frozenlist 1.4.1 idna 3.7 imagesize 1.4.1 importlib_metadata 7.1.0 iniconfig 2.0.0 installer 0.7.0 Jinja2 3.1.3 lz4 4.3.3 MarkupSafe 2.1.5 multidict 6.0.5 numpy 1.26.5 numpydoc 1.7.0 packaging 24.0 pandas 2.2.1 paramiko 3.4.0 pluggy 1.4.0 ply 3.11 pycparser 2.22 pyftpdlib 1.5.7 Pygments 2.17.2 PyNaCl 1.5.0 pyproject_hooks 1.0.0 pytest 8.1.1 pytest-asyncio 0.23.6 pytest-mock 3.14.0 pytest-vcr 1.0.2 python-dateutil 2.9.0.post0 pytz 2024.1 PyYAML 6.0.1 requests 2.31.0 setuptools 69.4.0 snowballstemmer 2.2.0 Sphinx 7.2.6 sphinx_design 0.5.0 sphinxcontrib-applehelp 1.0.8 sphinxcontrib-devhelp 1.0.6 sphinxcontrib-htmlhelp 2.0.5 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.7 sphinxcontrib-serializinghtml 1.1.10 tabulate 0.9.0 tokenize_rt 5.2.0 tomli 2.0.1 tqdm 4.66.2 typing_extensions 4.11.0 urllib3 2.2.1 vcrpy 6.0.1 wheel 0.43.0 wrapt 1.16.0 yarl 1.9.4 zipp 3.18.1 zstandard 0.22.0 ```Please let me know if you need more details or want me to perform some diagnostics.