def test_translate_zero(self):
        "test that tangent equals itself after translation of (0, 0)"

        circ1 = Circle()
        circ2 = Circle(Vec2D(4, 0))

        tan = Tangent(Vec2D(0, 1), circ1, 1, Vec2D(4, 1), circ2, -1)

        translated = tan + Vec2D()

        self.assertTrue(tan.is_equal(translated))
        self.assertTrue(translated.is_equal(tan))
    def test_translate_general(self):
        "test translation by non-zero vector"

        circ1 = Circle()
        circ2 = Circle(Vec2D(4, 0))

        translation = Vec2D(1, 0)

        original = Tangent(Vec2D(0, 1), circ1, 1, Vec2D(4, 1), circ2, -1)

        translated = original + translation

        v_circ1 = Circle(Vec2D(1, 0))
        v_circ2 = Circle(Vec2D(5, 0))

        verifier = Tangent(Vec2D(1, 1), v_circ1, 1, Vec2D(5, 1), v_circ2, -1)

        self.assertTrue(verifier.is_equal(translated))
        self.assertTrue(translated.is_equal(verifier))