Skip to content

Commit

Permalink
undo path change for test
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
  • Loading branch information
andrei-ng committed Jun 25, 2024
1 parent 0770a41 commit e5d03ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions plotly/src/plot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ mod tests {
#[test]
fn test_save_html() {
let plot = create_test_plot();
let dst = PathBuf::from("/tmp/example.html");
let dst = PathBuf::from("example.html");
plot.write_html(&dst);
assert!(dst.exists());
assert!(std::fs::remove_file(&dst).is_ok());
Expand All @@ -656,7 +656,7 @@ mod tests {
#[cfg(feature = "kaleido")]
fn test_save_to_png() {
let plot = create_test_plot();
let dst = PathBuf::from("/tmp/example.png");
let dst = PathBuf::from("example.png");
plot.write_image(&dst, ImageFormat::PNG, 1024, 680, 1.0);
assert!(dst.exists());
assert!(std::fs::remove_file(&dst).is_ok());
Expand All @@ -668,7 +668,7 @@ mod tests {
#[cfg(feature = "kaleido")]
fn test_save_to_jpeg() {
let plot = create_test_plot();
let dst = PathBuf::from("/tmp/example.jpeg");
let dst = PathBuf::from("example.jpeg");
plot.write_image(&dst, ImageFormat::JPEG, 1024, 680, 1.0);
assert!(dst.exists());
assert!(std::fs::remove_file(&dst).is_ok());
Expand All @@ -680,7 +680,7 @@ mod tests {
#[cfg(feature = "kaleido")]
fn test_save_to_svg() {
let plot = create_test_plot();
let dst = PathBuf::from("/tmp/example.svg");
let dst = PathBuf::from("example.svg");
plot.write_image(&dst, ImageFormat::SVG, 1024, 680, 1.0);
assert!(dst.exists());
assert!(std::fs::remove_file(&dst).is_ok());
Expand All @@ -692,7 +692,7 @@ mod tests {
#[cfg(feature = "kaleido")]
fn test_save_to_eps() {
let plot = create_test_plot();
let dst = PathBuf::from("/tmp/example.eps");
let dst = PathBuf::from("example.eps");
plot.write_image(&dst, ImageFormat::EPS, 1024, 680, 1.0);
assert!(dst.exists());
assert!(std::fs::remove_file(&dst).is_ok());
Expand All @@ -704,7 +704,7 @@ mod tests {
#[cfg(feature = "kaleido")]
fn test_save_to_pdf() {
let plot = create_test_plot();
let dst = PathBuf::from("/tmp/example.pdf");
let dst = PathBuf::from("example.pdf");
plot.write_image(&dst, ImageFormat::PDF, 1024, 680, 1.0);
assert!(dst.exists());
assert!(std::fs::remove_file(&dst).is_ok());
Expand All @@ -716,7 +716,7 @@ mod tests {
#[cfg(feature = "kaleido")]
fn test_save_to_webp() {
let plot = create_test_plot();
let dst = PathBuf::from("/tmp/example.webp");
let dst = PathBuf::from("example.webp");
plot.write_image(&dst, ImageFormat::WEBP, 1024, 680, 1.0);
assert!(dst.exists());
assert!(std::fs::remove_file(&dst).is_ok());
Expand Down
12 changes: 6 additions & 6 deletions plotly_kaleido/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ mod tests {
fn test_save_png() {
let test_plot = create_test_plot();
let k = Kaleido::new();
let dst = PathBuf::from("/tmp/example.png");
let dst = PathBuf::from("example.png");
let r = k.save(dst.as_path(), &test_plot, "png", 1200, 900, 4.5);
assert!(r.is_ok());
assert!(std::fs::remove_file(dst.as_path()).is_ok());
Expand All @@ -257,7 +257,7 @@ mod tests {
fn test_save_jpeg() {
let test_plot = create_test_plot();
let k = Kaleido::new();
let dst = PathBuf::from("/tmp/example.jpeg");
let dst = PathBuf::from("example.jpeg");
let r = k.save(dst.as_path(), &test_plot, "jpeg", 1200, 900, 4.5);
assert!(r.is_ok());
assert!(std::fs::remove_file(dst.as_path()).is_ok());
Expand All @@ -269,7 +269,7 @@ mod tests {
fn test_save_webp() {
let test_plot = create_test_plot();
let k = Kaleido::new();
let dst = PathBuf::from("/tmp/example.webp");
let dst = PathBuf::from("example.webp");
let r = k.save(dst.as_path(), &test_plot, "webp", 1200, 900, 4.5);
assert!(r.is_ok());
assert!(std::fs::remove_file(dst.as_path()).is_ok());
Expand All @@ -281,7 +281,7 @@ mod tests {
fn test_save_svg() {
let test_plot = create_test_plot();
let k = Kaleido::new();
let dst = PathBuf::from("/tmp/example.svg");
let dst = PathBuf::from("example.svg");
let r = k.save(dst.as_path(), &test_plot, "svg", 1200, 900, 4.5);
assert!(r.is_ok());
assert!(std::fs::remove_file(dst.as_path()).is_ok());
Expand All @@ -293,7 +293,7 @@ mod tests {
fn test_save_pdf() {
let test_plot = create_test_plot();
let k = Kaleido::new();
let dst = PathBuf::from("/tmp/example.pdf");
let dst = PathBuf::from("example.pdf");
let r = k.save(dst.as_path(), &test_plot, "pdf", 1200, 900, 4.5);
assert!(r.is_ok());
assert!(std::fs::remove_file(dst.as_path()).is_ok());
Expand All @@ -305,7 +305,7 @@ mod tests {
fn test_save_eps() {
let test_plot = create_test_plot();
let k = Kaleido::new();
let dst = PathBuf::from("/tmp/example.eps");
let dst = PathBuf::from("example.eps");
let r = k.save(dst.as_path(), &test_plot, "eps", 1200, 900, 4.5);
assert!(r.is_ok());
assert!(std::fs::remove_file(dst.as_path()).is_ok());
Expand Down

0 comments on commit e5d03ab

Please sign in to comment.