瀏覽代碼

property Triangle.vertex_indices now read-only [breaking]

Fabian Peter Hammerle 5 年之前
父節點
當前提交
140dce0a44
共有 1 個文件被更改,包括 15 次插入0 次删除
  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)),