# Path: test/_common.py
# RSRC = util.bytestring_path(os.path.join(os.path.dirname(__file__), 'rsrc'))
# PLUGINPATH = os.path.join(os.path.dirname(__file__), 'rsrc', 'beetsplug')
# HAVE_SYMLINK = sys.platform != 'win32'
# HAVE_HARDLINK = sys.platform != 'win32'
# HAVE_REFLINK = reflink.supported_at(tempfile.gettempdir())
# def item(lib=None):
# def album(lib=None):
# def import_session(lib=None, loghandler=None, paths=[], query=[], cli=False):
#     def assertExists(self, path):  # noqa
#     def assertNotExists(self, path):  # noqa
#     def assert_equal_path(self, a, b):
#     def setUp(self):
#     def tearDown(self):
#     def setUp(self):
#     def tearDown(self):
#     def __init__(self):
#     def time(self):
#     def sleep(self, amount):
#     def install(self):
#     def restore(self):
#     def __init__(self, output=None):
#     def __str__(self):
#     def __init__(self):
#     def write(self, s):
#     def get(self):
#     def flush(self):
#     def clear(self):
#     def __init__(self, out=None):
#     def add(self, s):
#     def close(self):
#     def readline(self):
#     def __init__(self):
#     def addinput(self, s):
#     def getoutput(self):
#     def readcount(self):
#     def install(self):
#     def restore(self):
# def touch(path):
#     def __init__(self, **fields):
#     def __getattr__(self, key):
#     def create_temp_dir(self):
#     def remove_temp_dir(self):
# def platform_windows():
# def platform_posix():
# def system_mock(name):
# def slow_test(unused=None):
#     def _id(obj):
# class Assertions:
# class TestCase(unittest.TestCase, Assertions):
# class LibTestCase(TestCase):
# class Timecop:
# class InputException(Exception):
# class DummyOut:
# class DummyIn:
# class DummyIO:
# class Bag:
# class TempDirMixin:
# 
# Path: test/helper.py
# class LogCapture(logging.Handler):
# class TestHelper:
# class ImportSessionFixture(importer.ImportSession):
#     def __init__(self):
#     def emit(self, record):
# def capture_log(logger='beets'):
# def control_stdin(input=None):
# def capture_stdout():
# def _convert_args(args):
# def has_program(cmd, args=['--version']):
#     def setup_beets(self, disk=False):
#     def teardown_beets(self):
#     def load_plugins(self, *plugins):
#     def unload_plugins(self):
#     def create_importer(self, item_count=1, album_count=1):
#     def create_item(self, **values):
#     def add_item(self, **values):
#     def add_item_fixture(self, **values):
#     def add_album(self, **values):
#     def add_item_fixtures(self, ext='mp3', count=1):
#     def add_album_fixture(self, track_count=1, ext='mp3', disc_count=1):
#     def create_mediafile_fixture(self, ext='mp3', images=[]):
#     def remove_mediafile_fixtures(self):
#     def _get_item_count(self):
#     def run_command(self, *args, **kwargs):
#     def run_with_output(self, *args):
#     def create_temp_dir(self):
#     def remove_temp_dir(self):
#     def touch(self, path, dir=None, content=''):
#     def __init__(self, *args, **kwargs):
#     def add_choice(self, choice):
#     def clear_choices(self):
#     def choose_match(self, task):
#     def add_resolution(self, resolution):
#     def resolve_duplicate(self, task, found_duplicates):
# def generate_album_info(album_id, track_values):
# def generate_track_info(track_id='track info', values={}):
# ALBUM_INFO_FIELDS = ['album', 'album_id', 'artist', 'artist_id',
#                      'asin', 'albumtype', 'va', 'label',
#                      'artist_sort', 'releasegroup_id', 'catalognum',
#                      'language', 'country', 'albumstatus', 'media',
#                      'albumdisambig', 'releasegroupdisambig', 'artist_credit',
#                      'data_source', 'data_url']
# TRACK_INFO_FIELDS = ['artist', 'artist_id', 'artist_sort',
#                      'disctitle', 'artist_credit', 'data_source',
#                      'data_url']


import os
import shutil
import tempfile
import unittest
import beets
from shlex import quote
from test import _common
from test import helper
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.






class PlaylistTestHelper(helper.TestHelper):
    def setUp(self):
        self.setup_beets()
        self.lib = beets.library.Library(':memory:')

        self.music_dir = os.path.expanduser(os.path.join('~', 'Music'))

        i1 = _common.item()
        i1.path = beets.util.normpath(os.path.join(
            self.music_dir,
            'a', 'b', 'c.mp3',
        ))
        i1.title = 'some item'
        i1.album = 'some album'
        self.lib.add(i1)
        self.lib.add_album([i1])


