Exemple #1
0
 def testPrettyTimes(self):
     """Convert seconds to pretty and back"""
     now = int(time.time())
     for i in [1, 200000, now]:
         assert Time.prettytotime(Time.timetopretty(i)) == i, i
     assert Time.prettytotime("now") is None
     assert Time.prettytotime("12314") is None
 def testPrettyTimes(self):
     """Convert seconds to pretty and back"""
     now = int(time.time())
     for i in [1, 200000, now]:
         self.assertEqual(Time.prettytotime(Time.timetopretty(i)), i)
     self.assertIsNone(Time.prettytotime("now"))
     self.assertIsNone(Time.prettytotime("12314"))
Exemple #3
0
	def testPrettyTimes(self):
		"""Convert seconds to pretty and back"""
		now = int(time.time())
		for i in [1, 200000, now]:
			assert Time.prettytotime(Time.timetopretty(i)) == i, i
		assert Time.prettytotime("now") is None
		assert Time.prettytotime("12314") is None