summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test/test_tkinter
Commit message (Collapse)AuthorAgeFilesLines
* gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ (#94070)Victor Stinner2022-06-2212-3736/+0
| | | | | | | | | | * Move Lib/tkinter/test/test_tkinter/ to Lib/test/test_tkinter/. * Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/. * Add Lib/test/test_ttk/__init__.py based on test_ttk_guionly.py. * Add Lib/test/test_tkinter/__init__.py * Remove old Lib/test/test_tk.py. * Remove old Lib/test/test_ttk_guionly.py. * Add __main__ sub-modules. * Update imports and update references to rename files.
* gh-91827: Add method info_pathlevel() in tkinter (GH-91829)Serhiy Storchaka2022-05-061-0/+29
|
* bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)Serhiy Storchaka2022-03-172-75/+39
|
* bpo-45979: Fix Tkinter tests with old Tk (>= 8.5.12) (GH-31938)Serhiy Storchaka2022-03-161-2/+2
|
* bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185)E-Paine2021-12-261-2/+9
|
* bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077)Zachary Ware2021-10-201-2/+5
| | | | | | | 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`.
* bpo-45229: Make tkinter tests discoverable (GH-28637)Serhiy Storchaka2021-10-139-34/+14
|
* bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005)Serhiy Storchaka2021-08-292-0/+9
|
* bpo-44404: tkinter `after` support callable classes (GH-26812)E-Paine2021-06-231-0/+7
|
* bpo-38659: [Enum] add _simple_enum decorator (GH-25497)Ethan Furman2021-04-211-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add: * `_simple_enum` decorator to transform a normal class into an enum * `_test_simple_enum` function to compare * `_old_convert_` to enable checking `_convert_` generated enums `_simple_enum` takes a normal class and converts it into an enum: @simple_enum(Enum) class Color: RED = 1 GREEN = 2 BLUE = 3 `_old_convert_` works much like` _convert_` does, using the original logic: # in a test file import socket, enum CheckedAddressFamily = enum._old_convert_( enum.IntEnum, 'AddressFamily', 'socket', lambda C: C.isupper() and C.startswith('AF_'), source=_socket, ) `_test_simple_enum` takes a traditional enum and a simple enum and compares the two: # in the REPL or the same module as Color class CheckedColor(Enum): RED = 1 GREEN = 2 BLUE = 3 _test_simple_enum(CheckedColor, Color) _test_simple_enum(CheckedAddressFamily, socket.AddressFamily) Any important differences will raise a TypeError
* Revert "bpo-38659: [Enum] add _simple_enum decorator (GH-25285)" (GH-25476)Ethan Furman2021-04-201-44/+0
| | | This reverts commit dbac8f40e81eb0a29dc833e6409a1abf47467da6.
* bpo-38659: [Enum] add _simple_enum decorator (GH-25285)Ethan Furman2021-04-201-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add: _simple_enum decorator to transform a normal class into an enum _test_simple_enum function to compare _old_convert_ to enable checking _convert_ generated enums _simple_enum takes a normal class and converts it into an enum: @simple_enum(Enum) class Color: RED = 1 GREEN = 2 BLUE = 3 _old_convert_ works much like _convert_ does, using the original logic: # in a test file import socket, enum CheckedAddressFamily = enum._old_convert_( enum.IntEnum, 'AddressFamily', 'socket', lambda C: C.isupper() and C.startswith('AF_'), source=_socket, ) test_simple_enum takes a traditional enum and a simple enum and compares the two: # in the REPL or the same module as Color class CheckedColor(Enum): RED = 1 GREEN = 2 BLUE = 3 _test_simple_enum(CheckedColor, Color) _test_simple_enum(CheckedAddressFamily, socket.AddressFamily) Any important differences will raise a TypeError
* bpo-33289: Return RGB triplet of ints instead of floats from ↵Cheryl Sabella2021-01-212-3/+54
| | | | tkinter.colorchooser (GH-6578)
* bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)Serhiy Storchaka2020-12-292-3/+20
| | | | Objects which belong to different Tcl interpreters are now always different, even if they have the same name.
* Rename Tkinter tests for widget options (GH-23944)Serhiy Storchaka2020-12-251-105/+106
| | | | Every test for widget option starts now with "test_configure_" to distinguish it from tests for widget commands.
* bpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)Desmond Cheong2020-12-251-0/+15
|
* bpo-42721: Improve using simple dialogs without root window (GH-23897)Serhiy Storchaka2020-12-253-6/+95
| | | | | | | | | | | | | | | | | When simple query dialogs (tkinter.simpledialog), message boxes (tkinter.messagebox) or color choose dialog (tkinter.colorchooser) are created without arguments master and parent, and the default root window is not yet created, a new temporary hidden root window will be created automatically. It will not be set as the default root window and will be destroyed right after closing the dialog window. It will help to use these simple dialog windows in programs which do not need other GUI. Previously, message boxes and color chooser created the blank root window and left it after closing the dialog window, and query dialogs just raised an exception. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)Serhiy Storchaka2020-12-196-9/+208
| | | | | | | | | | | * 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.
* bpo-19733: Re-enable tests for -image option in Tkinter (GH-23785)Serhiy Storchaka2020-12-161-3/+0
|
* bpo-41876: Overload __repr__ for tkinter Font objects (GH-22450)Anatoliy Platonov2020-10-141-0/+6
|
* bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354)Serhiy Storchaka2020-10-091-0/+48
|
* bpo-41306: Allow scale value to not be rounded (GH-21715)E-Paine2020-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.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
* bpo-40275: Use new test.support helper submodules in tests (GH-21743)Hai Shi2020-08-062-6/+8
|
* bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)Akuli2020-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>
* bpo-13153: Use OS native encoding for converting between Python and Tcl. ↵Serhiy Storchaka2019-10-041-0/+22
| | | | | | | | | | | | | (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-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-221-3/+1
|
* bpo-34189: Add simple tests for new Tk widget options. (GH-8396)Serhiy Storchaka2018-07-221-2/+25
|
* bpo-32857: Raise error when tkinter after_cancel() is called with None. ↵Cheryl Sabella2018-03-041-0/+108
| | | | (GH-5701)
* 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-301-3/+2
|\ | | | | | | | | 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-301-3/+2
| | | | | | | | | | 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.
* | Issue #27025: Generated names for Tkinter widgets are now more meanfulSerhiy Storchaka2016-06-131-0/+8
| | | | | | | | and recognizirable.
* | Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.Serhiy Storchaka2016-03-092-2/+17
|\ \ | |/
| * Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.Serhiy Storchaka2016-03-092-2/+17
| | | | | | | | Added few missed tests for configure options.
* | Issue #25263: Fixed the tkinter.test.test_tkinter.test_font.FontTest testSerhiy Storchaka2015-11-101-1/+1
|\ \ | |/ | | | | | | | | | | failure when the test is ran the second time. The root attribute was set in parent class in setUpClass and then overridded in child class in tearDownClass.
| * Issue #25263: Fixed the tkinter.test.test_tkinter.test_font.FontTest testSerhiy Storchaka2015-11-101-1/+1
| |\ | | | | | | | | | | | | | | | | | | failure when the test is ran the second time. The root attribute was set in parent class in setUpClass and then overridded in child class in tearDownClass.
| | * Issue #25263: Fixed the tkinter.test.test_tkinter.test_font.FontTest testSerhiy Storchaka2015-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | failure when the test is ran the second time. The root attribute was set in parent class in setUpClass and then overridded in child class in tearDownClass.
* | | Issue #25263: Trying to fix test_use on Windows.Serhiy Storchaka2015-11-071-3/+4
|/ /
* | Issue #24408: Fixed test for tkinter.Font on OS X.Serhiy Storchaka2015-06-211-1/+10
|\ \ | |/ | | | | Based on patch by Martin Panter.
| * Issue #24408: Fixed test for tkinter.Font on OS X.Serhiy Storchaka2015-06-211-1/+10
| | | | | | | | Based on patch by Martin Panter.
* | Issue #24408: Added more tkinter.Font tests.Serhiy Storchaka2015-06-091-5/+65
|\ \ | |/