mirror of
https://github.com/python/cpython.git
synced 2025-09-30 20:31:52 +00:00
Issue #25764: Remove test debugging
This commit is contained in:
parent
1a173de212
commit
0d559cf72a
1 changed files with 2 additions and 11 deletions
|
@ -1518,21 +1518,12 @@ class POSIXProcessTestCase(BaseTestCase):
|
||||||
# The internal code did not preserve the previous exception when
|
# The internal code did not preserve the previous exception when
|
||||||
# re-enabling garbage collection
|
# re-enabling garbage collection
|
||||||
try:
|
try:
|
||||||
from resource import getrlimit, setrlimit, RLIMIT_NPROC, RLIM_INFINITY
|
from resource import getrlimit, setrlimit, RLIMIT_NPROC
|
||||||
except ImportError as err:
|
except ImportError as err:
|
||||||
self.skipTest(err) # RLIMIT_NPROC is specific to Linux and BSD
|
self.skipTest(err) # RLIMIT_NPROC is specific to Linux and BSD
|
||||||
limits = getrlimit(RLIMIT_NPROC)
|
limits = getrlimit(RLIMIT_NPROC)
|
||||||
[_, hard] = limits
|
[_, hard] = limits
|
||||||
try:
|
setrlimit(RLIMIT_NPROC, (0, hard))
|
||||||
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")
|
|
||||||
self.addCleanup(setrlimit, RLIMIT_NPROC, limits)
|
self.addCleanup(setrlimit, RLIMIT_NPROC, limits)
|
||||||
# Forking should raise EAGAIN, translated to BlockingIOError
|
# Forking should raise EAGAIN, translated to BlockingIOError
|
||||||
with self.assertRaises(BlockingIOError):
|
with self.assertRaises(BlockingIOError):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue