diff --git a/tests/test_meta.py b/tests/test_meta.py index 2797984..d188d20 100644 --- a/tests/test_meta.py +++ b/tests/test_meta.py @@ -868,10 +868,12 @@ def test_option_combined(self) -> None: class TestOptionSetField: @pytest.mark.legacy def test_simple_string_legacy(self) -> None: - tmp = helper.get_score("meta-all-values.mscx") - Cli("meta", "--set-field", "vbox_title", "test", tmp, legacy=True).execute() - i = reload(tmp) - assert i.vbox_title == "test" + c = ( + Cli("meta", "--set-field", "vbox_title", "test", legacy=True) + .append_score("meta-all-values.mscz") + .execute() + ) + assert c.post.meta.interface.vbox_title == "test" def test_simple_string(self) -> None: c = ( @@ -883,19 +885,21 @@ def test_simple_string(self) -> None: @pytest.mark.legacy def test_multiple_times_legacy(self) -> None: - tmp = helper.get_score("meta-all-values.mscx") - Cli( - "meta", - "--set-field", - "vbox_title", - "vt", - "--set-field", - "vbox_composer", - "vc", - tmp, - legacy=True, - ).execute() - i = reload(tmp) + c = ( + Cli( + "meta", + "--set-field", + "vbox_title", + "vt", + "--set-field", + "vbox_composer", + "vc", + legacy=True, + ) + .append_score("meta-all-values.mscz") + .execute() + ) + i = c.post.meta.interface assert i.vbox_title == "vt" assert i.vbox_composer == "vc" @@ -962,9 +966,12 @@ def test_log(self, tmp_path: Path) -> None: class TestOptionDeleteDuplicates: @pytest.mark.legacy def test_normal_legacy(self) -> None: - tmp = helper.get_score("meta-duplicates.mscx") - Cli("meta", "--delete-duplicates", tmp, legacy=True).execute() - i = reload(tmp) + c = ( + Cli("meta", "--delete-duplicates", legacy=True) + .append_score("meta-duplicates.mscz") + .execute() + ) + i = c.post.meta.interface assert not i.combined_lyricist assert not i.combined_subtitle @@ -976,9 +983,12 @@ def test_normal(self) -> None: @pytest.mark.legacy def test_move_subtitle_legacy(self) -> None: - tmp = helper.get_score("meta-duplicates-move-subtitle.mscx") - Cli("meta", "--delete-duplicates", tmp, legacy=True).execute() - i = reload(tmp) + c = ( + Cli("meta", "--delete-duplicates", legacy=True) + .append_score("meta-duplicates-move-subtitle.mscz") + .execute() + ) + i = c.post.meta.interface assert not i.combined_lyricist assert not i.combined_subtitle assert i.combined_title == "Title"