tests package
Submodules
tests.test_accidentals module
-
class
tests.test_accidentals.
TestAccidentals
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
setup_measure
()[source]
-
test_foreign_accidentals_play
()[source]
-
test_foreign_accidentals_show
()[source]
-
test_key_signature_shows
()[source]
-
test_native_accidentals_dont_show
()[source]
-
test_native_accidentals_play
()[source]
tests.test_chord module
-
class
tests.test_chord.
TestChord
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_append_appends_note
()[source]
-
test_augmented_triad
()[source]
-
test_clear_removes_all_notes
()[source]
-
test_determine
()[source]
-
test_diminished_triad
()[source]
-
test_duration_is_duration_of_longest_note
()[source]
-
test_init_notes_passed_are_added
()[source]
-
test_major_triad
()[source]
-
test_minor_triad
()[source]
-
test_notes_returns_notes
()[source]
-
test_play_calls_play_score
(**keywargs)[source]
-
test_remove_removes_note
()[source]
-
test_save_calls_save_score
(**keywargs)[source]
-
test_show_calls_show_score
(**keywargs)[source]
-
test_suspended_triad
()[source]
tests.test_clef module
-
class
tests.test_clef.
TestClef
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_bass_clef_value_is_1
()[source]
-
test_treble_clef_value_is_0
()[source]
tests.test_df_import module
tests.test_exporting module
tests.test_harmony_maker module
tests.test_key module
-
class
tests.test_key.
TestKey
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_contains_letter
()[source]
-
test_contains_letter_with_accidental
()[source]
-
test_contains_letter_with_accidental_and_octave
()[source]
-
test_contains_letter_with_octave
()[source]
-
test_contains_note
()[source]
-
test_key_allows_good_key_signatures
()[source]
-
test_key_equivalence
()[source]
-
test_key_fails_more_than_7_flats
()[source]
-
test_key_fails_more_than_7_sharps
()[source]
-
test_key_fails_on_bad_key_signature_both_flats_and_sharps
()[source]
-
test_key_fails_on_less_than_0_flats
()[source]
-
test_key_fails_on_less_than_0_sharps
()[source]
-
test_key_str_c_major
()[source]
-
test_key_str_c_sharp_major
()[source]
-
test_key_str_e_flat_major
()[source]
-
test_key_str_no_minors
()[source]
-
test_major_scale
()[source]
-
test_major_tonic
()[source]
tests.test_measure module
-
class
tests.test_measure.
TestMeasure
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_measure_append_appends_notes
()[source]
-
test_measure_contains
()[source]
-
test_measure_duration_returns_duration_of_measure_in_beats
()[source]
-
test_measure_empty_index_raises_KeyError
()[source]
-
test_measure_extend
()[source]
-
test_measure_init_notes_passed_are_added
()[source]
-
test_measure_notes_are_indexed_by_start_beat
()[source]
-
test_measure_overfill_throws_exception
()[source]
-
test_measure_play_calls_play_score
(**keywargs)[source]
-
test_measure_save_calls_save_score
(**keywargs)[source]
-
test_measure_show_calls_show_score
(**keywargs)[source]
tests.test_music module
-
class
tests.test_music.
TestGlobals
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_key_signature_sets_globally
()[source]
-
test_time_signature_sets_globally
()[source]
-
class
tests.test_music.
TestNotes
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_C4_maps_to_0
()[source]
-
test_eq
()[source]
-
test_init_sets_pitch_and_duration
()[source]
-
class
tests.test_music.
TestRests
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_rest_init_sets_pitch_and_duration
()[source]
tests.test_part module
-
class
tests.test_part.
TestPart
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_add_staff_adds_staffs
()[source]
-
test_part_init_defaults_tempo_to_60
()[source]
-
test_part_init_keysig_defaults_to_global
()[source]
-
test_part_init_keysig_sets
()[source]
-
test_part_init_pass_staffs_adds_staffs
()[source]
-
test_part_init_sets_tempo
()[source]
-
test_part_init_timesig_defaults_to_global
()[source]
-
test_part_init_timesig_sets
()[source]
-
test_part_keysig_is_settable
()[source]
-
test_part_tempo_is_settable
()[source]
-
test_part_timesig_is_settable
()[source]
-
test_play_calls_play_score
(**keywargs)[source]
-
test_save_calls_save_score
(**keywargs)[source]
-
test_show_calls_show_score
(**keywargs)[source]
tests.test_pitch module
-
class
tests.test_pitch.
TestPitch
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_accidental_offset_double_sharp
()[source]
-
test_accidental_offset_flats
()[source]
-
test_accidental_offset_sharp
()[source]
-
test_getters_work
()[source]
-
test_pitch_to_int
()[source]
tests.test_predictability module
tests.test_rest module
-
class
tests.test_rest.
TestRest
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_accidentals_is_none
()[source]
-
test_accidentals_none
()[source]
-
test_augment_raises_exception
()[source]
-
test_diminish_raises_exception
()[source]
-
test_duration
()[source]
-
test_duration_is_settable
()[source]
-
test_init_sets_duration
()[source]
-
test_letter_is_none
()[source]
-
test_octave_down_raises_exception
()[source]
-
test_octave_is_none
()[source]
-
test_octave_up_raises_exception
()[source]
-
test_pitch_number_is_none
()[source]
-
test_play_calls_play_score
(**keywargs)[source]
-
test_save_calls_save_score
(**keywargs)[source]
-
test_set_accidentals_raises_exception
()[source]
-
test_set_letter_raises_exception
()[source]
-
test_set_octave_raises_exception
()[source]
-
test_show_calls_show_score
(**keywargs)[source]
-
test_transpose_raises_exception
()[source]
tests.test_score module
-
class
tests.test_score.
TestScore
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_add_parts_adds_part
()[source]
-
test_author_is_property
()[source]
-
test_composer_is_property
()[source]
-
test_init_parts_passed_adds_part
()[source]
-
test_play_calls_play_score
(**keywargs)[source]
-
test_save_creates_pdf
()[source]
-
test_show_calls_show_score
(**keywargs)[source]
-
test_title_is_property
()[source]
tests.test_staff module
-
class
tests.test_staff.
TestStaff
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_clef_is_gettable
()[source]
-
test_clef_is_settable
()[source]
-
test_init_defaults_clef_to_treble
()[source]
-
test_init_defaults_voice_to_piano
()[source]
-
test_init_measures_passed_are_added
()[source]
-
test_large_measure_index_appends_new_measures
()[source]
-
test_play_calls_play_score
(**keywargs)[source]
-
test_save_calls_write_to_pdf
(**keywargs)[source]
-
test_show_calls_show_score_png
(**keywargs)[source]
-
test_voice_is_gettable
()[source]
-
test_voice_is_settable
()[source]
tests.test_time module
-
class
tests.test_time.
TestTime
(methodName='runTest')[source]
Bases: unittest.case.TestCase
-
test_time_equality
()[source]
-
test_time_init_accepts_good_time_signature
()[source]
-
test_time_init_raises_PitcherException_on_bad_time_signature
()[source]
Module contents