Skip to content

Commit f2c3ddc

Browse files
sharkdpAlexWaygood
andauthored
[red-knot] Move intersection type tests to Markdown (#15396)
## Summary [**Rendered version of the new test suite**](https://github.com/astral-sh/ruff/blob/david/intersection-type-tests/crates/red_knot_python_semantic/resources/mdtest/intersection_types.md) Moves most of our existing intersection-types tests to a dedicated Markdown test suite, extends the test coverage, unifies the notation for these tests, groups tests into a proper structure, and adds some explanations for various simplification strategies. This changeset also: - Adds a new simplification where `~Never` is removed from intersections. - Adds a new simplification where adding `~object` simplifies the whole intersection to `Never` - Avoids unnecessary assignment-checks between inferred and declared type. This was added to this changeset to avoid many false positive errors in this test suite. Resolves the task described in this old comment [here](https://github.com/astral-sh/ruff/pull/13962/files/e01da82a5a0ef6a2af0aa4dc50f898cffadb4a33..e7e432bca2b3f24979da55a9a34ad765aaaae8d1#r1819924085). ## Test Plan Running the new Markdown tests --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
1 parent b861551 commit f2c3ddc

File tree

4 files changed

+888
-620
lines changed

4 files changed

+888
-620
lines changed

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy