21 monkeypatch.chdir(tmp_path)
23 write_file(tmp_path /
"a.peano-patch-file", binary, patches=2, evil=binary)
24 write_file(tmp_path /
"b.peano-patch-file", binary, patches=2, evil=binary)
26 tmp_path /
"meta.peano-patch-file",
27 [[
"a.peano-patch-file",
"b.peano-patch-file"]],
31 merge.read_meta_file(
"meta.peano-patch-file", start, end)
34 str(tmp_path /
"merged_patch_file_0.peano-patch-file"),
"Q", 0
38 assert merged.file_format == (
"Binary" if binary
else "ASCII")
40 patches = merged.unknown_attributes[
"Q"].cell_data
41 assert len(patches) == 4
42 for index, patch
in enumerate(patches):
43 expected = values_of_patch(index % 2, evil=binary)
44 assert patch.values.tobytes() == expected.tobytes()
46 meta = (tmp_path /
"merged_meta_file.peano-patch-file").read_text()
47 assert 'include "merged_patch_file_0.peano-patch-file"' in meta