Add test case for bug #1017553

This commit is contained in:
Andrew M. Kuchling 2004-10-20 11:47:01 +00:00
parent 910b282fbb
commit d4f2552ef8
1 changed files with 9 additions and 0 deletions

View File

@ -327,6 +327,14 @@ class WriteTestGzip(WriteTest):
class WriteStreamTestGzip(WriteStreamTest): class WriteStreamTestGzip(WriteStreamTest):
comp = "gz" comp = "gz"
# Filemode test cases
class FileModeTest(unittest.TestCase):
def test_modes(self):
self.assertEqual(tarfile.filemode(0755), '-rwxr-xr-x')
self.assertEqual(tarfile.filemode(07111), '---s--s--t')
if bz2: if bz2:
# Bzip2 TestCases # Bzip2 TestCases
class ReadTestBzip2(ReadTestGzip): class ReadTestBzip2(ReadTestGzip):
@ -354,6 +362,7 @@ def test_main():
bz2.BZ2File(tarname("bz2"), "wb").write(file(tarname(), "rb").read()) bz2.BZ2File(tarname("bz2"), "wb").write(file(tarname(), "rb").read())
tests = [ tests = [
FileModeTest,
ReadTest, ReadTest,
ReadStreamTest, ReadStreamTest,
WriteTest, WriteTest,