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.

classification
Title: tkinter test_variables fails with OS X Aqua Tk 8.4
Type: Stage: resolved
Components: Tests, Tkinter Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, lac, loewis, ned.deily, python-dev, serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2012-08-09 04:33 by ned.deily, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg167759 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-08-09 04:33
======================================================================
FAIL: test_get (tkinter.test.test_tkinter.test_variables.TestStringVar)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/tkinter/test/test_tkinter/test_variables.py", line 85, in test_get
    self.assertEqual("1", v.get())
AssertionError: '1' != 'True'
- 1
+ True

The OS X 32-bit installers for OS X 10.5+ link with Tcl/Tk 8.4 as that was the only version supplied by Apple for 10.5.  The test passes when linked with the Aqua Tcl/Tk 8.5 available in OS X 10.6+ and used with the 64-/32-bit OS X installers.
msg167763 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-08-09 06:50
The purpose of the test is to test whether get works on a string variable. Any boolean/string conversions aren't really relevant here, so we should just use a second string in the test (e.g. "def"), instead of True.
msg167811 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-08-09 18:51
New changeset 20a46c73855f by Andrew Svetlov in branch 'default':
Issue #15601: fix tkinter test_variables failure with OS X Aqua Tk 8.4
http://hg.python.org/cpython/rev/20a46c73855f
msg167812 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-08-09 18:52
Agree with Martin. Fixed.
Thanks.
msg248497 - (view) Author: Laura Creighton (lac) Date: 2015-08-13 05:09
Terry Reedy asked me to add this here.  Either this bug is not fixed, or I am getting a new one.

I have tried this on several debian unstable releases.

lac at smartwheels:~$ lsb_release -a
 LSB Version:	core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch
 Distributor ID:	Debian
 Description:		Debian GNU/Linux unstable (sid)
 Release:		unstable
 Codename:		sid

Idle shows my tk version as 8.6.4
python3 -m test -ugui -v test_tk gives 3 failures

= CPython 3.4.3+ (default, Jul 28 2015, 13:17:50) [GCC 4.9.3]
==   Linux-3.16.0-4-amd64-x86_64-with-debian-stretch-sid little-endian
==   hash algorithm: siphash24 64bit
==   /tmp/test_python_7974
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)

test_default (tkinter.test.test_tkinter.test_variables.TestBooleanVar) ... FAIL
test_get (tkinter.test.test_tkinter.test_variables.TestBooleanVar) ... FAIL
test_set (tkinter.test.test_tkinter.test_variables.TestBooleanVar) ... FAIL

======================================================================
FAIL: test_default (tkinter.test.test_tkinter.test_variables.TestBooleanVar)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_variables.py", line 163, in test_default
      self.assertIs(v.get(), False)
      AssertionError: 0 is not False

======================================================================
FAIL: test_get (tkinter.test.test_tkinter.test_variables.TestBooleanVar)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_variables.py", line 167, in test_get
      self.assertIs(v.get(), True)
      AssertionError: 1 is not True

======================================================================
FAIL: test_set (tkinter.test.test_tkinter.test_variables.TestBooleanVar)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.4/tkinter/test/test_tkinter/test_variables.py", line 186, in test_set
      self.assertEqual(self.root.globalgetvar("name"), true)
      AssertionError: 42 != 1

----------------------------------------------------------------------
Ran 660 tests in 3.901s

FAILED (failures=3)
1 test failed:
    test_tk
msg248514 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-08-13 11:53
Andrew (and others): I wasn't sure whether to reopen this or start a new issue.  Will re-close this and open new if preferable.
msg248528 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-08-13 16:39
Please open a new issue Laura.
History
Date User Action Args
2022-04-11 14:57:34adminsetgithub: 59806
2015-08-13 16:39:04serhiy.storchakasetstatus: open -> closed
nosy: + serhiy.storchaka
messages: + msg248528

2015-08-13 11:53:26terry.reedysetstatus: closed -> open
nosy: + terry.reedy
messages: + msg248514

2015-08-13 05:09:18lacsetnosy: + lac
messages: + msg248497
2012-08-09 18:52:31asvetlovsetstatus: open -> closed
resolution: fixed
messages: + msg167812

stage: needs patch -> resolved
2012-08-09 18:51:41python-devsetnosy: + python-dev
messages: + msg167811
2012-08-09 06:50:36loewissetnosy: + loewis
messages: + msg167763
2012-08-09 04:33:52ned.deilycreate