Skip to content

Test that ValueError is raised when vfsopen is passed an invalid mode#154008

Merged
tomasr8 merged 4 commits into
python:mainfrom
ravg998:add-invalid-vfsopen-test
Jul 19, 2026
Merged

Test that ValueError is raised when vfsopen is passed an invalid mode#154008
tomasr8 merged 4 commits into
python:mainfrom
ravg998:add-invalid-vfsopen-test

Conversation

@ravg998

@ravg998 ravg998 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Ensures vfsopen called with invalid "mode" argument raises a ValueError with correct initial error message ("invalid mode...")

@ravg998
ravg998 requested a review from barneygale as a code owner July 18, 2026 15:50
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jul 18, 2026
@python-cla-bot

python-cla-bot Bot commented Jul 18, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Jul 18, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Comment thread Lib/test/test_pathlib/test_read.py Outdated
Comment thread Lib/test/test_pathlib/test_read.py Outdated
@tomasr8 tomasr8 changed the title Add ValueError with message test Test that ValueError is raised when vfsopen is passed an invalid mode Jul 18, 2026
Change from double quotes to single quotes.

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
@tomasr8
tomasr8 enabled auto-merge (squash) July 19, 2026 07:38
Comment thread Lib/test/test_pathlib/test_read.py Outdated
@tomasr8
tomasr8 merged commit 9f5af27 into python:main Jul 19, 2026
48 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Sprint Jul 19, 2026
@tomasr8 tomasr8 added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 19, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @ravg998 for the PR, and @tomasr8 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @ravg998 for the PR, and @tomasr8 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 19, 2026

Copy link
Copy Markdown

GH-154064 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 19, 2026
@bedevere-app

bedevere-app Bot commented Jul 19, 2026

Copy link
Copy Markdown

GH-154065 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 19, 2026
tomasr8 added a commit that referenced this pull request Jul 19, 2026
…nvalid mode (GH-154008) (#154064)

Test that `ValueError` is raised when `vfsopen` is passed an invalid mode (GH-154008)

* ValueError with message test

* Remove white space

* Apply suggestions from code review

Change from double quotes to single quotes.



---------
(cherry picked from commit 9f5af27)

Co-authored-by: Rayan <157278782+ravg998@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants