Fix the project url.
[pyyaml/python3.git] / tests / test_canonical.py
blob7fa85dcd17ed42194e1f54a1a56192062683de34
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 scanner = test_appliance.CanonicalScanner(data)
9 tokens = scanner.scan()
10 #for token in tokens:
11 # print token
13 def _testCanonicalParser(self, test_name, canonical_filename):
14 data = file(canonical_filename, 'rb').read()
15 parser = test_appliance.CanonicalParser(data)
16 events = parser.parse()
17 #for event in events:
18 # print event
20 TestCanonicalAppliance.add_tests('testCanonicalScanner', '.canonical')
21 TestCanonicalAppliance.add_tests('testCanonicalParser', '.canonical')