"""Tests para point_in_ring."""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))

from python.functions.geo.point_in_ring import point_in_ring

SQUARE = [(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0)]


def test_punto_dentro_cuadrado():
    assert point_in_ring(0.5, 0.5, SQUARE) is True


def test_punto_fuera_cuadrado():
    assert point_in_ring(2.0, 2.0, SQUARE) is False


def test_ring_menor_3_vertices():
    assert point_in_ring(0.0, 0.0, [(0.0, 0.0), (1.0, 1.0)]) is False
