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


import sys
import mingus.core.notes as notes
import unittest
from mingus.core.mt_exceptions import RangeError

class test_notes(unittest.TestCase):
	
	def setUp(self):
		self.base_notes = ["C", "D", "E", "F", "G", "A", "B"]
		self.sharps = map(lambda x: x + '#', self.base_notes)
		self.flats = map(lambda x: x + 'b', self.base_notes)
		self.exotic = map(lambda x: x + 'b###b#', self.base_notes)

	def test_base_note_validity(self):
		map(lambda x: self.assert_(notes.is_valid_note(x),\
						"Base notes A-G"), self.base_notes)

	def test_sharp_note_validity(self):
		map(lambda x: self.assert_(notes.is_valid_note(x),\
						"Sharp notes A#-G#"), self.sharps) 

	def test_flat_note_validity(self):
		map(lambda x: self.assert_(notes.is_valid_note(x),\
						"Flat notes Ab-Gb"),self.flats) 

	def test_exotic_note_validity(self):
		map(lambda x: self.assert_(notes.is_valid_note(x),\
						"Exotic notes Ab##b#-Gb###b#"), self.exotic)

	def test_faulty_note_invalidity(self):
		map(lambda x: self.assertEqual(False, notes.is_valid_note(x),\
						"Faulty notes"), ['asdasd', 'C###f', 'c', 'd', 'E*'])

	def test_valid_int_to_note(self):	

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


# Path: unittest/test_notes.py
import sys
import mingus.core.notes as notes
import unittest
from mingus.core.mt_exceptions import RangeError


class test_notes(unittest.TestCase):
	
	def setUp(self):
		self.base_notes = ["C", "D", "E", "F", "G", "A", "B"]
		self.sharps = map(lambda x: x + '#', self.base_notes)
		self.flats = map(lambda x: x + 'b', self.base_notes)
		self.exotic = map(lambda x: x + 'b###b#', self.base_notes)

	def test_base_note_validity(self):
		map(lambda x: self.assert_(notes.is_valid_note(x),\
						"Base notes A-G"), self.base_notes)

	def test_sharp_note_validity(self):
		map(lambda x: self.assert_(notes.is_valid_note(x),\
						"Sharp notes A#-G#"), self.sharps) 

	def test_flat_note_validity(self):
		map(lambda x: self.assert_(notes.is_valid_note(x),\
						"Flat notes Ab-Gb"),self.flats) 

	def test_exotic_note_validity(self):
		map(lambda x: self.assert_(notes.is_valid_note(x),\
						"Exotic notes Ab##b#-Gb###b#"), self.exotic)

	def test_faulty_note_invalidity(self):
		map(lambda x: self.assertEqual(False, notes.is_valid_note(x),\
						"Faulty notes"), ['asdasd', 'C###f', 'c', 'd', 'E*'])

	def test_valid_int_to_note(self):	

		n = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']