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 54e674d..af99b6b 100644
14 --- a/beets/test/_common.py
15 +++ b/beets/test/_common.py
16 @@ -20,7 +20,12 @@ if TYPE_CHECKING:
17 import pytest
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