You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_tk test_widgets.ScaleTest fails with Tk 8.6.10 #85478
Traceback (most recent call last):
File "/usr/lib/python3.8/tkinter/test/test_tkinter/test_widgets.py", line 939, in test_fromself.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=float_round)
File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 106, in checkFloatParamself.checkParam(widget, name, value, conv=conv, **kwargs)
File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 64, in checkParamself.assertEqual2(widget.cget(name), expected, eq=eq)
File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 47, in assertEqual2self.assertEqual(actual, expected, msg)
AssertionError: 14.9 != 15.0
It's the only failure in the current Python 3.8.4 release's test suite here. Also adding Python 3.9 and 3.10 as I am able to reproduce it on master too.
I can reproduce that test failure with Tk 8.6.10 on macOS, along with a few others. I believe various small things have changed in Tk somewhere between 8.6.8 and 8.6.10 in ways that affect some of the Python Tk gui tests, like test_tk and test_ttk_guionly. Some of our tests are pretty brittle with regard to Tk behavior; they captured how a particular version of Tk worked without necessarily a guarantee on the Tk side that the observed behavior wouldn't change. Someone needs to go through and make the tests work with all recent versions of Tk 8.6.x and someone should also get at least some buildbots running with 8.6.10 and really running the gui tests.
This issue should be fixed for upcoming releases. Nosying Łukasz for consideration of "release blocker" status.
E-Paine commented on Aug 3, 2020
E-Painemannequin
Mannequin
More actions
+1 this issue. I have encountered this problem lots when testing patches and almost always just end up deleting the test_from method to get test_tk to pass. I am not sure of a solution, though, as we *need* to keep test compatibility with Tk 8.6.8 while (preferably) being able to recognise when the value is wrong for the given version. I hope to take a more in-depth look at the problem and possible solutions (I want to avoid, if possible, either checking the Tk version or allowing both 14.9 & 15.0 values to pass the test).
Activity
felixonmars commentedon Jul 15, 2020
test_from (tkinter.test.test_tkinter.test_widgets.ScaleTest) is currently failing on Arch Linux, and at least another place: https://python-build-standalone.readthedocs.io/en/latest/status.html
The error looks like:
======================================================================
FAIL: test_from (tkinter.test.test_tkinter.test_widgets.ScaleTest)
----------------------------------------------------------------------
It's the only failure in the current Python 3.8.4 release's test suite here. Also adding Python 3.9 and 3.10 as I am able to reproduce it on master too.
ned-deily commentedon Jul 16, 2020
What version of Tk is being used? It's in the output from:
python3 -m test.pythoninfo
or however you invoke python.
felixonmars commentedon Jul 16, 2020
tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.10
It's always reproducible in either a real desktop or Xvfb with arbitrary resolution etc as far as I have tested.
ned-deily commentedon Jul 16, 2020
I can reproduce that test failure with Tk 8.6.10 on macOS, along with a few others. I believe various small things have changed in Tk somewhere between 8.6.8 and 8.6.10 in ways that affect some of the Python Tk gui tests, like test_tk and test_ttk_guionly. Some of our tests are pretty brittle with regard to Tk behavior; they captured how a particular version of Tk worked without necessarily a guarantee on the Tk side that the observed behavior wouldn't change. Someone needs to go through and make the tests work with all recent versions of Tk 8.6.x and someone should also get at least some buildbots running with 8.6.10 and really running the gui tests.
[-]test_tk failure on Arch Linux[/-][+]test_tk test_widgets.ScaleTest fails with Tk 8.6.10[/+][-]test_tk failure on Arch Linux[/-][+]test_tk test_widgets.ScaleTest fails with Tk 8.6.10[/+]ned-deily commentedon Jul 28, 2020
This issue should be fixed for upcoming releases. Nosying Łukasz for consideration of "release blocker" status.
E-Paine commentedon Aug 3, 2020
+1 this issue. I have encountered this problem lots when testing patches and almost always just end up deleting the test_from method to get test_tk to pass. I am not sure of a solution, though, as we *need* to keep test compatibility with Tk 8.6.8 while (preferably) being able to recognise when the value is wrong for the given version. I hope to take a more in-depth look at the problem and possible solutions (I want to avoid, if possible, either checking the Tk version or allowing both 14.9 & 15.0 values to pass the test).
E-Paine commentedon Aug 3, 2020
For reference, I have opened https://core.tcl-lang.org/tk/tktview?name=81c3ef93148d17ff280d9a0b4c4edfce453b972f to report this to the Tk team and ask if this change in behaviour is intended.
terryjreedy commentedon Sep 25, 2020
Fixing this test bug is required to upgrade tk on Windows. bpo-39107 and PR 22405.
E. Paine reported on the PR 21715 that this change is intentional and here to stay. I wondered the same; thank you for asking.
miss-islington commentedon Oct 8, 2020
New changeset aecf036 by E-Paine in branch 'master':
bpo-41306: Allow scale value to not be rounded (GH-21715)
aecf036
miss-islington commentedon Oct 8, 2020
New changeset 3d103e0 by Miss Skeleton (bot) in branch '3.8':
bpo-41306: Allow scale value to not be rounded (GH-21715)
3d103e0
miss-islington commentedon Oct 8, 2020
New changeset 15e091f by Miss Skeleton (bot) in branch '3.9':
bpo-41306: Allow scale value to not be rounded (GH-21715)
15e091f