Ignore:
Timestamp:
04/16/06 19:45:21 (8 years ago)
Author:
xi
Message:

Refactor resolver.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/tests/test_emitter.py

    r136 r137  
    3131            if isinstance(event, ScalarEvent): 
    3232                #self.failUnlessEqual(event.implicit, new_event.implicit) 
    33                 if not event.implicit and not new_event.implicit: 
     33                if True not in event.implicit+new_event.implicit: 
    3434                    self.failUnlessEqual(event.tag, new_event.tag) 
    3535                self.failUnlessEqual(event.value, new_event.value) 
     
    5959        if class_name in ['ScalarEvent', 'SequenceStartEvent', 'MappingStartEvent']: 
    6060            mapping.setdefault('tag', None) 
     61        if class_name in ['SequenceStartEvent', 'MappingStartEvent']: 
     62            mapping.setdefault('implicit', True) 
    6163        if class_name == 'ScalarEvent': 
    62             mapping.setdefault('implicit', False) 
     64            mapping.setdefault('implicit', (False, True)) 
    6365            mapping.setdefault('value', '') 
    6466        value = getattr(yaml, class_name)(**mapping) 
Note: See TracChangeset for help on using the changeset viewer.