Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 341f62f

Browse files
committed
Move test_units_strings to the regression testing framework.
1 parent 816ae77 commit 341f62f

5 files changed

Lines changed: 289 additions & 11 deletions

File tree

5.56 KB
Binary file not shown.
19.2 KB
Loading
Lines changed: 279 additions & 0 deletions
Loading

lib/matplotlib/tests/test_axes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,16 @@ def test_arc_ellipse():
559559

560560
fig.savefig('arc_ellipse')
561561

562+
@image_comparison(baseline_images=['units_strings'])
563+
def test_units_strings():
564+
# Make sure passing in sequences of strings doesn't cause the unit
565+
# conversion registry to recurse infinitely
566+
Id = ['50', '100', '150', '200', '250']
567+
pout = ['0', '7.4', '11.4', '14.2', '16.3']
568+
fig = plt.figure()
569+
ax = fig.add_subplot(111)
570+
ax.plot(Id, pout)
571+
fig.savefig('units_strings')
562572

563573
if __name__=='__main__':
564574
import nose

0 commit comments

Comments
 (0)