diff options
Diffstat (limited to 'test/conftest.py')
-rw-r--r-- | test/conftest.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/test/conftest.py b/test/conftest.py index b4e1da93..50b38197 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -32,21 +32,3 @@ skip_appveyor = pytest.mark.skipif( def disable_alpn(monkeypatch): monkeypatch.setattr(mitmproxy.net.tcp, 'HAS_ALPN', False) monkeypatch.setattr(OpenSSL.SSL._lib, 'Cryptography_HAS_ALPN', False) - - -################################################################################ -# TODO: remove this wrapper when pytest 3.1.0 is released -original_pytest_raises = pytest.raises - - -@contextmanager -@functools.wraps(original_pytest_raises) -def raises(exc, *args, **kwargs): - with original_pytest_raises(exc, *args, **kwargs) as exc_info: - yield - if 'match' in kwargs: - assert exc_info.match(kwargs['match']) - - -pytest.raises = raises -################################################################################ |