diff options
author | Johan Dahlin <johan@src.gnome.org> | 2007-05-01 15:54:05 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2007-05-01 15:54:05 +0000 |
commit | a57fde73b509adcf56a73ae1fb97474d136fd2af (patch) | |
tree | 808278f44be0091211dd0113d6293ea0d6510583 /tests/test_enum.py | |
parent | ecbf8b6315dda927f4f90d8651033eb67c46a187 (diff) | |
download | pygobject-a57fde73b509adcf56a73ae1fb97474d136fd2af.tar.gz pygobject-a57fde73b509adcf56a73ae1fb97474d136fd2af.tar.xz pygobject-a57fde73b509adcf56a73ae1fb97474d136fd2af.zip |
Add a property helper, fixes #338098
* examples/properties.py:
* gobject/Makefile.am:
* gobject/__init__.py:
* gobject/constants.py.in:
* gobject/generate-constants.c: (main):
* gobject/propertyhelper.py:
* tests/Makefile.am:
* tests/test_enum.py:
* tests/test_interface.py:
* tests/test_properties.py:
Add a property helper, fixes #338098
svn path=/trunk/; revision=662
Diffstat (limited to 'tests/test_enum.py')
-rw-r--r-- | tests/test_enum.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/test_enum.py b/tests/test_enum.py index 88d8287..6543cec 100644 --- a/tests/test_enum.py +++ b/tests/test_enum.py @@ -1,20 +1,15 @@ import unittest import warnings +import gobject from gobject import GEnum, GFlags, GObject, GType, PARAM_READWRITE from common import gobject, atk, pango, gtk, gdk class PObject(GObject): - __gproperties__ = { - 'enum': (gtk.WindowType, 'blurb', 'description', - gtk.WINDOW_TOPLEVEL, PARAM_READWRITE), - 'enum2': (gtk.WindowType, 'blurb', 'description', - int(gtk.WINDOW_TOPLEVEL), PARAM_READWRITE), - 'flags': (gtk.AttachOptions, 'blurb', 'description', - gtk.EXPAND, PARAM_READWRITE), - 'flags2': (gtk.AttachOptions, 'blurb', 'description', - int(gtk.EXPAND), PARAM_READWRITE), - } + enum = gobject.property(type=gtk.WindowType, default=gtk.WINDOW_TOPLEVEL) + enum2 = gobject.property(type=gtk.WindowType, default=int(gtk.WINDOW_TOPLEVEL)) + flags = gobject.property(type=gtk.AttachOptions, default=gtk.EXPAND) + flags2 = gobject.property(type=gtk.AttachOptions, default=int(gtk.EXPAND)) class EnumTest(unittest.TestCase): def testEnums(self): |