Skip to content

Commit

Permalink
chore(rust): Replace outdated dev dependency tempdir (#12462)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego authored Nov 15, 2023
1 parent 23c367b commit ae7ed5c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 85 deletions.
111 changes: 31 additions & 80 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/polars-io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ zstd = { workspace = true, optional = true }
home = "0.5.4"

[dev-dependencies]
tempdir = "0.3.7"
tempfile = "3"

[features]
default = ["decompress"]
Expand Down
8 changes: 4 additions & 4 deletions crates/polars-io/src/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,21 @@ mod test {
use std::io::BufReader;
use std::path::PathBuf;

use tempdir::TempDir;
use tempfile;

use crate::ipc::IpcReader;
use crate::prelude::IpcWriterOption;
use crate::SerReader;

let tempdir = TempDir::new("ipc-partition")?;
let tmp_dir = tempfile::tempdir()?;

let df = df!("a" => [1, 1, 2, 3], "b" => [2, 2, 3, 4], "c" => [2, 3, 4, 5]).unwrap();
let by = ["a", "b"];
let rootdir = tempdir.path();
let rootdir = tmp_dir.path().join("ipc-partition");

let option = IpcWriterOption::new();

PartitionedWriter::new(option, rootdir, by).finish(&df)?;
PartitionedWriter::new(option, rootdir.clone(), by).finish(&df)?;

let expected_dfs = [
df!("a" => [1, 1], "b" => [2, 2], "c" => [2, 3])?,
Expand Down

0 comments on commit ae7ed5c

Please sign in to comment.