Ignore:
Timestamp:
02/19/06 17:17:28 (9 years ago)
Author:
xi
Message:

Parser is done. Add iterator interfaces for Scanner and Parser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pyyaml3000/tests/test_errors.py

    r47 r51  
    1919        reader = Reader(file(filename, 'rb')) 
    2020        scanner = Scanner(reader) 
    21         while scanner.peek_token(): 
    22             scanner.get_token() 
     21        return list(scanner) 
    2322 
    2423    def _load_string(self, filename): 
    2524        reader = Reader(file(filename, 'rb').read()) 
    2625        scanner = Scanner(reader) 
    27         while scanner.peek_token(): 
    28             scanner.get_token() 
     26        return list(scanner) 
    2927 
    3028TestErrors.add_tests('testErrors', '.error-message') 
Note: See TracChangeset for help on using the changeset viewer.