Ignore:
Timestamp:
04/18/06 12:48:00 (9 years ago)
Author:
xi
Message:

Add more unit tests for error messages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/emitter.py

    r137 r141  
    466466                self.prepared_tag = None 
    467467                return 
    468             if self.event.implicit[0] and not tag: 
     468            if self.event.implicit[0] and tag is None: 
    469469                tag = u'!' 
    470470                self.prepared_tag = None 
     
    473473                self.prepared_tag = None 
    474474                return 
    475         if not tag: 
     475        if tag is None: 
    476476            raise EmitterError("tag is not specified") 
    477477        if self.prepared_tag is None: 
     
    609609                    or ch in u'-_'): 
    610610                raise EmitterError("invalid character %r in the anchor: %r" 
    611                         % (ch.encode('utf-8'), text.encode('utf-8'))) 
     611                        % (ch.encode('utf-8'), anchor.encode('utf-8'))) 
    612612        return anchor 
    613613 
Note: See TracChangeset for help on using the changeset viewer.