- Got rid of newmodule.c
[python/dscho.git] / Lib / test / test_copy_reg.py
blob0f5c96f10dfd5bddd16510544ca6e707b31b1e99
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 def test_main():
26 test_support.run_unittest(CopyRegTestCase)
29 if __name__ == "__main__":
30 test_main()