test_set_process_priority.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:anglerfish 作者: juancarlospaco 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号