fix: csv_parser tests
This commit is contained in:
@ -79,14 +79,14 @@ fn parse_csv_field(field: &str) -> Value {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::fs;
|
||||
use std::{fs, path::PathBuf};
|
||||
use tempfile::tempdir;
|
||||
|
||||
fn create_temp_csv(content: &str) -> (String, tempfile::TempDir) {
|
||||
fn create_temp_csv(content: &str) -> (PathBuf, tempfile::TempDir) {
|
||||
let dir = tempdir().unwrap();
|
||||
let path = dir.path().join("test.csv");
|
||||
fs::write(&path, content).unwrap();
|
||||
(path.to_string_lossy().to_string(), dir)
|
||||
(path, dir)
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user