summaryrefslogtreecommitdiff
path: root/tests/test_syck.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_syck.py')
-rw-r--r--tests/test_syck.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/test_syck.py b/tests/test_syck.py
new file mode 100644
index 0000000..dd63056
--- /dev/null
+++ b/tests/test_syck.py
@@ -0,0 +1,30 @@
+
+import test_appliance
+
+class TestSyck(test_appliance.TestAppliance):
+
+ def _testSyckOnTokenTests(self, test_name, data_filename, tokens_filename):
+ try:
+ syck.parse(file(data_filename, 'rb'))
+ except:
+ print
+ print "DATA:"
+ print file(data_filename, 'rb').read()
+ raise
+
+ def _testSyckOnCanonicalTests(self, test_name, data_filename, canonical_filename):
+ try:
+ syck.parse(file(data_filename, 'rb'))
+ except:
+ print
+ print "DATA:"
+ print file(data_filename, 'rb').read()
+ raise
+
+try:
+ import syck
+ #TestSyck.add_tests('testSyckOnTokenTests', '.data', '.tokens')
+ #TestSyck.add_tests('testSyckOnCanonicalTests', '.data', '.canonical')
+except ImportError:
+ pass
+