This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2013-12-25.16:16:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387988182.68.0.509066568991.issue20067@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-12-25 16:16:22serhiy.storchakasetrecipients: + serhiy.storchaka
2013-12-25 16:16:22serhiy.storchakasetmessageid: <1387988182.68.0.509066568991.issue20067@psf.upfronthosting.co.za>
2013-12-25 16:16:22serhiy.storchakalinkissue20067 messages
2013-12-25 16:16:22serhiy.storchakacreate