From 923d2c7ccf2d60705469ace6ba1dce9ca80c0678 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Mon, 6 Jun 2016 13:57:59 -0700 Subject: [PATCH] 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. --- python/google/protobuf/internal/json_format_test.py | 4 ++-- 1 file 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 ba73c68c18..5394c0173c 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):