def test_class_function_no_args(self): class TestClass(object): def func(self): pass self.assertFalse(has_required_args(TestClass.func))
def test_simple_2_arg_function_with_one_default(self): def testfunc(foo, bar=3): pass self.assertTrue(has_required_args(testfunc))
def test_simple_2_arg_function_with_two_defaults(self): def testfunc(foo=1, bar=3): pass self.assertFalse(has_required_args(testfunc))
def test_simple_1_arg_function_with_default(self): def testfunc(foo=2): pass self.assertFalse(has_required_args(testfunc))
def test_simple_2_arg_function(self): def testfunc(foo, bar): pass self.assertTrue(has_required_args(testfunc))
def test_class_function_2_args_1_default(self): class TestClass(object): def func(self, foo, bar=2): pass self.assertTrue(has_required_args(TestClass.func))
def test_class_function_2_args_2_defaults(self): class TestClass(object): def func(self, foo=1, bar=2): pass self.assertFalse(has_required_args(TestClass.func))
def test_class_function_1_arg(self): class TestClass(object): def func(self, foo): pass self.assertTrue(has_required_args(TestClass.func))
def test_class_function_1_arg_with_default(self): class TestClass(object): def func(self, foo=2): pass self.assertFalse(has_required_args(TestClass.func))
def test_simple_no_args_function(self): def testfunc(): pass self.assertFalse(has_required_args(testfunc))