aboutsummaryrefslogtreecommitdiff
path: root/python/google
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2016-06-06 13:57:59 -0700
committerJosh Haberman <jhaberman@gmail.com>2016-06-06 13:57:59 -0700
commit923d2c7ccf2d60705469ace6ba1dce9ca80c0678 (patch)
tree75f201f2993241b5170f266d764f3f38a1946227 /python/google
parent6a618949aa639b7007d0fce16f9a7c856488cd18 (diff)
downloadprotobuf-923d2c7ccf2d60705469ace6ba1dce9ca80c0678.tar.gz
protobuf-923d2c7ccf2d60705469ace6ba1dce9ca80c0678.tar.bz2
protobuf-923d2c7ccf2d60705469ace6ba1dce9ca80c0678.zip
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.
Diffstat (limited to 'python/google')
-rw-r--r--python/google/protobuf/internal/json_format_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/google/protobuf/internal/json_format_test.py b/python/google/protobuf/internal/json_format_test.py
index ba73c68c..5394c017 100644
--- a/python/google/protobuf/internal/json_format_test.py
+++ b/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):