Last active
February 5, 2016 10:20
-
-
Save laurentsenta/3780003fe1d259f422ed to your computer and use it in GitHub Desktop.
pytest not calling hooks with TestCase
This file contains hidden or 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 | |
@pytest.hookimpl(hookwrapper=True) | |
def pytest_pyfunc_call(pyfuncitem): | |
1 / 0 | |
outcome = yield |
This file contains hidden or 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
from unittest import TestCase | |
class TestX(TestCase): | |
def test_should_fail_with_divby0(self): | |
assert False, "The hook didn't get called" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment