[3.11] gh-91387: Fix tarfile test on WASI (GH-93984) by ethanfurman · Pull Request #93993 · python/cpython
def test_longname_directory(self): # Test reading a longlink directory. Issue #47231. longdir = ('a' * 101) + '/' with os_helper.temp_cwd(): with tarfile.open(tmpname, 'w') as tar: tar.format = self.format try: os.mkdir(longdir) tar.add(longdir) finally: os.rmdir(longdir.rstrip("/")) with tarfile.open(tmpname) as tar: self.assertIsNotNone(tar.getmember(longdir)) self.assertIsNotNone(tar.getmember(longdir.removesuffix('/')))
class GNUReadTest(LongnameTest, ReadTest, unittest.TestCase):