Ejemplo n.º 1
0
 def test_seconds_without_time_unit(self):
     timedict = {'digital_unit': '12', 'time_unit': None}
     self.assertEqual(12, to_seconds(**timedict))
Ejemplo n.º 2
0
 def test_seconds(self):
     timedict = {'digital_unit': '10', 'time_unit': 's'}
     self.assertEqual(10, to_seconds(**timedict))
Ejemplo n.º 3
0
 def test_hours(self):
     timedict = {'digital_unit': '4', 'time_unit': 'h'}
     self.assertEqual(14400, to_seconds(**timedict))
Ejemplo n.º 4
0
 def test_minutes(self):
     timedict = {'digital_unit': '26', 'time_unit': 'm'}
     self.assertEqual(1560, to_seconds(**timedict))
Ejemplo n.º 5
0
 def test_days(self):
     timedict = {'digital_unit': '2', 'time_unit': 'd'}
     self.assertEqual(172800, to_seconds(**timedict))