diff --git a/tests/test_platform.py b/tests/test_platform.py
index a747ac03a3ae0d72fc0bc9397da0aa2a10afd613..6dcbfaeeab8a7f7a1ad04732f6ac810bd30992d0 100644
--- a/tests/test_platform.py
+++ b/tests/test_platform.py
@@ -59,6 +59,7 @@ def test_haveGui():
     wx.CallLater(500, runtest)
 
     app.MainLoop()
+    del app
 
     assert passed[0]