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
This commit is contained in:
Stanislav Ochotnicky 2013-04-07 01:32:47 +02:00
parent 536aea83e9
commit 1666f883e3

View file

@ -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