source: pyyaml/trunk/tests/test_canonical.py @ 136

Revision 136, 698 bytes checked in by xi, 9 years ago (diff)

Major refactoring.

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()
[136]8        tokens = list(test_appliance.canonical_scan(data))
[51]9        #for token in tokens:
10        #    print token
[43]11
12    def _testCanonicalParser(self, test_name, canonical_filename):
13        data = file(canonical_filename, 'rb').read()
[136]14        event = list(test_appliance.canonical_parse(data))
[51]15        #for event in events:
16        #    print event
[43]17
18TestCanonicalAppliance.add_tests('testCanonicalScanner', '.canonical')
19TestCanonicalAppliance.add_tests('testCanonicalParser', '.canonical')
20
Note: See TracBrowser for help on using the repository browser.