Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytest >= 4.1 throws AttributeError on all tests for pytest-remotedata #37

Closed
rawrgulmuffins opened this issue Feb 11, 2019 · 4 comments

Comments

@rawrgulmuffins
Copy link

Related thread from pytest-cov.

Specific error raised.

python -m pytest
======================================== test session starts =========================================
platform darwin -- Python 3.6.5, pytest-4.2.0, py-1.5.3, pluggy-0.8.1
benchmark: 3.2.2 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /Users/alexl/git/example, inifile: setup.cfg
plugins: remotedata-0.2.1, openfiles-0.3.0, doctestplus-0.1.3, cov-2.6.1, benchmark-3.2.2, arraydiff-0.2
collected 1 item

tests/test_example.py E                                                                        [100%]

=============================================== ERRORS ===============================================
___________________________ ERROR at setup of test_command_line_interface ____________________________

item = <Function test_command_line_interface>

    def pytest_runtest_setup(item):

>       remote_data = item.get_marker('remote_data')
E       AttributeError: 'Function' object has no attribute 'get_marker'

/usr/local/anaconda3/lib/python3.6/site-packages/pytest_remotedata/plugin.py:59: AttributeError
====================================== 1 error in 0.11 seconds =======================================
make: *** [test] Error 1
@rawrgulmuffins rawrgulmuffins changed the title Error raised when using Pytest >= 4.1 Pytest >= 4.1 throws AttributeError on all tests for pytest-remotedata Feb 11, 2019
@astrofrog
Copy link
Member

It looks like you are using pytest-remotedata 0.2.1 - can you try the latest 0.3.1 release?

@BaranOrnarli
Copy link

0.3.0 fail (plain Anaconda3 install + conda install pytest) ; 0.3.1 success

@StudyExchange
Copy link

Env: Python 3.6.5 :: Anaconda, Inc.
Install tool: pip
My work version:
pytest 5.0.0
pytest-arraydiff 0.2
pytest-astropy 0.3.0
pytest-doctestplus 0.1.3
pytest-openfiles 0.3.0
pytest-remotedata 0.3.1
python-dateutil 2.7.3

@bsipocz
Copy link
Member

bsipocz commented Jul 3, 2019

I believe this has been since fixed, but feel free to reopen if this is not true.

@bsipocz bsipocz closed this as completed Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants