Skip to content

Commit 71ae4d1

Browse files
committed
Move --config-file / --rootdir options
"test session [...] configuration" seems more fitting than "general"
1 parent d7176e2 commit 71ae4d1

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/_pytest/main.py

+17-17
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,6 @@ def pytest_addoption(parser: Parser) -> None:
8989
action="store_true",
9090
help="(Deprecated) alias to --strict-markers",
9191
)
92-
group._addoption(
93-
"-c",
94-
"--config-file",
95-
metavar="FILE",
96-
type=str,
97-
dest="inifilename",
98-
help="Load configuration from `FILE` instead of trying to locate one of the "
99-
"implicit configuration files.",
100-
)
101-
group._addoption(
102-
"--rootdir",
103-
action="store",
104-
dest="rootdir",
105-
help="Define root directory for tests. Can be relative path: 'root_dir', './root_dir', "
106-
"'root_dir/another_dir/'; absolute path: '/home/user/root_dir'; path with variables: "
107-
"'$HOME/root_dir'.",
108-
)
10992

11093
group = parser.getgroup("pytest-warnings")
11194
group.addoption(
@@ -235,6 +218,23 @@ def pytest_addoption(parser: Parser) -> None:
235218
)
236219

237220
group = parser.getgroup("debugconfig", "test session debugging and configuration")
221+
group._addoption(
222+
"-c",
223+
"--config-file",
224+
metavar="FILE",
225+
type=str,
226+
dest="inifilename",
227+
help="Load configuration from `FILE` instead of trying to locate one of the "
228+
"implicit configuration files.",
229+
)
230+
group._addoption(
231+
"--rootdir",
232+
action="store",
233+
dest="rootdir",
234+
help="Define root directory for tests. Can be relative path: 'root_dir', './root_dir', "
235+
"'root_dir/another_dir/'; absolute path: '/home/user/root_dir'; path with variables: "
236+
"'$HOME/root_dir'.",
237+
)
238238
group.addoption(
239239
"--basetemp",
240240
dest="basetemp",

0 commit comments

Comments
 (0)