Ignore:
Timestamp:
12/27/08 09:54:07 (5 years ago)
Author:
xi
Message:

Minor fixes in the test subsystem to prevent failures in LibYAML bindings tests.

File:
1 edited

Legend:

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

    r223 r311  
    2929            for token, ext_token in zip(tokens, ext_tokens): 
    3030                self.failUnlessEqual(token.__class__, ext_token.__class__) 
    31                 self.failUnlessEqual((token.start_mark.index, token.start_mark.line, token.start_mark.column), 
    32                         (ext_token.start_mark.index, ext_token.start_mark.line, ext_token.start_mark.column)) 
    33                 self.failUnlessEqual((token.end_mark.index, token.end_mark.line, token.end_mark.column), 
    34                         (ext_token.end_mark.index, ext_token.end_mark.line, ext_token.end_mark.column)) 
     31                if not isinstance(token, yaml.StreamEndToken): 
     32                    self.failUnlessEqual((token.start_mark.index, token.start_mark.line, token.start_mark.column), 
     33                            (ext_token.start_mark.index, ext_token.start_mark.line, ext_token.start_mark.column)) 
     34                    self.failUnlessEqual((token.end_mark.index, token.end_mark.line, token.end_mark.column), 
     35                            (ext_token.end_mark.index, ext_token.end_mark.line, ext_token.end_mark.column)) 
    3536                if hasattr(token, 'value'): 
    3637                    self.failUnlessEqual(token.value, ext_token.value) 
Note: See TracChangeset for help on using the changeset viewer.