def test_normailze_should_normalize_irregular_sharp_semitones(self): expected_semitone = Semitone('C') instance = Semitone('B',sharps=1) result = instance.normalize() self.assertSame(result,expected_semitone)
def test_normailze_should_normalize_irregular_flat_semitones(self): expected_semitone = Semitone('E') instance = Semitone('F',flats=1) result = instance.normalize() self.assertSame(result,expected_semitone)
def test_normailze_should_normalize_when_more_than_one_sharp(self): expected_semitone = Semitone('E') instance = Semitone('D',sharps=2) result = instance.normalize() self.assertSame(result,expected_semitone)
def test_normailze_should_normalize_when_both_flats_and_sharps_are_nonzero(self): expected_semitone = Semitone('D',sharps=1) instance = Semitone('D',flats=1,sharps=2) result = instance.normalize() self.assertSame(result,expected_semitone)
def test_normailze_should_reduce_flats_when_more_than_12(self): expected_semitone = Semitone('D', flats=1) instance = Semitone('D',flats=13) result = instance.normalize() self.assertSame(result,expected_semitone)
def test_normailze_should_do_nothing_to_normalized_flat_semitone(self): expected_semitone = Semitone('D',flats=1) instance = Semitone('D',flats=1) result = instance.normalize() self.assertSame(result,expected_semitone)