Skip to content

Commit da5c579

Browse files
Move setupplan and setuponly options to their respective modules.
Also, changed their group from "general" to "debugconfig".
1 parent 032ce8b commit da5c579

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

_pytest/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ def pytest_addoption(parser):
4444
help="run pytest in strict mode, warnings become errors.")
4545
group._addoption("-c", metavar="file", type=str, dest="inifilename",
4646
help="load configuration from `file` instead of trying to locate one of the implicit configuration files.")
47-
group.addoption('--setuponly', '--setup-only', action="store_true",
48-
help="only setup fixtures, don't execute the tests.")
49-
group.addoption('--setupplan', '--setup-plan', action="store_true",
50-
help="show what fixtures and tests would be executed but don't"
51-
" execute anything.")
5247
group._addoption("--continue-on-collection-errors", action="store_true",
5348
default=False, dest="continue_on_collection_errors",
5449
help="Force test execution even if collection errors occur.")

_pytest/setuponly.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import pytest
22
import sys
33

4+
def pytest_addoption(parser):
5+
group = parser.getgroup("debugconfig")
6+
group.addoption('--setuponly', '--setup-only', action="store_true",
7+
help="only setup fixtures, don't execute the tests.")
8+
49
@pytest.hookimpl(hookwrapper=True)
510
def pytest_fixture_setup(fixturedef, request):
611
yield

_pytest/setupplan.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import pytest
22

3+
def pytest_addoption(parser):
4+
group = parser.getgroup("debugconfig")
5+
group.addoption('--setupplan', '--setup-plan', action="store_true",
6+
help="show what fixtures and tests would be executed but don't"
7+
" execute anything.")
38

49
@pytest.hookimpl(tryfirst=True)
510
def pytest_fixture_setup(fixturedef, request):

0 commit comments

Comments
 (0)