Skip to content

Conversation

@p-sawicki
Copy link
Collaborator

If a run- test doesn't define a custom driver.py, the default one looks for functions prefixed test_ and calls them. If the prefix is missing or misspelled, or there is some other issue that causes the test to have no test cases, the test succeeds without running the cases.

To try to prevent this, the default driver will now fail if it doesn't find any test cases. Existing tests are changed to conform to this requirement in this PR.

For most tests that meant simply moving the statements from top level to a function, but some were revealed to have been broken and weren't actually run, for example because [typing fixtures/typing-full.pyi] was at the top of the test instead of at the bottom, which made the test setup code ignore all of the test case.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Nice, it's great to have more confidence that all our tests are actually being run.

@JukkaL JukkaL merged commit 77ce646 into python:master Jul 11, 2025
13 checks passed
@p-sawicki p-sawicki deleted the failure-no-run-tests branch July 11, 2025 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants