Issue #19343: Expose FreeBSD-specific APIs in resource module. Original patch by Koobs.

This commit is contained in:
Christian Heimes 2013-12-08 14:35:55 +01:00
parent ead8d0858b
commit 5bb414d176
4 changed files with 51 additions and 0 deletions

View file

@ -138,6 +138,12 @@ def test_linux_constants(self):
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):