Skip to content

whole tests/ directory is not included in the tarball … the test suite fails #111

@mcepl

Description

@mcepl

While packaging 2.9.1 for openSUSE/Factory I have encountered this problem:

[   18s] + PYTHONPATH=.:/home/abuild/rpmbuild/BUILDROOT/python-aiohttp-retry-2.9.1-0.x86_64/usr/lib/python3.10/site-packages
[   18s] + PYTHONDONTWRITEBYTECODE=1
[   18s] + pytest-3.10 --ignore=_build.python310 --ignore=_build.python312 --ignore=_build.python313 --ignore=_build.python311 -v
[   18s] ============================= test session starts ==============================
[   18s] platform linux -- Python 3.10.15, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3.10
[   18s] cachedir: .pytest_cache
[   18s] rootdir: /home/abuild/rpmbuild/BUILD/aiohttp_retry-2.9.1
[   18s] configfile: pyproject.toml
[   18s] plugins: asyncio-0.23.7, aiohttp-1.0.5
[   18s] asyncio: mode=auto
[   18s] collecting ... collected 5 items / 1 error
[   18s] 
[   18s] ==================================== ERRORS ====================================
[   18s] ____________________ ERROR collecting tests/test_client.py _____________________
[   18s] ImportError while importing test module '/home/abuild/rpmbuild/BUILD/aiohttp_retry-2.9.1/tests/test_client.py'.
[   18s] Hint: make sure your test modules/packages have valid Python names.
[   18s] Traceback:
[   18s] /usr/lib64/python3.10/importlib/__init__.py:126: in import_module
[   18s]     return _bootstrap._gcd_import(name[level:], package, level)
[   18s] tests/test_client.py:20: in <module>
[   18s]     from tests.app import App
[   18s] E   ModuleNotFoundError: No module named 'tests.app'
[   18s] =========================== short test summary info ============================
[   18s] ERROR tests/test_client.py
[   18s] !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
[   18s] =============================== 1 error in 0.10s ===============================

Complete build log with all packages used and steps taken to reproduce.

It seems that not all tests/* were included in the tarball:

mitmanek:python-aiohttp-retry (1A1D2M) $ tar tvf aiohttp_retry-2.9.1.tar.gz |grep 'tests/'
drwxr-xr-x runner/docker     0 2024-11-06 11:44 aiohttp_retry-2.9.1/tests/
-rw-r--r-- runner/docker 17762 2024-11-06 11:44 aiohttp_retry-2.9.1/tests/test_client.py
-rw-r--r-- runner/docker  1502 2024-11-06 11:44 aiohttp_retry-2.9.1/tests/test_retry_options.py
mitmanek:python-aiohttp-retry (1A1D2M) $ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions