<s> import unittest <EOL> from django . utils import inspect <EOL> class Person ( object ) : <EOL> def no_arguments ( self ) : <EOL> return None <EOL> def one_argument ( self , something ) : <EOL> return something <EOL> def just_args ( self , * args ) : <EOL> return args <EOL> def all_kinds ( self , name , address = '<STR_LIT>' , age = <NUM_LIT> , * args , ** kwargs ) : <EOL> return kwargs <EOL> class TestInspectMethods ( unittest . TestCase ) : <EOL> def test_get_func_full_args_no_arguments ( self ) : <EOL> self . assertEqual ( inspect . get_func_full_args ( Person . no_arguments ) , [ ] ) <EOL> def test_get_func_full_args_one_argument ( self ) : <EOL> self . assertEqual ( inspect . get_func_full_args ( Person . one_argument ) , [ ( '<STR_LIT>' , ) ] ) <EOL> def test_get_func_full_args_all_arguments ( self ) : <EOL> arguments = [ ( '<STR_LIT:name>' , ) , ( '<STR_LIT:address>' , '<STR_LIT>' ) , ( '<STR_LIT>' , <NUM_LIT> ) , ( '<STR_LIT>' , ) , ( '<STR_LIT>' , ) ] <EOL> self . assertEqual ( inspect . get_func_full_args ( Person . all_kinds ) , arguments ) <EOL> def test_func_accepts_var_args_has_var_args ( self ) : <EOL> self . assertEqual ( inspect . func_accepts_var_args ( Person . just_args ) , True ) <EOL> def test_func_accepts_var_args_no_var_args ( self ) : <EOL> self . assertEqual ( inspect . func_accepts_var_args ( Person . one_argument ) , False ) </s>
