Initial support for user general remarks
This commit is contained in:
1 parent
a38c1ff4b3
commit
2c9dc65640
16 files changed
+606
-20
No files matched your search
@@ -76,6 +76,21 @@ class ModificationTests(unittest.TestCase):
|
||||
self.assertTrue(all(abs(a-b) < 12 for a, b in zip(image.getpixel(xy), expected)),
|
||||
(image.getpixel(xy), expected))
|
||||
|
||||
def test_general_remarks_survive_repeated_body_edits(self):
|
||||
from copienator.general_remarks import IMAGE_FILENAME
|
||||
for mode in ("Bnot", "BGnot"):
|
||||
with self.subTest(mode=mode):
|
||||
self.mode = mode
|
||||
self.seed()
|
||||
image = Image.new("RGB", (120, 60), "magenta")
|
||||
image.save(self.output / IMAGE_FILENAME)
|
||||
original = (self.output / IMAGE_FILENAME).read_bytes()
|
||||
for _ in range(2):
|
||||
self.apply("Copie43 Ex 1 c{40}2> |Ex 2")
|
||||
self.assertEqual((self.output / IMAGE_FILENAME).read_bytes(), original)
|
||||
self.assert_color(self.image("Concat"), (50, 30), "magenta")
|
||||
self.assertTrue((self.output / "Concat_F.pdf").is_file())
|
||||
|
||||
def test_cut_uses_body_height_preserves_own_headers_and_scores(self):
|
||||
self.apply("Copie43 Ex 1 c{40}2> |Ex 2")
|
||||
source, target = self.image("Ex 1"), self.image("Ex 2")
|
||||
|
||||
Reference in new issue
Block a user