From d4f2552ef87b4298486aafc529dff7c5b64916b3 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 20 Oct 2004 11:47:01 +0000 Subject: [PATCH] Add test case for bug #1017553 --- Lib/test/test_tarfile.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 66156023f74..6b2fd6e808b 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -327,6 +327,14 @@ class WriteTestGzip(WriteTest): class WriteStreamTestGzip(WriteStreamTest): 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: # Bzip2 TestCases class ReadTestBzip2(ReadTestGzip): @@ -354,6 +362,7 @@ def test_main(): bz2.BZ2File(tarname("bz2"), "wb").write(file(tarname(), "rb").read()) tests = [ + FileModeTest, ReadTest, ReadStreamTest, WriteTest,