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

Major refactoring.

File:
1 edited

Legend:

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

    r118 r136  
    22import test_appliance 
    33 
    4 from yaml.reader import * 
    5 from yaml.tokens import * 
    6 from yaml.scanner import * 
     4from yaml import * 
    75 
    86class TestTokens(test_appliance.TestAppliance): 
     
    5250        tokens2 = file(tokens_filename, 'rb').read().split() 
    5351        try: 
    54             scanner = Scanner(Reader(file(data_filename, 'rb'))) 
    5552            tokens1 = [] 
    56             for token in scanner: 
     53            for token in scan(file(data_filename, 'rb')): 
    5754                if not isinstance(token, (StreamStartToken, StreamEndToken)): 
    5855                    tokens1.append(token) 
     
    7572            tokens = None 
    7673            try: 
    77                 scanner = Scanner(Reader(file(filename, 'rb'))) 
    7874                tokens = [] 
    79                 for token in scanner: 
     75                for token in scan(file(filename, 'rb')): 
    8076                    if not isinstance(token, (StreamStartToken, StreamEndToken)): 
    8177                        tokens.append(token.__class__.__name__) 
Note: See TracChangeset for help on using the changeset viewer.