def test_class_of_primitives(self, expected_class_of_primitives): """Tests the example class of primitives, but also includes attribute as init arg inherent pass through, which only works when not using meta splat expansion. """ parsed = parse(examples.NumpyDocClass, 'numpy') assert expected_class_of_primitives == parsed
def test_docstr_parse_func_linking(self, expected_func_linking): parsed = parse( examples.func_linking, 'numpy', # TODO a test of w/ whitelist and w/o, as well as blacklist. # whitelist=['tests.numpy_example_docstrings.func_defaults'], ) assert expected_func_linking == parsed
def test_class_recursive_parse_whitelist( self, expected_class_recursive_parse_whitelist, ): parsed = parse( examples.NumpyDocClassRecursiveParse, 'numpy', whitelist={'tests.numpy_example_docstrings.NumpyDocClass'}, ) assert expected_class_recursive_parse_whitelist == parsed
def test_recursive_parsing_types_1hop(self, expected_recursive_parse): parsed = parse( examples.func_recursive_parse, 'numpy', whitelist={ 'tests.numpy_example_docstrings.func', 'tests.numpy_example_docstrings.func_defaults', 'tests.numpy_example_docstrings.func_choices', }, ) assert expected_recursive_parse == parsed
def test_docstr_parse_func_linking_arg_pass_thru( self, expected_func_linking_arg_pass_thru, ): parsed = parse( examples.func_linking_arg_pass_thru, 'numpy', # TODO a test of w/ whitelist and w/o, as well as blacklist. #whitelist=[ # 'tests.numpy_example_docstrings.func_defaults', # 'tests.numpy_example_docstrings.func_choices', #], ) assert expected_func_linking_arg_pass_thru == parsed
def test_func_linking_see_mid(self, expected_func_linking_see_mid): parsed = parse(examples.func_linking_see_mid, 'numpy') assert expected_func_linking_see_mid == parsed
def test_func_linking_see_start(self, expected_func_linking_see_start): parsed = parse(examples.func_linking_see_start, 'numpy') assert expected_func_linking_see_start == parsed
def test_docstr_parse_func_linking_args(self, expected_func_linking_args): parsed = parse(examples.func_linking_args, 'numpy') assert expected_func_linking_args == parsed
def test_func_alt_defaults(self, expected_func_alt_defaults): parsed = parse(examples.func_alt_defaults, 'numpy') assert expected_func_alt_defaults == parsed
def test_docstr_parse_func_choices(self, expected_func_choices): parsed = parse(examples.func_choices, 'numpy') assert expected_func_choices == parsed
def test_docstr_parse_func(self, expected_func): parsed = parse(examples.func, 'numpy') assert expected_func == parsed
def test_class_doc_2hop_linking_and_non_primitive_arg( self, expected_class_multi_linking ): parsed = parse(examples.NumpyDocClassMultiLinking, 'numpy') assert expected_class_multi_linking == parsed
def test_class_doc_linking(self, expected_class_linking): parsed = parse(examples.NumpyDocClassLinking, 'numpy') assert expected_class_linking == parsed
def test_class_recursive_parse(self, expected_class_recursive_parse): parsed = parse(examples.NumpyDocClassRecursiveParse, 'numpy') assert expected_class_recursive_parse == parsed