MCPcopy
hub / github.com/beetbox/beets / test_playlist_write_empty

Method test_playlist_write_empty

test/test_m3ufile.py:32–39  ·  view source on GitHub ↗

Test whether saving an empty playlist file raises an error.

(self)

Source from the content-addressed store, hash-verified

30 """Tests the M3UFile class."""
31
32 def test_playlist_write_empty(self):
33 """Test whether saving an empty playlist file raises an error."""
34 tempdir = bytestring_path(mkdtemp())
35 the_playlist_file = path.join(tempdir, b"playlist.m3u8")
36 m3ufile = M3UFile(the_playlist_file)
37 with pytest.raises(EmptyPlaylistError):
38 m3ufile.write()
39 rmtree(tempdir)
40
41 def test_playlist_write(self):
42 """Test saving ascii paths to a playlist file."""

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
bytestring_pathFunction · 0.90
M3UFileClass · 0.90
joinMethod · 0.80

Tested by

no test coverage detected