GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.12] gh-60283: Check for redefined test names in CI (GH-109161) by miss-islington · Pull Request #109365 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 13, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

(cherry picked from commit 3cb9a8e)

Co-authored-by: Hugo van Kemenade [email protected]
Co-authored-by: Alex Waygood [email protected]
Co-authored-by: Adam Turner [email protected]

  • Issue: list duplicate test names with patchcheck #60283

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk @AlexWaygood
@AA-Turner @miss-islington
pythongh-60283: Check for redefined test names in CI (pythonGH-109161)
50edeff
(cherry picked from commit 3cb9a8e)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
@miss-islington
miss-islington requested review from AlexWaygood, ezio-melotti and hugovk as code owners September 13, 2023 05:30
@bedevere-app bedevere-app Bot added the awaiting review label Sep 13, 2023
This was referenced Sep 13, 2023
list duplicate test names with patchcheck #60283
Closed
gh-60283: Check for redefined test names in CI #109161
Merged
@bedevere-app bedevere-app Bot added the skip news label Sep 13, 2023
@hugovk
Update exclude list for 3.12
87b5a36
AlexWaygood
AlexWaygood approved these changes Sep 13, 2023
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Sep 13, 2023
hugovk added 2 commits September 13, 2023 11:45
@hugovk
Explicitly exclude files which failed to lint/parse
1a123e2
@hugovk
Sort to avoid future merge conflicts
057c060
@Yhg1s

Yhg1s commented Sep 13, 2023

Copy link
Copy Markdown
Member

The PR description doesn't seem accurate. Is this really a good idea for 3.12 (3.12.0 rc3 or 3.12.1)? Do we have a good handle on potential fallout from adding this workflow? Is the benefit of running on 3.12 worth the potential disruption?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood

AlexWaygood commented Sep 13, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

My opinion: I don't think it's crucial at all that this gets into 3.12.0; I'd certainly be fine with it being delayed until 3.12.1. However, I don't see it as a particularly risky change, so I also don't think there'd be any harm in it going into 3.12.0.

What this PR does

It adds a workflow that runs ruff in CI on Lib/test/. Only a single ruff rule is enabled, F811. The rule flags names that appear to be redefined before being used in the same scope. In my experience, the number of false positives from F811 is very low, so I think there's very low risk of disruption.

Why adding this CI check is useful

This is useful for CPython, in that it means that the rule detects unittest.TestCase subclasses where two or more test methods have the same name. This is an issue that's cropped up repeatedly for CPython, where we don't realise that tests are being silently skipped, because they're being overridden before they're ever being run.

Why I think it's good to backport this PR to 3.12 (but not necessarily 3.12.0)

We've had lots of situations in the past where core developers have been pretty confused due to CI setups being subtly different between the main branch and the various bugfix branches. Where possible, and where it's low-risk to do so, I think it's generally useful to keep the branches in sync on this kind of thing.

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Yhg1s
Yhg1s merged commit 36d6ba0 into python:3.12 Sep 14, 2023
@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 14, 2023
@miss-islington
miss-islington deleted the backport-3cb9a8e-3.12 branch September 14, 2023 22:39
@AlexWaygood AlexWaygood mentioned this pull request Sep 23, 2024
[3.13] Bump Ruff to 0.6.7 (#124384) #124389
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AlexWaygood AlexWaygood AlexWaygood approved these changes
@hugovk hugovk Awaiting requested review from hugovk hugovk is a code owner
@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti ezio-melotti is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@miss-islington @Yhg1s @AlexWaygood @hugovk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.