Exemplo n.º 1
0
 def test_ignores_docstrings(self):
     expect(find_method_lengths(code_with_docstring)) == [
         Method('method_with_multi_line_docstring', 1),
         Method('method_with_one_line_docstring', 1)]
Exemplo n.º 2
0
 def test_finds_method_lengths(self):
     expect(find_method_lengths(code)) == [
         Method('short_method', 0),
         Method('another_short_method', 1),
         Method('longest_method', 4)]