Changeset 311


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.

Location:
pyyaml/trunk/tests
Files:
2 edited

Legend:

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

    r39 r311  
    22def main(): 
    33    import sys, os, distutils.util 
    4     #build_lib = os.path.join('build', 'lib.%s-%s' % (distutils.util.get_platform(), sys.version[0:3])) 
    54    build_lib = 'build/lib' 
     5    build_lib_ext = os.path.join('build', 'lib.%s-%s' % (distutils.util.get_platform(), sys.version[0:3])) 
    66    sys.path.insert(0, build_lib) 
     7    sys.path.insert(0, build_lib_ext) 
    78    import test_yaml 
    89    test_yaml.main('test_yaml') 
  • 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.