Skip to content

Commit 4d7e487

Browse files
committed
Added an integration test
1 parent c82f906 commit 4d7e487

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,17 @@ jobs:
176176
exit 1
177177
fi
178178
pandoc-plot clean tests/issue30.md
179+
180+
# The idea here is to install some random package (npstreams) to
181+
# check whether the plots will be rendered in the appropriate
182+
# environment
183+
python -m venv ./issue46
184+
./issue46/bin/python -m pip install npstreams matplotlib
185+
pandoc --filter pandoc-plot -i tests/issue46.md -t native
186+
if [ $(ls "plots" | wc -l) != 2 ]; then
187+
exit 1
188+
fi
189+
pandoc-plot clean tests/issue46.md
179190
180191
- name: Build documentation
181192
run: source tools/mkmanual.sh

cabal.project

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
packages: pandoc-plot.cabal
2-
allow-newer: all
1+
packages: pandoc-plot.cabal

pandoc-plot.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ test-suite tests
148148
, containers
149149
, directory
150150
, filepath
151-
, hspec
152151
, hspec-expectations
153152
, pandoc-types >= 1.20 && <= 2
154153
, pandoc-plot

tests/issue46.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
plot-configuration: tests/fixtures/.verbose-config.yml
3+
---
4+
5+
```{.matplotlib executable="./issue46/bin/python"}
6+
import sys
7+
print(f"sys.executable={sys.executable}", file=sys.stderr)
8+
import npstreams
9+
```

0 commit comments

Comments
 (0)