summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] gh-107262: Update Tkinter tests for Tcl/Tk 8.6.14 (GH-119322) (#130275)Miss Islington (bot)2025-02-192-9/+22
| | | | | | Co-authored-by: James De Bias <81095953+DBJim@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* bpo-45979: Fix Tkinter tests with old Tk (>= 8.5.12) (GH-31938)Miss Islington (bot)2022-03-172-3/+5
| | | | | (cherry picked from commit dbbe4d2d0075fa0e95b069fb4780d79aae3514c7) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185)Miss Islington (bot)2021-12-261-2/+9
| | | | | (cherry picked from commit 2e3e0d23adca8d83722d939d6abd1e467d7578f7) Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
* bpo-27313: Use non-deprecated methods for tracing (GH-29425) (GH-29451)Miss Islington (bot)2021-11-061-5/+5
| | | | | (cherry picked from commit cc1cbcbb2d75cacc31ff3359d83043bc7bd5a89d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416) ↵Miss Islington (bot)2021-11-051-1/+4
| | | | | | | (GH-29420) (cherry picked from commit 54d1e3f72ed1ad8e860888c30ee7a285b931c0d1) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS ↵Miss Islington (bot)2021-11-051-46/+20
| | | | | | | (GH-29411) (GH-29423) (cherry picked from commit e52f9bee802aa7a7fbd405dcc43bc2d1bea884d9) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45160: Ttk optionmenu only set variable once (GH-28291) (GH-29132)Miss Islington (bot)2021-10-211-0/+13
| | | | | (cherry picked from commit add46f84769a7e6fafa50954f79b7c248231fa4e) Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
* Cleanup a couple of comments left on PR 28775 post-merge. (GH-29079)Miss Islington (bot)2021-10-201-1/+1
| | | | | (cherry picked from commit 1dfac27dffbe771f9d88bd1726f7362ce0341437) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) (GH-29081)Miss Islington (bot)2021-10-202-5/+11
| | | | | | | | | | Since v8.6.11, a few configuration options seem to accept an empty value where they did not previously; particularly the `type` of a `Menu` widget, and the `compound` of any ttk widget with a label. Providing an explicit expected error message to `checkEnumParam` bypasses the check of an empty value, which no longer raises `TclError`. (cherry picked from commit 4fe454c6f54b0948af67b53af6c2f35af6377e69) Co-authored-by: Zachary Ware <zach@python.org>
* [3.9] bpo-45229: Make tkinter tests discoverable (GH-28637) (GH-28929)Łukasz Langa2021-10-1313-568/+17
| | | | | (cherry picked from commit f59ed3c310a7ceebf2a56a84ea969a7f75d95b64) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] Fix typos in the Lib directory (GH-28775) (GH-28803)Christian Clauss2021-10-071-1/+1
| | | | | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be) Automerge-Triggered-By: GH:JulienPalard
* [3.9] bpo-25130: Add calls of gc.collect() in tests to support PyPy ↵Serhiy Storchaka2021-08-294-2/+17
| | | | | | (GH-28005). (GH-28028) (cherry picked from commit 2a8127cafe1d196f858a3ecabf5f1df3eebf9a12)
* [3.9] bpo-33289: Return RGB triplet of ints instead of floats from ↵Serhiy Storchaka2021-01-252-0/+63
| | | | | | | | tkinter.colorchooser (GH-6578). (GH-24318) (cherry picked from commit 6713e869c4989c04318158b406c30a147ea52904) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)Miss Islington (bot)2020-12-292-3/+20
| | | | | | | Objects which belong to different Tcl interpreters are now always different, even if they have the same name. (cherry picked from commit 1df56bc0597a051c13d53514e120e9b6764185f8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Rename Tkinter tests for widget options (GH-23944)Miss Islington (bot)2020-12-253-210/+212
| | | | | | | Every test for widget option starts now with "test_configure_" to distinguish it from tests for widget commands. (cherry picked from commit c1ae21c965cb4d0566df2095e4bcb274d0bd9353) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] bpo-42630: Improve error reporting in Tkinter for absent default root ↵Serhiy Storchaka2020-12-199-28/+257
| | | | | | | | | | | | | | | (GH-23781) (GH-23853) * Tkinter functions and constructors which need a default root window raise now RuntimeError with descriptive message instead of obscure AttributeError or NameError if it is not created yet or cannot be created automatically. * Add tests for all functions which use default root window. * Fix import in the pynche script. (cherry picked from commit 3d569fd6dccf9f582bafaca04d3535094cae393e)
* bpo-19733: Re-enable tests for -image option in Tkinter (GH-23785)Miss Islington (bot)2020-12-162-6/+0
| | | | | (cherry picked from commit 5f0fe8ec70120f4586d08978b0911b436f82c421) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42328: Skip some tests with themes vista and xpnative on Windows 7 ↵Miss Islington (bot)2020-12-031-0/+9
| | | | | | | (GH-23612) (cherry picked from commit f3c3ea91a76526edff928c95b9c6767e077b7448) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42370: Check element before making mouse click in ttk tests (GH-23491)Miss Islington (bot)2020-11-301-3/+11
| | | | | (cherry picked from commit b0b428510cfd604a8eef1f245f039331e671ea4a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42142: Try to fix timeouts in ttk tests (GH-23474)Miss Islington (bot)2020-11-302-19/+7
| | | | | | | Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop use update() which should proceed all queued events. (cherry picked from commit 6cc2c419f6cf5ed336609ba01055e77d7c553e6d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300)Miss Islington (bot)2020-11-232-9/+88
| | | | | | | | | The function accepts now the representation of the default state as empty sequence (as returned by Style.map()). The structure of the result is now the same on all platform and does not depend on the value of wantobjects. (cherry picked from commit dd844a2916fb3a8f481ec7c732802c13c3375691) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354) (GH-22617)Miss Skeleton (bot)2020-10-091-0/+48
| | | | | (cherry picked from commit f25323a307a72c40862c87c2df822f83be6645da) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41306: Allow scale value to not be rounded (GH-21715)Miss Skeleton (bot)2020-10-081-1/+2
| | | | | | | | | | 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.cGH-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 (cherry picked from commit aecf036738a404371303e770f4ce4fd9f7d43de7) Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
* bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)Miss Islington (bot)2020-07-271-0/+4
| | | | | | | ... when an unknown option is passed. TypeError was being raised because a 2to3 fix was missing. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit f1d40f941a6483b1d4ea10f1051ace7b426fb8e7) Co-authored-by: Akuli <akuviljanen17@gmail.com>
* bpo-39152: add missing ttk.Scale.configure return value (GH-17815)Terry Jan Reedy2020-01-051-9/+4
| | | | tkinter.ttk.Scale().configure([name]) now returns a configuration tuple for name or a list thereof for all options. Based on patch Giovanni Lombardo.
* bpo-13153: Use OS native encoding for converting between Python and Tcl. ↵Serhiy Storchaka2019-10-042-10/+25
| | | | | | | | | | | | | (GH-16545) On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the "surrogatepass" error handler for converting to/from Tcl Unicode objects. On Linux use UTF-8 with the "surrogateescape" error handler for converting to/from Tcl String objects. Converting strings from Tcl to Python and back now never fails (except MemoryError).
* bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)Serhiy Storchaka2019-08-082-4/+12
| | | | They now return NotImplemented for unsupported type of the other operand.
* bpo-29446: tkinter 'import *' only imports what it should (GH-14864)Flavian Hautbois2019-07-261-0/+14
| | | | Add __all__ to tkinter.__init__ and submodules. Replace 'import *' with explicit imports in some submodules.
* bpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406)Zackery Spytz2019-04-051-0/+9
|
* bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk ↵Ned Deily2019-02-241-1/+6
| | | | (GH-12011)
* Fix yet one error in checking Tcl version. (GH-10189)Serhiy Storchaka2018-10-281-1/+1
|
* Fix checking for bugfix Tcl version. (GH-10185)Serhiy Storchaka2018-10-281-1/+1
|
* bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760)Juliette Monsel2018-10-181-1/+8
|
* bpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768)Juliette Monsel2018-10-121-0/+23
|
* bpo-34829: Add missing selection_ methods to the Tkinter Spinbox. (GH-9617)Juliette Monsel2018-10-081-0/+50
| | | | | Implement the methods selection_from(), selection_range(), selection_present() and selection_to() for Tkinter Spinbox.
* bpo-34189: Fix checking for bugfix Tcl version. (GH-8397)Serhiy Storchaka2018-07-222-4/+14
|
* bpo-34189: Add simple tests for new Tk widget options. (GH-8396)Serhiy Storchaka2018-07-221-2/+25
|
* bpo-33096: Fix ttk.Treeview.insert. (GH-6228)Garvit Khatri2018-03-261-0/+9
| | | | | Allow ttk.Treeview.insert to insert iid that has a false boolean value. Note iid=0 and iid=False would be same.
* bpo-32857: Raise error when tkinter after_cancel() is called with None. ↵Cheryl Sabella2018-03-041-0/+108
| | | | (GH-5701)
* bpo-32585: Add tkinter.ttk.Spinbox. (#5221)Alan D Moore2018-02-091-1/+178
|
* [3.8] bpo-31508: Remove support of arguments in ↵Serhiy Storchaka2018-02-011-21/+0
| | | | | | tkinter.ttk.Treeview.selection. (GH-3651) It was deprecated in 3.6.
* bpo-32297: Few misspellings found in Python source code comments. (#4803)Mike2017-12-141-2/+2
| | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py
* bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (#3667)Serhiy Storchaka2017-09-241-1/+1
| | | | | Defer removing old behavior to 3.8. Document new feature of selection_set() and friends.
* bpo-25684: ttk.OptionMenu radiobuttons weren't unique (#2276)csabella2017-07-311-0/+25
| | | between instances of OptionMenu.
* bpo-30310: Add a test for non-ascii font family. (#1567) (#1832)Serhiy Storchaka2017-05-271-1/+11
|
* Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale causedSerhiy Storchaka2016-10-302-7/+15
|\ | | | | | | | | by representing the scale as float value internally in Tk. tkinter.IntVar now works if float value is set to underlying Tk variable.
| * Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale causedSerhiy Storchaka2016-10-302-7/+15
| | | | | | | | | | by representing the scale as float value internally in Tk. tkinter.IntVar now works if float value is set to underlying Tk variable.
* | Issue #22115: Updated Misc/NEWS.Serhiy Storchaka2016-06-261-2/+2
|\ \ | |/
| * Issue #22115: Fixed tracing Tkinter variables:Serhiy Storchaka2016-06-261-1/+50
| | | | | | | | | | | | * tracing in the "u" mode now works * trace_vdelete() with wrong mode no longer break tracing * trace_vinfo() now always returns a list of pairs of strings
* | Issue #22115: Added methods trace_add, trace_remove and trace_info in theSerhiy Storchaka2016-06-261-1/+100
| | | | | | | | | | | | tkinter.Variable class. They replace old methods trace_variable, trace, trace_vdelete and trace_vinfo that use obsolete Tcl commands and might not work in future versions of Tcl.