Description
Create a file test_pandas.py
with import pandas
$ echo 'import pandas' > test_pandas.py
run pytest
with --strict
flag
$ pytest --strict test_pandas.py
================================================ test session starts ================================================
platform darwin -- Python 3.6.1, pytest-3.1.0, py-1.4.33, pluggy-0.4.0
rootdir: /private/tmp, inifile:
plugins: xdist-1.15.0, repeat-0.4.1, cov-2.4.0
collected 0 items / 1 errors
====================================================== ERRORS =======================================================
__________________________________________ ERROR collecting test_pandas.py __________________________________________
test_pandas.py:1: in <module>
import pandas
/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/__init__.py:60: in <module>
import pandas.testing
/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/testing.py:7: in <module>
from pandas.util.testing import (
/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/pandas/pandas/util/testing.py:55: in <module>
slow = pytest.mark.slow
/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/_pytest/mark.py:251: in __getattr__
self._check(name)
/Users/taugspurger/Envs/pandas-dev/lib/python3.6/site-packages/_pytest/mark.py:266: in _check
raise AttributeError("%r not a registered marker" % (name,))
E AttributeError: 'slow' not a registered marker
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================== 1 error in 1.10 seconds ==============================================
(original post below)
Importing panda make my pytest tests fail because of one marker "slow" is required in
/usr/local/lib/python2.7/dist-packages/pandas/util/testing.py:55: in
slow = pytest.mark.slow
I don't use slow marker and have to add it to run my test even though it's just for panda
complete stack trace :
tests/_lib/createfullteststoresem.py:54: in createFullTestStoreSem
from oxlib.sem.history import get_ad_product_history
oxlib/sem/history.py:5: in
import pandas as pd
/usr/local/lib/python2.7/dist-packages/pandas/init.py:60: in
import pandas.testing
/usr/local/lib/python2.7/dist-packages/pandas/testing.py:7: in
from pandas.util.testing import (
/usr/local/lib/python2.7/dist-packages/pandas/util/testing.py:55: in
slow = pytest.mark.slow
/usr/local/lib/python2.7/dist-packages/_pytest/mark.py:184: in getattr
self._check(name)