# Path: test/_common.py
# RSRC = util.bytestring_path(os.path.join(os.path.dirname(__file__), 'rsrc'))
# PLUGINPATH = os.path.join(os.path.dirname(__file__), 'rsrc', 'beetsplug')
# HAVE_SYMLINK = sys.platform != 'win32'
# HAVE_HARDLINK = sys.platform != 'win32'
# HAVE_REFLINK = reflink.supported_at(tempfile.gettempdir())
# def item(lib=None):
# def album(lib=None):
# def import_session(lib=None, loghandler=None, paths=[], query=[], cli=False):
#     def assertExists(self, path):  # noqa
#     def assertNotExists(self, path):  # noqa
#     def assert_equal_path(self, a, b):
#     def setUp(self):
#     def tearDown(self):
#     def setUp(self):
#     def tearDown(self):
#     def __init__(self):
#     def time(self):
#     def sleep(self, amount):
#     def install(self):
#     def restore(self):
#     def __init__(self, output=None):
#     def __str__(self):
#     def __init__(self):
#     def write(self, s):
#     def get(self):
#     def flush(self):
#     def clear(self):
#     def __init__(self, out=None):
#     def add(self, s):
#     def close(self):
#     def readline(self):
#     def __init__(self):
#     def addinput(self, s):
#     def getoutput(self):
#     def readcount(self):
#     def install(self):
#     def restore(self):
# def touch(path):
#     def __init__(self, **fields):
#     def __getattr__(self, key):
#     def create_temp_dir(self):
#     def remove_temp_dir(self):
# def platform_windows():
# def platform_posix():
# def system_mock(name):
# def slow_test(unused=None):
#     def _id(obj):
# class Assertions:
# class TestCase(unittest.TestCase, Assertions):
# class LibTestCase(TestCase):
# class Timecop:
# class InputException(Exception):
# class DummyOut:
# class DummyIn:
# class DummyIO:
# class Bag:
# class TempDirMixin:
# 
# Path: test/helper.py
# class LogCapture(logging.Handler):
# class TestHelper:
# class ImportSessionFixture(importer.ImportSession):
#     def __init__(self):
#     def emit(self, record):
# def capture_log(logger='beets'):
# def control_stdin(input=None):
# def capture_stdout():
# def _convert_args(args):
# def has_program(cmd, args=['--version']):
#     def setup_beets(self, disk=False):
#     def teardown_beets(self):
#     def load_plugins(self, *plugins):
#     def unload_plugins(self):
#     def create_importer(self, item_count=1, album_count=1):
#     def create_item(self, **values):
#     def add_item(self, **values):
#     def add_item_fixture(self, **values):
#     def add_album(self, **values):
#     def add_item_fixtures(self, ext='mp3', count=1):
#     def add_album_fixture(self, track_count=1, ext='mp3', disc_count=1):
#     def create_mediafile_fixture(self, ext='mp3', images=[]):
#     def remove_mediafile_fixtures(self):
#     def _get_item_count(self):
#     def run_command(self, *args, **kwargs):
#     def run_with_output(self, *args):
#     def create_temp_dir(self):
#     def remove_temp_dir(self):
#     def touch(self, path, dir=None, content=''):
#     def __init__(self, *args, **kwargs):
#     def add_choice(self, choice):
#     def clear_choices(self):
#     def choose_match(self, task):
#     def add_resolution(self, resolution):
#     def resolve_duplicate(self, task, found_duplicates):
# def generate_album_info(album_id, track_values):
# def generate_track_info(track_id='track info', values={}):
# ALBUM_INFO_FIELDS = ['album', 'album_id', 'artist', 'artist_id',
#                      'asin', 'albumtype', 'va', 'label',
#                      'artist_sort', 'releasegroup_id', 'catalognum',
#                      'language', 'country', 'albumstatus', 'media',
#                      'albumdisambig', 'releasegroupdisambig', 'artist_credit',
#                      'data_source', 'data_url']
# TRACK_INFO_FIELDS = ['artist', 'artist_id', 'artist_sort',
#                      'disctitle', 'artist_credit', 'data_source',
#                      'data_url']


# Path: test/test_playlist.py
import os
import shutil
import tempfile
import unittest
import beets
from shlex import quote
from test import _common
from test import helper

# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.






class PlaylistTestHelper(helper.TestHelper):
    def setUp(self):
        self.setup_beets()
        self.lib = beets.library.Library(':memory:')

        self.music_dir = os.path.expanduser(os.path.join('~', 'Music'))

        i1 = _common.item()
        i1.path = beets.util.normpath(os.path.join(
            self.music_dir,
            'a', 'b', 'c.mp3',
        ))
        i1.title = 'some item'
        i1.album = 'some album'
        self.lib.add(i1)
        self.lib.add_album([i1])


        i2 = _common.item()