summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test/test_tkinter/test_misc.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185)E-Paine2021-12-261-2/+9
|
* bpo-45229: Make tkinter tests discoverable (GH-28637)Serhiy Storchaka2021-10-131-3/+1
|
* 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-211-0/+20
| | | | tkinter.colorchooser (GH-6578)
* bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)Serhiy Storchaka2020-12-191-2/+80
| | | | | | | | | | | * 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-41831: Add tests for tkinter.Event.__repr__ (GH-22354)Serhiy Storchaka2020-10-091-0/+48
|
* 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-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-32857: Raise error when tkinter after_cancel() is called with None. ↵Cheryl Sabella2018-03-041-0/+108
| | | | (GH-5701)
* Issue #27025: Generated names for Tkinter widgets are now more meanfulSerhiy Storchaka2016-06-131-0/+8
| | | | and recognizirable.
* Issue #22236: Tkinter tests now don't reuse default root window. New rootSerhiy Storchaka2014-08-241-5/+2
|\ | | | | | | | | | | | | | | | | window is created for every test class. Fixed Tkinter images copying operations in NoDefaultRoot mode. Tcl command names generated for "after" callbacks now contains a name of original function.
| * Issue #22236: Tkinter tests now don't reuse default root window. New rootSerhiy Storchaka2014-08-241-5/+2
| | | | | | | | | | | | | | | | | | window is created for every test class. Fixed Tkinter images copying operations in NoDefaultRoot mode. Tcl command names generated for "after" callbacks now contains a name of original function.
* | Issue #20636: Improved the repr of Tkinter widgets.Serhiy Storchaka2014-04-041-0/+5
|/
* Issue #16541: tk_setPalette() now works with keyword arguments.Serhiy Storchaka2013-01-011-0/+45
Added a test for tk_setPalette().