diff options
| author | Neal Norwitz <nnorwitz@gmail.com> | 2003-06-08 13:19:58 +0000 |
|---|---|---|
| committer | Neal Norwitz <nnorwitz@gmail.com> | 2003-06-08 13:19:58 +0000 |
| commit | e2fdc610043a29a4e95287ff53b1a2c43e401b11 (patch) | |
| tree | 1edb40832050a5d73a60fcb835e993d108ddca9f /Lib/test/test_copy.py | |
| parent | f0b1a1fca9e70663efa9fba2d123784cbd14616c (diff) | |
| download | cpython-git-e2fdc610043a29a4e95287ff53b1a2c43e401b11.tar.gz | |
Fix SF #749831, copy raises SystemError when getstate raises exception
Diffstat (limited to 'Lib/test/test_copy.py')
| -rw-r--r-- | Lib/test/test_copy.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py index 0e39e8356d..c734a9a9d4 100644 --- a/Lib/test/test_copy.py +++ b/Lib/test/test_copy.py @@ -515,6 +515,12 @@ class TestCopy(unittest.TestCase): self.assert_(x is not y) self.assert_(x[0] is not y[0]) + def test_getstate_exc(self): + class EvilState(object): + def __getstate__(self): + raise ValueError, "ain't got no stickin' state" + self.assertRaises(ValueError, copy.copy, EvilState()) + def test_main(): test_support.run_unittest(TestCopy) |
