Exemple #1
0
 def testDateTime2(self):
     ds1 = uriDate()
     ts1 = uriTime()
     dt1 = uriDateTime()
     t   = time()
     ds2 = uriDate(t)
     ts2 = uriTime(t)
     dt2 = uriDateTime(t)
     self.assertEqual(ds1, ds2, "testDateTime2, date: "+str((ds1,ds2)) )
     self.assertEqual(ts1, ts2, "testDateTime2, time: "+str((ts1,ts2)) )
     self.assertEqual(dt1, dt2, "testDateTime2, datetime: "+str((dt1,dt2)) )
Exemple #2
0
 def testDateTime2(self):
     ds1 = uriDate()
     ts1 = uriTime()
     dt1 = uriDateTime()
     t = time()
     ds2 = uriDate(t)
     ts2 = uriTime(t)
     dt2 = uriDateTime(t)
     self.assertEqual(ds1, ds2, "testDateTime2, date: " + str((ds1, ds2)))
     self.assertEqual(ts1, ts2, "testDateTime2, time: " + str((ts1, ts2)))
     self.assertEqual(dt1, dt2, "testDateTime2, datetime: " + str(
         (dt1, dt2)))
Exemple #3
0
 def testTime1(self):
     t = mktime((2007, 3, 8, 16, 25, 30, 0, 0, 0))
     self.assertEqual(uriTime(t), "162530", "testTime1")
Exemple #4
0
 def testTime1(self):
     t = mktime((2007,3,8,16,25,30,0,0,0))
     self.assertEqual(uriTime(t), "162530", "testTime1")