def __new__(cls, name, bases, dct):
    'Create a new test case class.'

    def create_test(method):

        def test_method(self):
            'Test getargspec.'
            expected = method(1, 2)
            returned = self.getargspec(method)
            self.assertEqual(returned, expected)
            self.assertIsInstance(returned, self.expected_class)
            self.assertNoDeprecation()
        return test_method
    for (attr, tested_method) in list(dct.items()):
        if attr.startswith('_method_test_'):
            suffix = attr[len('_method_test_'):]
            cls.add_method(dct, ('test_method_' + suffix), create_test(tested_method), doc_suffix='on {0}'.format(suffix))
    dct['net'] = False
    return super(MetaTestArgSpec, cls).__new__(cls, name, bases, dct)
Create a new test case class.
def __new__(cls, name, bases, dct):
    

    def create_test(method):

        def test_method(self):
            'Test getargspec.'
            expected = method(1, 2)
            returned = self.getargspec(method)
            self.assertEqual(returned, expected)
            self.assertIsInstance(returned, self.expected_class)
            self.assertNoDeprecation()
        return test_method
    for (attr, tested_method) in list(dct.items()):
        if attr.startswith('_method_test_'):
            suffix = attr[len('_method_test_'):]
            cls.add_method(dct, ('test_method_' + suffix), create_test(tested_method), doc_suffix='on {0}'.format(suffix))
    dct['net'] = False
    return super(MetaTestArgSpec, cls).__new__(cls, name, bases, dct)