Created
August 2, 2013 08:27
-
-
Save poliarush/6138334 to your computer and use it in GitHub Desktop.
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
py.test --capture=no --browser=ff -n 3 --junitxml=junit.xml . |
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
py.test --capture=no --browser=ff -n 3 --junitxml=junit.xml . |
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
c:\temp\xdist | |
>py.test --capture=no --browser=ff -n 3 --junitxml=junit.xml . | |
============================= test session starts ============================= | |
platform win32 -- Python 2.7.3 -- pytest-2.3.4 | |
plugins: xdist | |
gw0 [2] / gw1 [2] / gw2 [2] | |
scheduling tests via LoadScheduling | |
FF | |
================================== FAILURES =================================== | |
_________________________ test_something_in_parallel2 _________________________ | |
[gw0] win32 -- Python 2.7.3 c:\Program Files (x86)\Python27\python.exe | |
browser = 'ff' | |
def test_something_in_parallel2(browser): | |
> raise Exception(browser) | |
E Exception: ff | |
test_something.py:6: Exception | |
_________________________ test_something_in_parallel1 _________________________ | |
[gw1] win32 -- Python 2.7.3 c:\Program Files (x86)\Python27\python.exe | |
browser = 'ff' | |
def test_something_in_parallel1(browser): | |
> raise Exception(browser) | |
E Exception: ff | |
test_something.py:2: Exception | |
----------------- generated xml file: c:\temp\xdist\junit.xml ----------------- | |
========================== 2 failed in 0.59 seconds =========================== | |
c:\temp\xdist | |
> |
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
import pytest | |
def pytest_addoption(parser): | |
parser.addoption("--browser", action="store", default="firefox", | |
help="my option: firefox or explorer") | |
@pytest.fixture | |
def browser(request): | |
return request.config.getoption("--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
def test_something_in_parallel1(browser): | |
raise Exception(browser) | |
def test_something_in_parallel2(browser): | |
raise Exception(browser) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment