| Revision 122,
567 bytes
checked in by xi, 7 years ago
(diff) |
|
Add a skeleton of the emitter.
|
| Line | |
|---|
| 1 | |
|---|
| 2 | import test_appliance, sys |
|---|
| 3 | |
|---|
| 4 | from yaml import * |
|---|
| 5 | |
|---|
| 6 | class TestEmitterOnCanonical(test_appliance.TestAppliance): |
|---|
| 7 | |
|---|
| 8 | def _testEmitterOnCanonical(self, test_name, canonical_filename): |
|---|
| 9 | events = list(iter(Parser(Scanner(Reader(file(canonical_filename, 'rb')))))) |
|---|
| 10 | writer = sys.stdout |
|---|
| 11 | emitter = Emitter(writer) |
|---|
| 12 | print "-"*30 |
|---|
| 13 | print "ORIGINAL DATA:" |
|---|
| 14 | print file(canonical_filename, 'rb').read() |
|---|
| 15 | for event in events: |
|---|
| 16 | emitter.emit(event) |
|---|
| 17 | |
|---|
| 18 | TestEmitterOnCanonical.add_tests('testEmitterOnCanonical', '.canonical') |
|---|
| 19 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.