Skip to content

gh-115961: Improve tests for compressed file-like objects - #115963

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:test-compress-file-attrs
Feb 28, 2024
Merged

gh-115961: Improve tests for compressed file-like objects#115963
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:test-compress-file-attrs

Conversation

@serhiy-storchaka

@serhiy-storchakaserhiy-storchaka commented Feb 26, 2024

Copy link
Copy Markdown
Member
  • Increase coverage for compressed file-like objects initialized with a file name, an open file object, a file object opened by file descriptor, and a file-like object without name and mode attributes (io.BytesIO)
  • Increase coverage for name, fileno(), mode, readable(), writable(), seekable() in different modes and states
  • No longer skip tests with bytes names
  • Test objects implementing the path protocol, not just pathlib.Path.

* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
Comment threadLib/test/test_lzma.py Outdated
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) February 28, 2024 07:26
@serhiy-storchaka
serhiy-storchaka merged commit e72576c into python:mainFeb 28, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 28, 2024
…onGH-115963)
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
(cherry picked from commit e72576c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker e72576c48b8be1e4f22c2f387f9769efa073c5be 3.11

@bedevere-app

Copy link
Copy Markdown

GH-116032 is a backport of this pull request to the 3.12 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.12 only security fixes label Feb 28, 2024
serhiy-storchaka added a commit that referenced this pull request Feb 28, 2024
…115963) (GH-116032)
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
(cherry picked from commit e72576c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
serhiy-storchaka deleted the test-compress-file-attrs branch February 28, 2024 09:01
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Debian root 3.12 has failed when building commit e5e9862.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1102/builds/730) and take a look at the build logs.
  4. Check if the failure is related to this commit (e5e9862) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1102/builds/730

Failed tests:

  • test_socket

Failed subtests:

  • test_idna - test.test_socket.GeneralModuleTests.test_idna

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
File "/root/buildarea/3.12.angelico-debian-amd64/build/Lib/test/test_socket.py", line 1669, in test_idna
socket.gethostbyname(domain)
socket.gaierror: [Errno -2] Name or service not known

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 28, 2024
pythonGH-115963)
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
(cherry picked from commit e72576c)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app

Copy link
Copy Markdown

GH-116039 is a backport of this pull request to the 3.11 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.11 only security fixes label Feb 28, 2024
serhiy-storchaka added a commit that referenced this pull request Feb 28, 2024
…115963) (GH-116039)
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
(cherry picked from commit e72576c)
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
…onGH-115963)
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
…onGH-115963)
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…onGH-115963)
* Increase coverage for compressed file-like objects initialized with a
file name, an open file object, a file object opened by file
descriptor, and a file-like object without name and mode attributes
(io.BytesIO)
* Increase coverage for name, fileno(), mode, readable(), writable(),
seekable() in different modes and states
* No longer skip tests with bytes names
* Test objects implementing the path protocol, not just pathlib.Path.
@serhiy-storchakaserhiy-storchaka removed their assignment Jul 15, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@serhiy-storchaka@bedevere-bot