New submission from Serhiy Storchaka: Tkinter variables test fails when wantobjects is false:
====================================================================== ERROR: test_default (__main__.TestVariable) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/tkinter/test/test_tkinter/test_variables.py", line 29, in test_default self.assertEqual("", v.get()) File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 239, in get return self._tk.globalgetvar(self._name) _tkinter.TclError: can't read "PY_VAR0": no such variable ====================================================================== ERROR: test_default (__main__.TestStringVar) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/tkinter/test/test_tkinter/test_variables.py", line 79, in test_default self.assertEqual("", v.get()) File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 291, in get value = self._tk.globalgetvar(self._name) _tkinter.TclError: can't read "PY_VAR2": no such variable ====================================================================== ERROR: test_default (__main__.TestIntVar) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/tkinter/test/test_tkinter/test_variables.py", line 92, in test_default self.assertEqual(0, v.get()) File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 313, in get return getint(self._tk.globalgetvar(self._name)) _tkinter.TclError: can't read "PY_VAR3": no such variable ====================================================================== ERROR: test_default (__main__.TestDoubleVar) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/tkinter/test/test_tkinter/test_variables.py", line 114, in test_default self.assertEqual(0.0, v.get()) File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 332, in get return getdouble(self._tk.globalgetvar(self._name)) _tkinter.TclError: can't read "PY_VAR4": no such variable ====================================================================== ERROR: test_default (__main__.TestBooleanVar) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 352, in get return self._tk.getboolean(self._tk.globalgetvar(self._name)) _tkinter.TclError: can't read "PY_VAR5": no such variable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "Lib/tkinter/test/test_tkinter/test_variables.py", line 141, in test_default self.assertEqual(False, v.get()) File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 354, in get raise ValueError("invalid literal for getboolean()") ValueError: invalid literal for getboolean() ====================================================================== FAIL: test___del__ (__main__.TestVariable) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/tkinter/test/test_tkinter/test_variables.py", line 38, in test___del__ self.assertFalse(self.root.call("info", "exists", "varname")) AssertionError: '0' is not false ====================================================================== FAIL: test_dont_unset_not_existing (__main__.TestVariable) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/tkinter/test/test_tkinter/test_variables.py", line 45, in test_dont_unset_not_existing self.assertFalse(self.root.call("info", "exists", "varname")) AssertionError: '0' is not false ---------------------------------------------------------------------- Here is a patch which fixes tkinter and tests. ---------- assignee: serhiy.storchaka components: Tkinter files: tkinter_variables_wantobjects.patch keywords: patch messages: 206926 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Tkinter variables no works with wantobject is false type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33265/tkinter_variables_wantobjects.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20067> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com