Created
September 28, 2015 14:42
-
-
Save astraw38/e485eb89cf6cf61c7be9 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
import decorator | |
def failme(func): | |
def wrapped(func, *args, **kwargs): | |
raise Exception() | |
return decorator.decorator(wrapped, func) |
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 | |
from resources import resources | |
resources.register_mod("res_file") | |
from res_file import failme | |
@failme | |
@pytest.fixture(scope='class') | |
def fail_fixture(): | |
pass | |
def test_failing_fixture(fail_fixture): | |
assert True | |
if __name__ == "__main__": | |
pytest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment