Skip to content

Commit 1eed6c8

Browse files
committed
Display version information about the toolkit being tested.
svn path=/trunk/matplotlib/; revision=3457
1 parent 77c5b7b commit 1eed6c8

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

unit/memleak_gui.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
for i in range(indEnd+1):
5454

5555
fig = pylab.figure()
56-
#fig.savefig('test') # This seems to just slow down the testing.
56+
fig.savefig('test') # This seems to just slow down the testing.
5757
fig.clf()
5858
pylab.close(fig)
5959
gc.collect()
@@ -75,6 +75,28 @@
7575

7676
if i > indStart:
7777
print '# Backend %(backend)s, toolbar %(toolbar)s' % matplotlib.rcParams
78+
backend = options.backend.lower()
79+
if backend.startswith("gtk"):
80+
import gtk
81+
print "# pygtk version: %s, gtk version: %s" % \
82+
(gtk.pygtk_version, gtk.gtk_version)
83+
elif backend.startswith("qt4"):
84+
import PyQt4.pyqtconfig
85+
print "# PyQt4 version: %s, Qt version %x" % \
86+
(PyQt4.pyqtconfig.Configuration().pyqt_version_str,
87+
PyQt4.pyqtconfig.Configuration().qt_version)
88+
elif backend.startswith("qt"):
89+
import pyqtconfig
90+
print "# pyqt version: %s, qt version: %x" % \
91+
(pyqtconfig.Configuration().pyqt_version_str,
92+
pyqtconfig.Configuration().qt_version)
93+
elif backend.startswith("wx"):
94+
import wx
95+
print "# wxPython version: %s" % wx.__version__
96+
elif backend.startswith("tk"):
97+
import Tkinter
98+
print "# Tkinter version: %s, Tk version: %s, Tcl version: %s" % (Tkinter.__version__, Tkinter.TkVersion, Tkinter.TclVersion)
99+
78100
print '# Averaging over loops %d to %d' % (indStart, indEnd)
79101
print '# Memory went from %dk to %dk' % (start, end)
80102
print '# Average memory consumed per loop: %1.4fk bytes\n' % ((end-start)/float(indEnd-indStart))

0 commit comments

Comments
 (0)