""" test_zip_stream.py: unit tests for zip_stream
-Tests classes and functions in :py:mod:`pyi2ncommon.zip_stream`.
-
-Only runs in python3 since zip_stream is not py2-compatible (see comment in
-module doc there)
-
-For help see :py:mod:`unittest`
+Test classes and functions in :py:mod:`pyi2ncommon.zip_stream`.
.. codeauthor:: Intra2net
"""
-from __future__ import print_function
-from __future__ import absolute_import
-
import unittest
from tempfile import mkdtemp
import os
def readable(self):
return False
- def seek(sel, *args):
+ def seek(self, *args):
raise AttributeError('this function was removed')
def readline(self, *args):
def _test_zip(self, test_subdir=False):
"""Helper for test_* functions: check given zip for contents"""
- expect_contents = set((TEXT_FILE, BIN_FILE))
+ expect_contents = {TEXT_FILE, BIN_FILE}
if test_subdir:
expect_contents.add(SUBDIR + '/')