Skip to content

Commit a6cfaaa

Browse files
committed
fix tests
1 parent 4f9ba35 commit a6cfaaa

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

test/runtests.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@ ENV["MPLBACKEND"]="agg" # no GUI
22

33
using PythonPlot, PythonCall, Test
44

5-
@info("PythonPlot is using Matplotlib $(PythonPlot.version) with Python $(PyCall.pyversion)")
5+
pyversion = pyconvert(String, pyimport("sys").version)
6+
@info("PythonPlot is using Matplotlib $(PythonPlot.version) with Python $pyversion")
67

78
plot(1:5, 2:6, "ro-")
89

9-
line = gca().lines[1]
10-
@test line.get_xdata() == [1:5;]
11-
@test line.get_ydata() == [2:6;]
10+
line = gca().lines[0]
11+
@test PyArray(line.get_xdata()) == 1:5
12+
@test PyArray(line.get_ydata()) == 2:6
1213

1314
fig = gcf()
1415
@test isa(fig, PythonPlot.Figure)
1516
if PythonPlot.version >= v"2"
16-
@test fig.get_size_inches() [6.4, 4.8]
17+
@test PyArray(fig.get_size_inches()) [6.4, 4.8]
1718
else # matplotlib 1.3
18-
@test fig.get_size_inches() [8, 6]
19+
@test PyArray(fig.get_size_inches()) [8, 6]
1920
end
2021

2122
# with Matplotlib 1.3, I get "UserWarning: bbox_inches option for ps backend is not implemented yet"

0 commit comments

Comments
 (0)