# Path: MuseParse/tests/testLilyMethods/lily.py
# class Lily(unittest.TestCase):
# 
#     def setUp(self):
#         self.compile = False
#         self.wrappers = []
# 
#     def testValue(self):
#         if hasattr(self, "lilystring"):
#             if hasattr(self, "item"):
#                 self.assertEqual(self.lilystring, self.item.toLily())
# 
#     def testCompilation(self):
#         if hasattr(self, "compile") and self.compile is True:
# 
#             filepath = expanduser("~")
#             script = ''
#             if sys.platform == 'darwin':
#                 script = os.path.join(filepath, 'bin', 'lilypond')
#             filepath = os.path.join(filepath, self.name)
#             if self.compile and hasattr(self, "item"):
#                 if os.path.exists(filepath + ".pdf"):
#                     os.remove(filepath + ".pdf")
# 
#                 ly = LilypondOutput.LilypondRenderer(
#                     self.item, filepath + ".xml", script)
#                 if hasattr(self, "wrappers"):
#                     ly.run(wrappers=self.wrappers)
#                 else:
#                     ly.run()
#                 self.assertTrue(os.path.exists(filepath + ".pdf"))
# 
# Path: MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py
# class Harmony(BaseClass.Base):
# 
#     """
#     Class representing a harmonic chord for pianists/jazz musicians. Not currently implemented 100% correct in lilypond notation
# 
# 
#     # Optional inputs
# 
#         - root: the root note of the chord
# 
#         - kind: see MusicXML docs TODO write this up
# 
#         - bass: the bass note of the chord
# 
#         - degrees: any degrees to be included in the chord
#     """
# 
#     def __init__(self, **kwargs):
#         self.degrees = []
#         if "root" in kwargs:
#             if kwargs["root"] is not None:
#                 self.root = kwargs["root"]
#         if "kind" in kwargs:
#             if kwargs["kind"] is not None:
#                 self.kind = kwargs["kind"]
#         if "bass" in kwargs:
#             if kwargs["bass"] is not None:
#                 self.bass = kwargs["bass"]
#         if "degrees" in kwargs:
#             self.degrees = kwargs["degrees"]
#         if "frame" in kwargs:
#             self.frame = kwargs["frame"]
#         BaseClass.Base.__init__(self)
# 
#     def toLily(self):
#         val = "\chords {"
#         if hasattr(self, "root"):
#             val += "\n\r" + self.root
#         if hasattr(
#                 self,
#                 "bass") or len(
#                 self.degrees) > 0 or hasattr(
#                 self,
#                 "kind"):
#             val += "\n\r:"
#         if hasattr(self, "degrees"):
#             for degree in self.degrees:
#                 if hasattr(self, "kind"):
#                     if self.kind.parenthesis:
#                         val += "("
#                 val += degree.toLily()
#                 if hasattr(self, "kind"):
#                     if self.kind.parenthesis:
#                         val += ")"
#         if hasattr(self, "bass"):
#             val += "/" + self.bass
#         val += "\n\r}"
#         if hasattr(self, "frame"):
#             return_val = []
#             return_val.append(val)
#             return_val.append(self.frame.toLily())
#             val = return_val
#         return val


from MuseParse.tests.testLilyMethods.lily import Lily
from MuseParse.classes.ObjectHierarchy.ItemClasses import Harmony
        self.item.kind = Harmony.Kind(parenthesis=True)
        self.item.degrees.append(Harmony.Degree(value=3))
        self.lilystring = "\\chords {\n\r:(3)\n\r}"


class testHarmonyDegrees(Lily):

    def setUp(self):
        self.item = Harmony.Harmony()
        self.item.degrees.append(Harmony.Degree())
        self.lilystring = "\chords {\n\r:\n\r}"


class testHarmonyKind(Lily):

    def setUp(self):
        self.item = Harmony.Harmony()
        self.item.kind = Harmony.Kind()
        self.lilystring = "\chords {\n\r:\n\r}"


class testHarmonyFrame(Lily):

    def setUp(self):
        self.item = Harmony.Harmony()
        self.item.frame = Harmony.Frame()
        self.lilystring = ["\chords {\n\r}",
                           "^\markup {\n\r\\fret-diagram #\"\"\n}"]



