Skip to content

Commit

Permalink
flatten testdata directory
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Oct 20, 2023
1 parent e5f6414 commit 140fa92
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

logger = logging.getLogger(__name__)

TESTDATA = Path(__file__).resolve().parent / "testdata" / "cache"
TESTDATA = Path(__file__).resolve().parent / "testdata"
TEST_RELEASE_1 = TESTDATA / "Test Release 1"
TEST_RELEASE_2 = TESTDATA / "Test Release 2"
TEST_RELEASE_3 = TESTDATA / "Test Release 3"
TEST_COLLAGE_1 = TESTDATA / "Collage 1"
TEST_TAGGER = TESTDATA / "tagger"


@pytest.fixture(autouse=True)
Expand Down
7 changes: 2 additions & 5 deletions rose/tagger_test.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
from pathlib import Path

import pytest

from conftest import TEST_TAGGER
from rose.artiststr import Artists
from rose.tagger import AudioFile, _split_tag

TESTDATA = Path(__file__).resolve().parent.parent / "testdata" / "tagger"


@pytest.mark.parametrize(
("filepath", "track_num", "duration"),
Expand All @@ -19,7 +16,7 @@
],
)
def test_getters(filepath: str, track_num: str, duration: int) -> None:
tf = AudioFile.from_file(TESTDATA / filepath)
tf = AudioFile.from_file(TEST_TAGGER / filepath)
assert tf.track_number == track_num
assert tf.title == f"Track {track_num}"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 140fa92

Please sign in to comment.