mirror of
https://github.com/python/cpython.git
synced 2025-11-02 06:31:29 +00:00
Issue #19343: Expose FreeBSD-specific APIs in resource module. Original patch by Koobs.
This commit is contained in:
parent
ead8d0858b
commit
5bb414d176
4 changed files with 51 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue