Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_time_in_seconds(self):
self.assertEqual(0, convert.ms_to_s(400))
self.assertEqual(1, convert.ms_to_s(501))
self.assertEqual(36, convert.ms_to_s(36000))
def test_time_in_seconds(self):
self.assertEqual(0, convert.ms_to_s(400))
self.assertEqual(1, convert.ms_to_s(501))
self.assertEqual(36, convert.ms_to_s(36000))
def test_invalid_time(self):
# Sometimes really large times are reported during buffering, this test
# handles those special cases.
self.assertEqual(0, convert.ms_to_s(2**32 - 1))
def test_no_time_returns_zero(self):
self.assertEqual(0, convert.ms_to_s(None))
def test_time_in_seconds(self):
self.assertEqual(0, convert.ms_to_s(400))
self.assertEqual(1, convert.ms_to_s(501))
self.assertEqual(36, convert.ms_to_s(36000))
def test_time_in_seconds(self):
self.assertEqual(0, convert.ms_to_s(400))
self.assertEqual(1, convert.ms_to_s(501))
self.assertEqual(36, convert.ms_to_s(36000))
def test_invalid_time(self):
# Sometimes really large times are reported during buffering, this test
# handles those special cases.
self.assertEqual(0, convert.ms_to_s(2**32 - 1))
def _get_time_in_seconds(self, tag):
time = parser.first(self.playstatus, 'cmst', tag)
return convert.ms_to_s(time)