8000 ENH now can run the tests on test_backend_pgf by calling a python scr… · matplotlib/matplotlib@5db0cce · GitHub
[go: up one dir, main page]

Skip to content 10000

Commit 5db0cce

Browse files
committed
ENH now can run the tests on test_backend_pgf by calling a python script on it
1 parent 0a0ac8c commit 5db0cce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
baseline_dir, result_dir = _image_directories(lambda: 'dummy func')
1515

16+
1617
def check_for(texsystem):
1718
header = r"""
1819
\documentclass{minimal}
@@ -32,6 +33,7 @@ def check_for(texsystem):
3233

3334
return latex.returncode == 0
3435

36+
3537
def switch_backend(backend):
3638

3739
def switch_backend_decorator(func):
@@ -48,6 +50,7 @@ def backend_switcher(*args, **kwargs):
4850
return nose.tools.make_decorator(func)(backend_switcher)
4951
return switch_backend_decorator
5052

53+
5154
def compare_figure(fname):
5255
actual = os.path.join(result_dir, fname)
5356
plt.savefig(actual)
@@ -126,3 +129,7 @@ def test_rcupdate():
126129
mpl.rcParams.update(rc_set)
127130
create_figure()
128131
compare_figure('pgf_rcupdate%d.pdf' % (i+1))
132+
133+
if __name__ == '__main__':
134+
import nose
135+
nose.runmodule(argv=['-s','--with-doctest'], exit=False)

0 commit comments

Comments
 (0)
0