From 1f3857e7422a757c281e87fb50b031810ea4a4f4 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Tue, 15 Apr 2008 18:12:52 +0000 Subject: Set gobject.GObject.__module__ to gobject._gobject, this helps pylint to 2008-04-15 Johan Dahlin * gobject/gobjectmodule.c (init_gobject): Set gobject.GObject.__module__ to gobject._gobject, this helps pylint to check public methods of GObject subclasses * tests/Makefile.am (tests): * tests/test_gobject.py (TestGObjectAPI.testGObjectModule): Add a test for this (#523821, Simon Schampijer) svn path=/trunk/; revision=777 --- tests/Makefile.am | 1 + tests/test_gobject.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/test_gobject.py (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 3b05018..6d0c51a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,6 +24,7 @@ testhelper_la_SOURCES = \ tests = \ test_conversion.py \ test_enum.py \ + test_gobject.py \ test_gtype.py \ test_interface.py \ test_mainloop.py \ diff --git a/tests/test_gobject.py b/tests/test_gobject.py new file mode 100644 index 0000000..34ba094 --- /dev/null +++ b/tests/test_gobject.py @@ -0,0 +1,12 @@ +# -*- Mode: Python -*- + +import unittest + +from common import gobject + + +class TestGObjectAPI(unittest.TestCase): + def testGObjectModule(self): + obj = gobject.GObject() + self.assertEquals(obj.__module__, + 'gobject._gobject') -- cgit