]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add another ignore_bytes_warning call to log_test.
authorBen Darnell <ben@bendarnell.com>
Sun, 12 Oct 2014 02:59:15 +0000 (22:59 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 12 Oct 2014 02:59:15 +0000 (22:59 -0400)
This fixes a failure apparently introduced by changes to warning
logic in python 3.4.2.

tornado/test/log_test.py

index 6fad5ca02f2b2b8f4fe3f6aad255b823c997599e..102d3d42f9a0aa08fde7c765cfeb8a6847c7b11a 100644 (file)
@@ -95,7 +95,8 @@ class LogFormatterTest(unittest.TestCase):
             self.assertEqual(self.get_output(), utf8(repr(b"\xe9")))
 
     def test_utf8_logging(self):
-        self.logger.error(u("\u00e9").encode("utf8"))
+        with ignore_bytes_warning():
+            self.logger.error(u("\u00e9").encode("utf8"))
         if issubclass(bytes, basestring_type):
             # on python 2, utf8 byte strings (and by extension ascii byte
             # strings) are passed through as-is.