diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2003-04-25 00:27:24 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2003-04-25 00:27:24 (GMT) |
commit | 0b85203954a293b4fa9baa3551355e7f4e2214e9 (patch) | |
tree | 1ad9f5f8c496366ac9a56cbe8a45604d01b8bd0c | |
parent | a4c2b7485b6c33d0d6221d1a4505350ea9353668 (diff) | |
download | cpython-0b85203954a293b4fa9baa3551355e7f4e2214e9.zip cpython-0b85203954a293b4fa9baa3551355e7f4e2214e9.tar.gz cpython-0b85203954a293b4fa9baa3551355e7f4e2214e9.tar.bz2 |
[Patch #628208] Test the 'nil' extension
-rw-r--r-- | Lib/test/test_xmlrpc.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py index c6feb96..f1d69c9 100644 --- a/Lib/test/test_xmlrpc.py +++ b/Lib/test/test_xmlrpc.py @@ -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) |