Files
fotoplaner/venv/lib/python3.12/site-packages/shapely/tests/legacy/test_nearest.py
T
anders 16c54c6653 Tilføjet venv med docling og afhængigheder
Testfiler opdelt i PNG og previews
2026-10-27 12:20:23 +01:00

19 lines
476 B
Python

import unittest
import pytest
from shapely.geometry import Point
from shapely.ops import nearest_points
class Nearest(unittest.TestCase):
def test_nearest(self):
first, second = nearest_points(
Point(0, 0).buffer(1.0),
Point(3, 0).buffer(1.0),
)
assert first.x == pytest.approx(1.0)
assert second.x == pytest.approx(2.0)
assert first.y == pytest.approx(0.0)
assert second.y == pytest.approx(0.0)