def test_get_last_line_num_four_nonewline(self): src = textwrap.dedent('''\ 1 2 3 4''') assert rstsource.get_last_line_num(src) == 4
def test_get_last_line_num_one(self): src = textwrap.dedent('''\ 1 ''') assert rstsource.get_last_line_num(src) == 1
def test_get_last_line_num_one_nonewline(self): src = "1" assert rstsource.get_last_line_num(src) == 1
def test_get_last_line_num_null(self): assert rstsource.get_last_line_num("") == 1