관리-도구
편집 파일: test_grep.cpython-35.opt-2.pyc
���]o � @ s� d d l Z d d l m Z d d l m Z d d l m Z d d l Z Gd d � d � Z e � Z Gd d � d � Z e � Z Gd d � d e j � Z Gd d � d e j � Z Gd d � d e j � Z e d k r� e j d d d d � d S)� N)�captured_stdout)�Var)� GrepDialogc @ s e Z d Z d d � Z d S)�Dummy_searchenginec C s | j S)N)�_pat)�self� r �./opt/alt/python35/lib64/python3.5/test_grep.py�getpat s zDummy_searchengine.getpatN)�__name__� __module__�__qualname__r r r r r r s r c @ s@ e Z d Z e j Z e j Z e d � Z e Z d d � Z d S)� Dummy_grepFc C s d S)Nr )r r r r �close s zDummy_grep.closeN)r r r r �grep_itZ findfilesr Zrecvar�searchengine�enginer r r r r r s r c @ s e Z d Z d S)� FindfilesTestN)r r r r r r r r % s r c @ s4 e Z d Z d d � Z d d � Z d d � Z d S)�Grep_itTestc C s[ | t j _ t � � } t j t j | � t � Wd QRX| j � j d � } | j � | S)N� )�grepr r r r �re�compile�__file__�getvalue�split�pop)r �pat�s�linesr r r �report1 s zGrep_itTest.reportc C s[ d d } | j | � } | j t | � d � | j | | d � | j | d d � d S)Nzxyz*� � r � zNo hits.)r �assertEqual�len�assertIn)r r r r r r �test_unfound9 s zGrep_itTest.test_unfoundc C s� d } | j | � } | j t | � d � | j | | d � | j d | d � | j d | d � | j | d j d � � d S) Nz<""" !Changing this line will break Test_findfile.test_found!� r zpy: 1:r# �2� � z(Hint:)r r$ r% r&