def test_line_decorated_with_small_width(): """ Test that line() returns empty string if decorated True but line width less than 2. Example: width = 1 => "" """ assert calculator.line(1, decorated=True) == ""
def test_line_not_decorated(): """ Test that line() returns a line of given width, without end "<" and start ">" if decorated is False. Example: width = 6 => "------" """ assert calculator.line(7, decorated=False) == "-------"
def test_line_one_length(): """ Test that line() returns just one line if inserted line width is 1. Example: width = 1 => "-" """ assert calculator.line(1) == "-"
def test_line_decorated(): """ Test that line() returns a line of given width with ">" at the start and "<" in the end, if decorated is True. Example: width = 6 => ">----<" """ assert calculator.line(6, decorated=True) == ">----<"
def test_line_zero_length(): """ Test that line() returns an empty string if inserted line width is 0. Example: width = 0 => "" """ assert calculator.line(0) == ""