aboutsummaryrefslogtreecommitdiffstats
path: root/template_test/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'template_test/test.py')
-rwxr-xr-xtemplate_test/test.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/template_test/test.py b/template_test/test.py
deleted file mode 100755
index 22fcca0..0000000
--- a/template_test/test.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-import glob
-import json
-import os
-import subprocess
-for testfile in glob.glob("*.json"):
- testdoc = json.load(open(testfile))
- for test in testdoc["tests"]:
- if "lambda" in test["data"]:
- continue
- open('data', 'w').write(json.dumps(test["data"]))
- open('template', 'w').write(test["template"])
- if "partials" in test:
- open('partials', 'w').write(json.dumps(test["partials"]))
- else:
- open('partials', 'w').write("{}")
- ret = subprocess.check_output("./mustachetest")
- print testfile, test["name"]
- if ret != test["expected"]:
- if 'partials' in test:
- print 'partials:', json.dumps(test["partials"])
- print json.dumps(test["data"])
- print test["template"]
- print 'Expected:',repr(test["expected"])
- print 'Actual:',repr(ret)
- assert ret == test["expected"]
- os.unlink('data')
- os.unlink('template')
- os.unlink('partials')