summaryrefslogtreecommitdiff
path: root/Lib/test/test_resource.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-10-22 11:09:27 +0200
committerChristian Heimes <christian@cheimes.de>2013-10-22 11:09:27 +0200
commit6fc79bf813de21015208d989e38cdc95bda03292 (patch)
tree84bbc4d5b1596b3f215efd1ff4c23af5345ee75c /Lib/test/test_resource.py
parentd1d7576fb4a6787e3ebc0b5060561c076c9a4bf7 (diff)
downloadcpython-git-6fc79bf813de21015208d989e38cdc95bda03292.tar.gz
Issue #19324: Expose Linux-specific constants in resource module
Diffstat (limited to 'Lib/test/test_resource.py')
-rw-r--r--Lib/test/test_resource.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
index 1bf2a5a6ce..3c9c9a8292 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)