def test_vector_broken_2(self): computed_vector = Vector.compute(Position(0, 1), Position(1, 5)) computed_vector_2 = Vector.compute(Position(0, 1), Position(3, 8)) self.assertTrue(computed_vector != computed_vector_2)
def test_vector_broken(self): computed_vector = Vector.compute(Position(3, 4), Position(2, 2)) computed_vector_2 = Vector.compute(Position(3, 4), Position(1, 0)) self.assertTrue(computed_vector != computed_vector_2)
def test_vector_more_complex_path(self): computed_vector = Vector.compute(Position(1, 1), Position(4, 3)) self.assertTrue( Vector.compute(Position(1, 1), Position(4, 3)) == Vector(-2, 3))
def test_vector_no_y_change(self): computed_vector = Vector.compute(Position(0, 0), Position(2, 0)) self.assertTrue( Vector.compute(Position(0, 0), Position(2, 0)) == Vector(0, 1))
def test_vector_is_reduced(self): computed_vector = Vector.compute(Position(0, 0), Position(2, 2)) self.assertTrue(computed_vector == Vector(-1, 1))
def test_vector(self): computed_vector = Vector.compute(Position(0, 0), Position(2, 3)) self.assertTrue(computed_vector == Vector(-3, 2))