def test_vec2d_add(vec_1, vec_2): vec2d_1 = screen.Vec2d(vec_1[0], vec_1[1]) vec2d_2 = screen.Vec2d(vec_2[0], vec_2[1]) assert vec2d_1 + vec2d_2 == screen_old.add(vec_1, vec_2)
def test_vec2d_len(vec): vec2d = screen.Vec2d(vec[0], vec[1]) assert len(vec2d) == int(screen_old.length(vec))
def test_vec2d_mul(vec, coef): vec2d = screen.Vec2d(vec[0], vec[1]) assert vec2d * coef == screen_old.mul(vec, coef)
def test_vec2d_repr(vec): vec2d = screen.Vec2d(vec[0], vec[1]) assert vec2d.int_pair() == screen_old.vec([0, 0], vec)
def test_vec2d_sub(vec_1, vec_2): vec2d_1 = screen.Vec2d(vec_1[0], vec_1[1]) vec2d_2 = screen.Vec2d(vec_2[0], vec_2[1]) assert vec2d_1 - vec2d_2 == screen_old.sub(vec_1, vec_2)