def test_is_zipfile(self, zip_location): assert not current_zipfile() with mock.patch.object(sys, 'argv', [zip_location]): assert isinstance(current_zipfile(), ZipFile)
def test_argv0_is_not_zipfile(self): with current_zipfile() as zipfile: assert not zipfile
def test_argv0_is_not_zipfile(self): assert not current_zipfile()
def test_is_zipfile(self, zip_location): with mock.patch.object(sys, "argv", [zip_location]): with current_zipfile() as zipfile: assert isinstance(zipfile, ZipFile)