Hi, I'm most of the way through a conversion of matplotlib to using
pytest instead of nose, and I'm having a problem.
PR is here https://github.com/matplotlib/matplotlib/pull/5405

Th is is the error text I'm getting:

==================================== ERRORS ====================================

____________________________ ERROR at setup of test ____________________________

file /home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/numpy/testing/nosetester.py, line 249

def test(self, label='fast', verbose=1, extra_argv=None, doctests=False,

fixture 'self' not found

available fixtures: tmpdir_factory, pytestconfig, cov, cache, recwarn, monkeypatch, record_xml_property, capfd, capsys, tmpdir

use 'py.test --fixtures [testpath]' for help on them.

/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/numpy/testing/nosetester.py:249

____________________________ ERROR at setup of test ____________________________

file /home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/numpy/testing/nosetester.py, line 249

def test(self, label='fast', verbose=1, extra_argv=None, doctests=False,

fixture 'self' not found

available fixtures: tmpdir_factory, pytestconfig, cov, cache, recwarn, monkeypatch, record_xml_property, capfd, capsys, tmpdir

use 'py.test --fixtures [testpath]' for help on them.

/home/travis/build/matplotlib/matplotlib/venv/lib/python2.7/site-packages/numpy/testing/nosetester.py:249

3571 passed, 9 skipped, 28 xfailed, 2 pytest-warnings, 2 error in 120.55 seconds


So it seems to be locating a function called 'test' in numpy's nosetester.py file, thats in the virtualenv, and trying to set it up as a test. Which isn't what I want. (I only want tests located in matplotlib's install directory)

I've tried specifying "numpy" in tox.ini's [pytest] norecursedir option, but pytest seems to be ignoring that. Also tried using '--ignore=site-packages/numpy/testing/.' as a string in the list that is given to pytest.main(). and last, as a joke,
tried creating a fixture called 'self'  but it seemed to ignore that too.

Does anyone know how to make pytest self-aware so it can take on skynet.



_______________________________________________
pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to