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 <jkukkonen@vmware.com>
This commit is contained in:
Jussi Kukkonen 2020-08-07 14:39:37 +03:00
parent fc44652b93
commit c7425bec13

View file

@ -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(