[Python-modules-commits] [python-mplexporter] 113/135: test for legend

Wolfgang Borgert debacle at moszumanska.debian.org
Tue Sep 23 21:19:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository python-mplexporter.

commit efbea819ef5e9b040801ebb7af07c0e8eb360140
Author: John Eppley <jmeppley at gmail.com>
Date:   Wed Mar 26 14:50:37 2014 -0400

    test for legend
---
 mplexporter/tests/test_basic.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/mplexporter/tests/test_basic.py b/mplexporter/tests/test_basic.py
index 9c90d66..64309f9 100644
--- a/mplexporter/tests/test_basic.py
+++ b/mplexporter/tests/test_basic.py
@@ -178,3 +178,28 @@ def test_legend():
                          closing figure
                          """)
 
+def test_legend_dots():
+    fig, ax = plt.subplots()
+    ax.plot([1,2,3], label='label')
+    ax.plot([2,2,2], 'o', label='dots')
+    ax.legend().set_visible(True)
+    _assert_output_equal(fake_renderer_output(fig, FakeRenderer),
+                         """
+                         opening figure
+                         opening axes
+                         draw path with 3 vertices
+                         draw path with 25 vertices
+                         draw path with 25 vertices
+                         draw path with 25 vertices
+                         opening legend
+                         draw path with 2 vertices
+                         draw text 'label' None
+                         draw path with 25 vertices
+                         draw path with 25 vertices
+                         draw text 'dots' None
+                         draw path with 5 vertices
+                         closing legend
+                         closing axes
+                         closing figure
+                         """)
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-mplexporter.git



More information about the Python-modules-commits mailing list