]> granicus.if.org Git - python/commitdiff
use skip decorator
authorBenjamin Peterson <benjamin@python.org>
Tue, 6 Apr 2010 21:37:06 +0000 (21:37 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 6 Apr 2010 21:37:06 +0000 (21:37 +0000)
Lib/test/test_select.py

index 52805e625de454c082029690c6079fdc568f2589..fd7c8d0c5e4ea0f3e741d117abe1b80c034dcd43 100644 (file)
@@ -4,6 +4,8 @@ import select
 import os
 import sys
 
+@unittest.skipIf(sys.platform[:3] in ('win', 'mac', 'os2', 'riscos'),
+                 "can't easily test on this system")
 class SelectTestCase(unittest.TestCase):
 
     class Nope:
@@ -20,10 +22,6 @@ class SelectTestCase(unittest.TestCase):
         self.assertRaises(TypeError, select.select, [], [], [], "not a number")
 
     def test_select(self):
-        if sys.platform[:3] in ('win', 'mac', 'os2', 'riscos'):
-            if test_support.verbose:
-                print "Can't test select easily on", sys.platform
-            return
         cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
         p = os.popen(cmd, 'r')
         for tout in (0, 1, 2, 4, 8, 16) + (None,)*10: