Skip to content

Commit

Permalink
[red-knot] Removed local-inference test
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp committed Jan 23, 2025
1 parent c6a2776 commit 82313c9
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions crates/red_knot_python_semantic/src/types/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6008,7 +6008,6 @@ mod tests {
use crate::semantic_index::symbol::FileScopeId;
use crate::semantic_index::{global_scope, semantic_index, symbol_table, use_def_map};
use crate::types::check_types;
use crate::{HasType, SemanticModel};
use ruff_db::files::{system_path_to_file, File};
use ruff_db::system::DbWithTestSystem;
use ruff_db::testing::assert_function_query_was_not_run;
Expand Down Expand Up @@ -6229,25 +6228,6 @@ mod tests {
Ok(())
}

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

db.write_file("/src/a.py", "x = 10")?;
let a = system_path_to_file(&db, "/src/a.py").unwrap();

let parsed = parsed_module(&db, a);

let statement = parsed.suite().first().unwrap().as_assign_stmt().unwrap();
let model = SemanticModel::new(&db, a);

let literal_ty = statement.value.inferred_type(&model);

assert_eq!(format!("{}", literal_ty.display(&db)), "Literal[10]");

Ok(())
}

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

0 comments on commit 82313c9

Please sign in to comment.