Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 10
0
 def test_docstr_parse_func_choices(self, expected_func_choices):
     parsed = parse(examples.func_choices, 'numpy')
     assert expected_func_choices == parsed
Esempio n. 11
0
 def test_docstr_parse_func(self, expected_func):
     parsed = parse(examples.func, 'numpy')
     assert expected_func == parsed
Esempio n. 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
Esempio n. 13
0
 def test_class_doc_linking(self, expected_class_linking):
     parsed = parse(examples.NumpyDocClassLinking, 'numpy')
     assert expected_class_linking == parsed
Esempio n. 14
0
 def test_class_recursive_parse(self, expected_class_recursive_parse):
     parsed = parse(examples.NumpyDocClassRecursiveParse, 'numpy')
     assert expected_class_recursive_parse == parsed