summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorE-Paine <63801254+E-Paine@users.noreply.github.com>2020-10-08 13:30:13 (GMT)
committerGitHub <noreply@github.com>2020-10-08 13:30:13 (GMT)
commitaecf036738a404371303e770f4ce4fd9f7d43de7 (patch)
treeb6dda4aa3061333248da951d71898504a79aa351 /Misc
parent4a9f82f50d957b6cf3fd207de8b583d9137316b8 (diff)
downloadcpython-aecf036738a404371303e770f4ce4fd9f7d43de7.zip
cpython-aecf036738a404371303e770f4ce4fd9f7d43de7.tar.gz
cpython-aecf036738a404371303e770f4ce4fd9f7d43de7.tar.bz2
bpo-41306: Allow scale value to not be rounded (GH-21715)
This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed). Going into more detail for those who want it, the Tk change was made in [commit 591f68c](https://github.com/tcltk/tk/commit/591f68cb382525b72664c6fecaab87742b6cc87a) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](https://github.com/tcltk/tk/blob/591f68cb382525b72664c6fecaab87742b6cc87a/generic/tkScale.c#L623)), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`). Automerge-Triggered-By: @pablogsal
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Tests/2020-08-03-13-44-37.bpo-41306.VDoWXI.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Tests/2020-08-03-13-44-37.bpo-41306.VDoWXI.rst b/Misc/NEWS.d/next/Tests/2020-08-03-13-44-37.bpo-41306.VDoWXI.rst
new file mode 100644
index 0000000..5e9ba2d
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2020-08-03-13-44-37.bpo-41306.VDoWXI.rst
@@ -0,0 +1 @@
+Fixed a failure in ``test_tk.test_widgets.ScaleTest`` happening when executing the test with Tk 8.6.10.