X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Ftests%2Funit%2Fbenchmark%2Fcontexts%2Ftest_node.py;h=b67be375848e15d351842429c4ba3783f59ee778;hb=1160225135e429ba8581ad162b08d710db4e96a2;hp=8b232481b9ec5b3a931e2b0fe206309890e25a2d;hpb=54bfc1b0a9372cb2efc9dc75d504adc805f503c1;p=yardstick.git diff --git a/yardstick/tests/unit/benchmark/contexts/test_node.py b/yardstick/tests/unit/benchmark/contexts/test_node.py index 8b232481b..b67be3758 100644 --- a/yardstick/tests/unit/benchmark/contexts/test_node.py +++ b/yardstick/tests/unit/benchmark/contexts/test_node.py @@ -13,6 +13,7 @@ import errno import mock from yardstick.common import constants as consts +from yardstick.benchmark.contexts import base from yardstick.benchmark.contexts import node @@ -33,9 +34,11 @@ class NodeContextTestCase(unittest.TestCase): 'file': self._get_file_abspath(self.NODES_SAMPLE) } - def _remove_contexts(self): - if self.test_context in self.test_context.list: - self.test_context._delete_context() + @staticmethod + def _remove_contexts(): + for context in base.Context.list: + context._delete_context() + base.Context.list = [] def _get_file_abspath(self, filename): curr_path = os.path.dirname(os.path.abspath(__file__))