+
    *j  c                     R t ^ RIHt ^ RIt^ RIHu Ht ^ RI	t	^ RI
Ht ^ RIt^ RIHt ^ RIHt ]! ]4      P$                  P$                  R,          tRt]P*                  R 4       t]P*                  R	 4       t]P0                  P2                  R
 4       t]P0                  P2                  R 4       t]P0                  P2                  R 4       t]P0                  P2                  R 4       t]P0                  P2                  R 4       tR# )uD   Tests for compiler/stages/style.py — all offline via FakeProvider.)annotationsN)Path)	run_style)FakeProviderfixturesa  ---
source_id: test-src
title: Test Source
rights: public-domain
fetch_type: gutenberg
---

# Test Source

You have power over your mind, not outside events. Realize this, and you will find strength.

The impediment to action advances action. What stands in the way becomes the way.

Very little is needed to make a happy life; it is all within yourself in your way of thinking.

Confine yourself to the present and you will live a peaceful life.

The soul becomes dyed with the color of its thoughts.
c                p    V R ,          pVP                  4        VR,          P                  \        4       V# )corpustest-src.md)mkdir
write_text	CORPUS_MD)tmp_pathds   & B/Users/jameslopez/projects/MentorCore/tests/compiler/test_style.py
corpus_dirr   %   s-    8AGGI""9-H    c                 D    \         P                  ! \        R ,          4      # )style_extraction.jsonl)r   
from_jsonlFIXTURES r   r   style_providerr   -   s    ""8.F#FGGr   c           	     ^  "   VR ,          p\        RV R,          /VV4      G Rj  xL
 w  rEVP                  qf! 4       qw'       g   RRR\        P                  ! 4       9   g   \        P
                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          p\        \        P                  ! V4      4      hR;rgVP                  qf! 4       qw'       g   RRR	\        P                  ! 4       9   g   \        P
                  ! V4      '       d   \        P                  ! V4      MR	R\        P                  ! V4      R\        P                  ! V4      /,          p\        \        P                  ! V4      4      hR;rgR#  EL5i)
styletest-srcr   NAassert %(py4)s
{%(py4)s = %(py2)s
{%(py2)s = %(py0)s.exists
}()
}py0profile_pathpy2py4exemplars_path)	r   exists@py_builtinslocals
@pytest_ar_should_repr_global_name	_safereprAssertionError_format_explanation)	r   r   r   	style_dirr   r   @py_assert1@py_assert3@py_format5s	   &&&      r   test_run_style_creates_profiler,   5   s    7"I)2	Z-/0* $ L
           <    <               " """"""""">"""">""" """"""""""$s   #F-F*AF-=B=F-;A0F-c                  "   VR ,          p\        RV R,          /VV4      G Rj  xL
 w  rEVP                  4       pRqwV9   q'       g   \        P                  ! R
V3RWv34      R\        P                  ! V4      RR\
        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          p	RR	V	/,          p
\        \        P                  ! V
4      4      hR;rxR#  L5i)r   r   r   N#py1py3contentassert %(py5)spy5inz%(py1)s in %(py3)s)
r   	read_textr#   _call_reprcomparer%   r!   r"   r$   r&   r'   )r   r   r   r(   r   _r1   @py_assert0@py_assert2@py_format4@py_format6s   &&&        r   #test_run_style_profile_has_sectionsr>   A   s     7"I%	Z-/0 OL
 $$&G'>33''s   #D C>B	D 0AD c                x  "   VR ,          p\        RV R,          /VV4      G Rj  xL
 w  rEVP                  4       P                  4        Uu. uF  qfP                  4       '       g   K  VNK  	  pp\	        V4      p^ qV	8  q'       Eg   \
        P                  ! RV
3RW34      RR\        P                  ! 4       9   g!   \
        P                  ! \        4      '       d   \
        P                  ! \        4      MRRR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MRR\
        P                  ! V4      R	\
        P                  ! V	4      /,          pR
RV/,          p\        \
        P                  ! V4      4      hR;p;rV EF  p\        P                  ! V4      pRqV9   q'       g   \
        P                  ! RV3RW34      R\
        P                  ! V4      RR\        P                  ! 4       9   g   \
        P                  ! V4      '       d   \
        P                  ! V4      MR/,          pRRV/,          p\        \
        P                  ! V4      4      hR;rVR,          p\        V\         4      q'       Eg   RRR\        P                  ! 4       9   g!   \
        P                  ! \        4      '       d   \
        P                  ! \        4      MRR\
        P                  ! V4      RR\        P                  ! 4       9   g!   \
        P                  ! \         4      '       d   \
        P                  ! \         4      MRR\
        P                  ! V
4      /,          p\        \
        P                  ! V4      4      hR;pp
EK  	  R#  ELu upi 5i)r   r   r   Nr   lenr/   linesr0   py6zassert %(py8)spy8textrecordr2   r3   z5assert %(py5)s
{%(py5)s = %(py0)s(%(py2)s, %(py3)s)
}
isinstancer   str)>)z/%(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} > %(py6)sr4   r6   )r   r7   
splitlinesstripr@   r#   r8   r!   r"   r$   r%   r&   r'   jsonloadsrF   rG   )r   r   r   r(   r9   r   lnrA   r;   @py_assert5@py_assert4@py_format7@py_format9linerE   r:   r<   r=   r)   s   &&&                r   (test_run_style_exemplars_are_valid_jsonlrS   N   s     7"I'	Z-/0 A
 )224??APABXXZRRAEPu:>:33uu:D!vv ..z.#.........z....z..........#....#........... 
 QsK   #N:N2&N:N5(N5.A/N:AN:0D	N::B(N:#A+N:A$N:5N:c                J  "   VR,          p\         P                  ! \        R,          4      p\        RV R,          /VV4      G Rj  xL
 w  rEVP	                  4       p. pRqV9   qq'       g(   RqP
                  q! 4       qV9   qq'       g	   RqV9   pTp
V
'       Egn   \        P                  ! RV	3RW34      R	\        P                  ! V4      R
R\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          pRRV/,          pVP                  V4       V	'       Eg{   \        P                  ! RX3RXX34      R\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! X4      R\        P                  ! V4      /,          pRRV/,          pVP                  V4       V'       g   \        P                  ! RX3RXV34      R\        P                  ! V4      RR\        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MR/,          pRRV/,          pVP                  V4       \        P                  ! V^4      / ,          pRRV/,          p\        \        P                  ! V4      4      hR;p
;p;p;p	;p;p;p;p;ppR#  EL5i)u2   Recorded golden response — deterministic replay.r   r   r   r   NStoicausterez# Toner0   r3   r1   z%(py7)spy7py10py12py14py16z%(py18)spy18py21py23z%(py25)spy25zassert %(py28)spy28r4   )z%(py3)s in %(py5)s)zJ%(py10)s in %(py16)s
{%(py16)s = %(py14)s
{%(py14)s = %(py12)s.lower
}()
})z%(py21)s in %(py23)s)r   r   r   r   r7   lowerr#   r8   r%   r!   r"   r$   append_format_boolopr&   r'   )r   r   r(   providerr   r9   r1   r)   r;   rO   r:   @py_assert9@py_assert13@py_assert15@py_assert11@py_assert20@py_assert22r=   @py_format8@py_format17@py_format19@py_format24@py_format26@py_format27@py_format29s   &&                       r   test_run_style_golden_outputrr   `   s     7"I&&x2J'JKH%	Z-/0 OL
 $$&GT7TgTTTmmTmoTo!=TTTWATTTTT7TTT7TTTTTTgTTTTgTTTTTTTTToTTTTTTTTTgTTTTgTTTmTTToTTTTTTTTTWTTTTTTTTTWTTTTWTTTTTTTTTTTTTTTTTs=   AL#L AL#A&L#AL#A'L#0A.L#A'L#BL#c           	       "   V R ,          p\         P                  ! \        R,          4      p\        / W4      G Rj  xL
 w  r4VP                  qU! 4       qf'       g   RRR\
        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          p\        \        P                  ! V4      4      hR;rVVP                  qU! 4       qf'       g   RRR\
        P                  ! 4       9   g   \        P                  ! V4      '       d   \        P                  ! V4      MRR\        P                  ! V4      R\        P                  ! V4      /,          p\        \        P                  ! V4      4      hR;rVR#  EL5i)	r   r   Nr   r   r   r   r   r   )r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   )r   r(   rd   r   r   r)   r*   r+   s   &       r   test_run_style_empty_corpusrt   n   s    7"I&&x2J'JKH)22y)K#K L          <    <               " """"""""">"""">""" """""""""" $Ls   :GGAGB=GA0G)__doc__
__future__r   builtinsr!   _pytest.assertion.rewrite	assertionrewriter#   rK   pathlibr   pytestcompiler.stages.styler   runtime.providers.faker   __file__parentr   r   fixturer   r   markasyncior,   r>   rS   rr   rt   r   r   r   <module>r      s	   J "      + />  ''*4	,   H H # # 	 	 / /" 
U 
U # #r   