コード例 #1
0
def test_parse_item_tandem_spine_names_from_user_instrument():
    sco = score.Score()
    main.parse_item("*I:violin 1", sco)
    assert sco.spine_names == ["violin 1"]
コード例 #2
0
def test_parse_item_einterp():
    item = main.parse_item("**kern", score.Score())
    assert isinstance(item, score.Exclusive)
コード例 #3
0
def test_parse_item_tandem():
    item = main.parse_item("*ClefF4", score.Score())
    assert isinstance(item, score.Tandem)
コード例 #4
0
def test_parse_item_bar():
    item = main.parse_item("=2:||:", score.Score())
    assert isinstance(item, score.Bar)
コード例 #5
0
def test_parse_item_list():
    item = main.parse_item(["**kern", "**kern"], score.Score())
    assert [x.name for x in item] == ["kern", "kern"]
コード例 #6
0
def test_parse_item_null():
    item = main.parse_item(".", score.Score())
    assert isinstance(item, score.NullToken)
コード例 #7
0
def test_parse_item_null_interpretation():
    item = main.parse_item("*", score.Score())
    assert isinstance(item, score.NullInterpretation)
コード例 #8
0
def test_parse_item_comment():
    item = main.parse_item("! foo", score.Score())
    assert isinstance(item, score.Comment)