fastavro: 1.4.12: pytest is failing
I’m trying to package 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 </install/prefix>
- run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-fastavro-1.4.12-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-fastavro-1.4.12-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
SEED is 1653161848.075403
rootdir: /home/tkloczko/rpmbuild/BUILD/fastavro-1.4.12, configfile: pytest.ini
plugins: forked-1.4.0, xdist-2.5.0
collected 599 items
tests/test_aliases.py ....... [ 1%]
tests/test_appendable.py ..... [ 2%]
tests/test_block_reader.py ..FF [ 2%]
tests/test_canonical_form.py ....................................... [ 9%]
tests/test_complex.py ..... [ 10%]
tests/test_compression.py .......sss.... [ 12%]
tests/test_fastavro.py ..................................................................F......ss..................................s.............. [ 33%]
tests/test_fingerprint.py .............................................................................................................. [ 51%]
tests/test_json.py ...................... [ 55%]
tests/test_logical_types.py ............................................ [ 62%]
tests/test_main_cli.py ..... [ 63%]
tests/test_promotion.py ..... [ 64%]
tests/test_schema.py .................................................. [ 72%]
tests/test_schema_evolution.py ............................................................................................. [ 87%]
tests/test_schemaless.py ...... [ 88%]
tests/test_str_py3.py .. [ 89%]
tests/test_timezone.py .............. [ 91%]
tests/test_types.py .............. [ 93%]
tests/test_utils.py ... [ 94%]
tests/test_validation.py .......................... [ 98%]
tests/test_write_block.py .... [ 99%]
tests/repository/test_flat_dict.py ... [100%]
================================================================================= FAILURES =================================================================================
____________________________________________________________________ test_block_iteration_deflated_disk ____________________________________________________________________
Traceback (most recent call last):
File "/home/tkloczko/rpmbuild/BUILD/fastavro-1.4.12/tests/test_block_reader.py", line 87, in test_block_iteration_deflated_disk
check_round_trip_deflated(write_to_disk=True)
File "/home/tkloczko/rpmbuild/BUILD/fastavro-1.4.12/tests/test_block_reader.py", line 71, in check_round_trip_deflated
assert bytes == 16543
AssertionError: assert 16850 == 16543
___________________________________________________________________ test_block_iteration_deflated_memory ___________________________________________________________________
Traceback (most recent call last):
File "/home/tkloczko/rpmbuild/BUILD/fastavro-1.4.12/tests/test_block_reader.py", line 91, in test_block_iteration_deflated_memory
check_round_trip_deflated(write_to_disk=False)
File "/home/tkloczko/rpmbuild/BUILD/fastavro-1.4.12/tests/test_block_reader.py", line 71, in check_round_trip_deflated
assert bytes == 16543
AssertionError: assert 16850 == 16543
____________________________________________________________________________ test_cython_python ____________________________________________________________________________
Traceback (most recent call last):
File "/home/tkloczko/rpmbuild/BUILD/fastavro-1.4.12/tests/test_fastavro.py", line 762, in test_cython_python
assert getattr(_reader, "CYTHON_MODULE")
AttributeError: module 'fastavro._read_py' has no attribute 'CYTHON_MODULE'
========================================================================= short test summary info ==========================================================================
SKIPPED [3] tests/test_compression.py:68: codec is present
SKIPPED [1] tests/test_fastavro.py:1007: Cython-specific test
SKIPPED [1] tests/test_fastavro.py:1056: Cython-specific test
SKIPPED [1] tests/test_fastavro.py:2184: Only works using cython module
FAILED tests/test_block_reader.py::test_block_iteration_deflated_disk - assert 16850 == 16543
FAILED tests/test_block_reader.py::test_block_iteration_deflated_memory - assert 16850 == 16543
FAILED tests/test_fastavro.py::test_cython_python - AttributeError: module 'fastavro._read_py' has no attribute 'CYTHON_MODULE'
================================================================= 3 failed, 590 passed, 6 skipped in 3.01s =================================================================```
</details>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 29
The tests that are failing for me are different than the ones for you so something must be wrong with my dockerfile, but I would need your help there because this is the point I always get to.