MCPcopy Create free account
hub / github.com/astral-sh/ruff / py_slice_empty_input

Function py_slice_empty_input

crates/ty_python_semantic/src/subscript.rs:333–344  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

331
332 #[test]
333 fn py_slice_empty_input() {
334 let db = setup_db();
335 let input = [];
336
337 assert_eq_slice(&db, &input, None, None, None, &[]);
338 assert_eq_slice(&db, &input, Some(0), None, None, &[]);
339 assert_eq_slice(&db, &input, None, Some(0), None, &[]);
340 assert_eq_slice(&db, &input, Some(0), Some(0), None, &[]);
341 assert_eq_slice(&db, &input, Some(-5), Some(-5), None, &[]);
342 assert_eq_slice(&db, &input, None, None, Some(-1), &[]);
343 assert_eq_slice(&db, &input, None, None, Some(2), &[]);
344 }
345
346 #[test]
347 fn py_slice_single_element_input() {

Callers

nothing calls this directly

Calls 2

setup_dbFunction · 0.85
assert_eq_sliceFunction · 0.85

Tested by

no test coverage detected