]> granicus.if.org Git - python/commitdiff
Issue #18963: Fix test_selectors.test_above_fd_setsize on OS X, where the
authorCharles-François Natali <cf.natali@gmail.com>
Sun, 8 Sep 2013 09:34:42 +0000 (11:34 +0200)
committerCharles-François Natali <cf.natali@gmail.com>
Sun, 8 Sep 2013 09:34:42 +0000 (11:34 +0200)
default RLIMIT_NOFILE hard limit can be RLIMIT_INFINITY.

Lib/test/test_selectors.py

index 2657a505b4efc83c2b8fc0b3a8d1c1f34bdd470d..8041187cbfbe45e01e11f036894c9028fc7d99f4 100644 (file)
@@ -301,7 +301,6 @@ class BaseSelectorTestCase(unittest.TestCase):
 
 class ScalableSelectorMixIn:
 
-    @support.requires_mac_ver(10, 5)
     @unittest.skipUnless(resource, "Test needs resource module")
     def test_above_fd_setsize(self):
         # A scalable implementation should have no problem with more than
@@ -313,7 +312,7 @@ class ScalableSelectorMixIn:
             self.addCleanup(resource.setrlimit, resource.RLIMIT_NOFILE,
                             (soft, hard))
             NUM_FDS = hard
-        except OSError:
+        except (OSError, ValueError):
             NUM_FDS = soft
 
         # guard for already allocated FDs (stdin, stdout...)