From b71ef054b577abfa1899210aca75d00e1c947cbb Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Sat, 28 May 2016 10:26:12 +0530 Subject: [PATCH 1/3] Py3: Use cStringIO from six.moves --- test/pathod/test_log.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/pathod/test_log.py b/test/pathod/test_log.py index d91b8bb1e..3d1d10d68 100644 --- a/test/pathod/test_log.py +++ b/test/pathod/test_log.py @@ -1,10 +1,10 @@ -import StringIO from pathod import log from netlib.exceptions import TcpDisconnect -import netlib.tcp + +from six.moves import cStringIO -class DummyIO(StringIO.StringIO): +class DummyIO(cStringIO): def start_log(self, *args, **kwargs): pass From 877f5c54ef779c1ef081ed86ce69f4f7864d13d9 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Sat, 28 May 2016 10:26:56 +0530 Subject: [PATCH 2/3] Enable Travis for test_log --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a01174a0..0c37b53f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,9 +22,9 @@ matrix: git: depth: 9999999 - python: 3.5 - env: SCOPE="netlib ./test/mitmproxy/script ./test/pathod/test_utils.py" + env: SCOPE="netlib ./test/mitmproxy/script ./test/pathod/test_utils.py ./test/pathod/test_log.py" - python: 3.5 - env: SCOPE="netlib ./test/mitmproxy/script ./test/pathod/test_utils.py" NO_ALPN=1 + env: SCOPE="netlib ./test/mitmproxy/script ./test/pathod/test_utils.py ./test/pathod/test_log.py" NO_ALPN=1 - python: 2.7 env: DOCS=1 script: 'cd docs && make html' From fa7964988f1541587a9fc3b582223e0a7b11a4d1 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 28 May 2016 00:17:26 -0700 Subject: [PATCH 3/3] fix Python 2 tests --- test/pathod/test_log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pathod/test_log.py b/test/pathod/test_log.py index 3d1d10d68..29801eb3d 100644 --- a/test/pathod/test_log.py +++ b/test/pathod/test_log.py @@ -1,10 +1,10 @@ from pathod import log from netlib.exceptions import TcpDisconnect -from six.moves import cStringIO +import six -class DummyIO(cStringIO): +class DummyIO(six.StringIO): def start_log(self, *args, **kwargs): pass