summaryrefslogtreecommitdiff
path: root/Lib/test/test_resource.py
diff options
context:
space:
mode:
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 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):