Preparing the release: PyYAML-3.03
[pyyaml/python3.git] / tests / test_syck.py
blobdd630565a38fcb198c30805d98a9e9f8954540e1
2 import test_appliance
4 class TestSyck(test_appliance.TestAppliance):
6 def _testSyckOnTokenTests(self, test_name, data_filename, tokens_filename):
7 try:
8 syck.parse(file(data_filename, 'rb'))
9 except:
10 print
11 print "DATA:"
12 print file(data_filename, 'rb').read()
13 raise
15 def _testSyckOnCanonicalTests(self, test_name, data_filename, canonical_filename):
16 try:
17 syck.parse(file(data_filename, 'rb'))
18 except:
19 print
20 print "DATA:"
21 print file(data_filename, 'rb').read()
22 raise
24 try:
25 import syck
26 #TestSyck.add_tests('testSyckOnTokenTests', '.data', '.tokens')
27 #TestSyck.add_tests('testSyckOnCanonicalTests', '.data', '.canonical')
28 except ImportError:
29 pass