I would like to use py.test
combined with hunter:
PYTHONHUNTER="module_startswith='foo'" py.test -s -k test_bar
Unfortunately the output (trace) of hunter is not visible.
Version:
foo_cok_d@aptguettler:~$ py.test --version
This is pytest version 3.4.2, imported from /home/foo_cok_d/local/lib/python2.7/site-packages/pytest.pyc
setuptools registered plugins:
pytest-xdist-1.22.2 at /home/foo_cok_d/local/lib/python2.7/site-packages/xdist/looponfail.py
pytest-xdist-1.22.2 at /home/foo_cok_d/local/lib/python2.7/site-packages/xdist/plugin.py
pytest-forked-0.2 at /home/foo_cok_d/local/lib/python2.7/site-packages/pytest_forked/__init__.pyc
In a simpler (smaller) virtualenv it works (same pytest version, but no plugins).
What could be the reason?
How to debug this?
I found a work-around.
If I these two lines, then the -s
option (shortcut for --capture=no) for py.test
works.
def test_when_the_moon_is_in_the_seventh_house(self):
+ import hunter
+ hunter.trace(module_startswith='modlink')
...
And I will see the race, and I am happy.
A solution without modifying the source code would be nice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With