mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Issue #19324: Expose Linux-specific constants in resource module
This commit is contained in:
parent
d1d7576fb4
commit
6fc79bf813
4 changed files with 80 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
import sys
|
||||
import unittest
|
||||
from test import support
|
||||
import time
|
||||
|
@ -129,6 +130,15 @@ class ResourceTest(unittest.TestCase):
|
|||
self.assertIsInstance(pagesize, int)
|
||||
self.assertGreaterEqual(pagesize, 0)
|
||||
|
||||
@unittest.skipUnless(sys.platform == 'linux', 'test requires Linux')
|
||||
def test_linux_constants(self):
|
||||
self.assertIsInstance(resource.RLIMIT_MSGQUEUE, int)
|
||||
self.assertIsInstance(resource.RLIMIT_NICE, int)
|
||||
self.assertIsInstance(resource.RLIMIT_RTPRIO, int)
|
||||
self.assertIsInstance(resource.RLIMIT_RTTIME, int)
|
||||
self.assertIsInstance(resource.RLIMIT_SIGPENDING, int)
|
||||
|
||||
|
||||
def test_main(verbose=None):
|
||||
support.run_unittest(ResourceTest)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue