def get_full_desat_hhmmss(self): """Return full desat time (if calculated) in hhmmss format. instead of an int in seconds :returns: "hh:mm:ss" full desat time :rtype: str """ if self.full_desat_time_value is not None: return seconds_to_hhmmss(self.full_desat_time_value) else: return seconds_to_hhmmss(self.full_desat_time())
def test_seconds_to_hhmmss_5(self): try: result = seconds_to_hhmmss(-10) except ValueError: pass else: self.fail('should raise ValueError')
def test_seconds_to_hhmmss_5(self): try: _ = seconds_to_hhmmss(-10) except ValueError: pass else: self.fail('should raise ValueError')
def get_no_flight_hhmmss(self): """Return no flight time (if calculated) in hhmmss format. instead of an int in seconds .. note:: This method does not calculate no_flight_time you need to call no_flight_time() or no_flight_time_wo_exception() before. :returns: "hh:mm:ss" no flight time "" (empty string) if no flight time is not calculated :rtype: str """ if self.no_flight_time_value is not None: return seconds_to_hhmmss(self.no_flight_time_value) else: return ""
def get_no_flight_hhmmss(self): """Returns no flight time (if calculated) in hhmmss format instead of an int in seconds .. note:: This method does not calculate no_flight_time you need to call no_flight_time() or no_flight_time_wo_exception() before. *Keyword Arguments:* <none> Returns: str -- "hh:mm:ss" no flight time str -- "" if no flight time is not calculated """ if self.no_flight_time_value is not None: return seconds_to_hhmmss(self.no_flight_time_value) else: return ""
def test_seconds_to_hhmmss_4(self): self.assertEqual(seconds_to_hhmmss(447851), "124:24:11", "Wrong output for seconds to hhmmss: %s" % seconds_to_hhmmss(447851))
def test_seconds_to_hhmmss_3(self): self.assertEqual(seconds_to_hhmmss(875), "00:14:35", "Wrong output for seconds to hhmmss: %s" % seconds_to_hhmmss(875))
def test_seconds_to_hhmmss_2(self): self.assertEqual(seconds_to_hhmmss(100), "00:01:40", "Wrong output for seconds to hhmmss: %s" % seconds_to_hhmmss(100))
def test_seconds_to_hhmmss_4(self): self.assertEqual( seconds_to_hhmmss(447851), "124:24:11", "Wrong output for seconds to hhmmss: %s" % seconds_to_hhmmss(447851))
def test_seconds_to_hhmmss_3(self): self.assertEqual( seconds_to_hhmmss(875), "00:14:35", "Wrong output for seconds to hhmmss: %s" % seconds_to_hhmmss(875))
def test_seconds_to_hhmmss_2(self): self.assertEqual( seconds_to_hhmmss(100), "00:01:40", "Wrong output for seconds to hhmmss: %s" % seconds_to_hhmmss(100))