-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify test suites' module exclusion logic (#14575)
Individual test suites grew to have distinct approaches for selecting or excluding modules / symbols, with distinct ad-hoc exclude lists. Rather than rely on a common set of rules, test authors have been adding to those distinct lists (having to modify the test suite to support their test case). In this PR, we will consolidate this logic so we could have a common set of rules: - The "tested corpus" is what's asserted on. Everything else has a supporting role but does not contribute to what's being asserted on. - The "tested corpus" is - the `__main__` module - the `tested_modules`: modules provided through `[file ...]`, `[outfile ...]` or `[outfile-re ...]` - It follows that library code, whether imported from lib-stub/ or provided through `[builtins ...]` or `[typing ...]` will not be part of the "tested corpus". - At times we want `[file ...]` to also only have a supporting role and not be part of the tested corpus. In tests we used to have conventions like excluding modules starting with `_`. Instead, we'd have an explicit `[fixture ...]` block that just like `[file ...]` except it doesn't participate in the "tested corpus".
- Loading branch information
Showing
19 changed files
with
173 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.