[Python-checkins] cpython (3.4): Issue #21901: Cap the maximum number of file descriptors to use for the test.

charles-francois.natali python-checkins at python.org
Tue Jul 22 22:30:31 CEST 2014


http://hg.python.org/cpython/rev/7238c6a05ca6
changeset:   91773:7238c6a05ca6
branch:      3.4
parent:      91768:bf1b0afe419b
user:        Charles-François Natali <cf.natali at gmail.com>
date:        Tue Jul 22 21:25:03 2014 +0100
summary:
  Issue #21901: Cap the maximum number of file descriptors to use for the test.

files:
  Lib/test/test_selectors.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -378,7 +378,7 @@
             resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
             self.addCleanup(resource.setrlimit, resource.RLIMIT_NOFILE,
                             (soft, hard))
-            NUM_FDS = hard
+            NUM_FDS = min(hard, 2**16)
         except (OSError, ValueError):
             NUM_FDS = soft
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list