summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_zipfile.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2007-08-16 14:35:24 (GMT)
committerSkip Montanaro <skip@pobox.com>2007-08-16 14:35:24 (GMT)
commit7a98be2efbdc44a6271e3bf6117a1e6c77828414 (patch)
tree64b6306494f992605ef5bd854dfc9e4922f8b967 /Lib/test/test_zipfile.py
parentc5aba174477a4bdbda31d859ce407c6ee7cef293 (diff)
downloadcpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.zip
cpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.tar.gz
cpython-7a98be2efbdc44a6271e3bf6117a1e6c77828414.tar.bz2
Remove RISCOS support
Diffstat (limited to 'Lib/test/test_zipfile.py')
-rw-r--r--Lib/test/test_zipfile.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 98fe3c9..ef3987a 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -29,7 +29,7 @@ class TestsWithSourceFile(unittest.TestCase):
def makeTestArchive(self, f, compression):
# Create the ZIP archive
zipfp = zipfile.ZipFile(f, "w", compression)
- zipfp.write(TESTFN, "another"+os.extsep+"name")
+ zipfp.write(TESTFN, "another.name")
zipfp.write(TESTFN, TESTFN)
zipfp.writestr("strfile", self.data)
zipfp.close()
@@ -40,7 +40,7 @@ class TestsWithSourceFile(unittest.TestCase):
# Read the ZIP archive
zipfp = zipfile.ZipFile(f, "r", compression)
self.assertEqual(zipfp.read(TESTFN), self.data)
- self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data)
+ self.assertEqual(zipfp.read("another.name"), self.data)
self.assertEqual(zipfp.read("strfile"), self.data)
# Print the ZIP directory
@@ -64,7 +64,7 @@ class TestsWithSourceFile(unittest.TestCase):
names = zipfp.namelist()
self.assertEquals(len(names), 3)
self.assert_(TESTFN in names)
- self.assert_("another"+os.extsep+"name" in names)
+ self.assert_("another.name" in names)
self.assert_("strfile" in names)
# Check infolist
@@ -72,13 +72,13 @@ class TestsWithSourceFile(unittest.TestCase):
names = [ i.filename for i in infos ]
self.assertEquals(len(names), 3)
self.assert_(TESTFN in names)
- self.assert_("another"+os.extsep+"name" in names)
+ self.assert_("another.name" in names)
self.assert_("strfile" in names)
for i in infos:
self.assertEquals(i.file_size, len(self.data))
# check getinfo
- for nm in (TESTFN, "another"+os.extsep+"name", "strfile"):
+ for nm in (TESTFN, "another.name", "strfile"):
info = zipfp.getinfo(nm)
self.assertEquals(info.filename, nm)
self.assertEquals(info.file_size, len(self.data))
@@ -105,7 +105,7 @@ class TestsWithSourceFile(unittest.TestCase):
zipdata1.append(read_data)
zipdata2 = []
- zipopen2 = zipfp.open("another"+os.extsep+"name")
+ zipopen2 = zipfp.open("another.name")
while 1:
read_data = zipopen2.read(256)
if not read_data:
@@ -313,13 +313,13 @@ class TestZip64InSmallFiles(unittest.TestCase):
def largeFileExceptionTest(self, f, compression):
zipfp = zipfile.ZipFile(f, "w", compression)
self.assertRaises(zipfile.LargeZipFile,
- zipfp.write, TESTFN, "another"+os.extsep+"name")
+ zipfp.write, TESTFN, "another.name")
zipfp.close()
def largeFileExceptionTest2(self, f, compression):
zipfp = zipfile.ZipFile(f, "w", compression)
self.assertRaises(zipfile.LargeZipFile,
- zipfp.writestr, "another"+os.extsep+"name", self.data)
+ zipfp.writestr, "another.name", self.data)
zipfp.close()
def testLargeFileException(self):
@@ -330,7 +330,7 @@ class TestZip64InSmallFiles(unittest.TestCase):
def zipTest(self, f, compression):
# Create the ZIP archive
zipfp = zipfile.ZipFile(f, "w", compression, allowZip64=True)
- zipfp.write(TESTFN, "another"+os.extsep+"name")
+ zipfp.write(TESTFN, "another.name")
zipfp.write(TESTFN, TESTFN)
zipfp.writestr("strfile", self.data)
zipfp.close()
@@ -338,7 +338,7 @@ class TestZip64InSmallFiles(unittest.TestCase):
# Read the ZIP archive
zipfp = zipfile.ZipFile(f, "r", compression)
self.assertEqual(zipfp.read(TESTFN), self.data)
- self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data)
+ self.assertEqual(zipfp.read("another.name"), self.data)
self.assertEqual(zipfp.read("strfile"), self.data)
# Print the ZIP directory
@@ -362,7 +362,7 @@ class TestZip64InSmallFiles(unittest.TestCase):
names = zipfp.namelist()
self.assertEquals(len(names), 3)
self.assert_(TESTFN in names)
- self.assert_("another"+os.extsep+"name" in names)
+ self.assert_("another.name" in names)
self.assert_("strfile" in names)
# Check infolist
@@ -370,13 +370,13 @@ class TestZip64InSmallFiles(unittest.TestCase):
names = [ i.filename for i in infos ]
self.assertEquals(len(names), 3)
self.assert_(TESTFN in names)
- self.assert_("another"+os.extsep+"name" in names)
+ self.assert_("another.name" in names)
self.assert_("strfile" in names)
for i in infos:
self.assertEquals(i.file_size, len(self.data))
# check getinfo
- for nm in (TESTFN, "another"+os.extsep+"name", "strfile"):
+ for nm in (TESTFN, "another.name", "strfile"):
info = zipfp.getinfo(nm)
self.assertEquals(info.filename, nm)
self.assertEquals(info.file_size, len(self.data))
@@ -675,7 +675,7 @@ class TestsWithRandomBinaryFiles(unittest.TestCase):
def makeTestArchive(self, f, compression):
# Create the ZIP archive
zipfp = zipfile.ZipFile(f, "w", compression)
- zipfp.write(TESTFN, "another"+os.extsep+"name")
+ zipfp.write(TESTFN, "another.name")
zipfp.write(TESTFN, TESTFN)
zipfp.close()
@@ -687,7 +687,7 @@ class TestsWithRandomBinaryFiles(unittest.TestCase):
testdata = zipfp.read(TESTFN)
self.assertEqual(len(testdata), len(self.data))
self.assertEqual(testdata, self.data)
- self.assertEqual(zipfp.read("another"+os.extsep+"name"), self.data)
+ self.assertEqual(zipfp.read("another.name"), self.data)
zipfp.close()
def testStored(self):
@@ -708,7 +708,7 @@ class TestsWithRandomBinaryFiles(unittest.TestCase):
zipdata1.append(read_data)
zipdata2 = []
- zipopen2 = zipfp.open("another"+os.extsep+"name")
+ zipopen2 = zipfp.open("another.name")
while 1:
read_data = zipopen2.read(256)
if not read_data: