bpo-31904: Port test_resource to VxWorks (GH-12719)

Skip tests cases setting RLIMIT_FSIZE and RLIMIT_CPU on VxWorks.
This commit is contained in:
Lihua Zhao 2019-04-17 23:41:33 +08:00 committed by Victor Stinner
parent 2954550818
commit 693c104ae7
3 changed files with 7 additions and 0 deletions

View file

@ -16,6 +16,8 @@ class ResourceTest(unittest.TestCase):
self.assertRaises(TypeError, resource.setrlimit)
self.assertRaises(TypeError, resource.setrlimit, 42, 42, 42)
@unittest.skipIf(sys.platform == "vxworks",
"setting RLIMIT_FSIZE is not supported on VxWorks")
def test_fsize_ismax(self):
try:
(cur, max) = resource.getrlimit(resource.RLIMIT_FSIZE)
@ -110,6 +112,8 @@ class ResourceTest(unittest.TestCase):
pass
# Issue 6083: Reference counting bug
@unittest.skipIf(sys.platform == "vxworks",
"setting RLIMIT_CPU is not supported on VxWorks")
def test_setrusage_refcount(self):
try:
limits = resource.getrlimit(resource.RLIMIT_CPU)