Ignore:
Timestamp:
12/29/08 12:24:05 (5 years ago)
Author:
xi
Message:

Added basic support for Python 3 (Thanks idadesub(at)users(dot)sourceforge(dot)net).

Location:
pyyaml/trunk/tests3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/tests3/test_mark.py

    r322 r328  
    33 
    44def test_marks(marks_filename, verbose=False): 
    5     inputs = open(marks_filename, 'rb').read().split('---\n')[1:] 
     5    inputs = open(marks_filename, 'r').read().split('---\n')[1:] 
    66    for input in inputs: 
    77        index = 0 
     
    1515                column += 1 
    1616            index += 1 
    17         mark = yaml.Mark(marks_filename, index, line, column, unicode(input), index) 
     17        mark = yaml.Mark(marks_filename, index, line, column, input, index) 
    1818        snippet = mark.get_snippet(indent=2, max_length=79) 
    1919        if verbose: 
    20             print snippet 
     20            print(snippet) 
    2121        assert isinstance(snippet, str), type(snippet) 
    2222        assert snippet.count('\n') == 1, snippet.count('\n') 
Note: See TracChangeset for help on using the changeset viewer.