Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/python/bl_pyapi_idprop.py')
-rw-r--r--tests/python/bl_pyapi_idprop.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/python/bl_pyapi_idprop.py b/tests/python/bl_pyapi_idprop.py
index 4cee39fafb0..e9056137bcf 100644
--- a/tests/python/bl_pyapi_idprop.py
+++ b/tests/python/bl_pyapi_idprop.py
@@ -172,6 +172,14 @@ class TestIdPropertyGroupView(TestHelper, unittest.TestCase):
self.assertEqual(list(self.id.items()), [(k, v) for v, k in enumerate(text)])
self.assertEqual(list(reversed(self.id.items())), list(reversed([(k, v) for v, k in enumerate(text)])))
+ # Check direct iteration is working as expected.
+ self.id["group"] = {ch: i for i, ch in enumerate(text)}
+ group = self.id["group"]
+
+ self.assertEqual(len(group), len(text))
+ self.assertEqual(list(iter(group)), text)
+
+
def test_contains(self):
# Check `idprop.types.IDPropertyGroupView{Keys/Values/Items}.__contains__`
text = ["A", "B", "C"]