You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by yu...@apache.org on 2022/01/08 08:17:32 UTC
[thrift] branch master updated: Remove excess assertions
This is an automated email from the ASF dual-hosted git repository.
yuxuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 9d7d627 Remove excess assertions
9d7d627 is described below
commit 9d7d627b518f84d6f7bfee76f1d7410e63c4fe7c
Author: Ali-Akber Saifee <al...@indydevs.org>
AuthorDate: Fri Jan 7 07:58:13 2022 -0800
Remove excess assertions
Asserting on trying to deserialize None, or an invalid serialized
buffer result in different exceptions being raised in python2/3.
---
lib/py/test/thrift_TSerializer.py | 4 ----
1 file changed, 4 deletions(-)
diff --git a/lib/py/test/thrift_TSerializer.py b/lib/py/test/thrift_TSerializer.py
index b941654..0a66b92 100644
--- a/lib/py/test/thrift_TSerializer.py
+++ b/lib/py/test/thrift_TSerializer.py
@@ -53,10 +53,7 @@ class TestSerializer(unittest.TestCase):
42, deserialize(Message(), serialized, factory).num
)
- self.assertRaises(EOFError, deserialize, Message(), None, factory)
self.assertRaises(EOFError, deserialize, Message(), b'', factory)
- self.assertRaises(TypeError, deserialize, Message(), "test", factory)
-
def test_TBinaryProtocol(self):
buf = TTransport.TMemoryBuffer()
@@ -64,7 +61,6 @@ class TestSerializer(unittest.TestCase):
factory = TBinaryProtocolFactory(transport)
self.verify(self.binary_serialized, factory)
-
def test_TBinaryProtocolAccelerated(self):
buf = TTransport.TMemoryBuffer()
transport = TTransport.TBufferedTransportFactory().getTransport(buf)