diff options
author | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2017-05-24 14:53:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-24 14:53:45 +0200 |
commit | 8b31f5c324fac1296d0a89fc42f4e86046d28970 (patch) | |
tree | 980a41195850f57dcc34a0e73645e59b88dd261d /test/conftest.py | |
parent | 1ca98c83aabf7ce6e565aa6cedea61fdf5f193c9 (diff) | |
parent | e77f07a36bc2e29552bb541ed71406aa5127d4ac (diff) | |
download | mitmproxy-8b31f5c324fac1296d0a89fc42f4e86046d28970.tar.gz mitmproxy-8b31f5c324fac1296d0a89fc42f4e86046d28970.tar.bz2 mitmproxy-8b31f5c324fac1296d0a89fc42f4e86046d28970.zip |
Merge pull request #2350 from Kriechi/improve-tests
fix various leaking fds/sockets
Diffstat (limited to 'test/conftest.py')
-rw-r--r-- | test/conftest.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/test/conftest.py b/test/conftest.py index b4e1da93..bb913548 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,8 +1,6 @@ import os import pytest import OpenSSL -import functools -from contextlib import contextmanager import mitmproxy.net.tcp @@ -32,21 +30,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 -################################################################################ |