mdklatt / cookiecutter-python-app

Cookiecutter template for a Python application project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deprecated call to pytest.main() in test scripts

mdklatt opened this issue · comments

After upgrading to pytest 3, arguments to pytest.main() should be a list, not a single string:

===== pytest-warning summary =====
WC1 None passing a string to pytest.main() is deprecated, pass a list of arguments instead.

This block has to be modified at the end of every test script:

if __name__ == "__main__":
    raise SystemExit(pytest.main(__file__))

Issue resolved by commit eb8258e.