| 107 | ], |
| 108 | ) |
| 109 | def test_cell(center, h, rings): |
| 110 | polygon = Polygon(rings) |
| 111 | cell = Cell(center, h, polygon) |
| 112 | assert isinstance(cell.d, float) |
| 113 | assert isinstance(cell.p, float) |
| 114 | assert np.allclose(cell.c, center) |
| 115 | assert cell.h == h |
| 116 | |
| 117 | other = Cell(np.add(center, [0.1, 0.1]), h, polygon) |
| 118 | assert (cell < other) == (cell.d < other.d) |
| 119 | assert (cell > other) == (cell.d > other.d) |
| 120 | assert (cell <= other) == (cell.d <= other.d) |
| 121 | assert (cell >= other) == (cell.d >= other.d) |
| 122 | |
| 123 | |
| 124 | @pytest.mark.parametrize( |