diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2018-03-31 17:25:21 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2018-03-31 18:46:32 +0200 |
commit | 46f8901b8cf46769f62b7268117d2e60fc785c00 (patch) | |
tree | 154a2669f1dd13c2632f6387fee1d8931fe4c735 /test | |
parent | 3c52ed6ee1948a1c4b0fa064fe7313bdfadb8950 (diff) | |
download | mitmproxy-46f8901b8cf46769f62b7268117d2e60fc785c00.tar.gz mitmproxy-46f8901b8cf46769f62b7268117d2e60fc785c00.tar.bz2 mitmproxy-46f8901b8cf46769f62b7268117d2e60fc785c00.zip |
Python 3.5 is dead -- long live Python 3.6!
fixes #2266
Diffstat (limited to 'test')
-rwxr-xr-x[-rw-r--r--] | test/filename_matching.py | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | test/individual_coverage.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/utils/test_typecheck.py | 19 |
3 files changed, 4 insertions, 19 deletions
diff --git a/test/filename_matching.py b/test/filename_matching.py index e74848d4..5f49725e 100644..100755 --- a/test/filename_matching.py +++ b/test/filename_matching.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import os import re import glob diff --git a/test/individual_coverage.py b/test/individual_coverage.py index c975b4c8..097b290f 100644..100755 --- a/test/individual_coverage.py +++ b/test/individual_coverage.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import io import contextlib import os diff --git a/test/mitmproxy/utils/test_typecheck.py b/test/mitmproxy/utils/test_typecheck.py index 9cb4334e..85713e14 100644 --- a/test/mitmproxy/utils/test_typecheck.py +++ b/test/mitmproxy/utils/test_typecheck.py @@ -1,6 +1,5 @@ import io import typing -from unittest import mock import pytest from mitmproxy.utils import typecheck @@ -32,12 +31,6 @@ def test_check_union(): with pytest.raises(TypeError): typecheck.check_option_type("foo", [], typing.Union[int, str]) - # Python 3.5 only defines __union_params__ - m = mock.Mock() - m.__str__ = lambda self: "typing.Union" - m.__union_params__ = (int,) - typecheck.check_option_type("foo", 42, m) - def test_check_tuple(): typecheck.check_option_type("foo", (42, "42"), typing.Tuple[int, str]) @@ -50,12 +43,6 @@ def test_check_tuple(): with pytest.raises(TypeError): typecheck.check_option_type("foo", ("42", 42), typing.Tuple[int, str]) - # Python 3.5 only defines __tuple_params__ - m = mock.Mock() - m.__str__ = lambda self: "typing.Tuple" - m.__tuple_params__ = (int, str) - typecheck.check_option_type("foo", (42, "42"), m) - def test_check_sequence(): typecheck.check_option_type("foo", [10], typing.Sequence[int]) @@ -68,12 +55,6 @@ def test_check_sequence(): with pytest.raises(TypeError): typecheck.check_option_type("foo", "foo", typing.Sequence[str]) - # Python 3.5 only defines __parameters__ - m = mock.Mock() - m.__str__ = lambda self: "typing.Sequence" - m.__parameters__ = (int,) - typecheck.check_option_type("foo", [10], m) - def test_check_io(): typecheck.check_option_type("foo", io.StringIO(), typing.IO[str]) |