def test_set_process_priority(self):
old_nice = os.getpriority(os.PRIO_PROCESS, 0)
prio_set = set_process_priority(ionice=True)
new_nice = os.getpriority(os.PRIO_PROCESS, 0)
self.assertEqual(old_nice, 0) # a == b
self.assertTrue(isinstance(prio_set, bool)) # bool(x) is True
self.assertTrue(prio_set) # bool(x) is True
self.assertEqual(new_nice, 19) # a == b
test_set_process_priority.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录