[red-knot] Cleanup generated names of mdtest tests (#13831)

Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
Aditya Pratap Singh 2024-10-20 20:41:53 +05:30 committed by GitHub
parent 7ca3571194
commit 7fd8e30eed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 81 additions and 87 deletions

View file

@ -5,7 +5,7 @@ use ruff_db::files::system_path_to_file;
use ruff_db::parsed::parsed_module;
use ruff_db::system::{DbWithTestSystem, SystemPathBuf};
use std::collections::BTreeMap;
use std::path::PathBuf;
use std::path::Path;
type Failures = BTreeMap<SystemPathBuf, matcher::FailuresByLine>;
@ -19,7 +19,7 @@ mod parser;
///
/// Panic on test failure, and print failure details.
#[allow(clippy::print_stdout)]
pub fn run(path: &PathBuf, title: &str) {
pub fn run(path: &Path, title: &str) {
let source = std::fs::read_to_string(path).unwrap();
let suite = match test_parser::parse(title, &source) {
Ok(suite) => suite,