diff options
author | Johan Dahlin <johan@src.gnome.org> | 2006-07-05 14:52:26 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2006-07-05 14:52:26 +0000 |
commit | 0c54799197712812735ab19401379023792b8829 (patch) | |
tree | e419a819957a975c03321d0a322009ca9669e1b1 /tests | |
parent | 158516210b4e9a8704dc4abdf859e500b6470b97 (diff) | |
download | pygtk-0c54799197712812735ab19401379023792b8829.tar.gz |
Add infrastructure to handle lazy loading. Move keysyms to be loaded
* gtk/Makefile.am:
* gtk/__init__.py:
* gtk/_lazyutils.py:
* tests/Makefile.am:
* tests/test_api.py:
Add infrastructure to handle lazy loading.
Move keysyms to be loaded lazily.
Add API tests to make sure keysyms works.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/test_api.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 56dd262d..a10bdd68 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,7 @@ EXTRA_DIST = $(tests) common.py runtests.py testmodule.py leak.glade tests = \ + test_api.py \ test_glade.py \ test_conversion.py \ test_dialog.py \ diff --git a/tests/test_api.py b/tests/test_api.py new file mode 100644 index 00000000..9b715cd5 --- /dev/null +++ b/tests/test_api.py @@ -0,0 +1,8 @@ +import unittest + +from common import gtk + +class APITest(unittest.TestCase): + def testKeysyms(self): + self.failUnless(hasattr(gtk.keysyms, 'Escape')) + self.assertEqual(gtk.keysyms.Escape, 0xFF1B) |