Skip to content

Commit

Permalink
Add test for psutil.Process for overflowed PIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Jun 7, 2023
1 parent fcf422a commit b286f48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions psutil/tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class TestSpecialMethods(PsutilTestCase):
def test_check_pid_range(self):
with self.assertRaises(OverflowError):
psutil._psplatform.cext.check_pid_range(2 ** 128)
with self.assertRaises(OverflowError):
psutil.Process(2 ** 128)

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

0 comments on commit b286f48

Please sign in to comment.