changeset: 99525:2f9541cab936 parent: 99524:360c1326d8d1 parent: 99523:fe844253cd44 user: Martin Panter date: Fri Dec 11 05:42:26 2015 +0000 files: Lib/test/test_subprocess.py description: Issue #25764: Merge fix for root user from 3.5 diff -r 360c1326d8d1 -r 2f9541cab936 Lib/test/test_subprocess.py --- a/Lib/test/test_subprocess.py Fri Dec 11 05:41:48 2015 +0000 +++ b/Lib/test/test_subprocess.py Fri Dec 11 05:42:26 2015 +0000 @@ -1525,10 +1525,14 @@ [_, 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