o
    /if                     @   s`   d dl Z d dlmZ d dlmZ d dlmZ d dlZd dlZG dd deZ	dd Z
d	d
 ZdS )    N)
BaseMetric)LLMTestCase)assert_testc                   @   sT   e Zd Z				ddefddZdefdd	Zdefd
dZdd Ze	dd Z dS )
FakeMetric      ?Tasd	thresholdc                 C   s   || _ || _|| _|| _d S N)r   include_reasonevaluation_modelstrict_mode)selfr   r
   modelr    r   I/var/www/html/corbot_env/lib/python3.10/site-packages/tests/test_cache.py__init__
   s   
zFakeMetric.__init__	test_casec                 C   s8   t d tdd| _| j| jk| _| jrd| _| jS )N   g        g      ?zThis metric looking good!)	timesleeprandomuniformscorer   successr
   reasonr   r   r   r   r   measure   s   
zFakeMetric.measurec                    s   |  |S r	   )r   r   r   r   r   	a_measure   s   
zFakeMetric.a_measurec                 C   s   | j S r	   )r   r   r   r   r   is_successful"   s   zFakeMetric.is_successfulc                 C   s   dS )NzFake Metricr   r   r   r   r   __name__%   s   zFakeMetric.__name__N)r   Tr   T)
r    
__module____qualname__floatr   r   r   r   r   propertyr   r   r   r   r   	   s    
	r   c                  C   ,   t ddd} tddddd}t| |g d S )	Ninputoutputr&   actual_output皙?FTomgr   r
   r   r   r   r   r   r   metricr   r   r   
test_cache*   
   r0   c                  C   r%   )	Nzinput 3zoutput 2r(   r*   FTr+   r,   r-   r.   r   r   r   test_cache_again3   r1   r2   )pytestdeepeval.metricsr   deepeval.test_caser   deepevalr   r   r   r   r0   r2   r   r   r   r   <module>   s    !	