From 0ce3a2d68d867fb432a61f5b02508f58728ccfb7 Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Sat, 29 Jul 2017 20:19:40 -0700 Subject: [PATCH] Add a pyplot based julia test case --- tests/julia/pyplot/REQUIRE | 1 + tests/julia/pyplot/environment.yml | 3 +++ tests/julia/pyplot/verify | 12 ++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 tests/julia/pyplot/REQUIRE create mode 100644 tests/julia/pyplot/environment.yml create mode 100755 tests/julia/pyplot/verify diff --git a/tests/julia/pyplot/REQUIRE b/tests/julia/pyplot/REQUIRE new file mode 100644 index 00000000..f858f97a --- /dev/null +++ b/tests/julia/pyplot/REQUIRE @@ -0,0 +1 @@ +PyPlot diff --git a/tests/julia/pyplot/environment.yml b/tests/julia/pyplot/environment.yml new file mode 100644 index 00000000..19806b48 --- /dev/null +++ b/tests/julia/pyplot/environment.yml @@ -0,0 +1,3 @@ +dependencies: + - matplotlib + diff --git a/tests/julia/pyplot/verify b/tests/julia/pyplot/verify new file mode 100755 index 00000000..b77bde86 --- /dev/null +++ b/tests/julia/pyplot/verify @@ -0,0 +1,12 @@ +#!/usr/bin/env julia +# We try to plot something, and see if the file saved exists +using PyPlot +x = linspace(0,2*pi,1000); y = sin(3*x + 4*cos(2*x)) +plot(x, y, color="red", linewidth=2.0, linestyle="--") +savefig("graph.png") +if isfile("graph.png") + exit(0) +else + exit(1) +end +