fix: csv_parser tests

This commit is contained in:
Edward Langley
2026-04-02 10:18:01 -07:00
parent edd33d6dee
commit b9da06c55f

View File

@ -79,14 +79,14 @@ fn parse_csv_field(field: &str) -> Value {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use std::fs; use std::{fs, path::PathBuf};
use tempfile::tempdir; 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 dir = tempdir().unwrap();
let path = dir.path().join("test.csv"); let path = dir.path().join("test.csv");
fs::write(&path, content).unwrap(); fs::write(&path, content).unwrap();
(path.to_string_lossy().to_string(), dir) (path, dir)
} }
#[test] #[test]