dask / dask/crick

0.0.6: test suite fails with pytest 8.2.1

Open
#51 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
27
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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`
- because I'm calling `build` with `--no-isolation` I'm using during all processes only locally installed modules
- install .whl file in using `installer` module
- run pytest with $PYTHONPATH pointing to sitearch and sitelib inside
- build is performed in env which is *`cut 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-crick-0.0.6-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-crick-0.0.6-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network' --import-mode=importlib
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.2.1, pluggy-1.5.0
rootdir: /home/tkloczko/rpmbuild/BUILD/crick-0.0.6
configfile: setup.cfg
plugins: vcr-1.0.2
collected 0 items / 3 errors

========================================================================================== ERRORS ===========================================================================================
_____________________________________________________________________ ERROR collecting crick/tests/test_space_saving.py _____________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/tests/test_space_saving.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
crick/__init__.py:4: in
from .space_saving import SpaceSaving
E ModuleNotFoundError: No module named 'crick.space_saving'
________________________________________________________________________ ERROR collecting crick/tests/test_stats.py _________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/tests/test_stats.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
crick/tests/test_stats.py:7: in
from crick import SummaryStats
E ImportError: cannot import name 'SummaryStats' from 'crick' (/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/__init__.py)
_______________________________________________________________________ ERROR collecting crick/tests/test_tdigest.py ________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/tests/test_tdigest.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
crick/tests/test_tdigest.py:6: in
from crick import TDigest
E ImportError: cannot import name 'TDigest' from 'crick' (/home/tkloczko/rpmbuild/BUILD/crick-0.0.6/crick/__init__.py)
================================================================================== short test summary info ==================================================================================
ERROR crick/tests/test_space_saving.py
ERROR crick/tests/test_stats.py
ERROR crick/tests/test_tdigest.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 3 errors in 0.24s =====================================================================================
```

List of installed modules in build env:

```console
Package Version
------------------ -----------
build 1.2.1
Cython 3.0.10
exceptiongroup 1.1.3
importlib_metadata 7.1.0
iniconfig 2.0.0
installer 0.7.0
numpy 1.26.4
packaging 24.0
pluggy 1.5.0
pyproject_hooks 1.0.0
pytest 8.2.1
python-dateutil 2.9.0.post0
scipy 1.12.0
setuptools 69.4.0
setuptools-scm 8.1.0
tokenize_rt 5.2.0
tomli 2.0.1
versioneer 0.29
wheel 0.43.0
zipp 3.19.0
```

Please let me know if you need more details or want me to perform some diagnostics.

Contributor guide

Open the contributing guide

Research direction

Start with crick/__init__.py and the failing tests in crick/tests/test_space_saving.py, test_stats.py, and test_tdigest.py. Reproduce the reported PEP517 wheel installation and pytest command, then inspect why the installed package cannot expose the modules and classes required during test collection. Done means collection succeeds and the non-network test suite runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.