Example #1
0
 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 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)
Example #3
0
 def seconds(self):
   return libdiscid.sectors_to_seconds(self.sectors)
Example #4
0
 def seconds(self):
   return libdiscid.sectors_to_seconds(self.sectors) \
       if self.sectors is not None else None
Example #5
0
 def seconds(self):
   return libdiscid.sectors_to_seconds(self.sectors)
Example #6
0
 def seconds(self):
   return libdiscid.sectors_to_seconds(self.sectors) \
       if self.sectors is not None else None