mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688)
In future Tcl and Tk versions can be desynchronized.
This commit is contained in:
		
							parent
							
								
									6925c578a0
								
							
						
					
					
						commit
						3c8e8f3cee
					
				
					 7 changed files with 30 additions and 39 deletions
				
			
		|  | @ -1,7 +1,7 @@ | |||
| # Common tests for test_tkinter/test_widgets.py and test_ttk/test_widgets.py | ||||
| 
 | ||||
| import tkinter | ||||
| from test.test_tkinter.support import (AbstractTkTest, tcl_version, | ||||
| from test.test_tkinter.support import (AbstractTkTest, tk_version, | ||||
|                                   pixels_conv, tcl_obj_eq) | ||||
| import test.support | ||||
| 
 | ||||
|  | @ -22,7 +22,7 @@ def scaling(self): | |||
|             return self._scaling | ||||
| 
 | ||||
|     def _str(self, value): | ||||
|         if not self._stringify and self.wantobjects and tcl_version >= (8, 6): | ||||
|         if not self._stringify and self.wantobjects and tk_version >= (8, 6): | ||||
|             return value | ||||
|         if isinstance(value, tuple): | ||||
|             return ' '.join(map(self._str, value)) | ||||
|  | @ -156,7 +156,7 @@ def checkReliefParam(self, widget, name): | |||
|                          'flat', 'groove', 'raised', 'ridge', 'solid', 'sunken') | ||||
|         errmsg='bad relief "spam": must be '\ | ||||
|                'flat, groove, raised, ridge, solid, or sunken' | ||||
|         if tcl_version < (8, 6): | ||||
|         if tk_version < (8, 6): | ||||
|             errmsg = None | ||||
|         self.checkInvalidParam(widget, name, 'spam', | ||||
|                 errmsg=errmsg) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka