From 46f8901b8cf46769f62b7268117d2e60fc785c00 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sat, 31 Mar 2018 17:25:21 +0200 Subject: Python 3.5 is dead -- long live Python 3.6! fixes #2266 --- test/filename_matching.py | 2 ++ test/individual_coverage.py | 2 ++ test/mitmproxy/utils/test_typecheck.py | 19 ------------------- 3 files changed, 4 insertions(+), 19 deletions(-) mode change 100644 => 100755 test/filename_matching.py mode change 100644 => 100755 test/individual_coverage.py (limited to 'test') diff --git a/test/filename_matching.py b/test/filename_matching.py old mode 100644 new mode 100755 index e74848d4..5f49725e --- 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 old mode 100644 new mode 100755 index c975b4c8..097b290f --- 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]) -- cgit v1.2.3