MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_read_home_no_spaces

Function test_read_home_no_spaces

crates/venvlauncher/src/main.rs:128–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127 #[test]
128 fn test_read_home_no_spaces() {
129 let temp_dir = std::env::temp_dir();
130 let cfg_path = temp_dir.join("test_pyvenv2.cfg");
131
132 let mut file = fs::File::create(&cfg_path).unwrap();
133 writeln!(file, "home=C:\\Python313").unwrap();
134
135 let home = read_home(&cfg_path).unwrap();
136 assert_eq!(home, "C:\\Python313");
137
138 fs::remove_file(&cfg_path).unwrap();
139 }
140
141 #[test]
142 fn test_read_home_with_comments() {

Callers

nothing calls this directly

Calls 5

temp_dirFunction · 0.85
read_homeFunction · 0.85
createFunction · 0.50
joinMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected