diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2015-08-07 14:25:15 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2015-08-07 14:25:15 +0200 |
commit | 3e5aa8a7646cbe31c88413df51c04c06864e25bf (patch) | |
tree | e795fe12fc6aaf4d295addd2e5c3adcfd73d2911 | |
parent | a347904947825a2da90422ebe29c437b17cc9f84 (diff) | |
download | psutil-3e5aa8a7646cbe31c88413df51c04c06864e25bf.tar.gz |
try to fix failure on py 3
-rw-r--r-- | test/test_psutil.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_psutil.py b/test/test_psutil.py index 4afbe08b..ed93330a 100644 --- a/test/test_psutil.py +++ b/test/test_psutil.py @@ -1514,7 +1514,8 @@ class TestProcess(unittest.TestCase): 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)) |