Skip to content

Commit 4774421

Browse files
Update Lib/test/test_resource.py
Co-authored-by: Petr Viktorin <[email protected]>
1 parent a554136 commit 4774421

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_resource.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ def test_fsize_negative(self):
156156
(cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
157157
for value in -5, -2**31, -2**32-5, -2**63, -2**64-5, -2**1000:
158158
with self.subTest(value=value):
159+
# This test assumes that the values don't map to RLIM_INFINITY,
160+
# though Posix doesn't guarantee it.
161+
self.assertNotEqual(value, resource.RLIM_INFINITY)
162+
159163
self.assertRaises(ValueError, resource.setrlimit, resource.RLIMIT_FSIZE, (value, max))
160164
self.assertRaises(ValueError, resource.setrlimit, resource.RLIMIT_FSIZE, (cur, value))
161165

0 commit comments

Comments
 (0)