From 9d1d65b08c4a4c33923935a5414d6e6f4fe59ceb Mon Sep 17 00:00:00 2001 From: ipknHama Date: Sat, 2 Aug 2014 06:30:36 +0900 Subject: implementing mustache specs except partial and lambdas --- template_test/test.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'template_test') diff --git a/template_test/test.py b/template_test/test.py index b492396..f99ca23 100755 --- a/template_test/test.py +++ b/template_test/test.py @@ -6,21 +6,20 @@ import subprocess for testfile in glob.glob("*.json"): testdoc = json.load(open(testfile)) for test in testdoc["tests"]: - if "partials" in test: - continue - if "partial" in test: - continue if "lambda" in test["data"]: continue - print testfile, test["name"] - print json.dumps(test["data"]) - print test["template"] + if "partials" in test: + #print testfile, test["name"] + continue open('data', 'w').write(json.dumps(test["data"])) open('template', 'w').write(test["template"]) ret = subprocess.check_output("./mustachetest") + print testfile, test["name"] if ret != test["expected"]: - print 'Expected:',(test["expected"]) - print 'Actual:',(ret) + 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') - assert ret == test["expected"] -- cgit v1.2.3-54-g00ecf