Fix a bug when a block scalar is incorrectly emitted in the simple key context.
[pyyaml/python3.git] / tests / test_canonical.py
blob4416902a5286bde8448bfb1bf588aacbe97df4ae
2 import test_appliance
4 class TestCanonicalAppliance(test_appliance.TestAppliance):
6 def _testCanonicalScanner(self, test_name, canonical_filename):
7 data = file(canonical_filename, 'rb').read()
8 tokens = list(test_appliance.canonical_scan(data))
9 #for token in tokens:
10 # print token
12 def _testCanonicalParser(self, test_name, canonical_filename):
13 data = file(canonical_filename, 'rb').read()
14 event = list(test_appliance.canonical_parse(data))
15 #for event in events:
16 # print event
18 TestCanonicalAppliance.add_tests('testCanonicalScanner', '.canonical')
19 TestCanonicalAppliance.add_tests('testCanonicalParser', '.canonical')