Skip to content

Commit 8c3c3e4

Browse files
committed
try macos kaleido
Signed-off-by: Andrei Gherghescu <[email protected]>
1 parent 45c1b05 commit 8c3c3e4

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

plotly/src/plot.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ impl PartialEq for Plot {
585585
mod tests {
586586
use std::path::PathBuf;
587587

588+
use base64::{engine::general_purpose, Engine as _};
588589
use serde_json::{json, to_value};
589590

590591
use super::*;
@@ -748,7 +749,7 @@ mod tests {
748749
assert!(!dst.exists());
749750
}
750751

751-
#[cfg(target_os = "linux")]
752+
// #[cfg(target_os = "linux")]
752753
#[test]
753754
#[cfg(feature = "kaleido")]
754755
fn test_save_to_png() {
@@ -760,7 +761,7 @@ mod tests {
760761
assert!(!dst.exists());
761762
}
762763

763-
#[cfg(target_os = "linux")]
764+
// #[cfg(target_os = "linux")]
764765
#[test]
765766
#[cfg(feature = "kaleido")]
766767
fn test_save_to_jpeg() {
@@ -772,7 +773,7 @@ mod tests {
772773
assert!(!dst.exists());
773774
}
774775

775-
#[cfg(target_os = "linux")]
776+
// #[cfg(target_os = "linux")]
776777
#[test]
777778
#[cfg(feature = "kaleido")]
778779
fn test_save_to_svg() {
@@ -796,7 +797,7 @@ mod tests {
796797
assert!(!dst.exists());
797798
}
798799

799-
#[cfg(target_os = "linux")]
800+
// #[cfg(target_os = "linux")]
800801
#[test]
801802
#[cfg(feature = "kaleido")]
802803
fn test_save_to_pdf() {
@@ -820,12 +821,10 @@ mod tests {
820821
assert!(!dst.exists());
821822
}
822823

823-
#[cfg(target_os = "linux")]
824+
// #[cfg(target_os = "linux")]
824825
#[test]
825826
#[cfg(feature = "kaleido")]
826827
fn test_image_to_base64() {
827-
use base64::engine::general_purpose;
828-
use base64::Engine;
829828
let plot = create_test_plot();
830829

831830
let image_base64 = plot.to_base64(ImageFormat::PNG, 200, 150, 1.0);
@@ -850,7 +849,7 @@ mod tests {
850849
assert!(image_base64.is_empty());
851850
}
852851

853-
#[cfg(target_os = "linux")]
852+
// #[cfg(target_os = "linux")]
854853
#[test]
855854
#[cfg(feature = "kaleido")]
856855
fn test_image_to_svg_string() {

plotly_kaleido/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ mod tests {
297297
}
298298

299299
// This seems to fail unpredictably on MacOs.
300-
#[cfg(target_os = "linux")]
300+
// #[cfg(target_os = "linux")]
301301
#[test]
302302
fn test_save_png() {
303303
let test_plot = create_test_plot();
@@ -309,7 +309,7 @@ mod tests {
309309
}
310310

311311
// This seems to fail unpredictably on MacOs.
312-
#[cfg(target_os = "linux")]
312+
// #[cfg(target_os = "linux")]
313313
#[test]
314314
fn test_save_jpeg() {
315315
let test_plot = create_test_plot();
@@ -321,7 +321,7 @@ mod tests {
321321
}
322322

323323
// This seems to fail unpredictably on MacOs.
324-
#[cfg(target_os = "linux")]
324+
// #[cfg(target_os = "linux")]
325325
#[test]
326326
fn test_save_webp() {
327327
let test_plot = create_test_plot();
@@ -333,7 +333,7 @@ mod tests {
333333
}
334334

335335
// This seems to fail unpredictably on MacOs.
336-
#[cfg(target_os = "linux")]
336+
// #[cfg(target_os = "linux")]
337337
#[test]
338338
fn test_save_svg() {
339339
let test_plot = create_test_plot();
@@ -345,7 +345,7 @@ mod tests {
345345
}
346346

347347
// This seems to fail unpredictably on MacOs.
348-
#[cfg(target_os = "linux")]
348+
// #[cfg(target_os = "linux")]
349349
#[test]
350350
fn test_save_pdf() {
351351
let test_plot = create_test_plot();

0 commit comments

Comments
 (0)