Browse Source

Check Python version in test_rebind.py

rl1987 5 years ago
parent
commit
d40b0e73c2
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/test/test_rebind.py

+ 6 - 0
src/test/test_rebind.py

@@ -35,6 +35,12 @@ def pick_random_port():
 
     return port
 
+if sys.hexversion < 0x02070000:
+    sys.exit("ERROR: unsupported Python version (should be >= 2.7)")
+
+if sys.hexversion > 0x03000000 and sys.hexversion < 0x03010000:
+    sys.exit("ERROR: unsupported Python3 version (should be >= 3.1)")
+
 control_port = pick_random_port()
 socks_port = pick_random_port()