Commit e4fb1671 authored by Stefan Behnel's avatar Stefan Behnel

clean up test

parent a6d1644d
# tag: posix # tag: posix
from posix.unistd cimport * from posix.unistd cimport *
from posix.resource cimport * from posix.resource cimport *
def test_getpriority(): def test_getpriority():
""" """
>>> test_getpriority() >>> test_getpriority()
0
""" """
ret = getpriority(PRIO_PROCESS, getpid()) ret = getpriority(PRIO_PROCESS, getpid())
assert ret == 0 return ret
def test_getrlimit(): def test_getrlimit():
""" """
>>> test_getrlimit() >>> test_getrlimit()
0
True
""" """
cdef rlimit rlim cdef rlimit rlim
rlim.rlim_cur = 0
ret = getrlimit(RLIMIT_CPU, &rlim) ret = getrlimit(RLIMIT_CPU, &rlim)
assert ret == 0 print(ret)
assert rlim.rlim_cur != 0 return rlim.rlim_cur != 0
def test_getrusage(): def test_getrusage():
""" """
>>> test_getrusage() >>> test_getrusage()
0
""" """
cdef rusage r cdef rusage r
ret = getrusage(RUSAGE_SELF, &r) ret = getrusage(RUSAGE_SELF, &r)
assert ret == 0 return ret
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment