forked from seba/servefile
tests: Prepare version-specific code for extension
This commit is contained in:
parent
dce8c995f6
commit
a7d273f13f
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue