Exemplo n.º 1
0
def test_to_txt():
    txt_filename_in = os.path.join(os.path.dirname(__file__), "test_data",
                                   "test_progression.txt")
    txt_filename_out = os.path.join(os.path.dirname(__file__), "test_data",
                                    "test_progression_exported.txt")
    prog = ChordProgression.from_string("""C Fm C G7 C E7 Am G G G G G""")
    try:
        prog.to_txt(txt_filename_out)
        assert ChordProgression.from_txt(txt_filename_in) == prog
    finally:
        os.remove(txt_filename_out)
Exemplo n.º 2
0
def test_from_txt():
    txt_filename_in = os.path.join(os.path.dirname(__file__), "test_data",
                                   "test_progression.txt")
    assert ChordProgression.from_txt(
        txt_filename_in) == ChordProgression.from_string(
            """C Fm C G7 C E7 Am G G G G G""")