]> git.scottworley.com Git - paperdoorknob/blobdiff - paperdoorknob_test.py
Contemplate generating LaTeX directly
[paperdoorknob] / paperdoorknob_test.py
index 453f5a6338dfe5513b3e2cf68160786a4deb72c1..4cead9772866e3425f227c55acb3c32063659627 100644 (file)
@@ -11,7 +11,7 @@ import subprocess
 import paperdoorknob
 from testing.fakeserver import FakeGlowficServer
 from fetch import DirectFetcher
-from texify import PandocTexifier
+from texify import DirectTexifier, PandocTexifier, VerifyingTexifier
 
 TIMEOUT = 8
 
@@ -44,6 +44,14 @@ Pretty sure.
 \\end{document}
 ''')
 
+    def testDirectTexifier(self) -> None:
+        texifier = VerifyingTexifier(
+            PandocTexifier('pandoc'), DirectTexifier())
+        with DirectFetcher(TIMEOUT) as f:
+            buf = io.BytesIO()
+            paperdoorknob.process(
+                f"http://localhost:{self._port}", f, texifier, buf)
+
     def testPDF(self) -> None:
         texifier = PandocTexifier('pandoc')
         with DirectFetcher(TIMEOUT) as f: