resolve issue 2014
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index a46b9fa..8c048d0 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -55,6 +55,17 @@
(newdt,), m = xmlrpclib.loads(s, use_datetime=0)
self.assertEquals(newdt, xmlrpclib.DateTime('20050210T11:41:23'))
+ def test_datetime_before_1900(self):
+ # same as before but with an date before 1900
+ dt = datetime.datetime(1, 02, 10, 11, 41, 23)
+ s = xmlrpclib.dumps((dt,))
+ (newdt,), m = xmlrpclib.loads(s, use_datetime=1)
+ self.assertEquals(newdt, dt)
+ self.assertEquals(m, None)
+
+ (newdt,), m = xmlrpclib.loads(s, use_datetime=0)
+ self.assertEquals(newdt, xmlrpclib.DateTime('00010210T11:41:23'))
+
def test_cmp_datetime_DateTime(self):
now = datetime.datetime.now()
dt = xmlrpclib.DateTime(now.timetuple())