1# tag: posix 2 3from posix.unistd cimport * 4from posix.resource cimport * 5 6 7def test_getpriority(): 8 """ 9 >>> test_getpriority() 10 0 11 """ 12 ret = getpriority(PRIO_PROCESS, getpid()) 13 # DISABLED - does not work on current test server 14 return 0 # ret 15 16 17def test_getrlimit(): 18 """ 19 >>> test_getrlimit() 20 0 21 True 22 """ 23 cdef rlimit rlim 24 rlim.rlim_cur = 0 25 26 ret = getrlimit(RLIMIT_CPU, &rlim) 27 print(ret) 28 return rlim.rlim_cur != 0 29 30 31def test_getrusage(): 32 """ 33 >>> test_getrusage() 34 0 35 """ 36 cdef rusage r 37 ret = getrusage(RUSAGE_SELF, &r) 38 return ret 39