From 709d3cedd003a323d18a311c47f003ef50014f4f Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Thu, 14 Apr 2016 09:32:32 +0200 Subject: [PATCH] Cleanup test application on exit --- python/testing/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/testing/__init__.py b/python/testing/__init__.py index fe17d109eae..b9b42eb07ba 100644 --- a/python/testing/__init__.py +++ b/python/testing/__init__.py @@ -261,6 +261,12 @@ def start_app(): s = QGISAPP.showSettings() print(s) + import atexit + + @atexit.register + def exitQgis(): + QGISAPP.exitQgis() + return QGISAPP