def filter_reports_by_age(report): try: ts,__,__ = os.path.basename(report).split('_') if now - fromTimestamp(ts) > delta: return True except (InvalidTimestampFormat, ValueError): return False
def test_fromTimestamp(self): time_stamp = otime.timestamp(test_date) self.assertEqual(test_date, otime.fromTimestamp(time_stamp))