def test_as_note_with_same_note_should_do_nothing(self):
    expected_semitone = Semitone('D')
    instance = Semitone('D')

    result = instance.as_note('D')

    self.assertSame(result,expected_semitone)
  def test_as_note_with_notes_less_than_3_lower_should_be_flattened_from_flat(self):
    instance = Semitone('D',flats=1)

    self.assertSame(instance.as_note('E'),Semitone('E',flats=3))
    self.assertSame(instance.as_note('F'),Semitone('F',flats=4))
    self.assertSame(instance.as_note('G'),Semitone('G',flats=6))
  def test_as_note_with_notes_less_than_3_higher_should_be_sharped_from_flat(self):
    instance = Semitone('D',flats=1)

    self.assertSame(instance.as_note('C'),Semitone('C',sharps=1))
    self.assertSame(instance.as_note('B'),Semitone('B',sharps=2))
    self.assertSame(instance.as_note('A'),Semitone('A',sharps=4))
  def test_as_note_with_notes_less_than_3_higher_should_be_sharped_from_natural(self):
    instance = Semitone('D')

    self.assertSame(instance.as_note('C'),Semitone('C',sharps=2))
    self.assertSame(instance.as_note('B'),Semitone('B',sharps=3))
    self.assertSame(instance.as_note('A'),Semitone('A',sharps=5))