mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Try to fix some ttk tests. Error messages were changed in 8.6b3.
This commit is contained in:
		
						commit
						c8935fe860
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -6,7 +6,7 @@ import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import tkinter.test.support as support
 | 
					import tkinter.test.support as support
 | 
				
			||||||
from tkinter.test.test_ttk.test_functions import MockTclObj
 | 
					from tkinter.test.test_ttk.test_functions import MockTclObj
 | 
				
			||||||
from tkinter.test.support import tcl_version
 | 
					from tkinter.test.support import tcl_version, get_tk_patchlevel
 | 
				
			||||||
from tkinter.test.widget_tests import (add_standard_options, noconv,
 | 
					from tkinter.test.widget_tests import (add_standard_options, noconv,
 | 
				
			||||||
    AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
 | 
					    AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests,
 | 
				
			||||||
    setUpModule)
 | 
					    setUpModule)
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ class StandardTtkOptionsTests(StandardOptionsTests):
 | 
				
			||||||
        widget = self.create()
 | 
					        widget = self.create()
 | 
				
			||||||
        self.assertEqual(widget['class'], '')
 | 
					        self.assertEqual(widget['class'], '')
 | 
				
			||||||
        errmsg='attempt to change read-only option'
 | 
					        errmsg='attempt to change read-only option'
 | 
				
			||||||
        if tcl_version < (8, 6):
 | 
					        if get_tk_patchlevel() < (8, 6, 0): # actually this was changed in 8.6b3
 | 
				
			||||||
            errmsg='Attempt to change read-only option'
 | 
					            errmsg='Attempt to change read-only option'
 | 
				
			||||||
        self.checkInvalidParam(widget, 'class', 'Foo', errmsg=errmsg)
 | 
					        self.checkInvalidParam(widget, 'class', 'Foo', errmsg=errmsg)
 | 
				
			||||||
        widget2 = self.create(class_='Foo')
 | 
					        widget2 = self.create(class_='Foo')
 | 
				
			||||||
| 
						 | 
					@ -576,7 +576,7 @@ class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):
 | 
				
			||||||
        widget = self.create()
 | 
					        widget = self.create()
 | 
				
			||||||
        self.assertEqual(str(widget['orient']), 'vertical')
 | 
					        self.assertEqual(str(widget['orient']), 'vertical')
 | 
				
			||||||
        errmsg='attempt to change read-only option'
 | 
					        errmsg='attempt to change read-only option'
 | 
				
			||||||
        if tcl_version < (8, 6):
 | 
					        if get_tk_patchlevel() < (8, 6, 0): # actually this was changen in 8.6b3
 | 
				
			||||||
            errmsg='Attempt to change read-only option'
 | 
					            errmsg='Attempt to change read-only option'
 | 
				
			||||||
        self.checkInvalidParam(widget, 'orient', 'horizontal',
 | 
					        self.checkInvalidParam(widget, 'orient', 'horizontal',
 | 
				
			||||||
                errmsg=errmsg)
 | 
					                errmsg=errmsg)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue