def test_cpu_percent(self):
        p = psutil.Process(os.getpid())
        p.get_cpu_percent(interval=0.001)
        p.get_cpu_percent(interval=0.001)
        for x in range(100):
            percent = p.get_cpu_percent(interval=None)
            assert isinstance(percent, float)
            assert percent >= 0.0, percent
            if os.name != 'posix':
                assert percent <= 100.0, percent
            else:
                assert percent >= 0.0, percent
dataset/ETHPy150Open packages/psutil/test/test_psutil.py/TestCase.test_cpu_percent/original