Small error corrections
This commit is contained in:
parent
8507ff0615
commit
c18b145d2d
|
|
@ -41,7 +41,7 @@ class TestLogging(TestCase):
|
||||||
for exception in all_non_blocking_exception_tests:
|
for exception in all_non_blocking_exception_tests:
|
||||||
with self.assertLogs() as captured:
|
with self.assertLogs() as captured:
|
||||||
error_mngr.log_exception(exception, level="Warning")
|
error_mngr.log_exception(exception, level="Warning")
|
||||||
self.assertGreaterEqual(len(captured.records), 3)
|
self.assertGreaterEqual(len(captured.records), 1)
|
||||||
|
|
||||||
for exception in all_blocking_exception_tests:
|
for exception in all_blocking_exception_tests:
|
||||||
with self.assertLogs() as captured:
|
with self.assertLogs() as captured:
|
||||||
|
|
@ -52,14 +52,14 @@ class TestLogging(TestCase):
|
||||||
def test_log_message(self):
|
def test_log_message(self):
|
||||||
with self.assertLogs() as captured:
|
with self.assertLogs() as captured:
|
||||||
error_mngr.log_message("test message", level="INFO")
|
error_mngr.log_message("test message", level="INFO")
|
||||||
self.assertEqual(3, len(captured.records))
|
self.assertEqual(len(captured.records), 1)
|
||||||
self.assertEqual("INFO", captured.records[0].levelname)
|
self.assertEqual("INFO", captured.records[0].levelname)
|
||||||
self.assertEqual(" test message", captured.records[0].msg)
|
self.assertEqual(" test message", captured.records[0].msg)
|
||||||
|
|
||||||
def test_log_message_critical(self):
|
def test_log_message_critical(self):
|
||||||
with self.assertLogs() as captured:
|
with self.assertLogs() as captured:
|
||||||
error_mngr.log_message("test message", level="CRITICAL")
|
error_mngr.log_message("test message", level="CRITICAL")
|
||||||
self.assertEqual(3, len(captured.records))
|
self.assertGreaterEqual(len(captured.records), 1)
|
||||||
self.assertEqual("CRITICAL", captured.records[0].levelname)
|
self.assertEqual("CRITICAL", captured.records[0].levelname)
|
||||||
self.assertEqual(" test message", captured.records[0].msg)
|
self.assertEqual(" test message", captured.records[0].msg)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ _type_counterpart_container = [
|
||||||
(syntax.EtUnderlineToken, 'text:underline', "token", tools.__GLk(1)),
|
(syntax.EtUnderlineToken, 'text:underline', "token", tools.__GLk(1)),
|
||||||
(syntax.EtStrikethroughToken, 'text:strikethrough', "token", tools.__GLk(1)),
|
(syntax.EtStrikethroughToken, 'text:strikethrough', "token", tools.__GLk(1)),
|
||||||
(syntax.EtCustomSpanToken, None, "self", tools.__GLk(1), __XF), # Not sure what to do with custom spans
|
(syntax.EtCustomSpanToken, None, "self", tools.__GLk(1), __XF), # Not sure what to do with custom spans
|
||||||
(syntax.EtUlistToken, None, "self", tools.__GLk(1), __XF), # Shouldn't be an error
|
(syntax.EtUlistToken, None, "self", tools.__GLk(1)),
|
||||||
(syntax.EtOlistToken, None, "self", tools.__GLk(1), __XF), # Shouldn't be an error
|
(syntax.EtOlistToken, None, "self", tools.__GLk(1)),
|
||||||
(syntax.HeaderToken, None, "self", tools.__GLk(1)),
|
(syntax.HeaderToken, None, "self", tools.__GLk(1)),
|
||||||
(syntax.DisplayToken, None, "self", tools.__GLk(1)),
|
(syntax.DisplayToken, None, "self", tools.__GLk(1)),
|
||||||
(syntax.StructuralElementStartToken, None, "self", tools.__GLk(1)),
|
(syntax.StructuralElementStartToken, None, "self", tools.__GLk(1)),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue