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

Function test_read_home_with_comments

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

Source from the content-addressed store, hash-verified

140
141 #[test]
142 fn test_read_home_with_comments() {
143 let temp_dir = std::env::temp_dir();
144 let cfg_path = temp_dir.join("test_pyvenv3.cfg");
145
146 let mut file = fs::File::create(&cfg_path).unwrap();
147 writeln!(file, "# This is a comment").unwrap();
148 writeln!(file, "home = D:\\RustPython").unwrap();
149
150 let home = read_home(&cfg_path).unwrap();
151 assert_eq!(home, "D:\\RustPython");
152
153 fs::remove_file(&cfg_path).unwrap();
154 }
155}

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