def test_can_open_noext(self): fn = get_test_filename('tar.ext') a = tar.TarArchive(fn) self.assert_(a.can_open()) a.open() a.close()
def test_cannot_open(self): fn = get_test_filename('foobar-0.42.1.zip') a = tar.TarArchive(fn) self.assert_(not a.can_open())
def test_can_open(self): fn = get_test_filename('foobar-0.42.1.tar.gz') a = tar.TarArchive(fn) self.assert_(a.can_open()) a.open() a.close()