JSON surrogates Python: adjust regex for OSX error message.

OS X's version of Python has a slightly different error
message for this error case.
pull/1541/head
Josh Haberman 9 years ago
parent 6a618949aa
commit 923d2c7ccf
  1. 4
      python/google/protobuf/internal/json_format_test.py

@ -260,12 +260,12 @@ class JsonFormatTest(JsonFormatBase):
# Error case: unpaired high surrogate.
self.CheckError(
'{"stringValue": "\\uD83D"}',
r'Invalid \\uXXXX escape|Unpaired surrogate')
r'Invalid \\uXXXX escape|Unpaired (high )?surrogate')
# Unpaired low surrogate.
self.CheckError(
'{"stringValue": "\\uDE01"}',
r'Invalid \\uXXXX escape|Unpaired surrogate')
r'Invalid \\uXXXX escape|Unpaired (high )?surrogate')
def testTimestampMessage(self):

Loading…
Cancel
Save