Created
June 25, 2012 13:11
-
-
Save davehunt/2988477 to your computer and use it in GitHub Desktop.
Conditional xfails for pytest-mozwebqa tests.
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 | |
class TestConditionalXFails: | |
@pytest.mark.xfail("config.getvalue('platform') == 'MAC'") | |
def test_xfail_platform(self, mozwebqa): | |
assert False | |
@pytest.mark.xfail("config.getvalue('browser_name') == 'firefox'") | |
def test_xfail_browser_name(self, mozwebqa): | |
assert False | |
@pytest.mark.xfail("config.getvalue('browser_name') == 'firefox' and " | |
"int(config.getvalue('browser_version')) >= 10 and " | |
"config.getvalue('platform') == 'MAC'") | |
def test_xfail_browser_name_and_version_and_platform(self, mozwebqa): | |
assert False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import pytest
class TestSkipIf: