tests: Prepare version-specific code for extension

This commit is contained in:
Sebastian Pipping 2020-02-08 00:58:09 +01:00
parent dce8c995f6
commit a7d273f13f
1 changed files with 4 additions and 3 deletions

View File

@ -4,16 +4,17 @@ import pytest
import requests import requests
import socket import socket
import subprocess import subprocess
import sys
import tarfile import tarfile
import time import time
import urllib3 import urllib3
# crudly written to learn more about pytest and to have a base for refactoring # crudly written to learn more about pytest and to have a base for refactoring
try:
ConnectionRefusedError if sys.version_info.major >= 3:
connrefused_exc = ConnectionRefusedError connrefused_exc = ConnectionRefusedError
except NameError: else:
connrefused_exc = socket.error connrefused_exc = socket.error