summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tarfile.py
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2011-12-06 12:44:10 (GMT)
committerLars Gustäbel <lars@gustaebel.de>2011-12-06 12:44:10 (GMT)
commitbb44b73e17e505c24160ca6a9bb560d32c53109a (patch)
tree3c865178e84eb7e6998d84e58e23a58abd727ca5 /Lib/test/test_tarfile.py
parent45fb08218069ec5589c8595cc34d111846ce016d (diff)
downloadcpython-bb44b73e17e505c24160ca6a9bb560d32c53109a.zip
cpython-bb44b73e17e505c24160ca6a9bb560d32c53109a.tar.gz
cpython-bb44b73e17e505c24160ca6a9bb560d32c53109a.tar.bz2
Remove no longer needed work-around for bz2 file object support.
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r--Lib/test/test_tarfile.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 8bdef9f..a904e32 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -222,6 +222,9 @@ class CommonReadTest(ReadTest):
class MiscReadTest(CommonReadTest):
def test_no_name_argument(self):
+ if self.mode.endswith("bz2"):
+ # BZ2File has no name attribute.
+ return
with open(self.tarname, "rb") as fobj:
tar = tarfile.open(fileobj=fobj, mode=self.mode)
self.assertEqual(tar.name, os.path.abspath(fobj.name))