Remove no longer needed work-around for bz2 file object support.
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 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))