mirror of https://github.com/python/cpython
[Patch #628208] Test the 'nil' extension
This commit is contained in:
parent
a4c2b7485b
commit
0b85203954
|
@ -29,6 +29,14 @@ class XMLRPCTestCase(unittest.TestCase):
|
|||
self.assertRaises(OverflowError, xmlrpclib.dumps,
|
||||
(int(2L**34),))
|
||||
|
||||
def test_dump_none(self):
|
||||
value = alist + [None]
|
||||
arg1 = (alist + [None],)
|
||||
strg = xmlrpclib.dumps(arg1, allow_none=True)
|
||||
self.assertEquals(value,
|
||||
xmlrpclib.loads(strg)[0][0])
|
||||
self.assertRaises(TypeError, xmlrpclib.dumps, (arg1,))
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(XMLRPCTestCase)
|
||||
|
||||
|
|
Loading…
Reference in New Issue