py-cvs-rel2_1 (Rev 1.2) merge
[python/dscho.git] / Lib / test / test_copy_reg.py
blob51ec60b5958176e0d974ff3debad0f8f19820042
1 import copy_reg
2 import test_support
3 import unittest
6 class C:
7 pass
10 class CopyRegTestCase(unittest.TestCase):
12 def test_class(self):
13 self.assertRaises(TypeError, copy_reg.pickle,
14 C, None, None)
16 def test_noncallable_reduce(self):
17 self.assertRaises(TypeError, copy_reg.pickle,
18 type(1), "not a callable")
20 def test_noncallable_constructor(self):
21 self.assertRaises(TypeError, copy_reg.pickle,
22 type(1), int, "not a callable")
25 test_support.run_unittest(CopyRegTestCase)