def METHOD_NAME(self):
    """Test whether saving an empty playlist file raises an error."""
    tempdir = bytestring_path(mkdtemp())
    the_playlist_file = path.join(tempdir, b'playlist.m3u8')
    m3ufile = M3UFile(the_playlist_file)
    with self.assertRaises(EmptyPlaylistError):
        m3ufile.write()
    rmtree(tempdir)