mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-02 22:20:50 -06:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user