Skip to content

Commit 3737e5d

Browse files
isaulvBeyondEvil
andauthored
Removed xdist check since processes need to be able to set the sensitive URL (#254)
* Removed xdist check since processes need to be able to set the sensitive URL Co-authored-by: Jim Brännlund <[email protected]>
1 parent c36dc97 commit 3737e5d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

pytest_selenium/safety.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ def pytest_addoption(parser):
2121

2222

2323
def pytest_configure(config):
24-
if hasattr(config, "workerinput"):
25-
return # avoid doing anything if this is an xdist worker node
2624
config.option.sensitive_url = (
2725
config.getoption("sensitive_url")
2826
or config.getini("sensitive_url")

testing/test_driver.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,16 @@ def test_pass(driver):
256256
testdir.quick_qa("--driver", "Firefox", file_test, failed=1)
257257
expected_attempts = max_num_attempts or default_attempts
258258
assert mock_retrying.spy_return.statistics["attempt_number"] == expected_attempts
259+
260+
261+
def test_xdist(testdir):
262+
file_test = testdir.makepyfile(
263+
"""
264+
import pytest
265+
266+
@pytest.mark.nondestructive
267+
def test_xdist(driver):
268+
pass
269+
"""
270+
)
271+
testdir.quick_qa("--driver", "firefox", "-n", "2", file_test, passed=1)

0 commit comments

Comments
 (0)