Esempio n. 1
0
 def test_format_time(self):
     timetuple = (2005, 11, 2, 14, 23, 12, 123)
     for seps, exp in [(('-', ' ', ':'), '2005-11-02 14:23:12'),
                       (('', '-', ''), '20051102-142312'),
                       (('-', ' ', ':', '.'), '2005-11-02 14:23:12.123')]:
         assert_equal(format_time(timetuple, *seps), exp)
Esempio n. 2
0
 def test_format_time(self):
     timetuple = (2005, 11, 2, 14, 23, 12, 123)
     for seps, exp in [(('-',' ',':'), '2005-11-02 14:23:12'),
                       (('', '-', ''), '20051102-142312'),
                       (('-',' ',':','.'), '2005-11-02 14:23:12.123')]:
         assert_equal(format_time(timetuple, *seps), exp)