From 1666f883e3f6a497971b484c9ba875df2f6693a2 Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Sun, 7 Apr 2013 01:32:47 +0200 Subject: [PATCH] Fix python namespaces for test runs We need to make sure we don't use namespaced versions that are already installed on the system but rather use local version from current sources --- test/testall.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/testall.py b/test/testall.py index f0ed0b857..c91deba55 100755 --- a/test/testall.py +++ b/test/testall.py @@ -24,6 +24,13 @@ pkgpath = os.path.dirname(__file__) or '.' sys.path.append(pkgpath) os.chdir(pkgpath) +# Make sure we use local version of beetsplug and not system namespaced version +# for tests +try: + del sys.modules["beetsplug"] +except KeyError: + pass + def suite(): s = unittest.TestSuite() # Get the suite() of every module in this directory beginning with