def testSepIsIncluded(self): """Test to make sure sep argument is used.""" ideal = 'C:\\foo\\bar---2012-12-30-23-11-59.log' got = logutils.timestamped_filename( 'C:\\foo\\bar.log', timestruct=(2012, 12, 30, 23, 11, 59, 0, 1, 0), sep='---') self.assertEqual(ideal, got)
def testAgainstKnownGood(self): ideal = 'C:\\blah_2010-09-08-07-06-05.log' got = logutils.timestamped_filename( 'C:\\blah.log', timestruct=(2010, 9, 8, 7, 6, 5, 4, 3, 0)) self.assertEqual(ideal, got)