Skip to content

Commit

Permalink
[red-knot] Removed resolve_reference test
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Jan 23, 2025
1 parent 82313c9 commit d09cd2e
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions crates/red_knot_python_semantic/src/types/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6079,29 +6079,6 @@ mod tests {
assert_diagnostic_messages(diagnostics, expected);
}

#[test]
fn resolve_method() -> anyhow::Result<()> {
let mut db = setup_db();

db.write_dedented(
"src/mod.py",
"
class C:
def f(self): pass
",
)?;

let mod_file = system_path_to_file(&db, "src/mod.py").unwrap();
let class_ty = global_symbol(&db, mod_file, "C")
.expect_type()
.expect_class_literal();
let member_ty = class_ty.member(&db, "f").expect_type();
let func = member_ty.expect_function_literal();

assert_eq!(func.name(&db), "f");
Ok(())
}

#[test]
fn not_literal_string() -> anyhow::Result<()> {
let mut db = setup_db();
Expand Down

0 comments on commit d09cd2e

Please sign in to comment.