Skip to content

Instantly share code, notes, and snippets.

@astraw38
Created September 28, 2015 14:42
Show Gist options
  • Save astraw38/e485eb89cf6cf61c7be9 to your computer and use it in GitHub Desktop.
Save astraw38/e485eb89cf6cf61c7be9 to your computer and use it in GitHub Desktop.
import decorator
def failme(func):
def wrapped(func, *args, **kwargs):
raise Exception()
return decorator.decorator(wrapped, func)
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