Drop the old py.test call in favour of the new pytest call

This commit is contained in:
Pedro Algarvio 2020-04-08 13:34:59 +01:00
parent 5ed944ab07
commit a5b2b6c350
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -889,9 +889,9 @@ def _pytest(session, coverage, cmd_args):
try:
if coverage is True:
_run_with_coverage(session, "coverage", "run", "-m", "py.test", *cmd_args)
_run_with_coverage(session, "coverage", "run", "-m", "pytest", *cmd_args)
else:
session.run("py.test", *cmd_args, env=env)
session.run("pytest", *cmd_args, env=env)
except CommandFailed: # pylint: disable=try-except-raise
# Not rerunning failed tests for now
raise
@ -905,9 +905,9 @@ def _pytest(session, coverage, cmd_args):
cmd_args[idx] = parg.replace(".xml", "-rerun-failed.xml")
cmd_args.append("--lf")
if coverage is True:
_run_with_coverage(session, "coverage", "run", "-m", "py.test", *cmd_args)
_run_with_coverage(session, "coverage", "run", "-m", "pytest", *cmd_args)
else:
session.run("py.test", *cmd_args, env=env)
session.run("pytest", *cmd_args, env=env)
# pylint: enable=unreachable