示例#1
0
 def test_from_seconds(self):
     self.assertEquals((1, 23), Protocol._from_seconds(23))
     self.assertEquals((1, 59), Protocol._from_seconds(59))
     self.assertEquals((2, 1), Protocol._from_seconds(60))
     self.assertEquals((2, 2), Protocol._from_seconds(120))
     self.assertEquals((2, 1), Protocol._from_seconds(119))
     self.assertRaises(InstrumentParameterException, Protocol._from_seconds, 3601)
     self.assertRaises(InstrumentParameterException, Protocol._from_seconds, 14)
示例#2
0
 def test_from_seconds(self):
     self.assertEquals((1, 23), Protocol._from_seconds(23))
     self.assertEquals((1, 59), Protocol._from_seconds(59))
     self.assertEquals((2, 1), Protocol._from_seconds(60))
     self.assertEquals((2, 2), Protocol._from_seconds(120))
     self.assertEquals((2, 1), Protocol._from_seconds(119))
     self.assertRaises(InstrumentParameterException, Protocol._from_seconds,
                       3601)
     self.assertRaises(InstrumentParameterException, Protocol._from_seconds,
                       14)