From 0c54799197712812735ab19401379023792b8829 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Wed, 5 Jul 2006 14:52:26 +0000 Subject: 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. --- tests/Makefile.am | 1 + tests/test_api.py | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 tests/test_api.py (limited to 'tests') 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) -- cgit v1.2.1