]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42328: Skip some tests with themes vista and xpnative on Windows 7 (GH-23612)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 3 Dec 2020 09:07:13 +0000 (01:07 -0800)
committerGitHub <noreply@github.com>
Thu, 3 Dec 2020 09:07:13 +0000 (01:07 -0800)
(cherry picked from commit f3c3ea91a76526edff928c95b9c6767e077b7448)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/tkinter/test/test_ttk/test_style.py

index 54e913311766f17299dda683c05bf5f4ee27c397..38d70d7a89077d80a11c8fd95424c706eed01605 100644 (file)
@@ -1,4 +1,5 @@
 import unittest
+import sys
 import tkinter
 from tkinter import ttk
 from test import support
@@ -136,6 +137,10 @@ class StyleTest(AbstractTkTest, unittest.TestCase):
                 with self.subTest(theme=theme, name=name):
                     if support.verbose >= 2:
                         print('configure', theme, name, default)
+                    if (theme in ('vista', 'xpnative')
+                            and sys.getwindowsversion()[:2] == (6, 1)):
+                        # Fails on the Windows 7 buildbot
+                        continue
                     newname = f'C.{name}'
                     self.assertEqual(style.configure(newname), None)
                     style.configure(newname, **default)
@@ -158,6 +163,10 @@ class StyleTest(AbstractTkTest, unittest.TestCase):
                 with self.subTest(theme=theme, name=name):
                     if support.verbose >= 2:
                         print('map', theme, name, default)
+                    if (theme in ('vista', 'xpnative')
+                            and sys.getwindowsversion()[:2] == (6, 1)):
+                        # Fails on the Windows 7 buildbot
+                        continue
                     newname = f'C.{name}'
                     self.assertEqual(style.map(newname), {})
                     style.map(newname, **default)