Skip to content

Commit

Permalink
Move --config-file / --rootdir options
Browse files Browse the repository at this point in the history
"test session [...] configuration" seems more fitting than "general"
  • Loading branch information
The-Compiler committed Feb 13, 2025
1 parent 3d4fb89 commit d590a42
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/_pytest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,6 @@ def pytest_addoption(parser: Parser) -> None:
action="store_true",
help="(Deprecated) alias to --strict-markers",
)
group._addoption(
"-c",
"--config-file",
metavar="FILE",
type=str,
dest="inifilename",
help="Load configuration from `FILE` instead of trying to locate one of the "
"implicit configuration files.",
)
group._addoption(
"--rootdir",
action="store",
dest="rootdir",
help="Define root directory for tests. Can be relative path: 'root_dir', './root_dir', "
"'root_dir/another_dir/'; absolute path: '/home/user/root_dir'; path with variables: "
"'$HOME/root_dir'.",
)

group = parser.getgroup("pytest-warnings")
group.addoption(
Expand Down Expand Up @@ -235,6 +218,23 @@ def pytest_addoption(parser: Parser) -> None:
)

group = parser.getgroup("debugconfig", "test session debugging and configuration")
group._addoption(
"-c",
"--config-file",
metavar="FILE",
type=str,
dest="inifilename",
help="Load configuration from `FILE` instead of trying to locate one of the "
"implicit configuration files.",
)
group._addoption(
"--rootdir",
action="store",
dest="rootdir",
help="Define root directory for tests. Can be relative path: 'root_dir', './root_dir', "
"'root_dir/another_dir/'; absolute path: '/home/user/root_dir'; path with variables: "
"'$HOME/root_dir'.",
)
group.addoption(
"--basetemp",
dest="basetemp",
Expand Down

0 comments on commit d590a42

Please sign in to comment.