示例#1
0
    def test_checksum_fails(self):
        p = GPHDT()
        p.checksum = '03'
        p.nmea_sentence = '$GPHDT,227.66,T*03'

        result = p.check_chksum()

        self.assertFalse(result)
示例#2
0
    def test_checksum_fails(self):
        p = GPHDT()
        p.checksum = '03'
        p.nmea_sentence = '$GPHDT,227.66,T*03'

        result = p.check_chksum()

        self.assertFalse(result)
示例#3
0
    def test_checksum_passes(self):
        p = GPHDT()
        p.checksum = '02'
        p.nmea_sentence = '$GPHDT,227.66,T*02'

        result = p.check_chksum()

        self.assertTrue(result)
示例#4
0
    def test_checksum_passes(self):
        p = GPHDT()
        p.checksum = '02'
        p.nmea_sentence = '$GPHDT,227.66,T*02'

        result = p.check_chksum()

        self.assertTrue(result)