From ad7c57daf95b42326f35b919b824cbc32f9f941d 2009-07-29 09:13:26 From: Fernando Perez Date: 2009-07-29 09:13:26 Subject: [PATCH] Small fixes for wx-dependent tests and include clearcmd. Check that wx.aui can be imported and otherwise exclude modules that use it to avoid errors when loading the test suite. Also, do load clearcmd so that the tests for %clear do work. --- diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 02aa77a..5ea906f 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -50,6 +50,7 @@ def test_for(mod): have_curses = test_for('_curses') have_wx = test_for('wx') +have_wx_aui = test_for('wx.aui') have_zi = test_for('zope.interface') have_twisted = test_for('twisted') have_foolscap = test_for('foolscap') @@ -65,14 +66,15 @@ EXCLUDE = [pjoin('IPython', 'external'), pjoin('IPython_doctest_plugin'), pjoin('IPython', 'Gnuplot'), pjoin('IPython', 'Extensions', 'ipy_'), - pjoin('IPython', 'Extensions', 'clearcmd'), + pjoin('IPython', 'Extensions', 'PhysicalQInput'), pjoin('IPython', 'Extensions', 'PhysicalQInteractive'), + pjoin('IPython', 'Extensions', 'InterpreterPasteInput'), pjoin('IPython', 'Extensions', 'scitedirector'), pjoin('IPython', 'Extensions', 'numeric_formats'), pjoin('IPython', 'testing', 'attic'), pjoin('IPython', 'testing', 'tutils'), pjoin('IPython', 'testing', 'tools'), - pjoin('IPython', 'testing', 'mkdoctests') + pjoin('IPython', 'testing', 'mkdoctests'), ] if not have_wx: @@ -80,6 +82,9 @@ if not have_wx: EXCLUDE.append(pjoin('IPython', 'gui')) EXCLUDE.append(pjoin('IPython', 'frontend', 'wx')) +if not have_wx_aui: + EXCLUDE.append(pjoin('IPython', 'gui', 'wx', 'wxIPython')) + if not have_objc: EXCLUDE.append(pjoin('IPython', 'frontend', 'cocoa')) @@ -258,7 +263,7 @@ def run_iptestall(): t_start = time.time() for name,runner in runners.iteritems(): print '*'*77 - print 'IPython test set:',name + print 'IPython test group:',name res = runner.run() if res: failed[name] = res @@ -269,14 +274,14 @@ def run_iptestall(): # summarize results print print '*'*77 - print 'Ran %s test sets in %.3fs' % (nrunners, t_tests) + print 'Ran %s test groups in %.3fs' % (nrunners, t_tests) print if not failed: print 'OK' else: # If anything went wrong, point out what command to rerun manually to # see the actual errors and individual summary - print 'ERROR - %s out of %s test sets failed.' % (nfail, nrunners) + print 'ERROR - %s out of %s test groups failed.' % (nfail, nrunners) for name in failed: failed_runner = runners[name] print '-'*40 @@ -297,4 +302,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main()