Ignore:
Timestamp:
03/26/06 17:57:23 (9 years ago)
Author:
xi
Message:

Parser now provides style information. Allow empty plain scalars if a tag or anchor is given.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/branches/working-on-emitter/tests/test_emitter.py

    r122 r127  
    11 
    2 import test_appliance, sys 
     2import test_appliance, sys, StringIO 
    33 
    44from yaml import * 
     
    88    def _testEmitterOnCanonical(self, test_name, canonical_filename): 
    99        events = list(iter(Parser(Scanner(Reader(file(canonical_filename, 'rb')))))) 
    10         writer = sys.stdout 
     10        #writer = sys.stdout 
     11        writer = StringIO.StringIO() 
    1112        emitter = Emitter(writer) 
    12         print "-"*30 
    13         print "ORIGINAL DATA:" 
    14         print file(canonical_filename, 'rb').read() 
     13        #print "-"*30 
     14        #print "ORIGINAL DATA:" 
     15        #print file(canonical_filename, 'rb').read() 
    1516        for event in events: 
    1617            emitter.emit(event) 
Note: See TracChangeset for help on using the changeset viewer.