You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let file_path = create_test_file(&temp_dir, filename);
1265
1279
let random_string = "random123";
1266
1280
1267
-
let result = arrow_path_to_parquet(path, random_string);
1281
+
let result = arrow_path_to_parquet(&file_path, random_string);
1268
1282
1269
1283
assert!(result.is_none());
1270
1284
}
1271
1285
1272
1286
#[test]
1273
1287
fntest_complex_path(){
1274
-
let path = Path::new("/nested/directory/structure/20200201T1830f8a5fc1edc567d56&key1=value1&key2=value2.date=2020-01-21.hour=10.minute=30.region=us-west.ee529ffc8e76.data.arrows");
1288
+
let temp_dir = TempDir::new().expect("Failed to create temp dir");
1289
+
let nested_dir = temp_dir.path().join("nested/directory/structure");
1290
+
std::fs::create_dir_all(&nested_dir).expect("Failed to create nested directories");
1291
+
1292
+
let filename = "20200201T1830f8a5fc1edc567d56&key1=value1&key2=value2.date=2020-01-21.hour=10.minute=30.region=us-west.ee529ffc8e76.data.arrows";
1293
+
let file_path = nested_dir.join(filename);
1294
+
1295
+
letmut file = File::create(&file_path).expect("Failed to create test file");
1296
+
file.write_all(b"test content")
1297
+
.expect("Failed to write to test file");
1298
+
1275
1299
let random_string = "random456";
1276
1300
1277
-
let result = arrow_path_to_parquet(path, random_string);
1301
+
let result = arrow_path_to_parquet(&file_path, random_string);
0 commit comments