From ede9e96936f2f9fae702a51d07cd18fd0baddfa5 Mon Sep 17 00:00:00 2001 From: David Gustavsson Date: Sun, 22 Nov 2020 18:56:14 +0100 Subject: [PATCH] Update tests --- LaTeXDatax/datax.py | 6 +++--- Makefile | 8 ++++++-- tests/test_LaTeXDatax.py | 4 ---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LaTeXDatax/datax.py b/LaTeXDatax/datax.py index f243cd3..d4c29fd 100644 --- a/LaTeXDatax/datax.py +++ b/LaTeXDatax/datax.py @@ -60,9 +60,9 @@ def printvariables(f,**variables): """ Do `printvariable` for each of the given keyword arguments. """ - print('% File auto-generated by LaTeXDatax.py. Will be overwritten.',file=f) - for tag,variable in variables.items(): - printvariable(tag,variable,f) + print('% File auto-generated by LaTeXDatax.py. Will be overwritten.',file=f) + for tag,variable in variables.items(): + printvariable(tag,variable,f) def datax(filename="data.tex",**variables): """ diff --git a/Makefile b/Makefile index 068bd4f..ab38548 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,10 @@ -.PHONY: clean all +.PHONY: clean all test -all: README.html +all: README.html test + +test: tests/test_LaTeXDatax.py LaTeXDatax/datax.py + pip install . + python $< README.html : README.md md2html --github $< -o $@ diff --git a/tests/test_LaTeXDatax.py b/tests/test_LaTeXDatax.py index 907de01..9d291e6 100644 --- a/tests/test_LaTeXDatax.py +++ b/tests/test_LaTeXDatax.py @@ -25,10 +25,6 @@ def test_datax(self): \\pgfkeyssetvalue{/datax/d}{\\SI{3.1}{\\meter}} \\pgfkeyssetvalue{/datax/e}{\\num{3.1}} """ - print("written:") - print(written) - print("target:") - print(target) self.assertEqual(written,target) if __name__ == '__main__':