Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: f7adf2f473966ef33f6079ceb7115cb6cde3b521 authored by cvs2svn on 08 September 2001, 21:38:26 UTC
This commit was manufactured by cvs2svn to create tag 'r22a3'.
Tip revision: f7adf2f
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")


test_support.run_unittest(CopyRegTestCase)
back to top