From 59288c2746d6986ac98a4aab09e3f466fed7efef Mon Sep 17 00:00:00 2001 From: Vindaar Date: Tue, 9 Apr 2024 19:03:29 +0200 Subject: [PATCH] [tests] disable tests expected to fail w/o `threads:on` Nowadays we compile with `--threads:on` by default! --- tests/plotly/test_api.nim | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/plotly/test_api.nim b/tests/plotly/test_api.nim index b8355b9..6be6163 100644 --- a/tests/plotly/test_api.nim +++ b/tests/plotly/test_api.nim @@ -495,20 +495,21 @@ suite "show w/ filename without threads fails compilation": xs: xs, ys: ys) let plt = Plot[float](layout: layout, traces: @[d]) - ## NOTE: the following tests assume the test is compiled without `--threads:on`! - test "Plot - saveImage fails": - check compileFails(plt.saveImage("test.svg")) + when not compileOption("threads"): + ## NOTE: the following tests assume the test is compiled without `--threads:on`! + test "Plot - saveImage fails": + check compileFails(plt.saveImage("test.svg")) - test "PlotJson - saveImage fails": - check compileFails(plt.toPlotJson.saveImage("test.svg")) + test "PlotJson - saveImage fails": + check compileFails(plt.toPlotJson.saveImage("test.svg")) - test "Plot - show w/ filename w/o threads:on fails": - check compileFails(plt.show("test.svg")) + test "Plot - show w/ filename w/o threads:on fails": + check compileFails(plt.show("test.svg")) - test "PlotJson - show w/ filename w/o threads:on fails": - check compileFails(plt.toPlotJson.show("test.svg")) + test "PlotJson - show w/ filename w/o threads:on fails": + check compileFails(plt.toPlotJson.show("test.svg")) - test "Grid - show w/ filename w/o threads:on fails": - var grid = createGrid(1) - grid[0] = plt - check compileFails(grid.show("test.svg")) + test "Grid - show w/ filename w/o threads:on fails": + var grid = createGrid(1) + grid[0] = plt + check compileFails(grid.show("test.svg"))