Example #1
0
 def test_partial_function(self):
     line = 'def test_func(arg1, arg2,\n'
     self.assertFalse(missing_docstrings.is_full_function_definition(line))
Example #2
0
 def test_valid_line_with_tabs_is_function(self):
     line = '\t\tdef test_func(self):'
     self.assertTrue(missing_docstrings.is_full_function_definition(line))
Example #3
0
 def test_function_multi_lines(self):
     line = 'def test_function(arg1,\n'
     self.assertFalse(missing_docstrings.is_full_function_definition(line))
Example #4
0
 def test_function_call(self):
     line = 'definition(arg1)'
     self.assertFalse(missing_docstrings.is_full_function_definition(line))
Example #5
0
 def test_class_declaration_is_not_function(self):
     line = 'class MyClass:'
     self.assertFalse(missing_docstrings.is_full_function_definition(line))
Example #6
0
 def test_variable_assignment_is_not_function(self):
     line = 'variable = True'
     self.assertFalse(missing_docstrings.is_full_function_definition(line))
Example #7
0
 def test_function_with_comment(self):
     line = 'def test_function(): #  test comment\n'
     self.assertTrue(missing_docstrings.is_full_function_definition(line))
Example #8
0
 def test_function_with_trailing_whitespace(self):
     line = 'def test_function(arg1, arg2):    \n'
     self.assertTrue(missing_docstrings.is_full_function_definition(line))
Example #9
0
 def test_function_two_arguments(self):
     line = 'def test_function(arg1, arg2):\n'
     self.assertTrue(missing_docstrings.is_full_function_definition(line))