mirror of
https://github.com/beetbox/beets.git
synced 2025-12-28 19:42:42 +01:00
tests: remove import path mangling while importing 'test._common'
The import path mangling is not relevant (anymore?) for the two ways of running tests: * `python3 test/testall.py` (see CONTRIBUTING.rst): The `testall.py` script already adds the project path to `sys.path`. * `tox -e py-cov`: this command is supposed to be run from the project path. Thus, the current directory is already the first of location in `sys.path`. The previous mangling of the import path while loading a module could lead to unwanted side-effects hidden in an unexpected location. Instead, import path mangling should take place in the script being called by the user (here: `testall.py`).
This commit is contained in:
parent
7df14b6b3f
commit
4c2362b361
1 changed files with 0 additions and 2 deletions
|
|
@ -22,8 +22,6 @@ import time
|
|||
import unittest
|
||||
from contextlib import contextmanager
|
||||
|
||||
# Mangle the search path to include the beets sources.
|
||||
sys.path.insert(0, "..")
|
||||
import beets # noqa: E402
|
||||
import beets.library # noqa: E402
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue