diff options
-rw-r--r-- | tests/Makefile.am | 12 | ||||
-rw-r--r-- | tests/common.py | 9 | ||||
-rw-r--r-- | tests/enum.py | 1 |
3 files changed, 10 insertions, 12 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index c592b96..d7ef601 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -3,8 +3,12 @@ tests = \ enum.py \ signal.py -check-local: - @PYTHONPATH=$(top_builddir):$(top_builddir)/.libs:$(top_builddir)/gtk/.libs $(PYTHON) $(srcdir)/runtests.py - @rm -fr *.pyc +PYTHONPATH = $(top_builddir):$(top_builddir)/gobject:$(top_srcdir):$(top_srcdir)/gtk -EXTRA_DIST = $(tests) runtests.py +check-local: $(top_srcdir)/gtk/__init__.py + @if ! test -e $(top_builddir)/gtk/__init__.py; then cp $(top_srcdir)/gtk/__init__.py $(top_builddir)/gtk/__init__.py; fi + @PYTHONPATH=$(PYTHONPATH) $(PYTHON) $(srcdir)/runtests.py + @if test "$(top_builddir)" != "$(top_srcdir)"; then rm -f $(top_builddir)/gtk/__init__.py*; fi + @rm -fr *.pyc + +EXTRA_DIST = $(tests) common.py runtests.py diff --git a/tests/common.py b/tests/common.py index d65fb3b..b5eb774 100644 --- a/tests/common.py +++ b/tests/common.py @@ -1,16 +1,11 @@ -import os -import sys - -# Don't insert before . (first in list) -sys.path.insert(1, os.path.join('../gobject/.libs')) -sys.path.insert(1, os.path.join('../gtk/.libs')) +import ltihooks import gobject import atk import pango + import gtk from gtk import gdk from gtk import glade -import ltihooks ltihooks.uninstall() diff --git a/tests/enum.py b/tests/enum.py index c1665a8..11b73ea 100644 --- a/tests/enum.py +++ b/tests/enum.py @@ -24,7 +24,6 @@ class EnumTest(unittest.TestCase): assert atk.LAYER_INVALID != atk.LAYER_BACKGROUND def testWindowGetState(self): - # Usage through properties/external methods win = gtk.Window() win.realize() |