Skip to content

Commit

Permalink
Display version information about the toolkit being tested.
Browse files Browse the repository at this point in the history
svn path=/trunk/matplotlib/; revision=3457
  • Loading branch information
mdboom committed Jul 5, 2007
1 parent 77c5b7b commit 1eed6c8
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion unit/memleak_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
for i in range(indEnd+1):

fig = pylab.figure()
#fig.savefig('test') # This seems to just slow down the testing.
fig.savefig('test') # This seems to just slow down the testing.
fig.clf()
pylab.close(fig)
gc.collect()
Expand All @@ -75,6 +75,28 @@

if i > indStart:
print '# Backend %(backend)s, toolbar %(toolbar)s' % matplotlib.rcParams
backend = options.backend.lower()
if backend.startswith("gtk"):
import gtk
print "# pygtk version: %s, gtk version: %s" % \
(gtk.pygtk_version, gtk.gtk_version)
elif backend.startswith("qt4"):
import PyQt4.pyqtconfig
print "# PyQt4 version: %s, Qt version %x" % \
(PyQt4.pyqtconfig.Configuration().pyqt_version_str,
PyQt4.pyqtconfig.Configuration().qt_version)
elif backend.startswith("qt"):
import pyqtconfig
print "# pyqt version: %s, qt version: %x" % \
(pyqtconfig.Configuration().pyqt_version_str,
pyqtconfig.Configuration().qt_version)
elif backend.startswith("wx"):
import wx
print "# wxPython version: %s" % wx.__version__
elif backend.startswith("tk"):
import Tkinter
print "# Tkinter version: %s, Tk version: %s, Tcl version: %s" % (Tkinter.__version__, Tkinter.TkVersion, Tkinter.TclVersion)

print '# Averaging over loops %d to %d' % (indStart, indEnd)
print '# Memory went from %dk to %dk' % (start, end)
print '# Average memory consumed per loop: %1.4fk bytes\n' % ((end-start)/float(indEnd-indStart))
Expand Down

0 comments on commit 1eed6c8

Please sign in to comment.