Exemplo n.º 1
0
 def test_explicit_timestamp(self):
     timestamp = datetime.datetime(1975, 4, 9, 12, 34, 56)
     formatted_timestamp = timestamp.strftime(self.time_format)
     self.assertEqual(formatted_timestamp,
                      bench.filename_timestamp(timestamp))
Exemplo n.º 2
0
 def test_explicit_timestamp(self):
     timestamp = datetime.datetime(1975, 4, 9, 12, 34, 56)
     formatted_timestamp = timestamp.strftime(self.time_format)
     self.assertEqual(
         formatted_timestamp, bench.filename_timestamp(timestamp)
     )
Exemplo n.º 3
0
 def test_format_without_arguments(self):
     time = bench.filename_timestamp()
     try:
         datetime.datetime.strptime(time, self.time_format)
     except ValueError:
         self.fail('unexpected date format')
Exemplo n.º 4
0
 def test_format_without_arguments(self):
     time = bench.filename_timestamp()
     try:
         datetime.datetime.strptime(time, self.time_format)
     except ValueError:
         self.fail('unexpected date format')