Commit 9c012ed0 authored by Jie Luo's avatar Jie Luo Committed by GitHub

Add __bool__ as well as __nonzero__ for python3

parent a4847948
......@@ -166,6 +166,9 @@ class MessageTest(BaseTestCase):
def __nonzero__(self):
raise BadArgError()
def __bool__(self):
raise BadArgError()
with self.assertRaises(BadArgError):
golden_message.SerializeToString(deterministic=BadArg())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment