summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-11-19 18:51:54 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-11-19 18:51:54 (GMT)
commit07529354dba821ddfa8ee0a14a9302e352eb8173 (patch)
tree48143b330356fc0f25a75dbecbb66e48e8f17740 /Lib/test
parent9eec51c04ff9d04c74724aa6cd499457b64c75f9 (diff)
downloadcpython-07529354dba821ddfa8ee0a14a9302e352eb8173.zip
cpython-07529354dba821ddfa8ee0a14a9302e352eb8173.tar.gz
cpython-07529354dba821ddfa8ee0a14a9302e352eb8173.tar.bz2
Patch #1070046: Marshal new-style objects like InstanceType
in xmlrpclib.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_xmlrpc.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index 64d8fe8..ccc1b60 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -86,6 +86,15 @@ class XMLRPCTestCase(unittest.TestCase):
s = xmlrpclib.dumps((new_d,), methodresponse=True)
self.assert_(isinstance(s, str))
+ def test_newstyle_class(self):
+ class T(object):
+ pass
+ t = T()
+ t.x = 100
+ t.y = "Hello"
+ ((t2,), dummy) = xmlrpclib.loads(xmlrpclib.dumps((t,)))
+ self.assertEquals(t2, t.__dict__)
+
def test_dump_big_long(self):
self.assertRaises(OverflowError, xmlrpclib.dumps, (2L**99,))