Skip to content

0.2.1 sdist has incomplete tests directory #15

Closed
@mgorny

Description

@mgorny
$ tar -tf dist/lxml_html_clean-0.2.1.tar.gz  | grep tests/
lxml_html_clean-0.2.1/tests/
lxml_html_clean-0.2.1/tests/test_clean.py
$ pytest
/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))
========================================================= test session starts =========================================================
platform linux -- Python 3.12.5, pytest-8.3.2, pluggy-1.5.0
rootdir: /tmp/lxml_html_clean-0.2.1
configfile: pyproject.toml
plugins: pkgcore-0.12.27, xdist-3.6.1, xprocess-1.0.2, anyio-4.4.0, subtests-0.13.1, import-check-0.0.4, asyncio-0.24.0
asyncio: mode=Mode.STRICT, default_loop_scope=None
collected 0 items / 1 error                                                                                                           

=============================================================== ERRORS ================================================================
________________________________________________ ERROR collecting tests/test_clean.py _________________________________________________
ImportError while importing test module '/tmp/lxml_html_clean-0.2.1/tests/test_clean.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_clean.py:8: in <module>
    from .utils import peak_memory_usage
E   ImportError: attempted relative import with no known parent package
======================================================= short test summary info =======================================================
ERROR tests/test_clean.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================== 1 error in 0.10s ===========================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions