I am calling in my script, pytest.main(); although I get no print out unless the test fail.
I know that pytest has a -s flag that solve the problem, and in fact if I call my test from console using
python3 -m pytest -s mytest.py
Works just fine and I get the print statements printed correctly even if the test pass; but I can't find how do you obtain the same outcome while calling pytest.main() from a python script.
Aucun commentaire:
Enregistrer un commentaire