summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2015-12-11 05:42:26 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2015-12-11 05:42:26 (GMT)
commitaa5dcd893c2192786a532e625fea1bcec40ba448 (patch)
treec51afdfb240841cb05406dc45d05590cf5832702 /Lib/test/test_subprocess.py
parent70fe09bc67098756349c1dc35e0d8d85a4c465cf (diff)
parent5cf791b0357f7def78dd8190b3544ac4d44d28f9 (diff)
downloadcpython-aa5dcd893c2192786a532e625fea1bcec40ba448.zip
cpython-aa5dcd893c2192786a532e625fea1bcec40ba448.tar.gz
cpython-aa5dcd893c2192786a532e625fea1bcec40ba448.tar.bz2
Issue #25764: Merge fix for root user from 3.5
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index b32ef97..6628512 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1525,10 +1525,14 @@ class POSIXProcessTestCase(BaseTestCase):
[_, hard] = limits
setrlimit(RLIMIT_NPROC, (0, hard))
self.addCleanup(setrlimit, RLIMIT_NPROC, limits)
- # Forking should raise EAGAIN, translated to BlockingIOError
- with self.assertRaises(BlockingIOError):
+ try:
subprocess.call([sys.executable, '-c', ''],
preexec_fn=lambda: None)
+ except BlockingIOError:
+ # Forking should raise EAGAIN, translated to BlockingIOError
+ pass
+ else:
+ self.skipTest('RLIMIT_NPROC had no effect; probably superuser')
def test_args_string(self):
# args is a string