Commits

Ronald Oussoren committed cf2b09e

Ensure test cleanup is always run

  • Participants
  • Parent commits 3ef5364

Comments (0)

Files changed (1)

py2app_tests/test_basic_plugin.py

 
     @classmethod
     def tearDownClass(cls):
+        if os.path.exists('bundle_loader'):
+            os.unlink('bundle_loader')
+
         if os.path.exists(os.path.join(cls.plugin_dir, 'build')):
             shutil.rmtree(os.path.join(cls.plugin_dir, 'build'))
 
         if os.path.exists(os.path.join(cls.plugin_dir, 'dist')):
             shutil.rmtree(os.path.join(cls.plugin_dir, 'dist'))
 
-        if os.path.exists('bundle_loader'):
-            os.unlink('bundle_loader')
-
     def start_app(self):
         # Start the test app, return a subprocess object where
         # stdin and stdout are connected to pipes.
         if os.path.exists(cls.plugin_dir):
             shutil.rmtree(cls.plugin_dir)
 
+        super(TestBasicPluginUnicodePath, cls).tearDownClass()
+
+
 class TestBasicAliasPluginUnicodePath (TestBasicPluginUnicodePath):
     py2app_args = [ '--alias' ]