openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #31285
Re: [Merge] lp:~tomasgroth/openlp/chords into lp:openlp
I know you don't have a lot of time on your hands at the moment, but I'd really prefer to see more test coverage. You've written a bunch of new functions and only some of them are being (indirectly) tested.
Diff comments:
>
> === modified file 'tests/functional/openlp_plugins/songs/test_lib.py'
> --- tests/functional/openlp_plugins/songs/test_lib.py 2016-12-31 11:01:36 +0000
> +++ tests/functional/openlp_plugins/songs/test_lib.py 2017-03-18 21:30:23 +0000
> @@ -264,6 +264,32 @@
> # THEN: The stripped text matches thed expected result
> assert result == exp_result, 'The result should be %s' % exp_result
>
> + def transpose_chord_up_test(self):
Tests need to be prefixed with "test_" IIRC.
> + """
> + Test that the transpose_chord() method works when transposing up
> + """
> + # GIVEN: A Chord
> + chord = 'C'
> +
> + # WHEN: Transposing it 1 up
> + new_chord = transpose_chord(chord, 1, 'english')
> +
> + # THEN: The chord should be transposed up one note
> + self.assertEqual(new_chord, 'C#', 'The chord should be transposed up.')
> +
> + def transpose_chord_down_test(self):
> + """
> + Test that the transpose_chord() method works when transposing down
> + """
> + # GIVEN: A Chord
> + chord = 'C'
> +
> + # WHEN: Transposing it 1 down
> + new_chord = transpose_chord(chord, -1, 'english')
> +
> + # THEN: The chord should be transposed down one note
> + self.assertEqual(new_chord, 'B', 'The chord should be transposed down.')
> +
>
> class TestVerseType(TestCase):
> """
--
https://code.launchpad.net/~tomasgroth/openlp/chords/+merge/320277
Your team OpenLP Core is subscribed to branch lp:openlp.
References