[pytest-dev] no self-awareness for pytest
pizza at netspace.net.au
Tue Jan 19 07:37:07 EST 2016
On 09/01/16 00:56, Ionel Cristian Mărieș wrote:
> Would collection hooks help you here? Eg: skip/filter files that
> aren't part of matplotlib.
I followed your suggestion, and made a plugin that didn't allow files
that had 'numpy' in its path,
but the plugin never activated on such a file.
so I think I've tracked down whats causing the problem I was experiencing:
just to recap, I was getting an error of this (twice)
_________ __ ERROR at setup of test ____________________________
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.
as it turns out, there were two files that was causing the error, and
the line that seems to be doing it is..
from pylab import *
yup, a import statement was doing it. only reason I found it was
because of the instafail plugin (5 tests after a stack trace of a
failing test, the pytest error appeared)
Is it possible to have pytest print out the name of the test that its
about to do , with the result , instead of ".....E.xsss..." etc?
That would make weird occurrences/errors easier to find in future.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pytest-dev