示例#1
0
 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
示例#2
0
 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
示例#3
0
 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
示例#4
0
 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
示例#5
0
 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
示例#6
0
 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
示例#7
0
 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
示例#8
0
 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
示例#9
0
def test_func_alt_defaults(self, expected_func_alt_defaults):
    parsed = parse(examples.func_alt_defaults, 'numpy')
    assert expected_func_alt_defaults == parsed
示例#10
0
 def test_docstr_parse_func_choices(self, expected_func_choices):
     parsed = parse(examples.func_choices, 'numpy')
     assert expected_func_choices == parsed
示例#11
0
 def test_docstr_parse_func(self, expected_func):
     parsed = parse(examples.func, 'numpy')
     assert expected_func == parsed
示例#12
0
 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
示例#13
0
 def test_class_doc_linking(self, expected_class_linking):
     parsed = parse(examples.NumpyDocClassLinking, 'numpy')
     assert expected_class_linking == parsed
示例#14
0
 def test_class_recursive_parse(self, expected_class_recursive_parse):
     parsed = parse(examples.NumpyDocClassRecursiveParse, 'numpy')
     assert expected_class_recursive_parse == parsed