diff --git a/test/proxysql_base_test.py b/test/proxysql_base_test.py index 1a73e6d31..30b11fe58 100644 --- a/test/proxysql_base_test.py +++ b/test/proxysql_base_test.py @@ -1,4 +1,5 @@ import os +import os.path import random import re import shutil @@ -177,6 +178,10 @@ class ProxySQLBaseTest(TestCase): cursor.close() proxy_admin_connection.close() + @classmethod + def onerror(cls, function, path, excinfo): + print("Error while trying to delete %s: %r" % (path, excinfo)) + @classmethod def setUpClass(cls): # Always shutdown docker services because the previous test might have @@ -185,6 +190,7 @@ class ProxySQLBaseTest(TestCase): try: shutil.rmtree('/tmp/proxysql-tests/', onerror=cls.onerror) + if os.path.exists('/tmp/proxysql-tests'): except: pass