diff --git a/tests/drops_group_test.py b/tests/drops_group_test.py index df3c6c4f9372..0076e7b47723 100644 --- a/tests/drops_group_test.py +++ b/tests/drops_group_test.py @@ -1,5 +1,7 @@ -import sys import os +import sys + +import shutil from click.testing import CliRunner test_path = os.path.dirname(os.path.abspath(__file__)) @@ -8,7 +10,6 @@ sys.path.insert(0, test_path) sys.path.insert(0, modules_path) -import mock_tables.dbconnector import show.main as show import clear.main as clear @@ -75,10 +76,14 @@ sonic_drops_test 0 """ +dropstat_path = "/tmp/dropstat" + class TestDropCounters(object): @classmethod def setup_class(cls): print("SETUP") + if os.path.exists(dropstat_path): + shutil.rmtree(dropstat_path) os.environ["PATH"] += os.pathsep + scripts_path os.environ["UTILITIES_UNIT_TESTING"] = "1"