Skip to content

gh-154007: Improve test coverage for the shlex module#154009

Merged
tomasr8 merged 1 commit into
python:mainfrom
caseneuve:154007-improve-shlex-test-coverage
Jul 22, 2026
Merged

gh-154007: Improve test coverage for the shlex module#154009
tomasr8 merged 1 commit into
python:mainfrom
caseneuve:154007-improve-shlex-test-coverage

Conversation

@caseneuve

@caseneuve caseneuve commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Raises statement coverage of Lib/shlex.py from 67% to 91%.

Intentionally left out:

  • _print_tokens: only reachable via python -m shlex, not public API
  • A few break/continue branches deep in read_token()

Closes #154007.

Comment thread Lib/test/test_shlex.py
Comment thread Lib/test/test_shlex.py Outdated
Comment thread Lib/test/test_shlex.py Outdated
Comment thread Lib/test/test_shlex.py Outdated
Comment thread Lib/test/test_shlex.py Outdated
@caseneuve
caseneuve force-pushed the 154007-improve-shlex-test-coverage branch from 8afc311 to cf4df39 Compare July 19, 2026 11:00
@caseneuve
caseneuve requested a review from tomasr8 July 19, 2026 11:00
@caseneuve
caseneuve force-pushed the 154007-improve-shlex-test-coverage branch 2 times, most recently from 8fa77b3 to 9b33e5c Compare July 19, 2026 11:12
Comment thread Lib/test/test_shlex.py Outdated
@caseneuve
caseneuve force-pushed the 154007-improve-shlex-test-coverage branch from 9b33e5c to f8652d4 Compare July 21, 2026 08:52
@caseneuve
caseneuve requested a review from tomasr8 July 21, 2026 10:19

@tomasr8 tomasr8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @caseneuve!

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Sprint Jul 22, 2026
@tomasr8 tomasr8 added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 22, 2026
@tomasr8
tomasr8 merged commit 0eac28e into python:main Jul 22, 2026
57 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Sprint Jul 22, 2026
@miss-islington-app

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Jul 22, 2026

Copy link
Copy Markdown

GH-154445 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 22, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @caseneuve and @tomasr8, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 0eac28e3637d0ee15f4e8737b5d1a311623e46f9 3.13

@bedevere-app

bedevere-app Bot commented Jul 22, 2026

Copy link
Copy Markdown

GH-154446 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 22, 2026
@tomasr8

tomasr8 commented Jul 22, 2026

Copy link
Copy Markdown
Member

@caseneuve Do you think you could take care of the 3.13 backport? Here's the documentation: https://devguide.python.org/getting-started/git-boot-camp/#branch-merge

@caseneuve

Copy link
Copy Markdown
Contributor Author

@caseneuve Do you think you could take care of the 3.13 backport? Here's the documentation: https://devguide.python.org/getting-started/git-boot-camp/#branch-merge

@tomasr8 Sure, will have a look.

tomasr8 pushed a commit that referenced this pull request Jul 22, 2026
…4009) (#154445)

gh-154007: Improve test coverage for the `shlex` module (GH-154009)
(cherry picked from commit 0eac28e)

Co-authored-by: Piotr Kaznowski <piotr@kazno.dev>
tomasr8 pushed a commit that referenced this pull request Jul 22, 2026
…4009) (#154446)

gh-154007: Improve test coverage for the `shlex` module (GH-154009)
(cherry picked from commit 0eac28e)

Co-authored-by: Piotr Kaznowski <piotr@kazno.dev>
@bedevere-app

bedevere-app Bot commented Jul 22, 2026

Copy link
Copy Markdown

GH-154458 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 22, 2026
ambv pushed a commit that referenced this pull request Jul 22, 2026
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.

Improve test coverage for the shlex module

2 participants