MCPcopy Create free account
hub / github.com/aws/aws-cli / test_highlight

Method test_highlight

tests/unit/customizations/logs/test_ui.py:256–278  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

254 self.assertEqual(log_event, uncolored_log_event)
255
256 def test_highlight(self):
257 text = "INFO"
258 log_event = "This is an INFO log with info occurring a lot of times. Because we are testing INFO."
259 self.keyword = Keyword(text)
260
261 log_event_after_highlighting = self.keyword.highlight(log_event)
262
263 self.assertEqual(
264 "This is an "
265 + colorama.Fore.GREEN
266 + text
267 + colorama.Style.RESET_ALL
268 + " log with "
269 + colorama.Fore.GREEN
270 + text.lower()
271 + colorama.Style.RESET_ALL
272 + " occurring a lot of times. Because we are testing "
273 + colorama.Fore.GREEN
274 + text
275 + colorama.Style.RESET_ALL
276 + ".",
277 log_event_after_highlighting,
278 )
279
280
281class InteractivePrinterTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

KeywordClass · 0.90
highlightMethod · 0.80

Tested by

no test coverage detected