Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

0.6.1: pytest is failing

Aperta
#120 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia con test_snappy_cffi.py e con l’elenco del pacchetto snappy installato riportato nel report, quindi esamina il contenuto della wheel PEP517. Determina perché snappy._snappy_cffi è assente dal pacchetto installato e considera il problema risolto quando entrambi i test CFFI hanno esito positivo dopo il ciclo documentato di build e installazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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-snappy-0.6.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-snappy-0.6.1-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
rootdir: /home/tkloczko/rpmbuild/BUILD/python-snappy-0.6.1
plugins: forked-1.4.0, xdist-2.5.0
collected 28 items

test_formats.py .........                                                                                                                                            [ 32%]
test_hadoop_snappy.py ..                                                                                                                                             [ 39%]
test_snappy.py ...............                                                                                                                                       [ 92%]
test_snappy_cffi.py FF                                                                                                                                               [100%]

================================================================================= FAILURES =================================================================================
__________________________________________________________________________ test_snappy_cffi_enum ___________________________________________________________________________

    def test_snappy_cffi_enum():
>       from snappy.snappy_cffi import lib

test_snappy_cffi.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    from __future__ import absolute_import

>   from ._snappy_cffi import ffi, lib
E   ModuleNotFoundError: No module named 'snappy._snappy_cffi'

../../BUILDROOT/python-snappy-0.6.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages/snappy/snappy_cffi.py:3: ModuleNotFoundError
___________________________________________________________________________ test_snappy_all_cffi ___________________________________________________________________________

    def test_snappy_all_cffi():
>       from snappy.snappy_cffi import ffi, lib

test_snappy_cffi.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    from __future__ import absolute_import

>   from ._snappy_cffi import ffi, lib
E   ModuleNotFoundError: No module named 'snappy._snappy_cffi'

../../BUILDROOT/python-snappy-0.6.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages/snappy/snappy_cffi.py:3: ModuleNotFoundError
========================================================================= short test summary info ==========================================================================
FAILED test_snappy_cffi.py::test_snappy_cffi_enum - ModuleNotFoundError: No module named 'snappy._snappy_cffi'
FAILED test_snappy_cffi.py::test_snappy_all_cffi - ModuleNotFoundError: No module named 'snappy._snappy_cffi'
======================================================================= 2 failed, 26 passed in 1.14s =======================================================================
Here is content
[tkloczko@devel-g2v python-snappy-0.6.1-2.fc35.x86_64]$ ls -lR usr/lib64/python3.8/site-packages/snappy/
usr/lib64/python3.8/site-packages/snappy/:
total 68
-rw-r--r--. 1 tkloczko tkloczko  7552 May 21 19:23 hadoop_snappy.py
-rw-r--r--. 1 tkloczko tkloczko   347 May 21 19:23 __init__.py
-rw-r--r--. 1 tkloczko tkloczko  2412 May 21 19:23 __main__.py
drwxr-xr-x. 1 tkloczko tkloczko  1272 May 21 19:23 __pycache__
-rw-r--r--. 1 tkloczko tkloczko  5581 May 21 19:23 snappy_cffi_builder.py
-rw-r--r--. 1 tkloczko tkloczko  2124 May 21 19:23 snappy_cffi.py
-rwxr-xr-x. 1 tkloczko tkloczko 16400 May 21 19:23 _snappy.cpython-38-x86_64-linux-gnu.so
-rw-r--r--. 1 tkloczko tkloczko  2901 May 21 19:23 snappy_formats.py
-rw-r--r--. 1 tkloczko tkloczko 13136 May 21 19:23 snappy.py

usr/lib64/python3.8/site-packages/snappy/__pycache__:
total 124
-rw-r--r--. 1 tkloczko tkloczko 7229 May 21 19:23 hadoop_snappy.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 3917 May 21 19:23 hadoop_snappy.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 7229 May 21 19:23 hadoop_snappy.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko  539 May 21 19:23 __init__.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko  539 May 21 19:23 __init__.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko  539 May 21 19:23 __init__.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 1952 May 21 19:23 __main__.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 1845 May 21 19:23 __main__.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 1952 May 21 19:23 __main__.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 5770 May 21 19:23 snappy_cffi_builder.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 5770 May 21 19:23 snappy_cffi_builder.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 5770 May 21 19:23 snappy_cffi_builder.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 2242 May 21 19:23 snappy_cffi.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 2242 May 21 19:23 snappy_cffi.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 2242 May 21 19:23 snappy_cffi.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 9751 May 21 19:23 snappy.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 5592 May 21 19:23 snappy.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 9792 May 21 19:23 snappy.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 1929 May 21 19:23 snappy_formats.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 1400 May 21 19:23 snappy_formats.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 1929 May 21 19:23 snappy_formats.cpython-38.pyc
Lingua principale
Python
Stelle
490
Fork
104
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di intake/python-snappy

Tutte le issue di intake/python-snappy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.