summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-119614: Fix truncation of strings with embedded null characters in ↵Miss Islington (bot)2024-06-241-0/+24
| | | | | | | | | Tkinter (GH-120909) (GH-120938) Now the null character is always represented as \xc0\x80 for Tcl_NewStringObj(). (cherry picked from commit c38e2f64d012929168dfef7363c9e48bd1a6c731) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-101830: Fix Tcl_Obj to string conversion (GH-120884) (GH-120905)Miss Islington (bot)2024-06-231-1/+51
| | | | | | | Accessing the Tkinter object's string representation no longer converts the underlying Tcl object to a string on Windows. (cherry picked from commit f4ddaa396715855ffbd94590f89ab7d55feeec07) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-104855: Update Tkinter tests for Tcl/Tk 8.7 and 9.0 (GH-120824) ↵Miss Islington (bot)2024-06-221-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-120864) The tests are now passed with the current version of Tcl/Tk under development (8.7b1+ and 9.0b3+). The following changes were also made to make the tests more flexible: * Helper methods like checkParam() now interpret the expected error message as a regular expression instead of a literal. * Add support of new arguments in checkEnumParam(): - allow_empty=True skips testing with empty string; - fullname= specifies the name for error message if it differs from the option name; - sort=True sorts values for error message. * Add support of the allow_empty argument in checkReliefParam(): allow_empty=True adds an empty string to the list of accepted values. * Attributes _clip_highlightthickness, _clip_pad and _clip_borderwidth specify how negative values of options -highlightthickness, -padx, -pady and -borderwidth are handled. * Use global variables for some common error messages. (cherry picked from commit 6ad26de6e8ab61b035e7ecfff9791c2b349c3ad0) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-66410: Do not stringify arguments of Tkinter callback (GH-98592)Serhiy Storchaka2024-05-071-12/+23
| | | | | | | | | Callbacks registered in the tkinter module now take arguments as various Python objects (int, float, bytes, tuple), not just str. To restore the previous behavior set tkinter module global wantobject to 1 before creating the Tk object or call the wantobject() method of the Tk object with argument 1. Calling it with argument 2 restores the current default behavior.
* gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688)Serhiy Storchaka2023-08-071-11/+2
| | | In future Tcl and Tk versions can be desynchronized.
* gh-104411: Update test_getint for Tcl 9.0 (GH-104412)Christopher Chavez2023-06-061-1/+4
|
* gh-84623: Remove unused imports in tests (#93772)Victor Stinner2022-06-131-3/+0
|
* gh-91827: Add method info_pathlevel() in tkinter (GH-91829)Serhiy Storchaka2022-05-061-10/+2
|
* bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)Serhiy Storchaka2022-03-171-48/+24
|
* bpo-38371: Remove remaining use of tk.split from bigmem tcl test (GH-29082)Zachary Ware2021-10-201-1/+0
|
* bpo-45229: Remove test_main in many tests (GH-28405)Serhiy Storchaka2021-09-191-4/+1
| | | | | | | | | Instead of explicitly enumerate test classes for run_unittest() use the unittest ability to discover tests. This also makes these tests discoverable and runnable with unittest. load_tests() can be used for dynamic generating tests and adding doctests. setUpModule(), tearDownModule() and addModuleCleanup() can be used for running code before and after all module tests.
* bpo-38371: Remove deprecated `tkinter` split() method (GH-28237)Erlend Egeberg Aasland2021-09-081-53/+0
|
* bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)Serhiy Storchaka2021-07-141-1/+7
| | | | if it is called with a sequence or set, but not list or tuple.
* bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl ↵Erlend Egeberg Aasland2021-05-271-3/+3
| | | | (GH-26412)
* bpo-43916: Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to selected types (GH-25748)Erlend Egeberg Aasland2021-04-301-0/+3
| | | | | | | | | | | | | | | | | | | | | Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to the following types: * _dbm.dbm * _gdbm.gdbm * _multibytecodec.MultibyteCodec * _sre..SRE_Scanner * _thread._localdummy * _thread.lock * _winapi.Overlapped * array.arrayiterator * functools.KeyWrapper * functools._lru_list_elem * pyexpat.xmlparser * re.Match * re.Pattern * unicodedata.UCD * zlib.Compress * zlib.Decompress
* bpo-42749: Use dynamic version to test for unsupported bignum in Tk (GH-23966)Serhiy Storchaka2020-12-291-1/+1
| | | | Tk can internally support bignum even if Tkinter is built without support of bignum.
* bpo-42749: Fix testing bignum if Tkinter is compiled with Tk 8.4 and dynamic ↵Serhiy Storchaka2020-12-271-4/+8
| | | | linked with Tk >= 8.5 (GH-23955)
* bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281)Serhiy Storchaka2020-11-151-6/+40
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21743)Hai Shi2020-08-061-7/+8
|
* bpo-40275: Use new test.support helper submodules in tests (GH-20824)Hai Shi2020-06-251-1/+2
|
* bpo-38371: Tkinter: deprecate the split() method. (GH-16584)Serhiy Storchaka2019-10-081-4/+9
|
* bpo-13153: Use OS native encoding for converting between Python and Tcl. ↵Serhiy Storchaka2019-10-041-0/+5
| | | | | | | | | | | | | (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-33974: Fix passing special characters to ttk widgets. (GH-7986)Serhiy Storchaka2018-06-301-0/+37
| | | | Fix passing lists and tuples of strings containing special characters '"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
* bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (#3866)Serhiy Storchaka2017-10-031-21/+33
| | | | | when pass a string larger than 2 GiB. Decrease memory requirements for Tcl's bigmem tests.
* Issue #23815: Fixed crashes related to directly created instances of types inSerhiy Storchaka2016-05-081-0/+2
| | | | _tkinter and curses.panel modules.
* Issue #25093: Merge with 3.4Zachary Ware2015-10-131-4/+4
|\
| * Issue #25093: Fix test_tcl's testloadWithUNC for paths with spacesZachary Ware2015-10-131-4/+4
| | | | | | | | Patch by Serhiy Storchaka.
* | Issue #20035: Reimplement tkinter._fix module as a C function.Zachary Ware2015-05-221-3/+1
| | | | | | | | | | The new private C function makes no permanent changes to the environment and is #ifdef'd out on non-Windows platforms.
* | Issue #23880: Tkinter's getint() and getdouble() now support Tcl_Obj.Serhiy Storchaka2015-05-061-1/+1
| | | | | | | | Tkinter's getdouble() now supports any numbers (in particular int).
* | Issue #16840. Turn off bignum support in tkinter with with Tcl earlier than ↵Serhiy Storchaka2015-04-221-1/+3
|\ \ | |/ | | | | | | | | | | 8.5.8 (tclTomMath.h was broken) and non-final Tcl 8.6. Removed TK_VERSION_HEX.
| * Issue #16840. Turn off bignum support in tkinter with with Tcl earlier than ↵Serhiy Storchaka2015-04-221-1/+3
| | | | | | | | | | | | 8.5.8 (tclTomMath.h was broken) and non-final Tcl 8.6.
* | Fixed full Tcl version parsing in tests for pre-final versions.Serhiy Storchaka2015-04-221-15/+11
|\ \ | |/
| * Fixed full Tcl version parsing in tests for pre-final versions.Serhiy Storchaka2015-04-221-15/+11
| |
* | Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and alwaysSerhiy Storchaka2015-04-041-1/+2
|\ \ | |/ | | | | | | returns bool. tkinter.BooleanVar now validates input values (accepted bool, int, str, and Tcl_Obj). tkinter.BooleanVar.get() now always returns bool.
| * Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and alwaysSerhiy Storchaka2015-04-041-1/+2
| | | | | | | | | | returns bool. tkinter.BooleanVar now validates input values (accepted bool, int, str, and Tcl_Obj). tkinter.BooleanVar.get() now always returns bool.
* | Issue #16840: Fixed test_tcl for Tcl < 8.5.Serhiy Storchaka2015-04-021-4/+4
|\ \ | |/
| * Issue #16840: Fixed test_tcl for Tcl < 8.5.Serhiy Storchaka2015-04-021-4/+4
| |
* | Issue #21526: Skip test_booleans on Tcl < 8.5.Serhiy Storchaka2015-04-021-0/+1
|\ \ | |/
| * Issue #21526: Skip test_booleans on Tcl < 8.5.Serhiy Storchaka2015-04-021-0/+1
| |
* | Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 andSerhiy Storchaka2015-04-021-7/+37
|\ \ | |/ | | | | arbitrary precision integers added in Tcl 8.5.
| * Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 andSerhiy Storchaka2015-04-021-7/+39
| | | | | | | | arbitrary precision integers added in Tcl 8.5.
* | Issue #21526: Fixed the test_booleans test for wantobjects = 0.Serhiy Storchaka2015-04-021-2/+6
|\ \ | |/
| * Issue #21526: Fixed the test_booleans test for wantobjects = 0.Serhiy Storchaka2015-04-021-2/+6
| |
* | Issue #21526: Fixed support of new boolean type in Tcl 8.5.Serhiy Storchaka2015-04-021-0/+15
|\ \ | |/
| * Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.Serhiy Storchaka2015-04-021-0/+15
| |
* | Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command withSerhiy Storchaka2014-09-111-1/+2
|\ \ | |/ | | | | | | | | | | empty string or tuple argument. On some platforms Tcl memory allocator returns NULL when allocating zero-sized block of memory.
| * Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command withSerhiy Storchaka2014-09-111-1/+2
| | | | | | | | | | | | | | empty string or tuple argument. On some platforms Tcl memory allocator returns NULL when allocating zero-sized block of memory.
* | Issue #22226: Added private function _splitdict() in the Tkinter module.Serhiy Storchaka2014-09-061-1/+36
|\ \ | |/ | | | | | | First letter no longer is stripped from the "status" key in the result of Treeview.heading().
| * Issue #22226: Added private function _splitdict() in the Tkinter module.Serhiy Storchaka2014-09-061-1/+36
| | | | | | | | | | First letter no longer is stripped from the "status" key in the result of Treeview.heading().
* | Issue #22334: Add debug traces to test_tclVictor Stinner2014-09-041-2/+6
| |