From 5bb414d176b5c99d9f2500738fe77c47ea938763 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 8 Dec 2013 14:35:55 +0100 Subject: Issue #19343: Expose FreeBSD-specific APIs in resource module. Original patch by Koobs. --- Lib/test/test_resource.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Lib/test/test_resource.py') diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py index 006198fc41..2ecae0fc45 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): -- cgit v1.2.1