예제 #1
0
    def test_duplicate_unequal(self):
        """Tests the duplicate function for nonequal positions."""
        gps1 = GpsPosition(latitude=0, longitude=0)
        gps2 = GpsPosition(latitude=1, longitude=0)
        gps3 = GpsPosition(latitude=0, longitude=1)

        self.assertFalse(gps1.duplicate(gps2))
        self.assertFalse(gps1.duplicate(gps3))
예제 #2
0
    def test_duplicate_equal(self):
        """Tests the duplicate function for equal positiions."""
        gps1 = GpsPosition(latitude=1, longitude=1)
        gps2 = GpsPosition(latitude=1, longitude=1)

        self.assertTrue(gps1.duplicate(gps2))