Skip to content

Commit

Permalink
Add test for description file
Browse files Browse the repository at this point in the history
  • Loading branch information
7x11x13 committed Jul 26, 2024
1 parent 33b6e03 commit a98b6cf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_track.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,20 @@ def test_download_archive(tmp_path: Path) -> None:
)
assert r.returncode == 1
assert "already exists" in r.stderr


def test_description_file(tmp_path: Path) -> None:
os.chdir(tmp_path)
r = call_scdl_with_auth(
"-l",
"https://soundcloud.com/one-thousand-and-one/test-track",
"--name-format",
"track",
"--onlymp3",
"--add-description",
)
assert r.returncode == 0
desc_file = Path("./track.txt")
assert desc_file.exists()
with open(desc_file, encoding="utf-8") as f:
assert f.read().splitlines() == ["test description:", "9439290883"]

0 comments on commit a98b6cf

Please sign in to comment.