From: Scott Worley Date: Fri, 29 Dec 2023 08:35:20 +0000 (-0800) Subject: test: Don't duplicate list of TeX modules in test X-Git-Url: http://git.scottworley.com/paperdoorknob/commitdiff_plain/4aa870922e636a50ec829471e0de5ca6a6103974 test: Don't duplicate list of TeX modules in test --- diff --git a/paperdoorknob_test.py b/paperdoorknob_test.py index 2787287..a608f8b 100644 --- a/paperdoorknob_test.py +++ b/paperdoorknob_test.py @@ -8,6 +8,7 @@ from abc import ABC, abstractmethod import unittest import io +import re import subprocess import paperdoorknob @@ -45,20 +46,17 @@ class BaseTestProcess(ABC): 'margin=20mm', buf) paperdoorknob.process(spec) - assert buf.getvalue() == b'''\\documentclass{article} -\\usepackage{graphicx} -\\usepackage{varwidth} -\\usepackage{wrapstuff} -\\usepackage[margin=20mm]{geometry} + assert re.match(br'''\\documentclass{article} +(\\usepackage{[a-z]+}\n)+\\usepackage\[margin=20mm\]{geometry} \\begin{document} This is glowfic -You \\emph{sure}? +You \\emph{sure}\? Pretty sure. \\end{document} -''' +''', buf.getvalue()) def testDirectTexifier(self) -> None: texifier = VerifyingTexifier(