[Python-checkins] cpython: Issue #25764: Remove test debugging
martin.panter
python-checkins at python.org
Sat Dec 5 07:43:06 EST 2015
https://hg.python.org/cpython/rev/0c9095566f21
changeset: 99464:0c9095566f21
user: Martin Panter <vadmium+py at gmail.com>
date: Sat Dec 05 10:18:25 2015 +0000
summary:
Issue #25764: Remove test debugging
files:
Lib/test/test_subprocess.py | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1518,21 +1518,12 @@
# The internal code did not preserve the previous exception when
# re-enabling garbage collection
try:
- from resource import getrlimit, setrlimit, RLIMIT_NPROC, RLIM_INFINITY
+ from resource import getrlimit, setrlimit, RLIMIT_NPROC
except ImportError as err:
self.skipTest(err) # RLIMIT_NPROC is specific to Linux and BSD
limits = getrlimit(RLIMIT_NPROC)
[_, hard] = limits
- try:
- setrlimit(RLIMIT_NPROC, limits)
- setrlimit(RLIMIT_NPROC, (0, hard))
- except ValueError as err:
- # Seems to happen on various OS X buildbots
- print(
- f"Setting NPROC failed: {err!r}, limits={limits!r}, "
- f"RLIM_INFINITY={RLIM_INFINITY!r}, "
- f"getrlimit() -> {getrlimit(RLIMIT_NPROC)!r}")
- self.skipTest("Setting NPROC limit failed")
+ setrlimit(RLIMIT_NPROC, (0, hard))
self.addCleanup(setrlimit, RLIMIT_NPROC, limits)
# Forking should raise EAGAIN, translated to BlockingIOError
with self.assertRaises(BlockingIOError):
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list