mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 20:12:33 +01:00
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:
parent
536aea83e9
commit
1666f883e3
1 changed files with 7 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue