Update pytest_plugin.py

This commit is contained in:
Michael Mintz 2021-09-26 15:02:00 -04:00
parent bd2754a4d3
commit b8000bb750
1 changed files with 13 additions and 0 deletions

View File

@ -886,6 +886,19 @@ def pytest_addoption(parser):
'\n (DO NOT combine "--forked" with "--rs"/"--reuse-session"!)\n'
)
# Recorder Mode does not support multi-threaded / multi-process runs.
if (
"--recorder" in sys_argv
or "--record" in sys_argv
or "--rec" in sys_argv
):
arg_join = " ".join(sys.argv)
if ("-n" in sys_argv) or (" -n=" in arg_join) or ("-c" in sys_argv):
raise Exception(
"\n\n Recorder Mode does NOT support multi-process mode (-n)!"
'\n (DO NOT combine "--recorder" with "-n NUM_PROCESSES"!)\n'
)
# As a shortcut, you can use "--edge" instead of "--browser=edge", etc,
# but you can only specify one default browser for tests. (Default: chrome)
browser_changes = 0