Skip to content

Commit

Permalink
Add test for cext._check_pid_range
Browse files Browse the repository at this point in the history
Signed-off-by: Xuehai Pan <[email protected]>
  • Loading branch information
XuehaiPan committed Jun 6, 2023
1 parent 9b5f06a commit bdec8b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions psutil/tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@

class TestSpecialMethods(PsutilTestCase):

def test_check_pid_range(self):
with self.assertRaises(OverflowError):
psutil._psplatform.cext._check_pid_range(2 ** 128)

def test_process__repr__(self, func=repr):
p = psutil.Process(self.spawn_testproc().pid)
r = func(p)
Expand Down

0 comments on commit bdec8b0

Please sign in to comment.