forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-python/protobuf-python: fix tests
Bug: https://bugs.gentoo.org/934062 Signed-off-by: Sam James <[email protected]>
- Loading branch information
1 parent
f4c0928
commit de15b02
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
See also https://github.com/protocolbuffers/protobuf/pull/9098 | ||
--- a/google/protobuf/internal/json_format_test.py | ||
+++ b/google/protobuf/internal/json_format_test.py | ||
@@ -1060,7 +1060,7 @@ class JsonFormatTest(JsonFormatBase): | ||
def testInvalidTimestamp(self): | ||
message = json_format_proto3_pb2.TestTimestamp() | ||
text = '{"value": "10000-01-01T00:00:00.00Z"}' | ||
- self.assertRaisesRegexp( | ||
+ self.assertRaisesRegex( | ||
json_format.ParseError, 'Failed to parse value field: ' | ||
'time data \'10000-01-01T00:00:00\' does not match' | ||
' format \'%Y-%m-%dT%H:%M:%S\' at TestTimestamp.value.', | ||
@@ -1097,7 +1097,7 @@ class JsonFormatTest(JsonFormatBase): | ||
def testInvalidOneof(self): | ||
message = json_format_proto3_pb2.TestOneof() | ||
text = '{"oneofInt32Value": 1, "oneofStringValue": "2"}' | ||
- self.assertRaisesRegexp( | ||
+ self.assertRaisesRegex( | ||
json_format.ParseError, 'Message type "proto3.TestOneof"' | ||
' should not have multiple "oneof_value" oneof fields at "TestOneof".', | ||
json_format.Parse, text, message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters