Author: Amaury Forgeot d'Arc <amaur...@gmail.com> Branch: py3.3 Changeset: r75147:e761d5274b75 Date: 2014-12-21 12:32 +0100 http://bitbucket.org/pypy/pypy/changeset/e761d5274b75/
Log: test_ttk: Progress diff --git a/lib-python/3/tkinter/test/test_ttk/test_extensions.py b/lib-python/3/tkinter/test/test_ttk/test_extensions.py --- a/lib-python/3/tkinter/test/test_ttk/test_extensions.py +++ b/lib-python/3/tkinter/test/test_ttk/test_extensions.py @@ -2,7 +2,7 @@ import unittest import tkinter from tkinter import ttk -from test.support import requires, run_unittest +from test.support import requires, run_unittest, gc_collect import tkinter.test.support as support @@ -22,6 +22,7 @@ x = ttk.LabeledScale() var = x._variable._name x.destroy() + gc_collect() self.assertRaises(tkinter.TclError, x.tk.globalgetvar, var) # manually created variable @@ -34,6 +35,7 @@ else: self.assertEqual(float(x.tk.globalgetvar(name)), myvar.get()) del myvar + gc_collect() self.assertRaises(tkinter.TclError, x.tk.globalgetvar, name) # checking that the tracing callback is properly removed @@ -173,6 +175,7 @@ def test_resize(self): x = ttk.LabeledScale() x.pack(expand=True, fill='both') + gc_collect() x.wait_visibility() x.update() @@ -209,6 +212,7 @@ optmenu.destroy() self.assertEqual(optmenu.tk.globalgetvar(name), var.get()) del var + gc_collect() self.assertRaises(tkinter.TclError, optmenu.tk.globalgetvar, name) @@ -254,6 +258,7 @@ # check that variable is updated correctly optmenu.pack() + gc_collect() optmenu.wait_visibility() optmenu['menu'].invoke(0) self.assertEqual(optmenu._variable.get(), items[0]) diff --git a/lib_pypy/_tkinter/app.py b/lib_pypy/_tkinter/app.py --- a/lib_pypy/_tkinter/app.py +++ b/lib_pypy/_tkinter/app.py @@ -25,7 +25,7 @@ def varname_converter(input): if isinstance(input, Tcl_Obj): - return input.string + input = input.string if isinstance(input, str): input = input.encode('utf-8') if b'\0' in input: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit