
    q"jw                     R    d dl Zd dlmc mZ d dlmZmZm	Z	 d Z
d Zd Zd Zd ZdS )    N)evaluate_red_flag_video_gates
score_hookscore_idea_retentionc                  b   t          d          } t          d          }|d         }| d         }||k    }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d	}|d
         }||v }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d}|d
         }||v }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d}|d
         }||v }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d S )NzHere are some productivity tipsz>If your brain has 47 tabs open, do this before opening TikTok.score)>)z%(py1)s > %(py4)spy1py4assert %(py6)spy6specificitysignalsinz%(py1)s in %(py4)sdirect_address	open_loop)r   
@pytest_ar_call_reprcompare	_safereprAssertionError_format_explanation)weakstrong@py_assert0@py_assert3@py_assert2@py_format5@py_format7s          N/home/agent/jarvis_runtime/autoshortsbot/AutoShortsBot/tests/test_retention.py;test_score_hook_rewards_specific_tension_and_direct_addressr"      s   788DXYYF'?*T']*?]**********?]*****?****]***************************-F9--=-----------=------=--------------------------------0vi000000000000000000000000000000000000000000000000000+&++;+++++++++++;++++++;++++++++++++++++++++++++++++++++++    c                  D   dddddd} t          |           }|d         }d}||k     }|slt          j        d	|fd
||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d}|d         }||v }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d}|d         }||v }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d S )Nz2In this video I will talk about productivity tips.K   z*Static slideshow with abstract background.z.Some generic advice about habits and routines.zFollow for more.hookduration_secondsvisual_conceptscript_outlinectar      )<)z%(py1)s < %(py4)sr	   r   r   
slow_introrisksr   r   generic_valuer   r   r   r   r   r   )idearesultr   r   r   r   r    s          r!   7test_score_idea_retention_penalizes_slow_generic_introsr4      s!   DFJ! D "$''F'?Q?Q?Q?Q*6'?*<?**********<?*****<****?***************************-fWo-?o----------?o-----?----o-----------------------------r#   c                     dddddd} t          |           }|d         }d}||k    }|slt          j        d	|fd
||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}|d         }| }|s:ddt          j        |          iz  }t	          t          j        |                    d x}}d S )Nz?You do not need more discipline. You need a smaller first step.&   zSPattern interrupt: messy desk becomes one tiny next action with timer and captions.zfChallenge the discipline myth, show the two-minute starter, give one concrete example, close the loop.z'Comment START if you want the template.r&   r      )>=)z%(py1)s >= %(py4)sr	   r   r   r/   zassert not %(py1)sr
   r1   )r2   r3   r   r   r   r   r    @py_format3s           r!   <test_score_idea_retention_accepts_strong_testbatch_candidater:      s6   Qo C8 D "$''F'?a?a?a?agr#   c                  L   ddddddgd} t          |           }|d         }d	}||u }|slt          j        d
|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}|d         d         }d	}||u }|slt          j        d
|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d S )NzoPhone browser screen showing a fake CAPTCHA trap asking for notification permission and risking account alerts.z(What is the trap before you click Allow?z5The CAPTCHA asks for browser notification permission.z/Block the permission request and close the tab.zWhat do I check before acting?z"What do I do if I already clicked?)visibleScreenr'   redFlag	saferMovewebsite_companion_questionsallowedTisz%(py1)s is %(py4)sr	   r   r   gatesone_second_recognitionr   r   r   r   r   r   )	candidater3   r   r   r   r   r    s          r!   Jtest_red_flag_video_gates_require_screen_trap_one_move_and_companion_valuerH   -   s    K:JF(HJn'o I +955F)$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$'?34<<4<<<<<<<<<<4<<<<<4<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<r#   c                  D   t          ddddgdg d          } | d         }d}||u }|slt          j        d	|fd
||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d}| d         }||v }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d}| d         }||v }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d}| d         }||v }|slt          j        d|fd||f          t          j        |          t          j        |          dz  }dd|iz  }t	          t          j        |                    d x}x}}d S )NzAbstract dark backgroundzScams are everywhere.zBad linkzBad phone numberzBe careful.)r<   r'   	red_flagsr>   r?   r@   FrA   rC   r	   r   r   one_second_recognition_gatefailuresr   r   one_red_flag_gatewebsite_companion_value_gaterF   )r3   r   r   r   r   r    s         r!   @test_red_flag_video_gates_block_multiple_red_flags_and_vague_ctarO   <   s   *3' "45"'), ,  F )%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%(>F:,>>(,>>>>>>>>>>>(,>>>>>>(>>>>,>>>>>>>>>>>>>>>>>>>>>>>>>>>>4&"44"44444444444"4444444444"4444444444444444444444444444)?VJ-??)-???????????)-??????)????-??????????????????????????????r#   )builtins@py_builtins_pytest.assertion.rewrite	assertionrewriter   autoshorts.retentionr   r   r   r"   r4   r:   rH   rO    r#   r!   <module>rW      s                  ` ` ` ` ` ` ` ` ` `, , ,. . .   = = =@ @ @ @ @r#   