Skip to content

Commit

Permalink
try to fix failure on py 3
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Aug 7, 2015
1 parent a347904 commit 3e5aa8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_psutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,8 @@ def test_rlimit(self):
with self.assertRaises(IOError) as exc:
with open(TESTFN, "wb") as f:
f.write(b"X" * 1025)
self.assertEqual(exc.exception[0], errno.EFBIG)
self.assertEqual(exc.exception.errno if PY3 else exc.exception[0],
errno.EFBIG)
finally:
p.rlimit(psutil.RLIMIT_FSIZE, (soft, hard))
self.assertEqual(p.rlimit(psutil.RLIMIT_FSIZE), (soft, hard))
Expand Down

0 comments on commit 3e5aa8a

Please sign in to comment.