Ignore:
Timestamp:
04/15/06 19:54:52 (9 years ago)
Author:
xi
Message:

Major refactoring.

File:
1 edited

Legend:

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

    r59 r136  
    1616    def _load(self, filename): 
    1717        try: 
    18             reader = Reader(file(filename, 'rb')) 
    19             scanner = Scanner(reader) 
    20             parser = Parser(scanner) 
    21             composer = Composer(parser) 
    22             resolver = Resolver(composer) 
    23             constructor = Constructor(resolver) 
    24             return list(constructor) 
     18            return list(load_all(file(filename, 'rb'))) 
    2519        except YAMLError, exc: 
    2620        #except ScannerError, exc: 
     
    3428    def _load_string(self, filename): 
    3529        try: 
    36             reader = Reader(file(filename, 'rb').read()) 
    37             scanner = Scanner(reader) 
    38             parser = Parser(scanner) 
    39             composer = Composer(parser) 
    40             resolver = Resolver(composer) 
    41             constructor = Constructor(resolver) 
    42             return list(constructor) 
     30            return list(load_all(file(filename, 'rb').read())) 
    4331        except YAMLError, exc: 
    4432        #except ScannerError, exc: 
Note: See TracChangeset for help on using the changeset viewer.