示例#1
0
 def test_offset_by_time_invalid(self):
     with self.assertRaises(_ud.UdunitsError) as cm:
         _ud.offset_by_time(self.metre, -31622400.0)
     ex = cm.exception
示例#2
0
    def test_offset_by_time_valid(self):
        time_since = _ud.offset_by_time(self.second, -31622400.0)

        self.assertIsNotNone(time_since)