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

Function default_root_python_folder

crates/ty/tests/cli/python_environment.rs:2111–2136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2109
2110#[test]
2111fn default_root_python_folder() -> anyhow::Result<()> {
2112 let case = CliTest::with_files([
2113 ("src/foo.py", "foo = 10"),
2114 ("python/bar.py", "bar = 20"),
2115 (
2116 "python/test_bar.py",
2117 r#"
2118 from foo import foo
2119 from bar import bar
2120
2121 print(f"{foo} {bar}")
2122 "#,
2123 ),
2124 ])?;
2125
2126 assert_cmd_snapshot!(case.command(), @"
2127 success: true
2128 exit_code: 0
2129 ----- stdout -----
2130 All checks passed!
2131
2132 ----- stderr -----
2133 ");
2134
2135 Ok(())
2136}
2137
2138/// If `python/__init__.py` is present, it is considered a package and `python` is not added to search paths.
2139#[test]

Callers

nothing calls this directly

Calls 2

with_filesFunction · 0.85
OkClass · 0.85

Tested by

no test coverage detected