diff options
author | christian@christian-linux.sarrazin.local <christian@christian-linux.sarrazin.local> | 2014-06-27 17:42:37 +0200 |
---|---|---|
committer | christian@christian-linux.sarrazin.local <christian@christian-linux.sarrazin.local> | 2014-06-27 17:42:37 +0200 |
commit | c8264385eabc1c6d3ff85d63f7da1ab5ff3e4d7d (patch) | |
tree | 5886c1838131dbcbf3391f172247dcbd07275b49 /_pytest/main.py | |
parent | 54c88a6cf3d6b4dbb78102a4114a0348dcfdcd5b (diff) | |
download | pytest-c8264385eabc1c6d3ff85d63f7da1ab5ff3e4d7d.tar.gz |
Implement the "-c" command line switch that allows to explicitly specifiy the config file to load.
This feature was requested in issue #174.
--HG--
branch : explicit-ini-filename
Diffstat (limited to '_pytest/main.py')
-rw-r--r-- | _pytest/main.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/_pytest/main.py b/_pytest/main.py index 246470f01..011e43275 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -38,6 +38,9 @@ def pytest_addoption(parser): help="exit after first num failures or errors.") group._addoption('--strict', action="store_true", help="run pytest in strict mode, warnings become errors.") + # This option is never used as such, see config.getcfg(). + group._addoption("-c", metavar="file", type=str, dest="_inifilename", + help="load configuration from `file` instead of trying to locate one of the implicit configuration files.") group = parser.getgroup("collect", "collection") group.addoption('--collectonly', '--collect-only', action="store_true", |