summaryrefslogtreecommitdiff
path: root/Lib/test/test_copy.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-29 23:37:32 +0000
committerCollin Winter <collinw@gmail.com>2007-08-29 23:37:32 +0000
commit03f6649445c535b585c00acd7a5fd3b7a3ae5018 (patch)
tree6719b71a07303286fa8ef3acd2bf48b5f621a19d /Lib/test/test_copy.py
parent44c8e4b776323e23a7173611c472fd4da04f6fae (diff)
downloadcpython-03f6649445c535b585c00acd7a5fd3b7a3ae5018.tar.gz
Raise statement normalization in Lib/test/.
Diffstat (limited to 'Lib/test/test_copy.py')
-rw-r--r--Lib/test/test_copy.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py
index dfdea845ec..cf945939c9 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):