Skip to content

Commit 01e0afa

Browse files
benjaminpmiss-islington
authored andcommitted
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
1 parent 84db4a9 commit 01e0afa

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Lib/test/test_resource.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ def test_freebsd_contants(self):
147147
@support.requires_linux_version(2, 6, 36)
148148
def test_prlimit(self):
149149
self.assertRaises(TypeError, resource.prlimit)
150-
if os.geteuid() != 0:
151-
self.assertRaises(PermissionError, resource.prlimit,
152-
1, resource.RLIMIT_AS)
153150
self.assertRaises(ProcessLookupError, resource.prlimit,
154151
-1, resource.RLIMIT_AS)
155152
limit = resource.getrlimit(resource.RLIMIT_AS)

0 commit comments

Comments
 (0)