Move test___all__ over to unittest.main() and use ModuleNotFoundError

This commit is contained in:
Brett Cannon 2013-06-12 20:12:30 -04:00
parent 603dcf2714
commit c9a1bfed5d
5 changed files with 21 additions and 24 deletions

View file

@ -18,18 +18,18 @@ import binascii
try:
import zlib # We may need its compression method
crc32 = zlib.crc32
except ImportError:
except ModuleNotFoundError:
zlib = None
crc32 = binascii.crc32
try:
import bz2 # We may need its compression method
except ImportError:
except ModuleNotFoundError:
bz2 = None
try:
import lzma # We may need its compression method
except ImportError:
except ModuleNotFoundError:
lzma = None
__all__ = ["BadZipFile", "BadZipfile", "error",