Open kloczek opened 1 month ago
Do you know how to test for the effect of -m "not network"
within the test run session? All of these tests can be skipped for such a run.
I don't see any of use network' pytest mark to skip some units so that module should not be affected by this.
not notwork` should skip anything which requires more than localhost access.
In this case looks like failing units uses access to localhost but nothing is listening.
OK, so listening on localhost doesn't work; is there a way to make a pytest fixture that can know this restriction?
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.10.0-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-fsspec-2024.10.0-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.2.2, pluggy-1.5.0 rootdir: /home/tkloczko/rpmbuild/BUILD/filesystem_spec-2024.10.0 configfile: pyproject.toml plugins: asyncio-0.23.8, mock-3.14.0, vcr-1.0.2 asyncio: mode=strict collected 1737 items / 9 skipped fsspec/implementations/tests/local/local_test.py ....................... [ 1%] ........................................................................ [ 5%] ........................................ [ 7%] fsspec/implementations/tests/memory/memory_test.py ..................... [ 8%] ........................................................................ [ 13%] .......................................... [ 15%] fsspec/implementations/tests/test_archive.py ........................... [ 17%] ..........................................................ssssssssssssss [ 21%] sss [ 21%] fsspec/implementations/tests/test_cached.py ............................ [ 23%] ..............ssssssssssss................................ [ 26%] fsspec/implementations/tests/test_common.py ssss [ 26%] fsspec/implementations/tests/test_data.py .. [ 26%] fsspec/implementations/tests/test_dirfs.py ............................. [ 28%] ........................................................................ [ 32%] ................................. [ 34%] fsspec/implementations/tests/test_ftp.py FFFFFFFF........... [ 35%] fsspec/implementations/tests/test_http.py .............................. [ 37%] .......................... [ 38%] fsspec/implementations/tests/test_libarchive.py s [ 38%] fsspec/implementations/tests/test_local.py .s........................... [ 40%] .s............................................................ss........ [ 44%] ss.sssss.......sss....s.......................... [ 47%] fsspec/implementations/tests/test_memory.py ............................ [ 49%] .. [ 49%] fsspec/implementations/tests/test_reference.py .................s.....ss [ 50%] ..sss [ 50%] fsspec/implementations/tests/test_sftp.py ssssssssssss [ 51%] fsspec/implementations/tests/test_tar.py ......................... [ 53%] fsspec/implementations/tests/test_webhdfs.py sssssssssss [ 53%] fsspec/implementations/tests/test_zip.py ................. [ 54%] fsspec/tests/test_api.py ...............x...... [ 55%] fsspec/tests/test_async.py .........s... [ 56%] fsspec/tests/test_caches.py ............................................ [ 59%] ........................................................................ [ 63%] ............................. [ 64%] fsspec/tests/test_callbacks.py ........ [ 65%] fsspec/tests/test_compression.py .....s [ 65%] fsspec/tests/test_config.py ....... [ 66%] fsspec/tests/test_core.py .............................................. [ 68%] ...s.......s [ 69%] fsspec/tests/test_file.py ........... [ 70%] fsspec/tests/test_generic.py ...... [ 70%] fsspec/tests/test_mapping.py ................. [ 71%] fsspec/tests/test_parquet.py sssssssssssssssssssssssssssssssssssssssssss [ 73%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 78%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 82%] sssss [ 82%] fsspec/tests/test_registry.py ......s [ 82%] fsspec/tests/test_spec.py ....................x......................... [ 85%] ........................................................................ [ 89%] ........................................................................ [ 93%] ....................................... [ 96%] fsspec/tests/test_utils.py ............................................. [ 98%] ...................... [100%] =================================== FAILURES =================================== _____________________________ test_tls[False-FTP] ______________________________ ftp = ('localhost', 2121), tls = False, exp_cls =List of installed modules in build env:
```console Package Version ----------------------------- ----------- aiohappyeyeballs 2.4.3 aiohttp 3.10.10 aiosignal 1.3.1 alabaster 0.7.16 async-timeout 4.0.3 attrs 24.2.0 babel 2.16.0 bcrypt 4.2.0 build 1.2.2.post1 cffi 1.17.1 charset-normalizer 3.4.0 cryptography 42.0.8 defusedxml 0.7.1 distro 1.9.0 docutils 0.21.2 exceptiongroup 1.1.3 frozenlist 1.4.1 hatch-vcs 0.4.0 hatchling 1.25.0 imagesize 1.4.1 importlib_metadata 8.5.0 iniconfig 2.0.0 installer 0.7.0 Jinja2 3.1.4 lz4 4.3.3 MarkupSafe 3.0.2 multidict 6.1.0 numpy 1.26.4 numpydoc 1.7.0 packaging 24.0 pandas 2.2.1 paramiko 3.5.0 pathspec 0.12.1 pluggy 1.5.0 ply 3.11 pycparser 2.22 pyftpdlib 1.5.7 Pygments 2.18.0 PyNaCl 1.5.0 pyproject_hooks 1.2.0 pytest 8.2.2 pytest-asyncio 0.23.8 pytest-mock 3.14.0 pytest-vcr 1.0.2 python-dateutil 2.9.0.post0 pytz 2024.2 PyYAML 6.0.2 requests 2.32.3 setuptools 75.1.0 setuptools-scm 8.1.0 snowballstemmer 2.2.0 Sphinx 8.1.3 sphinx_design 0.6.1 sphinxcontrib-applehelp 2.0.0 sphinxcontrib-devhelp 1.0.6 sphinxcontrib-htmlhelp 2.1.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 2.0.0 sphinxcontrib-serializinghtml 2.0.0 tabulate 0.9.0 tokenize_rt 6.0.0 tomli 2.0.1 tqdm 4.66.5 trove-classifiers 2024.10.17 typing_extensions 4.12.2 urllib3 2.2.2 vcrpy 6.0.2 wheel 0.44.0 wrapt 1.16.0 yarl 1.12.1 zipp 3.20.2 zstandard 0.22.0 ```Please let me know if you need more details or want me to perform some diagnostics.