Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement multiple browser instances possibility for a single test
- Loading branch information
Showing
10 changed files
with
112 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,4 @@ nosetests.xml | |
/lib | ||
/include | ||
/src | ||
/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Configuration for pytest runner.""" | ||
|
||
pytest_plugins = 'pytester' | ||
|
||
import mock | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope='session') | ||
def splinter_session_scoped_browser(): | ||
"""Make it test scoped.""" | ||
return False | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
def mocked_browser(request): | ||
"""Mock splinter browser.""" | ||
mocked_browser = mock.MagicMock() | ||
mocked_browser.driver = mock.MagicMock() | ||
mocked_browser.driver.profile = mock.MagicMock() | ||
patcher = mock.patch('pytest_splinter.plugin.splinter.Browser', lambda *args, **kwargs: mocked_browser) | ||
request.addfinalizer(patcher.stop) | ||
patcher.start() | ||
return mocked_browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters