generated from jCloud/repository-template
style: ensure trailing newlines
This commit is contained in:
48 files changed
+48
-48
No files matched your search
@@ -1410,4 +1410,4 @@ Examples
|
||||
>>> A()''')
|
||||
])
|
||||
def test_PythonDefinitionDocumentationGenerator_generate_documentation(definition_documentation_generator, expected):
|
||||
assert definition_documentation_generator.generate_documentation() == expected
|
||||
assert definition_documentation_generator.generate_documentation() == expected
|
||||
@@ -59,4 +59,4 @@ def test_generate_documentation(dir, expectdir):
|
||||
allow_tables = True,
|
||||
allow_html = False
|
||||
).generate_documentation(
|
||||
) # simplify the tests
|
||||
) # simplify the tests
|
||||
+1
-1
@@ -1 +1 @@
|
||||
def func(): ...
|
||||
def func(): ...
|
||||
@@ -961,4 +961,4 @@ Barks.
|
||||
A dog.'''),
|
||||
])
|
||||
def test_PythonModuleDocumentationGenerator_exceptions(module_documentation_generator, expected):
|
||||
assert module_documentation_generator.generate_documentation() == expected
|
||||
assert module_documentation_generator.generate_documentation() == expected
|
||||
@@ -24,4 +24,4 @@ import pytest
|
||||
(PythonArgumentKind.KWARGS, 'kwargs'),
|
||||
])
|
||||
def test__argument_kind_human_readable(argument_kind, expected):
|
||||
assert _argument_kind_human_readable(argument_kind) == expected
|
||||
assert _argument_kind_human_readable(argument_kind) == expected
|
||||
@@ -136,4 +136,4 @@ def test_PythonDocumentationGenerator_collect_modules(python_documentation_gener
|
||||
])
|
||||
])
|
||||
def test___collect_definitions(module, expected):
|
||||
assert list(_collect_definitions(module)) == expected
|
||||
assert list(_collect_definitions(module)) == expected
|
||||
@@ -53,4 +53,4 @@ def test__fit_row_length(expected_length, row, expected):
|
||||
def test__fit_row_length_exceptions(expected_length, row, expected_exception):
|
||||
with pytest.raises(expected_exception) as exc_info:
|
||||
_fit_row_length(expected_length, row)
|
||||
assert str(exc_info.value) == 'expected must be larger than or equal 0.'
|
||||
assert str(exc_info.value) == 'expected must be larger than or equal 0.'
|
||||
@@ -101,4 +101,4 @@ def docstring_args_list(docstring: str) -> list[docstring_parser.DocstringParam]
|
||||
([], '', {}),
|
||||
])
|
||||
def test__function_params_types(arg_list, docstring, expected):
|
||||
assert _function_params_info(arg_list, docstring_args_list(docstring)) == expected
|
||||
assert _function_params_info(arg_list, docstring_args_list(docstring)) == expected
|
||||
@@ -90,4 +90,4 @@ def test__markdown_table(header, body, allow_markdown_table, force_row_lengths,
|
||||
def test__markdown_table_exceptions(header, body, allow_markdown_table, force_row_lengths, one_line_values, missing_value, expected_exception, expected_exception_msg):
|
||||
with pytest.raises(expected_exception) as exc_info:
|
||||
_markdown_table(header, body, allow_markdown_table = allow_markdown_table, force_row_lengths = force_row_lengths, one_line_values = one_line_values, missing_value = missing_value)
|
||||
assert str(exc_info.value) == expected_exception_msg
|
||||
assert str(exc_info.value) == expected_exception_msg
|
||||
@@ -94,4 +94,4 @@ import pytest
|
||||
], ['a: int = 1']),
|
||||
])
|
||||
def test__signature_argument_list(argument_list, expected):
|
||||
assert _signature_argument_list(argument_list) == expected
|
||||
assert _signature_argument_list(argument_list) == expected
|
||||
@@ -47,4 +47,4 @@ class Dog(Animal):
|
||||
Barks.
|
||||
'''
|
||||
|
||||
print('Woof!')
|
||||
print('Woof!')
|
||||
@@ -212,4 +212,4 @@ def argument_list(argument_list: str) -> ast.arguments:
|
||||
]),
|
||||
])
|
||||
def test_PythonASTArgumentsListParser_to_argument_list(ast_arguments_list, expected):
|
||||
assert PythonASTArgumentsListParser(ast_arguments_list).to_argument_list() == expected
|
||||
assert PythonASTArgumentsListParser(ast_arguments_list).to_argument_list() == expected
|
||||
@@ -154,4 +154,4 @@ def test_PythonFunctionArgument_asterik(name, kind, annotation):
|
||||
(PythonFunctionArgument('a', PythonArgumentKind.KWARGS, None, 'int'), '**a: int'),
|
||||
])
|
||||
def test_PythonFunctionArgument_signature_repr(argument, expected):
|
||||
assert argument.signature_repr() == expected
|
||||
assert argument.signature_repr() == expected
|
||||
@@ -94,4 +94,4 @@ def test_PythonFunctionDefinition_exceptions(name, args, returns, doc, decorator
|
||||
])),
|
||||
])
|
||||
def test_PythonDefinition_from_node(node, expected):
|
||||
assert PythonClassDefinition.from_node(node) == expected
|
||||
assert PythonClassDefinition.from_node(node) == expected
|
||||
@@ -81,4 +81,4 @@ def test_PythonDefinition_exceptions(name, doc, decorators, expected_exception,
|
||||
])
|
||||
def test_PythonDefinition___eq__(definition1, definition2, expected):
|
||||
assert (definition1 == definition2) == expected
|
||||
assert (definition2 == definition1) == expected
|
||||
assert (definition2 == definition1) == expected
|
||||
@@ -84,4 +84,4 @@ def test_PythonFunctionDefinition_exceptions(name, args, returns, doc, decorator
|
||||
(ast_node('@decorator\ndef func(): ...'), PythonFunctionDefinition('func', [], None, None, ['decorator'])),
|
||||
])
|
||||
def test_PythonDefinition_from_node(node, expected):
|
||||
assert PythonFunctionDefinition.from_node(node) == expected
|
||||
assert PythonFunctionDefinition.from_node(node) == expected
|
||||
@@ -44,4 +44,4 @@ def test_PythonModuleNamespace___eq__(namespace1, namespace2, expected):
|
||||
(PythonModuleNamespace(StrSubclass('a')), 'PythonModuleNamespace(\'a\')'),
|
||||
])
|
||||
def test_PythonModuleNamespace_string_representation(namespace, expected):
|
||||
assert repr(namespace) == expected
|
||||
assert repr(namespace) == expected
|
||||
@@ -31,4 +31,4 @@ def test_PythonNamespace_name_attribute(namespace, expected_name):
|
||||
(PythonNamespace(StrSubclass('a')), 'PythonNamespace(\'a\')'),
|
||||
])
|
||||
def test_PythonNamespace_string_representation(namespace, expected):
|
||||
assert repr(namespace) == expected
|
||||
assert repr(namespace) == expected
|
||||
@@ -105,4 +105,4 @@ def test_PythonPackageNamespace_string_representation(namespace, expected):
|
||||
])
|
||||
def test_PythonPackageNamespace___getitem__(namespace, new_namespace, expected):
|
||||
namespace.add(new_namespace)
|
||||
assert namespace == expected
|
||||
assert namespace == expected
|
||||
Reference in new issue
Block a user