# Path: MuseParse/tests/testLilyMethods/lily.py
# class Lily(unittest.TestCase):
# 
#     def setUp(self):
#         self.compile = False
#         self.wrappers = []
# 
#     def testValue(self):
#         if hasattr(self, "lilystring"):
#             if hasattr(self, "item"):
#                 self.assertEqual(self.lilystring, self.item.toLily())
# 
#     def testCompilation(self):
#         if hasattr(self, "compile") and self.compile is True:
# 
#             filepath = expanduser("~")
#             script = ''
#             if sys.platform == 'darwin':
#                 script = os.path.join(filepath, 'bin', 'lilypond')
#             filepath = os.path.join(filepath, self.name)
#             if self.compile and hasattr(self, "item"):
#                 if os.path.exists(filepath + ".pdf"):
#                     os.remove(filepath + ".pdf")
# 
#                 ly = LilypondOutput.LilypondRenderer(
#                     self.item, filepath + ".xml", script)
#                 if hasattr(self, "wrappers"):
#                     ly.run(wrappers=self.wrappers)
#                 else:
#                     ly.run()
#                 self.assertTrue(os.path.exists(filepath + ".pdf"))
# 
# Path: MuseParse/classes/ObjectHierarchy/ItemClasses/Harmony.py
# class Harmony(BaseClass.Base):
# 
#     """
#     Class representing a harmonic chord for pianists/jazz musicians. Not currently implemented 100% correct in lilypond notation
# 
# 
#     # Optional inputs
# 
#         - root: the root note of the chord
# 
#         - kind: see MusicXML docs TODO write this up
# 
#         - bass: the bass note of the chord
# 
#         - degrees: any degrees to be included in the chord
#     """
# 
#     def __init__(self, **kwargs):
#         self.degrees = []
#         if "root" in kwargs:
#             if kwargs["root"] is not None:
#                 self.root = kwargs["root"]
#         if "kind" in kwargs:
#             if kwargs["kind"] is not None:
#                 self.kind = kwargs["kind"]
#         if "bass" in kwargs:
#             if kwargs["bass"] is not None:
#                 self.bass = kwargs["bass"]
#         if "degrees" in kwargs:
#             self.degrees = kwargs["degrees"]
#         if "frame" in kwargs:
#             self.frame = kwargs["frame"]
#         BaseClass.Base.__init__(self)
# 
#     def toLily(self):
#         val = "\chords {"
#         if hasattr(self, "root"):
#             val += "\n\r" + self.root
#         if hasattr(
#                 self,
#                 "bass") or len(
#                 self.degrees) > 0 or hasattr(
#                 self,
#                 "kind"):
#             val += "\n\r:"
#         if hasattr(self, "degrees"):
#             for degree in self.degrees:
#                 if hasattr(self, "kind"):
#                     if self.kind.parenthesis:
#                         val += "("
#                 val += degree.toLily()
#                 if hasattr(self, "kind"):
#                     if self.kind.parenthesis:
#                         val += ")"
#         if hasattr(self, "bass"):
#             val += "/" + self.bass
#         val += "\n\r}"
#         if hasattr(self, "frame"):
#             return_val = []
#             return_val.append(val)
#             return_val.append(self.frame.toLily())
#             val = return_val
#         return val


# Path: MuseParse/tests/testLilyMethods/testHarmony.py
from MuseParse.tests.testLilyMethods.lily import Lily
from MuseParse.classes.ObjectHierarchy.ItemClasses import Harmony

        self.item.kind = Harmony.Kind(parenthesis=True)
        self.item.degrees.append(Harmony.Degree(value=3))
        self.lilystring = "\\chords {\n\r:(3)\n\r}"


class testHarmonyDegrees(Lily):

    def setUp(self):
        self.item = Harmony.Harmony()
        self.item.degrees.append(Harmony.Degree())
        self.lilystring = "\chords {\n\r:\n\r}"


class testHarmonyKind(Lily):

    def setUp(self):
        self.item = Harmony.Harmony()
        self.item.kind = Harmony.Kind()
        self.lilystring = "\chords {\n\r:\n\r}"


class testHarmonyFrame(Lily):

    def setUp(self):
        self.item = Harmony.Harmony()
        self.item.frame = Harmony.Frame()
        self.lilystring = ["\chords {\n\r}",
                           "^\markup {\n\r\\fret-diagram #\"\"\n}"]



class testKind(Lily):