You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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".
0 commit comments