Skip to content

Commit 75063bc

Browse files
author
Lukas Maxeiner
committed
fixed the test
1 parent 6a9763e commit 75063bc

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

test/test_steps.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import matplotlib.pyplot as plt
2-
import numpy as np
1+
from helpers import assert_equality
32

43

54
def plot():
6-
plt.figure()
5+
import matplotlib.pyplot as plt
6+
import numpy as np
7+
8+
fig = plt.figure()
79
x = np.arange(5)
810
y1 = np.array([1, 2, 1, 4, 2])
911
y2 = np.array([1, 2, 1, 4, 2])
@@ -15,10 +17,14 @@ def plot():
1517
plt.step(x, y2, "b--", where="pre")
1618
plt.step(x, y3, "g-.", where="post")
1719
plt.step(x, y4, "y:", where="mid")
18-
plt.plot(x, y5, "c.",)
20+
plt.plot(x, y5, "c.")
1921
plt.legend(["default", "pre", "post", "mid", "default"])
2022

21-
return plt.gcf()
23+
return fig
24+
25+
26+
def test():
27+
assert_equality(plot, __file__[:-3] + "_reference.tex")
2228

2329

2430
if __name__ == "__main__":

0 commit comments

Comments
 (0)