Merge pull request #3486 from dotCooCoo/fix/tests-data-set-export-fails-on-a-stale-folder

Tests: the data set export test fails when its folder cannot be emptied (#3389)
This commit is contained in:
BFlat
2026-10-22 06:22:14 +07:00
committed by GitHub
+3 -1
View File
@@ -229,7 +229,9 @@ fn variables_panel_data_sets_ask_off_the_ui_thread() {
let (mut app, shown, _) = app();
app.run("file.new", json!({"width": 100, "height": 80})).unwrap();
let dir = vectorcraft_testkit::temp_dir("picks-data-sets");
let _ = std::fs::remove_dir_all(&dir);
if let Err(e) = std::fs::remove_dir_all(&dir) {
assert_eq!(e.kind(), std::io::ErrorKind::NotFound, "cannot empty {}: {e}", dir.display());
}
std::fs::create_dir_all(&dir).unwrap();
let (csv, out) = (dir.join("sets.csv"), dir.join("out.csv"));
std::fs::write(&csv, "name,Name\nB,y\n").unwrap();