diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2012-09-17 15:37:04 -0400 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-01-17 08:06:12 +0100 |
commit | fd32acdd97f49f086a8ad5cf2b65862c4e6ccc44 (patch) | |
tree | 7873ef8d01874b436f85916c403fc743c138727d /tests/test_properties.py | |
parent | 9a2060f26c2cc2f9ef79ab6fb9f512c317004856 (diff) | |
download | pygobject-fd32acdd97f49f086a8ad5cf2b65862c4e6ccc44.tar.gz |
gobject: Go through introspection on property setting
Consider introspected properties in object.set_property().
https://bugzilla.gnome.org/show_bug.cgi?id=684062
Diffstat (limited to 'tests/test_properties.py')
-rw-r--r-- | tests/test_properties.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/test_properties.py b/tests/test_properties.py index d19970f3..d0552e08 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -715,7 +715,7 @@ class TestProperty(unittest.TestCase): self.assertEqual(b.prop1, 20) def test_property_subclass_c(self): - class A(GIMarshallingTests.PropertiesObject): + class A(Regress.TestSubObj): prop1 = GObject.Property(type=int) a = A() @@ -723,8 +723,15 @@ class TestProperty(unittest.TestCase): self.assertEqual(a.prop1, 10) # also has parent properties - a.props.some_int = 20 - self.assertEqual(a.props.some_int, 20) + a.props.int = 20 + self.assertEqual(a.props.int, 20) + + # Some of which are unusable without introspection + a.props.list = ("str1", "str2") + self.assertEqual(a.props.list, ["str1", "str2"]) + + a.set_property("list", ("str3", "str4")) + self.assertEqual(a.props.list, ["str3", "str4"]) def test_property_subclass_custom_setter(self): # test for #523352 |