%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/lib2to3/tests/ |
Current File : //usr/local/lib/python2.7/lib2to3/tests/test_refactor.pyc |
ó Pêáac @€ s` d Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z d d l m Z d d l m Z e j j e j j e ƒ d ƒ Z e j j e d ƒ Z e j j e ƒ z e j d ƒ Z Wd e j j ƒ Xe j d ƒ Z d e j f d „ ƒ YZ! d S( s Unit tests for refactor.py. iÿÿÿÿ( t with_statementN( t refactort pygramt fixer_base( t tokeni ( t supportt datat fixerst myfixess lib2to3.fixest TestRefactoringToolc B€ sì e Z d „ Z d „ Z d „ Z d e d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z e d d e d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C€ s t j j t ƒ d S( N( t syst patht appendt FIXER_DIR( t self( ( s7 /usr/local/lib/python2.7/lib2to3/tests/test_refactor.pyt setUp% s c C€ s t j j ƒ d S( N( R R t pop( R ( ( s7 /usr/local/lib/python2.7/lib2to3/tests/test_refactor.pyt tearDown( s c C€ sJ xC t | | ƒ D]2 \ } } t | | ƒ s | j d | | ƒ q q Wd S( Ns %s are not instances of %s( t zipt isinstancet fail( R t instancest classest instt cls( ( s7 /usr/local/lib/python2.7/lib2to3/tests/test_refactor.pyt check_instances+ s c C€ s t j | | | ƒ S( N( R t RefactoringTool( R t optionsR t explicit( ( s7 /usr/local/lib/python2.7/lib2to3/tests/test_refactor.pyt rt0 s c C€ sI | j i t d 6ƒ } | j | j t j ƒ | j | j j t j ƒ d S( Nt print_function( R t Truet assertIst grammarR t! python_grammar_no_print_statementt driver( R R ( ( s7 /usr/local/lib/python2.7/lib2to3/tests/test_refactor.pyt test_print_function_option3 s c C€ sF | j ƒ } | j | j ƒ | j i t d 6ƒ } | j | j ƒ d S( Nt write_unchanged_files( R t assertFalseR% R t assertTrue( R R ( ( s7 /usr/local/lib/python2.7/lib2to3/tests/test_refactor.pyt! test_write_unchanged_files_option9 s c C€ s§ d d d d d g } t j d ƒ } t j d t ƒ } t j d ƒ } | j | g | D] } d | ^ qU ƒ | j | | ƒ | j | g | D] } d | ^ qŒ ƒ d S( NR t firstt lastt parrott preorderR t fix_s myfixes.fix_( R t get_all_fix_namest Falset get_fixers_from_packaget assertEqual( R t contentst non_prefixedt prefixedt full_namest name( ( s7 /usr/local/lib/python2.7/lib2to3/tests/test_refactor.pyt test_fixer_loading_helpers? s ' c C€ s t j } t } | ƒ } | j | d ƒ | ƒ | j | d ƒ | d ƒ ƒ | j | d ƒ | d ƒ ƒ | j | d ƒ | d ƒ ƒ d } | j | | ƒ | d ƒ ƒ d } | j | | ƒ | d ƒ ƒ d } | j | | ƒ | d ƒ ƒ d } | j | | ƒ | d! ƒ ƒ d } | j | | ƒ | d"