Debian Codegraph @

debian/patches/test-rsrc

raw
1 From: Stefano Rivera <[email protected]>
2 Date: Thu, 6 Jun 2024 13:49:51 +0100
3 Subject: Allow overriding the path to test resources
4
5 They aren't installed in the binary package.
6
7 Forwarded: not-needed
8 ---
9 beets/test/_common.py | 7 ++++++-
10 1 file changed, 6 insertions(+), 1 deletion(-)
11
12 diff --git a/beets/test/_common.py b/beets/test/_common.py
13 index f629e7b..3ff1d5f 100644
14 --- a/beets/test/_common.py
15 +++ b/beets/test/_common.py
16 @@ -25,7 +25,12 @@ if TYPE_CHECKING:
17 from beets.library import Item, Library
18
19 # Test resources path.
20 -RSRC = (Path(__file__).parent.parent.parent / "test" / "rsrc").resolve()
21 +RSRC = Path(
22 + os.environ.get(
23 + "RSRC",
24 + (Path(__file__).parent.parent.parent / "test" / "rsrc").resolve()
25 + )
26 + )
27 PLUGINPATH = str(RSRC / "beetsplug")
28
29 # Propagate to root logger so the test runner can capture it