def test_given_word_and_raw_then_return_word(self): word = "test_word" col = "test_col" raw = True return_value = dls_logs_since_release.colour(word, col, raw) self.assertEqual(return_value, word)
def test_given_word_and_not_raw_then_return_formatted_word(self): word = "test_word" col = 5 expected_return_value = "\x1b[" + str(col) + "m" + str(word) + "\x1b[0m" raw = False return_value = dls_logs_since_release.colour(word, col, raw) self.assertEqual(return_value, expected_return_value)
def test_given_word_and_not_raw_then_return_formatted_word(self): word = "test_word" col = 5 expected_return_value = "\x1b[" + str(col) + "m" + str( word) + "\x1b[0m" raw = False return_value = dls_logs_since_release.colour(word, col, raw) self.assertEqual(return_value, expected_return_value)