]> git.scottworley.com Git - paperdoorknob/blobdiff - paperdoorknob_test.py
test: Don't duplicate list of TeX modules in test
[paperdoorknob] / paperdoorknob_test.py
index 2787287eb8575145f15d0679582bda386edfe546..a608f8bf89ccfee8facdfd1912ccc12bbd83909c 100644 (file)
@@ -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(