From: Benjamin Peterson Date: Thu, 13 Sep 2018 21:53:09 +0000 (-0700) Subject: bpo-31132: Remove prlimit permission test. (GH-9280) X-Git-Tag: v3.8.0a1~1006 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01e0afa994c2e840f85e2de103e72a2c0ddf1b1f;p=python 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 --- diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index 4b852789be..b07eb73b2a 100644 --- a/Lib/test/test_resource.py +++ b/Lib/test/test_resource.py @@ -147,9 +147,6 @@ class ResourceTest(unittest.TestCase): @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)