diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 (GMT) |
commit | 3add4d78ff9f5de02e2c0de09efe9a9b5317539f (patch) | |
tree | c61c6a122b33537814bcc643300f10759fa81010 /Lib/test/test_copy.py | |
parent | e0281cab810c30a23cf2490704e0f85aa4751e83 (diff) | |
download | cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.zip cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.gz cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.bz2 |
Raise statement normalization in Lib/test/.
Diffstat (limited to 'Lib/test/test_copy.py')
-rw-r--r-- | Lib/test/test_copy.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py index dfdea84..cf94593 100644 --- a/Lib/test/test_copy.py +++ b/Lib/test/test_copy.py @@ -51,7 +51,7 @@ class TestCopy(unittest.TestCase): def __reduce_ex__(self, proto): return "" def __reduce__(self): - raise test_support.TestFailed, "shouldn't call this" + raise test_support.TestFailed("shouldn't call this") x = C() y = copy.copy(x) self.assert_(y is x) @@ -68,7 +68,7 @@ class TestCopy(unittest.TestCase): class C(object): def __getattribute__(self, name): if name.startswith("__reduce"): - raise AttributeError, name + raise AttributeError(name) return object.__getattribute__(self, name) x = C() self.assertRaises(copy.Error, copy.copy, x) @@ -224,7 +224,7 @@ class TestCopy(unittest.TestCase): def __reduce_ex__(self, proto): return "" def __reduce__(self): - raise test_support.TestFailed, "shouldn't call this" + raise test_support.TestFailed("shouldn't call this") x = C() y = copy.deepcopy(x) self.assert_(y is x) @@ -241,7 +241,7 @@ class TestCopy(unittest.TestCase): class C(object): def __getattribute__(self, name): if name.startswith("__reduce"): - raise AttributeError, name + raise AttributeError(name) return object.__getattribute__(self, name) x = C() self.assertRaises(copy.Error, copy.deepcopy, x) @@ -565,7 +565,7 @@ class TestCopy(unittest.TestCase): def test_getstate_exc(self): class EvilState(object): def __getstate__(self): - raise ValueError, "ain't got no stickin' state" + raise ValueError("ain't got no stickin' state") self.assertRaises(ValueError, copy.copy, EvilState()) def test_copy_function(self): |