bpo-42328: Skip some tests with themes vista and xpnative on Windows 7 (GH-23612)

This commit is contained in:
Serhiy Storchaka 2020-12-03 10:48:26 +02:00 committed by GitHub
parent 3ec9d01901
commit f3c3ea91a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
import unittest
import sys
import tkinter
from tkinter import ttk
from test import support
@ -136,6 +137,10 @@ def test_configure_custom_copy(self):
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 @@ def test_map_custom_copy(self):
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)