<s> import os , sys , shutil <EOL> sys . path . insert ( <EOL> <NUM_LIT:0> , <EOL> os . path . normpath ( <EOL> os . path . join ( <EOL> os . path . dirname ( os . path . abspath ( __file__ ) ) , <EOL> "<STR_LIT:..>" <EOL> ) <EOL> ) <EOL> ) <EOL> from test_common import ( <EOL> my_print , <EOL> setup , <EOL> hasModule , <EOL> compareWithCPython , <EOL> decideFilenameVersionSkip , <EOL> getRuntimeTraceOfLoadedFiles , <EOL> createSearchMode , <EOL> reportSkip <EOL> ) <EOL> python_version = setup ( needs_io_encoding = True ) <EOL> search_mode = createSearchMode ( ) <EOL> search_mode . mayFailFor ( <EOL> "<STR_LIT>" <EOL> ) <EOL> for filename in sorted ( os . listdir ( '<STR_LIT:.>' ) ) : <EOL> if not filename . endswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if not decideFilenameVersionSkip ( filename ) : <EOL> continue <EOL> path = os . path . relpath ( filename ) <EOL> active = search_mode . consider ( dirname = None , filename = filename ) <EOL> if not active : <EOL> my_print ( "<STR_LIT>" , filename ) <EOL> continue <EOL> extra_flags = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] <EOL> if filename == "<STR_LIT>" : <EOL> if python_version . startswith ( "<STR_LIT>" ) or python_version . startswith ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if "<STR_LIT>" in filename : <EOL> if python_version . startswith ( "<STR_LIT>" ) or python_version . startswith ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if "<STR_LIT>" in filename : <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if python_version . startswith ( "<STR_LIT:2>" ) : <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if "<STR_LIT>" in filename : <EOL> if python_version . startswith ( "<STR_LIT>" ) or python_version . startswith ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if os . name == "<STR_LIT>" and "<STR_LIT>" in filename : <EOL> continue <EOL> if "<STR_LIT>" in filename or "<STR_LIT>" in filename : <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if filename == "<STR_LIT>" : <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if filename == "<STR_LIT>" : <EOL> if python_version . startswith ( "<STR_LIT>" ) or python_version . startswith ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if filename . startswith ( "<STR_LIT>" ) : <EOL> if os . name != "<STR_LIT>" : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if filename == "<STR_LIT>" : <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if filename == "<STR_LIT>" : <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if filename == "<STR_LIT>" : <EOL> if python_version . startswith ( "<STR_LIT:2>" ) : <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> else : <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if filename == "<STR_LIT>" : <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if filename == "<STR_LIT>" : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if filename == "<STR_LIT>" : <EOL> if not hasModule ( "<STR_LIT>" ) : <EOL> reportSkip ( "<STR_LIT:.>" , filename , "<STR_LIT>" ) <EOL> continue <EOL> extra_flags . append ( "<STR_LIT>" ) <EOL> if filename not in ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" ) : <EOL> extra_flags += [ <EOL> "<STR_LIT>" <EOL> ] <EOL> my_print ( "<STR_LIT>" , filename ) <EOL> compareWithCPython ( <EOL> dirname = None , <EOL> filename = filename , <EOL> extra_flags = extra_flags , <EOL> search_mode = search_mode , <EOL> needs_2to3 = False <EOL> ) <EOL> loaded_filenames = getRuntimeTraceOfLoadedFiles ( <EOL> path = os . path . join ( <EOL> filename [ : - <NUM_LIT:3> ] + "<STR_LIT>" , <EOL> filename [ : - <NUM_LIT:3> ] + "<STR_LIT>" <EOL> ) <EOL> ) <EOL> current_dir = os . path . normpath ( os . getcwd ( ) ) <EOL> current_dir = os . path . normcase ( current_dir ) <EOL> illegal_access = False <EOL> for loaded_filename in loaded_filenames : <EOL> loaded_filename = os . path . normpath ( loaded_filename ) <EOL> loaded_filename = os . path . normcase ( loaded_filename ) <EOL> if loaded_filename . startswith ( current_dir ) : <EOL> continue <EOL> if loaded_filename . startswith ( os . path . abspath ( current_dir ) ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename == "<STR_LIT>" : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if os . path . basename ( loaded_filename ) . startswith ( "<STR_LIT>" ) or os . path . basename ( loaded_filename ) . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if os . path . basename ( loaded_filename ) == "<STR_LIT>" : <EOL> continue <EOL> if "<STR_LIT>" in loaded_filename : <EOL> continue <EOL> if "<STR_LIT>" in loaded_filename : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename . startswith ( "<STR_LIT>" ) or loaded_filename in ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) : <EOL> continue <EOL> if os . path . basename ( loaded_filename ) == "<STR_LIT>" : <EOL> continue <EOL> if "<STR_LIT>" in loaded_filename : <EOL> continue <EOL> if os . path . basename ( loaded_filename ) . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename == "<STR_LIT>" + python_version [ : <NUM_LIT:3> ] + "<STR_LIT>" : <EOL> continue <EOL> if loaded_filename == "<STR_LIT>" + python_version [ : <NUM_LIT:3> ] + "<STR_LIT>" : <EOL> continue <EOL> if loaded_filename == "<STR_LIT>" + python_version [ : <NUM_LIT:3> ] + "<STR_LIT>" : <EOL> continue <EOL> if loaded_filename == "<STR_LIT>" + python_version [ : <NUM_LIT:3> ] + "<STR_LIT>" : <EOL> continue <EOL> if loaded_filename == "<STR_LIT>" + python_version [ : <NUM_LIT:3> ] + "<STR_LIT>" : <EOL> continue <EOL> if loaded_filename == "<STR_LIT>" : <EOL> continue <EOL> if loaded_filename in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . endswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_filename . endswith ( "<STR_LIT>" ) : <EOL> continue <EOL> loaded_basename = os . path . basename ( loaded_filename ) . upper ( ) <EOL> if loaded_basename in ( <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_basename . startswith ( "<STR_LIT>" ) : <EOL> continue <EOL> if loaded_basename in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> continue <EOL> my_print ( "<STR_LIT>" % loaded_filename ) <EOL> illegal_access = True <EOL> if illegal_access : <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> shutil . rmtree ( filename [ : - <NUM_LIT:3> ] + "<STR_LIT>" ) <EOL> search_mode . finish ( ) </s>
