Skip to content

Commit b37d407

Browse files
committed
smartplaylist: Test --quiet option behavior
1 parent 7ab21d8 commit b37d407

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/plugins/test_smartplaylist.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,3 +591,17 @@ def test_splupdate_unknown_playlist_error_is_sorted_and_quoted(self):
591591
"No playlist matching any of "
592592
"'a one.m3u' 'rock'\"'\"'n roll.m3u' 'z last.m3u' found"
593593
)
594+
595+
def test_splupdate_pretend_quiet_suppresses_banner(self):
596+
with self.assertLogs("beets.smartplaylist", level="INFO") as logs:
597+
self.run_with_output(
598+
"splupdate", "--pretend", "--quiet", "my_playlist"
599+
)
600+
601+
output = "\n".join(logs.output)
602+
assert "Showing query results for" not in output
603+
assert "Updating 1 smart playlists..." not in output
604+
assert "Results for playlist" not in output
605+
assert "Creating playlist" not in output
606+
assert "my_playlist.m3u: 1 items matched." in output
607+
assert "1 playlists would be updated" in output

0 commit comments

Comments
 (0)