[Python-checkins] bpo-31132: Remove prlimit permission test. (GH-9280)
Miss Islington (bot)
webhook-mailer at python.org
Thu Sep 13 18:22:19 EDT 2018
https://github.com/python/cpython/commit/f79d74d5a3ceb06b63996e8ecf23e419e16e4be2
commit: f79d74d5a3ceb06b63996e8ecf23e419e16e4be2
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-09-13T15:22:16-07:00
summary:
bpo-31132: Remove prlimit permission test. (GH-9280)
This test is doesn't work when the test process is privledged, which is hard to detect.
https://bugs.python.org/issue34668
(cherry picked from commit 01e0afa994c2e840f85e2de103e72a2c0ddf1b1f)
Co-authored-by: Benjamin Peterson <benjamin at python.org>
files:
M Lib/test/test_resource.py
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
index cc9c57024dee..b405f0169d6e 100644
--- a/Lib/test/test_resource.py
+++ b/Lib/test/test_resource.py
@@ -148,9 +148,6 @@ def test_freebsd_contants(self):
@support.requires_linux_version(2, 6, 36)
def test_prlimit(self):
self.assertRaises(TypeError, resource.prlimit)
- if os.geteuid() != 0:
- self.assertRaises(PermissionError, resource.prlimit,
- 1, resource.RLIMIT_AS)
self.assertRaises(ProcessLookupError, resource.prlimit,
-1, resource.RLIMIT_AS)
limit = resource.getrlimit(resource.RLIMIT_AS)
More information about the Python-checkins
mailing list