LinearRing_test.py
Go to the documentation of this file.
1 #==============================================================================
2 # Copyright (C) 2021-2024 Wageningen University - All Rights Reserved
3 # Author: Gonzalo Mier
4 # BSD-3 License
5 #==============================================================================
6 
7 import pytest
8 import fields2cover as f2c
9 
10 def near(a, b):
11  assert pytest.approx(a) == pytest.approx(b)
12 
13 
15  ring1 = f2c.LinearRing();
16  ring1.addPoint(1,1);
17  ring1.addPoint(2,1);
18  near(ring1.size(), 2);
19  ring2 = f2c.LinearRing(f2c.VectorPoint([f2c.Point(1,2), f2c.Point(3,2), f2c.Point(1,3)]));
20  near(ring2.size(), 3);
21 
LinearRing_test.test_fields2cover_types_linearring_init
def test_fields2cover_types_linearring_init()
Definition: LinearRing_test.py:14
LinearRing_test.near
def near(a, b)
Definition: LinearRing_test.py:10


fields2cover
Author(s):
autogenerated on Fri Apr 25 2025 02:18:31