summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tarfile.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2004-10-20 11:47:01 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2004-10-20 11:47:01 (GMT)
commitd4f2552ef87b4298486aafc529dff7c5b64916b3 (patch)
treed1410a2dbb507cfdc98e6e6755a2367797528bbb /Lib/test/test_tarfile.py
parent910b282fbbba5463edf98e86a58ed88c481c365d (diff)
downloadcpython-d4f2552ef87b4298486aafc529dff7c5b64916b3.zip
cpython-d4f2552ef87b4298486aafc529dff7c5b64916b3.tar.gz
cpython-d4f2552ef87b4298486aafc529dff7c5b64916b3.tar.bz2
Add test case for bug #1017553
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r--Lib/test/test_tarfile.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 6615602..6b2fd6e 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,