[babl/HEAD: 1/3] tests: Add test setup for introspection bindings in Python
- From: Jon Nordby <jonnor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl/HEAD: 1/3] tests: Add test setup for introspection bindings in Python
- Date: Tue, 31 Jul 2012 10:54:45 +0000 (UTC)
commit dd8669b1ef8f87089a8674a8b797e4a3573dce4b
Author: Jon Nordby <jononor gmail com>
Date: Sun Jul 29 15:39:27 2012 +0200
tests: Add test setup for introspection bindings in Python
tests/Makefile.am | 18 +++++++++++++++---
tests/introspection.py | 17 +++++++++++++++++
2 files changed, 32 insertions(+), 3 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a13270d..27e8bbd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,7 +2,7 @@ if OS_UNIX
CONCURRENCY_STRESS_TEST = concurrency-stress-test
endif
-TESTS = \
+C_TESTS = \
grayscale_to_rgb \
rgb_to_bgr \
rgb_to_ycbcr \
@@ -21,7 +21,16 @@ TESTS = \
cairo-RGB24 \
$(CONCURRENCY_STRESS_TEST)
-TESTS_ENVIRONMENT = BABL_PATH=$(top_builddir)/extensions/.libs
+if HAVE_INTROSPECTION
+INTROSPECTION_TESTS = \
+ introspection.py
+endif
+
+TESTS = \
+ $(C_TESTS) \
+ $(INTROSPECTION_TESTS)
+
+TESTS_ENVIRONMENT = LD_LIBRARY_PATH=$(top_builddir)/babl:$LD_LIBRARY_PATH GI_TYPELIB_PATH=$(top_builddir)/babl BABL_PATH=$(top_builddir)/extensions/.libs
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/babl
if OS_UNIX
@@ -33,6 +42,9 @@ LDADD = $(top_builddir)/babl/libbabl- BABL_API_VERSION@.la \
EXTRA_DIST=common.inc
+noinst_SCRIPTS = \
+ introspection.py
+
noinst_PROGRAMS = \
introspect \
babl_fish_path_fitness \
@@ -40,4 +52,4 @@ noinst_PROGRAMS = \
babl-html-dump \
conversions \
formats \
- $(TESTS)
+ $(C_TESTS)
diff --git a/tests/introspection.py b/tests/introspection.py
new file mode 100755
index 0000000..5b64ae1
--- /dev/null
+++ b/tests/introspection.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+import unittest
+
+class TestSanity(unittest.TestCase):
+
+ def test_import(self):
+ import gi
+ from gi.repository import Babl
+
+ def test_init(self):
+ import gi
+ from gi.repository import Babl
+ Babl.init()
+
+if __name__ == '__main__':
+ unittest.main()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]