1
0
mirror of https://github.com/ultrajson/ultrajson.git synced 2024-11-10 17:26:02 +01:00

Fixed broken test on Win32

This commit is contained in:
Jonas Tarnstrom 2014-04-11 11:47:39 +02:00
parent 90a2c915dd
commit bf30600769

@ -232,7 +232,15 @@ class UltraJSONTests(TestCase):
s = u'\U0001f42e\U0001f42e\U0001F42D\U0001F42D' # 🐮🐮🐭🐭
encoded = ujson.dumps(s)
encoded_json = json.dumps(s)
self.assertEqual(len(encoded), len(s) * 12 + 2) # 12 characters + quotes
print encoded
print "Len(s): %d" % (len(s), )
print "Len(encoded): %d" % (len(encoded), )
if len(s) == 4:
self.assertEqual(len(encoded), len(s) * 12 + 2)
else:
self.assertEqual(len(encoded), len(s) * 6 + 2)
self.assertEqual(encoded, encoded_json)
decoded = ujson.loads(encoded)
self.assertEqual(s, decoded)