-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_tk test_widgets.ScaleTest fails with Tk 8.6.10 #85478
Comments
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: ====================================================================== Traceback (most recent call last):
File "/usr/lib/python3.8/tkinter/test/test_tkinter/test_widgets.py", line 939, in test_from
self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=float_round)
File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 106, in checkFloatParam
self.checkParam(widget, name, value, conv=conv, **kwargs)
File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 64, in checkParam
self.assertEqual2(widget.cget(name), expected, eq=eq)
File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 47, in assertEqual2
self.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. |
What version of Tk is being used? It's in the output from: |
tkinter.TCL_VERSION: 8.6 It's always reproducible in either a real desktop or Xvfb with arbitrary resolution etc as far as I have tested. |
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. |
+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). |
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. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: