Skip to content

Commit

Permalink
Relaxed test expectation to accomodate change in Python error message
Browse files Browse the repository at this point in the history
  • Loading branch information
cgates committed Sep 24, 2020
1 parent 38cabcb commit eb8da13
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/utils/logger_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ def test_noExceptionOnMalformedMessage(self):
logger.info("bar {}/{}/{}", "1", "2")

root_logger = logger.logging.getLogger()
self.assertEquals(["root: INFO: Malformed log message (IndexError: tuple index out of range)|bar {}/{}/{}|['1', '2']"], root_logger.handlers[0].buffer)
errmsg = root_logger.handlers[0].buffer[0]
self.assertRegexpMatches(
r"root: INFO: Malformed log message .*\|bar {}/{}/{}\|['1', '2']",
errmsg)

class LoggerTestCaseDebugOnly(unittest.TestCase):
def setUp(self):
Expand Down

0 comments on commit eb8da13

Please sign in to comment.