(self)
| 913 | is_stream = True |
| 914 | |
| 915 | def test_read_through(self): |
| 916 | # Issue #11224: A poorly designed _FileInFile.read() method |
| 917 | # caused seeking errors with stream tar files. |
| 918 | for tarinfo in self.tar: |
| 919 | if not tarinfo.isreg(): |
| 920 | continue |
| 921 | with self.tar.extractfile(tarinfo) as fobj: |
| 922 | while True: |
| 923 | try: |
| 924 | buf = fobj.read(512) |
| 925 | except tarfile.StreamError: |
| 926 | self.fail("simple read-through using " |
| 927 | "TarFile.extractfile() failed") |
| 928 | if not buf: |
| 929 | break |
| 930 | |
| 931 | def test_fileobj_regular_file(self): |
| 932 | tarinfo = self.tar.next() # get "regtype" (can't use getmember) |
nothing calls this directly
no test coverage detected