diff options
author | Christian Heimes <christian@cheimes.de> | 2013-10-22 09:09:27 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-10-22 09:09:27 (GMT) |
commit | 6fc79bf813de21015208d989e38cdc95bda03292 (patch) | |
tree | 84bbc4d5b1596b3f215efd1ff4c23af5345ee75c /Lib/test/test_resource.py | |
parent | d1d7576fb4a6787e3ebc0b5060561c076c9a4bf7 (diff) | |
download | cpython-6fc79bf813de21015208d989e38cdc95bda03292.zip cpython-6fc79bf813de21015208d989e38cdc95bda03292.tar.gz cpython-6fc79bf813de21015208d989e38cdc95bda03292.tar.bz2 |
Issue #19324: Expose Linux-specific constants in resource module
Diffstat (limited to 'Lib/test/test_resource.py')
-rw-r--r-- | Lib/test/test_resource.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index 1bf2a5a..3c9c9a8 100644 --- a/Lib/test/test_resource.py +++ b/Lib/test/test_resource.py @@ -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) |