mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:43 +00:00
[red-knot] Expand test corpus (#14360)
## Summary - Add 383 files from `crates/ruff_python_parser/resources` to the test corpus - Add 1296 files from `crates/ruff_linter/resources` to the test corpus - Use in-memory file system for tests - Improve test isolation by cleaning the test environment between checks - Add a mechanism for "known failures". Mark ~80 files as known failures. - The corpus test is now a lot slower (6 seconds). Note: While `red_knot` as a command line tool can run over all of these files without panicking, we still have a lot of test failures caused by explicitly "pulling" all types. ## Test Plan Run `cargo test -p red_knot_workspace` while making sure that - Introducing code that is known to lead to a panic fails the test - Removing code that is known to lead to a panic from `KNOWN_FAILURES`-files also fails the test
This commit is contained in:
parent
62d650226b
commit
9f3235a37f
5 changed files with 201 additions and 30 deletions
|
@ -491,6 +491,12 @@ impl From<&str> for SystemPathBuf {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<String> for SystemPathBuf {
|
||||
fn from(value: String) -> Self {
|
||||
SystemPathBuf::from_utf8_path_buf(Utf8PathBuf::from(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for SystemPathBuf {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue