PyTest doesn't run any tests
PyTest doesn't run any tests, and it's not clear why. I tried using -debug but didn't get any valuable information. It's not clear how to debug problems like this with pytest (looks like some kind of problem with PyTest config settings / env variables / test names?)
Sample test file:
$ cat test_sanity.py
import pytest
@pytest.mark.sanity
def test_me():
""" I'm a test. """
assert True
But PyTest doesn't run any test:
$ pytest
================================================== test session starts ===================================================
platform linux2 -- Python 2.7.12, pytest-3.1.3, py-1.4.34, pluggy-0.4.0
rootdir: /home/qawizard/pytest-hell, inifile:
plugins: xdist-1.15.0, timeout-1.2.0
collected 1 item s
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Exit: Done! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================== no tests ran in 0.13 seconds ==============================================
Why is that?
+3
source to share
No one has answered this question yet
Check out similar questions: