From a6ebd33613b9f61d972d1ad3939ff4b8e35a7f45 Mon Sep 17 00:00:00 2001 From: Fernando Perez Date: Mon, 11 Apr 2011 00:22:11 -0700 Subject: [PATCH] Do not generate output for empty figures in Qt console. Before, calling figure() would produce a big blank area. This ensures output is only returned if the figure has content. Also added basic testing for pylabtools, for which we had none. --- IPython/testing/iptest.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index e88781540..bc96126cc 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -101,11 +101,12 @@ def test_for(mod, min_version=None): have = {} have['curses'] = test_for('_curses') +have['matplotlib'] = test_for('matplotlib') +have['pexpect'] = test_for('pexpect') +have['pymongo'] = test_for('pymongo') have['wx'] = test_for('wx') have['wx.aui'] = test_for('wx.aui') -have['pexpect'] = test_for('pexpect') have['zmq'] = test_for('zmq', '2.1.4') -have['pymongo'] = test_for('pymongo') #----------------------------------------------------------------------------- # Functions and classes @@ -191,6 +192,11 @@ def make_exclude(): if not have['pymongo']: exclusions.append(ipjoin('parallel', 'controller', 'mongodb')) + if not have['matplotlib']: + exclusions.extend([ipjoin('lib', 'pylabtools'), + ipjoin('lib', 'pylabtools', + 'tests', 'test_pylabtools')]) + # This is needed for the reg-exp to match on win32 in the ipdoctest plugin. if sys.platform == 'win32': exclusions = [s.replace('\\','\\\\') for s in exclusions]