[testinggtk] fix tc, toplevel list should be empty before test.



commit 4ee1668fdc9332432124060eae1e8c4d894a28d7
Author: Björn Lindqvist <bjourne gmail com>
Date:   Fri Jul 10 13:46:56 2009 +0200

    fix tc, toplevel list should be empty before test.

 tests/test_window.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_window.py b/tests/test_window.py
index c93943a..2310425 100644
--- a/tests/test_window.py
+++ b/tests/test_window.py
@@ -328,6 +328,8 @@ def test_destroy_removes_window_from_toplevels():
     Calling ``destroy()`` on a ``gtk.Window`` should remove it from
     the list of toplevels.
     '''
+    for toplevel in gtk.window_list_toplevels():
+        toplevel.destroy()
     windows = [gtk.Window() for x in range(2)]
     assert len(gtk.window_list_toplevels()) == 2
     windows[0].destroy()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]