From b184f391c6bc88ec1cedbf7d32ddc9f589cc7783 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 28 Sep 2015 18:34:16 -0300 Subject: [PATCH] Show known environment variables in py.test --help --- _pytest/helpconfig.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/_pytest/helpconfig.py b/_pytest/helpconfig.py index b445dcfc3..1df0c56ac 100644 --- a/_pytest/helpconfig.py +++ b/_pytest/helpconfig.py @@ -80,8 +80,18 @@ def showhelp(config): line = " %-24s %s" %(spec, help) tw.line(line[:tw.fullwidth]) - tw.line() ; tw.line() - #tw.sep("=") + tw.line() + tw.line("environment variables:") + vars = [ + ("PYTEST_ADDOPTS", "extra command line options"), + ("PYTEST_PLUGINS", "comma-separated plugins to load during startup"), + ("PYTEST_DEBUG", "set to enable debug tracing of pytest's internals") + ] + for name, help in vars: + tw.line(" %-24s %s" % (name, help)) + tw.line() + tw.line() + tw.line("to see available markers type: py.test --markers") tw.line("to see available fixtures type: py.test --fixtures") tw.line("(shown according to specified file_or_dir or current dir "