--- ../pygobject.svn.trunk/tests/test_source.py	2008-03-27 16:50:18.000000000 -0500
+++ tests/test_source.py	2008-03-27 16:50:50.000000000 -0500
@@ -315,5 +315,40 @@
 
         assert d[0]
 
+    # simple is_destroyed case
+    def testIsDestroyedSimple(self):
+        s = gobject.Source()
+        c = gobject.MainContext()
+
+        assert not s.is_destroyed
+
+        s.destroy()
+
+        assert s.is_destroyed
+
+        s = gobject.Source()
+
+        s.attach(c)
+
+        assert not s.is_destroyed
+
+        s.destroy()
+
+        assert s.is_destroyed
+
+    # is_destroyed when destroyed via context death
+    def testIsDestroyedIndirect(self):
+        def f():
+            c = gobject.MainContext()
+            s = gobject.Source()
+
+            s.attach(c)
+
+            return s
+
+        s = f()
+
+        assert s.is_destroyed
+
 if __name__ == '__main__':
     unittest.main()
