I am using py.test -rfs to get additional reports on failed and skipped tests.
There are two ways by which a test gets skipped: 1) by calling pytest.skip(msg) from inside of a test case 2) by decorating a test case: @pytest.mark.skipif(condition, msg)
In the final report, the 1) is nicely reported by path/testmodule:linenumber: message
the name of the test case (which is not there) would be great but this way it's certainly good enough.
what bugs me is the 2) skip way which results in SKIP [1] /usr/lib/python2.7/dist-packages/_pytest/skipping.py:132: message
Not even the test module name. The path to always the same line from inside py.test ifself is not really helpful.
I certainly could put the name of the test case into the message but if there is a more elegant way of getting the report better, it would be great. Does anyone know of that? Thanks a lot.
Aucun commentaire:
Enregistrer un commentaire