Staging
v0.5.1
Revision 0832165c43cc059ca2d8de0bef09990f6ebdcae0 authored by cvs2svn on 18 March 2002, 16:47:35 UTC, committed by cvs2svn on 18 March 2002, 16:47:35 UTC
1 parent 0c3ea5d
Raw File
test_copy_reg.py
import copy_reg
import test_support
import unittest


class C:
    pass


class CopyRegTestCase(unittest.TestCase):

    def test_class(self):
        self.assertRaises(TypeError, copy_reg.pickle,
                          C, None, None)

    def test_noncallable_reduce(self):
        self.assertRaises(TypeError, copy_reg.pickle,
                          type(1), "not a callable")

    def test_noncallable_constructor(self):
        self.assertRaises(TypeError, copy_reg.pickle,
                          type(1), int, "not a callable")


def test_main():
    test_support.run_unittest(CopyRegTestCase)


if __name__ == "__main__":
    test_main()
back to top