summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_resource.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-12-08 13:35:55 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-12-08 13:35:55 (GMT)
commit5bb414d176b5c99d9f2500738fe77c47ea938763 (patch)
tree84b7bfa89c46eb75e08ddb25ba174ac2b769271e /Lib/test/test_resource.py
parentead8d0858b326ec8d902dc597aa3da23e4c5a82b (diff)
downloadcpython-5bb414d176b5c99d9f2500738fe77c47ea938763.zip
cpython-5bb414d176b5c99d9f2500738fe77c47ea938763.tar.gz
cpython-5bb414d176b5c99d9f2500738fe77c47ea938763.tar.bz2
Issue #19343: Expose FreeBSD-specific APIs in resource module. Original patch by Koobs.
Diffstat (limited to 'Lib/test/test_resource.py')
-rw-r--r--Lib/test/test_resource.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py
index 006198f..2ecae0f 100644
--- a/Lib/test/test_resource.py
+++ b/Lib/test/test_resource.py
@@ -138,6 +138,12 @@ class ResourceTest(unittest.TestCase):
with contextlib.suppress(AttributeError):
self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
+ @support.requires_freebsd_version(9)
+ def test_freebsd_contants(self):
+ for attr in ['SWAP', 'SBSIZE', 'NPTS']:
+ with contextlib.suppress(AttributeError):
+ self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
+
@unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit')
@support.requires_linux_version(2, 6, 36)
def test_prlimit(self):