mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-81325: Support path-like objects with streaming TarFile (#137188)
Some checks failed
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Ubuntu SSL tests with AWS-LC (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
Verify bundled wheels / verify (push) Has been cancelled
Some checks failed
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Sanitizers (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / Ubuntu SSL tests with AWS-LC (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
mypy / Run mypy on Lib/_pyrepl (push) Waiting to run
mypy / Run mypy on Lib/test/libregrtest (push) Waiting to run
mypy / Run mypy on Lib/tomllib (push) Waiting to run
mypy / Run mypy on Tools/build (push) Waiting to run
mypy / Run mypy on Tools/cases_generator (push) Waiting to run
mypy / Run mypy on Tools/clinic (push) Waiting to run
mypy / Run mypy on Tools/jit (push) Waiting to run
mypy / Run mypy on Tools/peg_generator (push) Waiting to run
Verify bundled wheels / verify (push) Has been cancelled
Co-authored-by: Emma Smith <emma@emmatyping.dev>
This commit is contained in:
parent
b266fbc9ec
commit
3ec3d05345
3 changed files with 13 additions and 1 deletions
|
|
@ -1737,6 +1737,16 @@ class StreamWriteTest(WriteTestBase, unittest.TestCase):
|
|||
finally:
|
||||
os.umask(original_umask)
|
||||
|
||||
def test_pathlike_name(self):
|
||||
expected_name = os.path.abspath(tmpname)
|
||||
tarpath = os_helper.FakePath(tmpname)
|
||||
|
||||
for func in (tarfile.open, tarfile.TarFile.open):
|
||||
with self.subTest():
|
||||
with func(tarpath, self.mode) as tar:
|
||||
self.assertEqual(tar.name, expected_name)
|
||||
os_helper.unlink(tmpname)
|
||||
|
||||
|
||||
class GzipStreamWriteTest(GzipTest, StreamWriteTest):
|
||||
def test_source_directory_not_leaked(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue