Created
November 10, 2016 12:35
-
-
Save RonnyPfannschmidt/3913fe506bd0bdc3a85dea083db06694 to your computer and use it in GitHub Desktop.
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 contextlib | |
| @contextlib.contextmanager | |
| def raises_kind(exc_type, kind): | |
| with pytest.raises(exc_type) as e: | |
| yield | |
| assert e.value.kind == kind |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment