Switch to test_support.get_attribute.
This commit is contained in:
parent
514e77e0ae
commit
59529e1ef6
|
@ -204,7 +204,8 @@ class SysModuleTest(unittest.TestCase):
|
||||||
sys.setrecursionlimit(oldlimit)
|
sys.setrecursionlimit(oldlimit)
|
||||||
|
|
||||||
def test_getwindowsversion(self):
|
def test_getwindowsversion(self):
|
||||||
if hasattr(sys, "getwindowsversion"):
|
# Raise SkipTest if sys doesn't have getwindowsversion attribute
|
||||||
|
test.test_support.get_attribute(sys, "getwindowsversion")
|
||||||
v = sys.getwindowsversion()
|
v = sys.getwindowsversion()
|
||||||
self.assertEqual(len(v), 5)
|
self.assertEqual(len(v), 5)
|
||||||
self.assertIsInstance(v[0], int)
|
self.assertIsInstance(v[0], int)
|
||||||
|
|
Loading…
Reference in New Issue