Skip to content

Commit 6998729

Browse files
committed
Refactor pytest config
1 parent 69776d7 commit 6998729

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

seleniumbase/plugins/pytest_plugin.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,26 +1918,16 @@ def pytest_configure(config):
19181918
or " -n=" in arg_join
19191919
or " -n" in arg_join
19201920
or "-c" in sys_argv
1921-
or (
1922-
"addopts" in config.inicfg.keys()
1923-
and (
1924-
"-n=" in config.inicfg["addopts"]
1925-
or "-n " in config.inicfg["addopts"]
1926-
or "-n" in config.inicfg["addopts"]
1927-
)
1928-
)
1921+
or "-n=" in config.getini("addopts")
1922+
or "-n " in config.getini("addopts")
1923+
or "-n" in config.getini("addopts")
19291924
):
19301925
sb_config._multithreaded = True
19311926
if (
19321927
"--html" in sys_argv
19331928
or " --html=" in arg_join
1934-
or (
1935-
"addopts" in config.inicfg.keys()
1936-
and (
1937-
"--html=" in config.inicfg["addopts"]
1938-
or "--html " in config.inicfg["addopts"]
1939-
)
1940-
)
1929+
or "--html=" in config.getini("addopts")
1930+
or "--html " in config.getini("addopts")
19411931
):
19421932
sb_config._using_html_report = True
19431933
sb_config._html_report_name = config.getoption("htmlpath")

0 commit comments

Comments
 (0)