<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

e fo
                 @   s   d  Z  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  n  d S)a   !Changing this line will break Test_findfile.test_found!
Non-gui unit tests for idlelib.GrepDialog methods.
dummy_command calls grep_it calls findfiles.
An exception raised in one method will fail callers.
Otherwise, tests are mostly independent.
*** Currently only test grep_it.
    N)captured_stdout)Var)
GrepDialogc               @   s"   e  Z d  Z d Z d d   Z d S)Dummy_searchenginezGrepDialog.__init__ calls parent SearchDiabolBase which attaches the
    passed in SearchEngine instance as attribute 'engine'. Only a few of the
    many possible self.engine.x attributes are needed here.
    c             C   s   |  j  S)N)_pat)self r   @/opt/alt/python34/lib64/python3.4/idlelib/idle_test/test_grep.pygetpat   s    zDummy_searchengine.getpatN)__name__
__module____qualname____doc__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    zDummy_grep.closeN)r   r   r   r   grep_itZ	findfilesr   Zrecvar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   sZ   | t  j _ t     } t  j t j |  t  Wd  QX| j   j	 d  } | j
   | S)N
)grepr   r   r   r   recompile__file__getvaluesplitpop)r   patslinesr   r   r	   report1   s    
zGrep_itTest.reportc             C   s[   d d } |  j  |  } |  j t |  d  |  j | | d  |  j | d d  d  S)Nzxyz*      r      zNo hits.)r!   assertEquallenassertIn)r   r   r    r   r   r	   test_unfound9   s
    
zGrep_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   zpy: 1:r$   2      z(Hint:)r!   r%   r&   r'   Z
assertTrue
startswith)r   r   r    r   r   r	   
test_found@   s    zGrep_itTest.test_foundN)r   r   r   r!   r(   r.   r   r   r   r	   r   ,   s   r   c               @   s   e  Z d  Z d S)Default_commandTestN)r   r   r   r   r   r   r	   r/   J   s   r/   __main__	verbosityr#   exitF)r   ZunittestZtest.supportr   Zidlelib.idle_test.mock_tkr   Zidlelib.GrepDialogr   r   r   r   r   r   ZTestCaser   r   r/   r   mainr   r   r   r	   <module>   s   		