GNOME Bugzilla – Bug 686627
TestSource.testSources() test does not clean up its GSources
Last modified: 2012-10-23 03:52:45 UTC
PyGObject has established the assumption that the destruction of a GLib.Source Python object does not destroy the actual GSource, as shown in TestSource.setup_timeout(), TestTimeout.test504337(), and https://bugzilla.gnome.org/show_bug.cgi?id=504337. So we need to explicitly destroy our MySource and Idle objects after using them, as their callbacks always return True and we do not want them to spill over into other tests. Also, that test has a bad bug: assert self.pos >= 0 and idle.count >= 0 This does not actually assert anything. We need to compare self.pos to > 0, as we want to enforce that MySources' callback was called at least once.
Created attachment 226980 [details] [review] Fix TestSource.testSources() test case This fixes the problem.
I pushed this.