Skip to content

Commit

Permalink
Removed xdist check since processes need to be able to set the sensit…
Browse files Browse the repository at this point in the history
…ive URL (#254)

* Removed xdist check since processes need to be able to set the sensitive URL

Co-authored-by: Jim Brännlund <jimbrannlund@fastmail.com>
  • Loading branch information
isaulv and BeyondEvil committed Sep 17, 2020
1 parent c36dc97 commit 3737e5d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pytest_selenium/safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ def pytest_addoption(parser):


def pytest_configure(config):
if hasattr(config, "workerinput"):
return # avoid doing anything if this is an xdist worker node
config.option.sensitive_url = (
config.getoption("sensitive_url")
or config.getini("sensitive_url")
Expand Down
13 changes: 13 additions & 0 deletions testing/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,16 @@ def test_pass(driver):
testdir.quick_qa("--driver", "Firefox", file_test, failed=1)
expected_attempts = max_num_attempts or default_attempts
assert mock_retrying.spy_return.statistics["attempt_number"] == expected_attempts


def test_xdist(testdir):
file_test = testdir.makepyfile(
"""
import pytest
@pytest.mark.nondestructive
def test_xdist(driver):
pass
"""
)
testdir.quick_qa("--driver", "firefox", "-n", "2", file_test, passed=1)

0 comments on commit 3737e5d

Please sign in to comment.