samedi 21 février 2015

py.test main() invocation examples

I have this structure.



/bin
__init__.py
run_test.py (call pytest.main)
/tests
__init__.py
test_xyz.py


If I call run_test.py using simply via pytest.main(), it won't invoke tests in "tests" module. I tried passing couple of parameters like module="tests" etc but they don't work. I have to altogether chuck auto discovery and use the suite parameter for it to pick up any tests.


What am I missing? I tried to walk through the code in the pytest module, but it is way too complex to understand. And the documentation is very bad.


Aucun commentaire:

Enregistrer un commentaire