
To test path vars, we monkey patched the method get_prefix of Paths, but not restored. Because of it, the other test cases, like test_plugin, fail to pass. This patch restores the change on teardown. Reported-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com> Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com> --- tests/test_config.py.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_config.py.in b/tests/test_config.py.in index 3b9ebdc..0400645 100644 --- a/tests/test_config.py.in +++ b/tests/test_config.py.in @@ -25,6 +25,17 @@ import unittest from kimchi.config import Paths, PluginPaths +get_prefix = None + + +def setUpModule(): + global get_prefix + get_prefix = Paths.get_prefix + + +def tearDownModule(): + Paths.get_prefix = PluginPaths.get_prefix = get_prefix + class ConfigTests(unittest.TestCase): def assertInstalledPath(self, actual, expected): -- 1.8.4.2