[Python-checkins] r79897 - python/branches/release26-maint/Lib/test/test_select.py

benjamin.peterson python-checkins at python.org
Wed Apr 7 22:40:30 CEST 2010


Author: benjamin.peterson
Date: Wed Apr  7 22:40:30 2010
New Revision: 79897

Log:
remove use of 2.7 unittest features

Modified:
   python/branches/release26-maint/Lib/test/test_select.py

Modified: python/branches/release26-maint/Lib/test/test_select.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_select.py	(original)
+++ python/branches/release26-maint/Lib/test/test_select.py	Wed Apr  7 22:40:30 2010
@@ -4,8 +4,6 @@
 import os
 import sys
 
- at unittest.skipIf(sys.platform[:3] in ('win', 'mac', 'os2', 'riscos'),
-                 "can't easily test on this system")
 class SelectTestCase(unittest.TestCase):
 
     class Nope:
@@ -24,11 +22,15 @@
     def test_returned_list_identity(self):
         # See issue #8329
         r, w, x = select.select([], [], [], 1)
-        self.assertIsNot(r, w)
-        self.assertIsNot(r, x)
-        self.assertIsNot(w, x)
+        self.assertFalse(r is w)
+        self.assertFalse(r is x)
+        self.assertFalse(w is x)
 
     def test_select(self):
+        if sys.platform[:3] in ('win', 'mac', 'os2'):
+            if test_support.verbose:
+                print "can't easily test on this system"
+            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:


More information about the Python-checkins mailing list