source: branches/pyyaml3000/tests/test_canonical.py @ 43

Revision 43, 773 bytes checked in by xi, 8 years ago (diff)

Scanner is mostly completed. Need to write alias, tag, and scalar scanners.

RevLine 
[43]1
2import test_appliance
3
4class TestCanonicalAppliance(test_appliance.TestAppliance):
5
6    def _testCanonicalScanner(self, test_name, canonical_filename):
7        data = file(canonical_filename, 'rb').read()
8        scanner = test_appliance.CanonicalScanner(canonical_filename, data)
9        tokens = scanner.scan()
10        #print tokens
11
12    def _testCanonicalParser(self, test_name, canonical_filename):
13        data = file(canonical_filename, 'rb').read()
14        parser = test_appliance.CanonicalParser(canonical_filename, data)
15        documents = parser.parse()
16        #for document in documents:
17        #    print document
18
19TestCanonicalAppliance.add_tests('testCanonicalScanner', '.canonical')
20TestCanonicalAppliance.add_tests('testCanonicalParser', '.canonical')
21
Note: See TracBrowser for help on using the repository browser.