Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.11.0: Tests in sdist are incomplete #134

Closed
mtelka opened this issue Dec 14, 2023 · 1 comment · Fixed by #140
Closed

8.11.0: Tests in sdist are incomplete #134

mtelka opened this issue Dec 14, 2023 · 1 comment · Fixed by #140
Labels
good first issue Good for newcomers

Comments

@mtelka
Copy link

mtelka commented Dec 14, 2023

The tests directory in the 8.11.0 sdist is missing many files. There are only tests/test_* files included and everything else is missing so testing fails:

Traceback:
/usr/lib/python3.9/vendor-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/lib/python3.9/vendor-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/usr/lib/python3.9/vendor-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
tests/test_transport.py:41: in <module>
    from tests.conftest import DummyNode
E   ModuleNotFoundError: No module named 'tests.conftest'

PS: I assume it is supposed that tests should be included in sdist because of #132.

@pquentin pquentin added the good first issue Good for newcomers label Dec 14, 2023
@pquentin
Copy link
Member

Right, good point. I tested locally, and conftest.py is indeed the only missing part. We could also include noxfile.py to make it easier to run tests too. And make sure those two files are not in the wheel.

As a second step we could also use the sdist to run tests, but I'm not sure how easy it is while keeping the ease of use of nox.

cc @parona-source

parona-source added a commit to parona-source/elastic-transport-python that referenced this issue Dec 26, 2023
* Have to use graft to include everything necessary.

Closes: elastic#134
Signed-off-by: Alfred Wingate <parona@protonmail.com>
pquentin pushed a commit that referenced this issue Jan 18, 2024
* Have to use graft to include everything necessary.

Closes: #134

Signed-off-by: Alfred Wingate <parona@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants