aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2017-05-24 10:36:29 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2017-05-24 11:35:53 +0200
commit0bd3d0ff4c3c51aeae2ce1735c9028a1ac34cdaa (patch)
tree4fa262ae8f5fa132860724df74e22696fce3197b
parent4961d782ed344b5f36bf5b44b8b4b247dcef2605 (diff)
downloadmitmproxy-0bd3d0ff4c3c51aeae2ce1735c9028a1ac34cdaa.tar.gz
mitmproxy-0bd3d0ff4c3c51aeae2ce1735c9028a1ac34cdaa.tar.bz2
mitmproxy-0bd3d0ff4c3c51aeae2ce1735c9028a1ac34cdaa.zip
upgrade pytest and remove our pytest.raises wrapper
-rw-r--r--setup.py27
-rw-r--r--test/conftest.py18
2 files changed, 10 insertions, 35 deletions
diff --git a/setup.py b/setup.py
index a03d74fb..38bd7ee4 100644
--- a/setup.py
+++ b/setup.py
@@ -61,8 +61,9 @@ setup(
# It is not considered best practice to use install_requires to pin dependencies to specific versions.
install_requires=[
"blinker>=1.4, <1.5",
- "click>=6.2, <7",
+ "brotlipy>=0.5.1, <0.7",
"certifi>=2015.11.20.1", # no semver here - this should always be on the last release!
+ "click>=6.2, <7",
"construct>=2.8, <2.9",
"cryptography>=1.4, <1.9",
"cssutils>=1.0.1, <1.1",
@@ -79,37 +80,29 @@ setup(
"pyperclip>=1.5.22, <1.6",
"requests>=2.9.1, <3",
"ruamel.yaml>=0.13.2, <0.15",
+ "sortedcontainers>=1.5.4, <1.6",
"tornado>=4.3, <4.6",
"urwid>=1.3.1, <1.4",
- "brotlipy>=0.5.1, <0.7",
- "sortedcontainers>=1.5.4, <1.6",
- # transitive from cryptography, we just blacklist here.
- # https://github.com/pypa/setuptools/issues/861
- "setuptools>=11.3, !=29.0.0",
],
extras_require={
':sys_platform == "win32"': [
"pydivert>=2.0.3, <2.1",
],
- ':sys_platform != "win32"': [
- ],
'dev': [
- "Flask>=0.10.1, <0.13",
"flake8>=3.2.1, <3.4",
+ "Flask>=0.10.1, <0.13",
"mypy>=0.501, <0.502",
- "rstcheck>=2.2, <4.0",
- "tox>=2.3, <3",
- "pytest>=3, <3.1",
"pytest-cov>=2.2.1, <3",
+ "pytest-faulthandler>=1.3.0, <2",
"pytest-timeout>=1.0.0, <2",
"pytest-xdist>=1.14, <2",
- "pytest-faulthandler>=1.3.0, <2",
- "sphinx>=1.3.5, <1.7",
+ "pytest>=3.1, <4",
+ "rstcheck>=2.2, <4.0",
+ "sphinx_rtd_theme>=0.1.9, <0.3",
"sphinx-autobuild>=0.5.2, <0.7",
+ "sphinx>=1.3.5, <1.7",
"sphinxcontrib-documentedlist>=0.5.0, <0.7",
- "sphinx_rtd_theme>=0.1.9, <0.3",
- ],
- 'contentviews': [
+ "tox>=2.3, <3",
],
'examples': [
"beautifulsoup4>=4.4.1, <4.7",
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
-################################################################################