Error when running tests in local environment

Aperta
#210 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Inizia riproducendo la configurazione con Python 3.6.9 usando requirements.txt, test_requirements.txt e setup.py develop, quindi esegui pytest tests/. Leggi tests/test_probe_expiry_alert.py, in particolare il relativo import di dataclasses, e ispeziona i file delle dipendenze per determinare come la suite di test dovrebbe supportare l’ambiente documentato. È completato quando pytest tests/ completa la raccolta senza il ModuleNotFoundError segnalato.

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

Descrizione

pip install -r requirements.txt
pip install -r test_requirements.txt
python setup.py develop

After running above commands when I am running tests locally I am getting error

Command: pytest tests/
Error:

======================================================================= ERRORS =======================================================================
_________________________________________________ ERROR collecting tests/test_probe_expiry_alert.py __________________________________________________
ImportError while importing test module '/home/jhabar/mozilla/probe-scraper/tests/test_probe_expiry_alert.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.6/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_probe_expiry_alert.py:2: in <module>
    from dataclasses import dataclass
E   ModuleNotFoundError: No module named 'dataclasses'
============================================================== short test summary info ===============================================================
ERROR tests/test_probe_expiry_alert.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Dependencies

Python: 3.6.9
Distributor ID: Peppermint
Description: Peppermint 10 Ten
Release: 10
Codename: bionic

Lingua principale
Python
Stelle
27
Fork
74
Merge medio
5g 2h
PR unite (30g)
12

Preparare l'ambiente

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 mozilla/probe-scraper

Tutte le issue di mozilla/probe-scraper

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.