Skip to content

Commit e0f7cc1

Browse files
committed
add proxy tests decorator to pytest conftest
1 parent 0a621dd commit e0f7cc1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ MANIFEST
1111
*.wpr
1212
*.wpu
1313
*.DS_Store
14+
.pytest_cache
1415

1516
# virtualenv
1617
# - ignores directories of a virtualenv when you create it right on

tests/conftest.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ def pytest_addoption(parser):
102102
'SSH server on your machine. In certain environments, this '
103103
'may be insecure! Default: False'
104104
)
105+
test_selection_group.addoption(
106+
'--proxy',
107+
'--proxy-tests',
108+
dest='ssh',
109+
action='store_true',
110+
default=False,
111+
help='Run proxy tests'
112+
)
105113
test_selection_group.addoption(
106114
'--run-destructive',
107115
action='store_true',
@@ -640,7 +648,8 @@ def test_daemon(request):
640648
('sysinfo', request.config.getoption('--sysinfo')),
641649
('no_colors', request.config.getoption('--no-colors')),
642650
('output_columns', request.config.getoption('--output-columns')),
643-
('ssh', request.config.getoption('--ssh')))
651+
('ssh', request.config.getoption('--ssh')),
652+
('proxy', request.config.getoption('--proxy')))
644653
options = namedtuple('options', [n for n, v in values])(*[v for n, v in values])
645654
fake_parser = namedtuple('parser', 'options')(options)
646655

0 commit comments

Comments
 (0)