diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:47:13 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:47:16 +0900 |
commit | 0c23c15365643b062119d3e0335f62a39835fd5e (patch) | |
tree | 691e70cfd6bbc9da67a3869f629819059a30c89e /tests | |
parent | e49df4afb1654f59a39d02e6ec0ecdf537ce9351 (diff) | |
download | pygobject2-0c23c15365643b062119d3e0335f62a39835fd5e.tar.gz pygobject2-0c23c15365643b062119d3e0335f62a39835fd5e.tar.bz2 pygobject2-0c23c15365643b062119d3e0335f62a39835fd5e.zip |
Imported Upstream version 3.3.90
Change-Id: I2320e829dc2f47614d46efbbf92575dc9c71980e
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/Makefile.in | 34 | ||||
-rw-r--r-- | tests/test_gi.py | 14 | ||||
-rw-r--r-- | tests/test_overrides.py | 55 |
4 files changed, 75 insertions, 32 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 950385e..e35a737 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -107,9 +107,9 @@ RUN_TESTS_ENV_VARS= \ check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled @echo " CHECK Pyflakes" - @pyflakes $(top_srcdir) + @if type pyflakes >/dev/null 2>&1; then pyflakes $(top_srcdir); else echo "skipped, pyflakes not installed"; fi @echo " CHECK PEP8" - @pep8 --ignore=E501,E123 --repeat --show-source $(top_srcdir) + @if type pep8 >/dev/null 2>&1; then pep8 --ignore=E501,E123,E124 --repeat --show-source $(top_srcdir); else echo "skipped, pep8 not installed"; fi $(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning $(srcdir)/runtests.py check.gdb: diff --git a/tests/Makefile.in b/tests/Makefile.in index d12cc85..0e0b2bc 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.11.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,10 +55,8 @@ subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/libtool.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/jhflags.m4 $(top_srcdir)/m4/python.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -105,6 +120,11 @@ am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(nodist_libgimarshallingtests_la_SOURCES) \ $(nodist_libregress_la_SOURCES) $(testhelper_la_SOURCES) DIST_SOURCES = $(testhelper_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -703,9 +723,9 @@ clean-local: check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled @echo " CHECK Pyflakes" - @pyflakes $(top_srcdir) + @if type pyflakes >/dev/null 2>&1; then pyflakes $(top_srcdir); else echo "skipped, pyflakes not installed"; fi @echo " CHECK PEP8" - @pep8 --ignore=E501,E123 --repeat --show-source $(top_srcdir) + @if type pep8 >/dev/null 2>&1; then pep8 --ignore=E501,E123,E124 --repeat --show-source $(top_srcdir); else echo "skipped, pep8 not installed"; fi $(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) -Wd -Werror::PendingDeprecationWarning -Werror::DeprecationWarning $(srcdir)/runtests.py check.gdb: diff --git a/tests/test_gi.py b/tests/test_gi.py index 3862334..fbe832c 100644 --- a/tests/test_gi.py +++ b/tests/test_gi.py @@ -2067,6 +2067,20 @@ class TestGErrorReturn(unittest.TestCase): self.assertEqual(error.message, GIMarshallingTests.CONSTANT_GERROR_MESSAGE) +class TestParamSpec(unittest.TestCase): + def test_param_spec_return(self): + obj = GIMarshallingTests.param_spec_return() + self.assertEqual(obj.name, 'test-param') + self.assertEqual(obj.nick, 'test') + self.assertEqual(obj.value_type, GObject.TYPE_STRING) + + def test_param_spec_out(self): + obj = GIMarshallingTests.param_spec_out() + self.assertEqual(obj.name, 'test-param') + self.assertEqual(obj.nick, 'test') + self.assertEqual(obj.value_type, GObject.TYPE_STRING) + + class TestKeywordArgs(unittest.TestCase): def test_calling(self): diff --git a/tests/test_overrides.py b/tests/test_overrides.py index 3990454..c9b8682 100644 --- a/tests/test_overrides.py +++ b/tests/test_overrides.py @@ -932,6 +932,13 @@ class TestGtk(unittest.TestCase): self.tester.assertEqual(int_value, self.int_value) self.tester.assertEqual(string_value, self.string_value) + def test_tree_model_sort(self): + self.assertEqual(Gtk.TreeModelSort, overrides.Gtk.TreeModelSort) + self.assertRaises(TypeError, Gtk.TreeModelSort) + model = Gtk.TreeStore(int, bool) + model_sort = Gtk.TreeModelSort(model) + self.assertEqual(model_sort.get_model(), model) + def test_tree_store(self): self.assertEqual(Gtk.TreeStore, overrides.Gtk.TreeStore) self.assertEqual(Gtk.ListStore, overrides.Gtk.ListStore) @@ -985,21 +992,22 @@ class TestGtk(unittest.TestCase): i = 97 label = 'this is child #%d' % i testobj = TestGtk.TestClass(self, i, label) - tree_store.set(parent, 0, i, - 2, testobj, - 1, label, - 3, testobj, - 4, test_pyobj, - 5, test_pydict, - 6, test_pylist, - 7, i % 2, - 8, bool(i % 2), - 9, i, - 10, GObject.G_MAXULONG, - 11, GObject.G_MININT64, - 12, 0xffffffffffffffff, - 13, 254, - 14, _bytes('a')) + tree_store.set(parent, + 0, i, + 2, testobj, + 1, label, + 3, testobj, + 4, test_pyobj, + 5, test_pydict, + 6, test_pylist, + 7, i % 2, + 8, bool(i % 2), + 9, i, + 10, GObject.G_MAXULONG, + 11, GObject.G_MININT64, + 12, 0xffffffffffffffff, + 13, 254, + 14, _bytes('a')) parent = tree_store.append(parent) i = 98 @@ -1251,14 +1259,15 @@ class TestGtk(unittest.TestCase): i = 100 label = 'this is row #100' treeiter = list_store.append() - list_store.set(treeiter, 1, label, - 0, i, - 2, TestGtk.TestClass(self, i, label), - 3, test_pyobj, - 4, test_pydict, - 5, test_pylist, - 6, 0, - 7, False) + list_store.set(treeiter, + 1, label, + 0, i, + 2, TestGtk.TestClass(self, i, label), + 3, test_pyobj, + 4, test_pydict, + 5, test_pylist, + 6, 0, + 7, False) i = 101 label = 'this is row #101' treeiter = list_store.append() |