diff options
author | Martin Pitt <martinpitt@gnome.org> | 2012-11-14 07:09:58 +0100 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2012-11-14 07:09:58 +0100 |
commit | 614cc9594cb34d92a6d4b00773427d4fb023c65e (patch) | |
tree | 8ed08b9538c74755ded1a48aeacaf67f3a5afa35 /tests/test_unknown.py | |
parent | 9d7771affcf788d251cced65da56fc2773a278b3 (diff) | |
download | pygobject-614cc9594cb34d92a6d4b00773427d4fb023c65e.tar.gz |
test_unknown.py: Check property interface
NB that the property implementation in test-unknown.c does not actually do
anything, we just want to assert that the properties are properly registered.
Diffstat (limited to 'tests/test_unknown.py')
-rw-r--r-- | tests/test_unknown.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_unknown.py b/tests/test_unknown.py index ca5d4602..20f30055 100644 --- a/tests/test_unknown.py +++ b/tests/test_unknown.py @@ -16,3 +16,13 @@ class TestUnknown(unittest.TestCase): TestUnknown = GObject.new(TestUnknownGType).__class__ assert isinstance(obj, testhelper.Interface) assert isinstance(obj, TestUnknown) + + def test_property(self): + obj = testhelper.get_unknown() + self.assertEqual(obj.get_property('some-property'), None) + obj.set_property('some-property', 'foo') + + def test_unknown_property(self): + obj = testhelper.get_unknown() + self.assertRaises(TypeError, obj.get_property, 'unknown') + self.assertRaises(TypeError, obj.set_property, 'unknown', '1') |