From 4aa870922e636a50ec829471e0de5ca6a6103974 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Fri, 29 Dec 2023 00:35:20 -0800 Subject: [PATCH 1/1] test: Don't duplicate list of TeX modules in test --- paperdoorknob_test.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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( -- 2.44.1