From 989270afc5caae57fb93113b65db36b48cb8765c Mon Sep 17 00:00:00 2001 From: Sascha Brawer Date: Fri, 10 Mar 2017 13:01:02 +0100 Subject: [PATCH] =?UTF-8?q?[AAT]=20Use=20=E2=98=83=20instead=20of=20?= =?UTF-8?q?=F0=9F=8C=8D=20to=20test=20non-ASCII=20characters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On some Python builds, Unicode characters above U+FFFF get escaped to two question marks ?? instead of just one ?. This is not a real problem, but for testing it is a nuisance when the results depend on the platform. --- Tests/ttLib/tables/otConverters_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/ttLib/tables/otConverters_test.py b/Tests/ttLib/tables/otConverters_test.py index 56f1b6c5b..3b7796d8c 100644 --- a/Tests/ttLib/tables/otConverters_test.py +++ b/Tests/ttLib/tables/otConverters_test.py @@ -37,9 +37,9 @@ class Char64Test(unittest.TestCase): def test_write_replace_not_ascii(self): writer = OTTableWriter() with CapturingLogHandler(otConverters.log, "WARNING") as captor: - self.converter.write(writer, self.font, {}, "Hello 🌍") + self.converter.write(writer, self.font, {}, "Hello ☃") self.assertEqual(writer.getData(), b"Hello ?" + 57 * b"\0") - self.assertIn('replacing non-ASCII characters in "Hello 🌍"', + self.assertIn('replacing non-ASCII characters in "Hello ☃"', [r.msg for r in captor.records]) def test_write_truncated(self):