Browse Source

property Triangle.vertex_indices now read-only [breaking]

Fabian Peter Hammerle 5 years ago
parent
commit
140dce0a44
1 changed files with 15 additions and 0 deletions
  1. 15 0
      tests/test_polygonal_circuit.py

+ 15 - 0
tests/test_polygonal_circuit.py

@@ -18,6 +18,21 @@ def test_init_iterator():
     assert circuit.vertex_indices == (1, 2, 3, 5)
 
 
+def test_init_tuple():
+    circuit = _PolygonalCircuit((1, 2, 3, 5))
+    assert circuit.vertex_indices == (1, 2, 3, 5)
+
+
+def test_init_list():
+    circuit = _PolygonalCircuit([1, 2, 3, 5])
+    assert circuit.vertex_indices == (1, 2, 3, 5)
+
+
+def test_init_iterator():
+    circuit = _PolygonalCircuit(iter([1, 2, 3, 5]))
+    assert circuit.vertex_indices == (1, 2, 3, 5)
+
+
 @pytest.mark.parametrize(('source_vertex_indices', 'expected_vertex_indices'), [
     ((1,), (1,)),
     ((1, 2), (1, 2)),