mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Show local variables on test failures
This commit is contained in:
parent
ad6eee068a
commit
dff88decfe
1 changed files with 10 additions and 4 deletions
14
noxfile.py
14
noxfile.py
|
@ -1,4 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
noxfile
|
||||
~~~~~~~
|
||||
|
@ -7,7 +6,6 @@ Nox configuration script
|
|||
"""
|
||||
# pylint: disable=resource-leakage,3rd-party-module-not-gated
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import datetime
|
||||
import glob
|
||||
|
@ -65,7 +63,7 @@ RUNTESTS_LOGFILE = os.path.join(
|
|||
)
|
||||
|
||||
# Prevent Python from writing bytecode
|
||||
os.environ[str("PYTHONDONTWRITEBYTECODE")] = str("1")
|
||||
os.environ["PYTHONDONTWRITEBYTECODE"] = "1"
|
||||
|
||||
|
||||
def find_session_runner(session, name, **kwargs):
|
||||
|
@ -952,7 +950,15 @@ def _pytest(session, coverage, cmd_args):
|
|||
cmd_args.append("--lf")
|
||||
if coverage is True:
|
||||
_run_with_coverage(
|
||||
session, "python", "-m", "coverage", "run", "-m", "pytest", *cmd_args
|
||||
session,
|
||||
"python",
|
||||
"-m",
|
||||
"coverage",
|
||||
"run",
|
||||
"-m",
|
||||
"pytest",
|
||||
"--showlocals",
|
||||
*cmd_args
|
||||
)
|
||||
else:
|
||||
session.run("python", "-m", "pytest", *cmd_args, env=env)
|
||||
|
|
Loading…
Add table
Reference in a new issue