diff options
author | Christian Heimes <christian@cheimes.de> | 2013-12-08 13:35:55 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-12-08 13:35:55 (GMT) |
commit | 5bb414d176b5c99d9f2500738fe77c47ea938763 (patch) | |
tree | 84b7bfa89c46eb75e08ddb25ba174ac2b769271e /Lib/test/test_resource.py | |
parent | ead8d0858b326ec8d902dc597aa3da23e4c5a82b (diff) | |
download | cpython-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.py | 6 |
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): |