From c7425bec13350d84bbb4fd5aaa9c4dfa5be2be3b Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Fri, 7 Aug 2020 14:39:37 +0300 Subject: [PATCH] test_proxy_use: Error out early if using Python3 proxy_server.py is python2 only, don't try to setup the class as it leads to a confusing TimeoutError. This may prevent me from debugging this apparent test failure a third time. Signed-off-by: Jussi Kukkonen --- tests/test_proxy_use.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_proxy_use.py b/tests/test_proxy_use.py index 6fdb3b47..ae6e6088 100644 --- a/tests/test_proxy_use.py +++ b/tests/test_proxy_use.py @@ -78,6 +78,10 @@ def setUpClass(cls): unittest_toolbox.Modified_TestCase.setUpClass() + if not six.PY2: + raise NotImplementedError("TestWithProxies only works with Python 2" + " (proxy_server.py is Python2 only)") + # Launch a simple HTTP server (serves files in the current dir). cls.http_port = random.randint(30000, 45000) cls.http_server_proc = popen_python(