def test_sectors_to_seconds(self): # there are 75 sectors per second for sectors in range(38): # round down for sectors in the first half self.assertEqual(libdiscid.sectors_to_seconds(sectors), 0) for sectors in range(38, 76): # round up for sectors in the second half self.assertEqual(libdiscid.sectors_to_seconds(sectors), 1)
def seconds(self): return libdiscid.sectors_to_seconds(self.sectors)
def seconds(self): return libdiscid.sectors_to_seconds(self.sectors) \ if self.sectors is not None else None