From: Andrew M. Kuchling Date: Wed, 20 Oct 2004 11:47:01 +0000 (+0000) Subject: Add test case for bug #1017553 X-Git-Tag: v2.4b2~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4f2552ef87b4298486aafc529dff7c5b64916b3;p=thirdparty%2FPython%2Fcpython.git Add test case for bug #1017553 --- diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 66156023f744..6b2fd6e808bf 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,