# Path: mingus/core/mt_exceptions.py
# class RangeError(Error):
# 	pass
# 
# class FormatError(Error):
#         pass
# 
# class NoteFormatError(Error):
# 	pass


import sys
import mingus.core.chords as chords
import unittest
from mingus.core.mt_exceptions import RangeError, FormatError, NoteFormatError
sys.path = ["../"] + sys.path


class test_chords(unittest.TestCase):
	
	def setUp(self):
		pass

	def test_triad(self):
		self.assertEqual(["C", "E", "G"], chords.triad("C", "C"))
		self.assertEqual(["C", "Eb", "G"], chords.triad("C", "Eb"))

	def test_major_triad(self):
		self.assertEqual(["C", "E", "G"], chords.major_triad("C"))
		self.assertEqual(["E", "G#", "B"], chords.major_triad("E"))
		self.assertEqual(["Eb", "G", "Bb"], chords.major_triad("Eb"))

	def test_minor_triad(self):
		self.assertEqual(["C", "Eb", "G"], chords.minor_triad("C"))
		self.assertEqual(["E", "G", "B"], chords.minor_triad("E"))
		self.assertEqual(["B", "D", "F#"] , chords.minor_triad("B"))

	def test_diminished_triad(self):
		self.assertEqual(["C", "Eb", "Gb"], chords.diminished_triad("C"))
		self.assertEqual(["E", "G", "Bb"], chords.diminished_triad("E"))
		self.assertEqual(["B", "D", "F"], chords.diminished_triad("B"))


# Path: mingus/core/mt_exceptions.py
# class RangeError(Error):
# 	pass
# 
# class FormatError(Error):
#         pass
# 
# class NoteFormatError(Error):
# 	pass


# Path: unittest/test_chords.py
import sys
import mingus.core.chords as chords
import unittest
from mingus.core.mt_exceptions import RangeError, FormatError, NoteFormatError

sys.path = ["../"] + sys.path


class test_chords(unittest.TestCase):
	
	def setUp(self):
		pass

	def test_triad(self):
		self.assertEqual(["C", "E", "G"], chords.triad("C", "C"))
		self.assertEqual(["C", "Eb", "G"], chords.triad("C", "Eb"))

	def test_major_triad(self):
		self.assertEqual(["C", "E", "G"], chords.major_triad("C"))
		self.assertEqual(["E", "G#", "B"], chords.major_triad("E"))
		self.assertEqual(["Eb", "G", "Bb"], chords.major_triad("Eb"))

	def test_minor_triad(self):
		self.assertEqual(["C", "Eb", "G"], chords.minor_triad("C"))
		self.assertEqual(["E", "G", "B"], chords.minor_triad("E"))
		self.assertEqual(["B", "D", "F#"] , chords.minor_triad("B"))

	def test_diminished_triad(self):
		self.assertEqual(["C", "Eb", "Gb"], chords.diminished_triad("C"))
		self.assertEqual(["E", "G", "Bb"], chords.diminished_triad("E"))
		self.assertEqual(["B", "D", "F"], chords.diminished_triad("B"))


	def test_augmented_triad(self):