diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 17:58:48 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-24 17:58:48 (GMT) |
commit | 8b33dd8e547790af86e9fc85ea6c315ead276b6e (patch) | |
tree | 4da041d085b8c0226f691429036835167e3874ac /Lib/test/test_os.py | |
parent | 6a7a49c6318afe8a54fe6dda2dd321af2a275295 (diff) | |
download | cpython-8b33dd8e547790af86e9fc85ea6c315ead276b6e.zip cpython-8b33dd8e547790af86e9fc85ea6c315ead276b6e.tar.gz cpython-8b33dd8e547790af86e9fc85ea6c315ead276b6e.tar.bz2 |
Use OESeeror instead of os.error (#16720)
Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 165a9bf..cc9bd4e 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -1190,31 +1190,31 @@ if sys.platform != 'win32': if hasattr(os, 'setuid'): def test_setuid(self): if os.getuid() != 0: - self.assertRaises(os.error, os.setuid, 0) + self.assertRaises(OSError, os.setuid, 0) self.assertRaises(OverflowError, os.setuid, 1<<32) if hasattr(os, 'setgid'): def test_setgid(self): if os.getuid() != 0: - self.assertRaises(os.error, os.setgid, 0) + self.assertRaises(OSError, os.setgid, 0) self.assertRaises(OverflowError, os.setgid, 1<<32) if hasattr(os, 'seteuid'): def test_seteuid(self): if os.getuid() != 0: - self.assertRaises(os.error, os.seteuid, 0) + self.assertRaises(OSError, os.seteuid, 0) self.assertRaises(OverflowError, os.seteuid, 1<<32) if hasattr(os, 'setegid'): def test_setegid(self): if os.getuid() != 0: - self.assertRaises(os.error, os.setegid, 0) + self.assertRaises(OSError, os.setegid, 0) self.assertRaises(OverflowError, os.setegid, 1<<32) if hasattr(os, 'setreuid'): def test_setreuid(self): if os.getuid() != 0: - self.assertRaises(os.error, os.setreuid, 0, 0) + self.assertRaises(OSError, os.setreuid, 0, 0) self.assertRaises(OverflowError, os.setreuid, 1<<32, 0) self.assertRaises(OverflowError, os.setreuid, 0, 1<<32) @@ -1228,7 +1228,7 @@ if sys.platform != 'win32': if hasattr(os, 'setregid'): def test_setregid(self): if os.getuid() != 0: - self.assertRaises(os.error, os.setregid, 0, 0) + self.assertRaises(OSError, os.setregid, 0, 0) self.assertRaises(OverflowError, os.setregid, 1<<32, 0) self.assertRaises(OverflowError, os.setregid, 0, 1<<32) |