Skip to content

Improve test for random.sample and os.renames - #159657

Open
ste1hi wants to merge 4 commits into
python:mainfrom
ste1hi:my-new-test
Open

ste1hi wants to merge 4 commits into
python:mainfrom
ste1hi:my-new-test

Conversation

@ste1hi

@ste1hi ste1hi commented Oct 18, 2026

Copy link
Copy Markdown

Inprove random.sample test. Add tests for when the items in the list are not integers.
Add test for os.rename function.

@ste1hi
ste1hi requested a review from rhettinger as a code owner October 18, 2026 02:52
@bedevere-app bedevere-app Bot added awaiting review tests Tests in the Lib/test dir labels Oct 18, 2026
@bedevere-app

bedevere-app Bot commented Oct 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.

@picnixz picnixz 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.

I don't think the tests for random are relevant. It's a garbage-in/garbage-out case. For os.renames, it makes sense (and I'm surprised we didn't have a test!)

@python-cla-bot

python-cla-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@ste1hi

ste1hi commented Oct 19, 2026 •

Copy link
Copy Markdown
Author

I removed the test for random.sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants