We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 278cbb7 commit 4fbde3dCopy full SHA for 4fbde3d
test/test_cleanfigure.py
@@ -405,8 +405,18 @@ def test_scatter(self):
405
ax.scatter(x, y)
406
ax.set_ylim([20, 80])
407
ax.set_xlim([20, 80])
408
- with pytest.warns(Warning):
409
- cleanfigure.clean_figure(fig)
+ raw = get_tikz_code()
+
410
+ cleanfigure.clean_figure()
411
+ clean = get_tikz_code()
412
413
+ # Use number of lines to test if it worked.
414
+ # the baseline (raw) should have 20 points
415
+ # the clean version (clean) should have 2 points
416
+ # the difference in line numbers should therefore be 2
417
+ numLinesRaw = raw.count("\n")
418
+ numLinesClean = clean.count("\n")
419
+ assert numLinesRaw - numLinesClean == 6
420
plt.close("all")
421
422
def test_bar(self):
0 commit comments