mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
[Patch #628208] Test the 'nil' extension
This commit is contained in:
parent
a4c2b7485b
commit
0b85203954
1 changed files with 8 additions and 0 deletions
|
|
@ -29,6 +29,14 @@ class XMLRPCTestCase(unittest.TestCase):
|
||||||
self.assertRaises(OverflowError, xmlrpclib.dumps,
|
self.assertRaises(OverflowError, xmlrpclib.dumps,
|
||||||
(int(2L**34),))
|
(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():
|
def test_main():
|
||||||
test_support.run_unittest(XMLRPCTestCase)
|
test_support.run_unittest(XMLRPCTestCase)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue