+
    Q�i'9  ã                  óº  € ^ RI Ht ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RIHtHt ^RIHt ^RIHt ^R	IHt R
 tR tR t ! R R]4      t ! R R4      tR R lt]! ]! 4       '       * R4      ]! ]! 4       '       * R4       ! R R]
4      4       4       t] ! R R]4      4       tR tR t]! ]! 4       '       * R4      ]! ]! 4       '       * R4       ! R R]
4      4       4       t ]! ]! 4       '       * R4      ]! ]! 4       '       * R4      ]! ]! 4       '       * R4       ! R R]
4      4       4       4       t!]! ]! 4       '       * R4      ]! ]! 4       '       * R4       ! R  R!]
4      4       4       t" ! R" R#]4      t# ! R$ R%]4      t$ ! R& R']4      t%]! ]! 4       '       * R4      ]! ]! 4       '       * R4      ]! ]! 4       '       * R4       ! R( R)]
4      4       4       4       t&R# )*é    )ÚannotationsN)Ú	dataclass)ÚProtocol)ÚTestCaseÚskipIf)ÚTypeMachineBuilderÚpep614)ÚMethodicalMachine)ÚTypeMachine)ÚisTwistedInstalledc                 óB   €  \        R4       R#   \         d     R# i ; i)z*
Is the graphviz Python module installed?
ÚgraphvizTF)Ú
__import__ÚImportError© ó    Ú>/usr/lib/python3/dist-packages/automat/_test/test_visualize.pyÚisGraphvizModuleInstalledr      s(   € ðÜ�:Ôñ øô ô Úðús   ‚ ��c                 óü   € \         P                  ! 4       w  r\         P                  ! V4        \        P                  ! RV RR7      '       * \         P                  ! V 4       #   \         P                  ! T 4       i ; i)z#
Are the graphviz tools installed?
ÚdotT)ÚstdinÚshell)ÚosÚpipeÚcloseÚ
subprocessÚcall)ÚrÚws     r   ÚisGraphvizInstalledr       sK   € ô �7Š7‹9�D€AÜ‡H‚HˆQ„KðÜ—?’? 5°¸Ô>Ô>ä
�Š��øŒ�Š��ús   ¯A# Á#A;c                 ón   a€ \        4       o ! V3R lR\        4      p V ! 4       pVP                  4        S# )z?
Create a sample L{MethodicalMachine} with some sample states.
c                  óü   <€ ] tR t^/t Z P	                  RR7      R 4       t Z P	                  4       R 4       t Z P                  4       R 4       t Z P                  4       R 4       t
]P                  ]]]
.4       RtR# )	Ú#sampleMachine.<locals>.SampleObjectT)Úinitialc                ó   € R# )zinitial stateNr   ©Úselfs   &r   ÚbeginÚ)sampleMachine.<locals>.SampleObject.begin0   ó   ‚ r   c                ó   € R# )z	end stateNr   r&   s   &r   ÚendÚ'sampleMachine.<locals>.SampleObject.end4   r*   r   c                ó   € R# )zsample inputNr   r&   s   &r   ÚgoÚ&sampleMachine.<locals>.SampleObject.go8   r*   r   c                ó   € R# )zsample outputNr   r&   s   &r   ÚoutÚ'sampleMachine.<locals>.SampleObject.out<   r*   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ústater(   r,   Úinputr/   Úoutputr2   ÚuponÚ__static_attributes__)Úmms   €r   ÚSampleObjectr#   /   s…   ø† Ù	�‰˜$ˆÓ	ñ	ó 
 ð	ñ 
�‰‹ñ	ó 
ð	ñ 
�‰‹ñ	ó 
ð	ñ 
�‰‹ñ	ó 
ð	ð 	�
‰
�2�s˜S˜E×"Ð"r   r>   )r
   Úobjectr/   )r>   Úsor=   s     @r   ÚsampleMachinerA   )   s0   ø€ ô 
Ó	€B÷#”vô #ñ& 
‹€BØ‡E�E„GØ€Ir   c                  ó"   € ] tR t^GtR R ltRtR# )ÚSamplec               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNoner   )Úformats   "r   Ú__annotate__ÚSample.__annotate__H   s   € ×Ñ�DÑr   c                	ó   € R # ©Nr   r&   s   &r   r/   Ú	Sample.goH   s   € ™#r   r   N)r4   r5   r6   r7   r/   r<   r   r   r   rC   rC   G   s   † ßÑr   rC   c                  ó   € ] tR t^ItRtR# )ÚCorer   N)r4   r5   r6   r7   r<   r   r   r   rP   rP   I   s   † ‹Cr   rP   c               ó   € V ^8„  d   QhRR/# )rF   rG   zTypeMachine[Sample, Core]r   )rI   s   "r   rJ   rJ   L   s   € ÷ ñ Ð4ñ r   c                 ó2  € \        \        \        4      p V P                  R4      pR R lpV P                  RV4      pV P                  R4      pVP	                  \        P
                  4      P                  V4      P                  R4       VP	                  \        P
                  4      P                  V4      P                  R4       \        VP	                  \        P
                  4      P                  V4      4      R R l4       pV P                  4       # )	z9
Create a sample L{TypeMachine} with some sample states.
r(   c               ó$   € V ^8„  d   QhRRRRRR/# )rF   ÚprotorC   ÚcorerP   rG   Úintr   )rI   s   "r   rJ   Ú'sampleTypeMachine.<locals>.__annotate__S   s!   € ÷ ñ �vð  Tð ¨cñ r   c                ó   € ^# )é   r   )rT   rU   s   &&r   ÚbuilditÚ"sampleTypeMachine.<locals>.builditS   s   € Ùr   Údatar,   Nc               ó$   € V ^8„  d   QhRRRRRR/# )rF   ÚsamplerC   rU   rP   rG   rH   r   )rI   s   "r   rJ   rW   \   s   € ×4Ñ4�FÐ4 $Ð4¨4Ñ4r   c                ó   € R # rM   r   )r^   rU   s   &&r   r2   ÚsampleTypeMachine.<locals>.out[   s   € Ù14r   )
r   rC   rP   r8   r;   r/   ÚtoÚreturnsr	   Úbuild)Úbuilderr(   rZ   r\   r,   r2   s         r   ÚsampleTypeMachinere   L   sÆ   € ô !¤¬Ó.€GØ�M‰M˜'Ó"€Eõð �=‰=˜ Ó)€DØ
�-‰-˜Ó
€CØ	‡J�JŒv�y‰yÓ×Ñ˜TÓ"×*Ñ*¨4Ô0Ø‡I�IŒf�i‰iÓ×Ñ˜CÓ ×(Ñ(¨Ô.äˆC�H‰H”V—Y‘YÓ×"Ñ" 5Ó)Ó*Ü4ó +Ø4à�=‰=‹?Ðr   z!Graphviz module is not installed.zTwisted is not installed.c                  ó2   € ] tR t^atRtR tR tR tR tRt	R# )ÚElementMakerTestszD
L{elementMaker} generates HTML representing the specified element.
c                	ó   € ^RI Hp Wn        R# )rF   ©ÚelementMakerN)Ú
_visualizerj   )r'   rj   s   & r   ÚsetUpÚElementMakerTests.setUph   s   € Ý-à(Ör   c           
     óR   € RpV P                  WP                  RRRRR7      4       R# )z;
L{elementMaker} orders HTML attributes lexicographically.
z<div a="1" b="2" c="3"></div>ÚdivÚ2Ú1Ú3©ÚbÚaÚcN©ÚassertEqualrj   ©r'   Úexpecteds   & r   Útest_sortsAttrsÚ!ElementMakerTests.test_sortsAttrsm   s+   € ð 4ˆØ×Ñ˜×#4Ñ#4°U¸cÀSÈCÐ#4Ó#PÖQr   c           
     óR   € RpV P                  WP                  RR^RR7      4       R# )z‰
L{elementMaker} quotes HTML attributes according to DOT's quoting rule.

See U{http://www.graphviz.org/doc/info/lang.html}, footnote 1.
z-<div a="1" b="a \" quote" c="a string"></div>ro   z	a " quoteza stringrs   Nrw   ry   s   & r   Útest_quotesAttrsÚ"ElementMakerTests.test_quotesAttrst   s/   € ð DˆØ×ÑØ×'Ñ'¨°ÀÀZÐ'ÓPö	
r   c                óJ   € RpV P                  WP                  R4      4       R# )z>
L{elementMaker} should render an element with no attributes.
z<div ></div>ro   Nrw   ry   s   & r   Útest_noAttrsÚElementMakerTests.test_noAttrs   s"   € ð #ˆØ×Ñ˜×#4Ñ#4°UÓ#;Ö<r   ri   N)
r4   r5   r6   r7   Ú__doc__rl   r{   r~   r�   r<   r   r   r   rg   rg   a   s   † ñò)ò
Rò	
ö=r   rg   c                  ó:   € ] tR t^‡t$ RtR]R&   R]R&   R]R&   RtR	# )
ÚHTMLElementz2Holds an HTML element, as created by elementMaker.ÚstrÚnamezlist[HTMLElement]Úchildrenzdict[str, str]Ú
attributesr   N)r4   r5   r6   r7   rƒ   Ú__annotations__r<   r   r   r   r…   r…   ‡   s   ‡ á<à
ƒIØÓØ×r   r…   c                ó¶   € V! V 4      '       d   V .# \        V 4      '       d   . # V P                   UUu. uF  p\        W!4       F  pVNK  	  K  	  upp# u uppi )z_
Recursively collect all elements in an L{HTMLElement} tree that
match the optional predicate.
)ÚisLeafrˆ   ÚfindElements)ÚelementÚ	predicateÚchildÚresults   &&  r   r�   r�   �   sd   € ñ
 �×ÒØˆyÐÜ	��ŠØˆ	ð ×%Ò%ôá%ˆEÜ" 5Ö4ˆFó 	á4ñ 	Ù%òð ùó s   ´Ac                ó,   € \        V \        4      '       * # )z*
This HTML element is actually leaf node.
)Ú
isinstancer…   ©rŽ   s   &r   rŒ   rŒ   ¡   s   € ô ˜'¤;Ó/Ô/Ð/r   c                  ó8   € ] tR t^¨tRtR tR tR tR tR t	Rt
R# )	ÚTableMakerTestszÆ
Tests that ensure L{tableMaker} generates HTML tables usable as
labels in DOT graphs.

For more information, read the "HTML-Like Labels" section of
U{http://www.graphviz.org/doc/info/shapes.html}.
c                	ó   € \        WVR 7      # ))r‡   rˆ   r‰   )r…   )r'   r‡   rˆ   r‰   s   &&*,r   ÚfakeElementMakerÚ TableMakerTests.fakeElementMaker³   s   € Ü ÀJÔOÐOr   c                	óz   € ^RI Hp RV n        RV n        \        P
                  ! WP                  R7      V n        R# )rF   )Ú
tableMakerúinput labelzthe port)Ú_EN)rk   r›   Ú
inputLabelÚportÚ	functoolsÚpartialr˜   )r'   r›   s   & r   rl   ÚTableMakerTests.setUp¶   s+   € Ý+à'ˆŒØˆŒ	Ü#×+Ò+¨J×;PÑ;PÔQˆŽr   c                óÔ  a € V 3R lp. R.3 F×  pS P                  S P                  VS P                  R7      pS P                  \	        VP
                  4      ^ 4       VP
                  ^ ,          p\        W14      pS P                  \	        V4      ^4       S P                  V^ ,          P                  R4       S P                  \        V\        4      S P                  .4       KÙ  	  R# )z­
The table returned by L{tableMaker} always contains the input
symbol label in its first row, and that row contains one cell
with a port attribute set to the provided port.
c                ó„   <€ \        V 4      '       * ;'       d)    V P                  P                  R 4      SP                  8H  # ©rŸ   )rŒ   r‰   ÚgetrŸ   )rŽ   r'   s   &€r   ÚhasPortÚ3TableMakerTests.test_inputLabelRow.<locals>.hasPortÄ   s2   ø€ Ü˜g“Ô&×VÐV¨7×+=Ñ+=×+AÑ+AÀ&Ó+IÈTÏYÉYÑ+VÐVr   zan output labelr¥   ÚtdN)
r›   rž   rŸ   ÚassertGreaterÚlenrˆ   r�   rx   r‡   rŒ   )r'   r§   ÚoutputLabelsÚtableÚinputLabelRowÚportCandidatess   f     r   Útest_inputLabelRowÚ"TableMakerTests.test_inputLabelRow½   s¹   ø€ õ	Wð  Ð"3Ð!4Ó5ˆLØ—O‘O D§O¡O°\ÈÏ	É	�OÓRˆEØ×Ñœs 5§>¡>Ó2°AÔ6Ø!ŸN™N¨1Õ-ˆMä)¨%Ó9ˆNà×ÑœS Ó0°!Ô4Ø×Ñ˜^¨AÕ.×3Ñ3°TÔ:Ø×Ñœ\¨-¼Ó@À4Ç?Á?ÐBSÖTó 6r   c                óà   € V P                  RRV P                  R7      pV P                  \        VP                  4      ^4       VP                  w  pV P                  RVP                  4       R# )zu
L{tableMaker} does not add a colspan attribute to the input
label's cell or a second row if there no output labels.
rœ   r¥   ÚcolspanNr   )r›   rŸ   rx   r«   rˆ   ÚassertNotInr‰   )r'   r­   r®   s   &  r   Útest_noOutputLabelsÚ#TableMakerTests.test_noOutputLabelsÒ   sW   € ð
 —‘ ¨r¸¿	¹	�ÓBˆØ×Ñœ˜UŸ^™^Ó,¨aÔ0Ø Ÿ>™>ÑˆØ×Ñ˜ M×$<Ñ$<Ö=r   c                óN  € V P                  V P                  RV P                  R7      pV P                  \	        VP
                  4      ^4       VP
                  w  r#R pV P                  \	        \        W$4      4      ^4       V P                  \        V\        4      RR.4       R# )z™
L{tableMaker} adds a colspan attribute to the input label's cell
equal to the number of output labels and a second row that
contains the output labels.
úoutput label 1úoutput label 2r¥   c                óœ   € \        V 4      '       * ;'       d6    V P                  R 8H  ;'       d    V P                  P                  R4      R8H  # )r©   r³   rp   )rŒ   r‡   r‰   r¦   r”   s   &r   ÚhasCorrectColspanÚ@TableMakerTests.test_withOutputLabels.<locals>.hasCorrectColspané   sJ   € ä˜7“OÔ#÷ =ð =Ø—L‘L DÑ(÷=ð =à×&Ñ&×*Ñ*¨9Ó5¸Ñ<ðr   N)r¸   r¹   )r›   rž   rŸ   rx   r«   rˆ   r�   rŒ   )r'   r­   ÚinputRowÚ	outputRowr»   s   &    r   Útest_withOutputLabelsÚ%TableMakerTests.test_withOutputLabelsÜ   s�   € ð —‘Ø�O‰OÐAÈÏ	É	ð  ó 
ˆð 	×Ñœ˜UŸ^™^Ó,¨aÔ0Ø#Ÿn™nÑˆò	ð 	×Ñœœ\¨(ÓFÓGÈÔKØ×ÑÜ˜¤FÓ+Ð.>Ð@PÐ-Qö	
r   )rž   rŸ   r›   N)r4   r5   r6   r7   rƒ   r˜   rl   r°   rµ   r¿   r<   r   r   r   r–   r–   ¨   s#   † ñòPòRòUò*>ö
r   r–   z!Graphviz tools are not installed.c                  ó&   € ] tR t^ötRtR R ltRtR# )ÚIntegrationTestszO
Tests which make sure Graphviz can understand the output produced by
Automat.
c               ó   € V ^8„  d   QhRR/# rE   r   )rI   s   "r   rJ   ÚIntegrationTests.__annotate__ÿ   s   € ÷ *ñ * Dñ *r   c                ó>  € \        4       P                  4       pRP                  V4      P                  R4      p\        P
                  ! R\        P                  \        P                  R7      pVP                  V4      w  rEV P                  VP                  ^ 4       R# )z(
C{graphviz} emits valid graphviz data.
Ú zutf-8r   )r   ÚstdoutN)
rA   Ú	asDigraphÚjoinÚencoder   ÚPopenÚPIPEÚcommunicaterx   Ú
returncode)r'   ÚdigraphÚtextÚpr2   Úerrs   &     r   Útest_validGraphvizÚ#IntegrationTests.test_validGraphvizÿ   sm   € ô  “/×+Ñ+Ó-ˆØ�w‰w�wÓ×&Ñ& wÓ/ˆÜ×Ò˜U¬*¯/©/Ä*Ç/Á/ÔRˆØ—=‘= Ó&‰ˆØ×Ñ˜Ÿ™ qÖ)r   r   N)r4   r5   r6   r7   rƒ   rÓ   r<   r   r   r   rÂ   rÂ   ö   s   † ñ÷
*ñ *r   rÂ   c                  ó&   € ] tR tRtRtR tR tRtR# )Ú
SpotChecksi
  z^
Tests to make sure that the output contains salient features of the machine
being generated.
c                óä   € RP                  \        4       P                  4       4      pV P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       R# )zq
The output of L{graphviz.Digraph} should contain the names of the
states, inputs, outputs in the state machine.
rÆ   r(   r,   r/   r2   N)rÉ   rA   rÈ   ÚassertIn©r'   Úgvouts   & r   Útest_containsMachineFeaturesÚ'SpotChecks.test_containsMachineFeatures  sU   € ð
 —‘œ›×1Ñ1Ó3Ó4ˆØ�‰�g˜uÔ%Ø�‰�e˜UÔ#Ø�‰�d˜EÔ"Ø�‰�e˜UÖ#r   c                ó  € RP                  \        4       P                  4       4      pV P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       R# )zq
The output of L{graphviz.Digraph} should contain the names of the states,
inputs, outputs in the state machine.
rÆ   r(   r,   r/   zdata:builditr2   N)rÉ   re   rÈ   rØ   rÙ   s   & r   Ú test_containsTypeMachineFeaturesÚ+SpotChecks.test_containsTypeMachineFeatures  se   € ð
 —‘Ô)Ó+×5Ñ5Ó7Ó8ˆØ�‰�g˜uÔ%Ø�‰�e˜UÔ#Ø�‰�d˜EÔ"Ø�‰�n eÔ,Ø�‰�e˜UÖ#r   r   N)r4   r5   r6   r7   rƒ   rÛ   rÞ   r<   r   r   r   rÖ   rÖ   
  s   † ñò
	$ö
$r   rÖ   c                  ó&   € ] tR tRtRtR tR tRtR# )ÚRecordsDigraphActionsi*  z'
Records calls made to L{FakeDigraph}.
c                	ó&   € V P                  4        R # rM   )Úresetr&   s   &r   Ú__init__ÚRecordsDigraphActions.__init__/  s   € Ø�
‰
Žr   c                	ó"   € . V n         . V n        R # rM   ©ÚrenderCallsÚ	saveCallsr&   s   &r   rã   ÚRecordsDigraphActions.reset2  s   € ØˆÔØˆŽr   rç   N)r4   r5   r6   r7   rƒ   rä   rã   r<   r   r   r   rá   rá   *  s   † ñòör   rá   c                  ó,   € ] tR tRtRtR tR tR tRtR# )ÚFakeDigraphi7  zN
A fake L{graphviz.Digraph}.  Instantiate it with a
L{RecordsDigraphActions}.
c                	ó   € Wn         R # rM   ©Ú	_recorder)r'   Úrecorders   &&r   rä   ÚFakeDigraph.__init__=  s   € Ø!Žr   c                	óP   € V P                   P                  P                  V4       R # rM   )rï   rè   Úappend©r'   Úkwargss   &,r   ÚrenderÚFakeDigraph.render@  s   € Ø�‰×"Ñ"×)Ñ)¨&Ö1r   c                	óP   € V P                   P                  P                  V4       R # rM   )rï   ré   ró   rô   s   &,r   ÚsaveÚFakeDigraph.saveC  s   € Ø�‰× Ñ ×'Ñ'¨Ö/r   rî   N)	r4   r5   r6   r7   rƒ   rä   rö   rù   r<   r   r   r   rì   rì   7  s   † ñò
"ò2ö0r   rì   c                  ó&   € ] tR tRtRtR tR tRtR# )ÚFakeMethodicalMachineiG  zD
A fake L{MethodicalMachine}.  Instantiate it with a L{FakeDigraph}
c                	ó   € Wn         R # rM   ©Ú_digraph)r'   rÏ   s   &&r   rä   ÚFakeMethodicalMachine.__init__L  s   € ØŽr   c                	ó   € V P                   # rM   rþ   r&   s   &r   rÈ   ÚFakeMethodicalMachine.asDigraphO  s   € Ø�}‰}Ðr   rþ   N)r4   r5   r6   r7   rƒ   rä   rÈ   r<   r   r   r   rü   rü   G  s   † ñò ör   rü   c                  óV   € ] tR tRtR tR tR tRR ltR tR t	R	 t
R
 tR tR tRtR# )ÚVisualizeToolTestsiS  c                	ó’   € \        4       V n        \        V P                  4      V n        R V n        R.V n        . V n        RV n        R# )z	tool-testÚignoredz	fake.fqpnN)rá   ÚdigraphRecorderrì   ÚfakeDigraphÚfakePrognameÚfakeSysPathÚcollectedOutputÚfakeFQPNr&   s   &r   rl   ÚVisualizeToolTests.setUpW  sA   € Ü4Ó6ˆÔÜ& t×';Ñ';Ó<ˆÔà'ˆÔØ%˜;ˆÔØ!ˆÔØ#ˆŽr   c                	óZ   € V P                   P                  R P                  V4      4       R# )Ú N)r  ró   rÉ   )r'   Úargss   &*r   ÚcollectPrintsÚ VisualizeToolTests.collectPrints`  s   € Ø×Ñ×#Ñ# C§H¡H¨T£NÖ3r   c              #  	ó@   "  € V\        V P                  4      3x € R # 5irM   )rü   r  )r'   Úfqpns   &&r   ÚfakeFindMachinesÚ#VisualizeToolTests.fakeFindMachinesc  s   é € ØÔ)¨$×*:Ñ*:Ó;Ð;Ô;ùs   ‚Nc                	óò   € ^RI Hp T! T;'       g    V P                  T;'       g    V P                  .T;'       g    V P                  T;'       g    V P
                  T;'       g    V P                  R7      # )rF   )Útool)Ú	_prognameÚ_argvÚ_syspathÚ_findMachinesÚ_print)rk   r  r	  r  r
  r  r  )r'   ÚprognameÚargvÚsyspathÚfindMachinesÚprintr  s   &&&&&& r   r  ÚVisualizeToolTests.toolf  si   € õ 	&áØ×3Ð3 $×"3Ñ"3Ø×)Ð)˜4Ÿ=™=˜/Ø×0Ð0 × 0Ñ 0Ø&×?Ð?¨$×*?Ñ*?Ø×.Ð.˜D×.Ñ.ô
ð 	
r   c                ó†   € V P                  V P                  .R7       V P                  V P                  ^ ,          R4       R# )zi
L{tool} adds '' to sys.path to ensure
L{automat._discover.findMachines} searches the current
directory.
©r  rÆ   N)r  r  rx   r
  r&   s   &r   Útest_checksCurrentDirectoryÚ.VisualizeToolTests.test_checksCurrentDirectorys  s3   € ð 	�	‰	˜Ÿ™�ˆ	Ô'Ø×Ñ˜×)Ñ)¨!Õ,¨bÖ1r   c                óê   € V P                  V P                  R.R7       V P                  V P                  4       V P                  V P                  R.R7       V P                  V P                  4       R# )z&
Passing -q/--quiet hides all output.
z--quietr%  z-qN)r  r  ÚassertFalser  r&   s   &r   Útest_quietHidesOutputÚ(VisualizeToolTests.test_quietHidesOutput|  sZ   € ð 	�	‰	˜Ÿ™ yÐ1ˆ	Ô2Ø×Ñ˜×-Ñ-Ô.Ø�	‰	˜Ÿ™ tÐ,ˆ	Ô-Ø×Ñ˜×-Ñ-Ö.r   c                ó†  € R	 EF9  pV P                   P                  4        . V n        V P                  V P                  VR.R7       T P                  \        ;QJ d&    R V P                   4       F  '       g   K   RM	  RM! R V P                   4       4      4       V P                  \        V P                   P                  4      ^4       V P                   P                  w  pV P                  RP                  V P                  4      VR,          4       V P                  V P                   P                  4       EK<  	  R# )
zM
Passing an empty string for --image-directory/-i disables
rendering images.
rÆ   r%  c              3  ó,   "  € T F
  pR V9   x € K  	  R# 5i©ÚimageNr   ©Ú.0Úlines   & r   Ú	<genexpr>Ú6VisualizeToolTests.test_onlySaveDot.<locals>.<genexpr>�  s   é € Ð RÑ=Q°T ¨D¦Ó=Qùó   ‚TFú{}.dotÚfilenameN)ú--image-directoryz-i)r  rã   r  r  r  r)  Úanyrx   r«   ré   rI   rè   ©r'   Úargr   s   &  r   Útest_onlySaveDotÚ#VisualizeToolTests.test_onlySaveDot…  sæ   € ô
 /ˆCØ× Ñ ×&Ñ&Ô(Ø#%ˆDÔ à�I‰I˜DŸM™M¨3°Ð3ˆIÔ4Ø×ÑŸS›SÑ R¸T×=QÒ=QÓ RŸSŸSšSÑ R¸T×=QÒ=QÓ RÓRÔSà×ÑœS ×!5Ñ!5×!?Ñ!?Ó@À!ÔDØ×*Ñ*×4Ñ4‰GˆTØ×Ñ˜XŸ_™_¨T¯]©]Ó;¸TÀ*Õ=MÔNà×Ñ˜T×1Ñ1×=Ñ=×>ó /r   c                ó¶  € R
 EFQ  pV P                   P                  4        . V n        V P                  V P                  VR.R7       T P                  \        ;QJ d&    R V P                   4       F  '       g   K   RM	  RM! R V P                   4       4      4       V P                  \        V P                   P                  4      ^4       V P                   P                  w  pV P                  RP                  V P                  4      VR,          4       V P                  VR,          4       V P                  V P                   P                  4       EKT  	  R	# )zK
Passing an empty string for --dot-directory/-d disables saving dot
files.
rÆ   r%  c              3  ó,   "  € T F
  pR V9   x € K  	  R# 5i©r   Nr   r0  s   & r   r3  Ú8VisualizeToolTests.test_saveOnlyImage.<locals>.<genexpr>¡  s   é € Ð PÑ;O°4 ¨$¦Ó;Oùr5  TFr6  r7  ÚcleanupN)ú--dot-directoryz-d)r  rã   r  r  r  r)  r9  rx   r«   rè   rI   Ú
assertTrueré   r:  s   &  r   Útest_saveOnlyImageÚ%VisualizeToolTests.test_saveOnlyImage—  sö   € ô
 -ˆCØ× Ñ ×&Ñ&Ô(Ø#%ˆDÔ Ø�I‰I˜DŸM™M¨3°Ð3ˆIÔ4à×ÑŸS›SÑ P¸4×;OÒ;OÓ PŸSŸSšSÑ P¸4×;OÒ;OÓ PÓPÔQà×ÑœS ×!5Ñ!5×!AÑ!AÓBÀAÔFØ×*Ñ*×6Ñ6‰GˆTØ×Ñ˜XŸ_™_¨T¯]©]Ó;¸TÀ*Õ=MÔNØ�O‰O˜D �OÔ,à×Ñ˜T×1Ñ1×;Ñ;×<ó -r   c                ó\  € RpRpV P                  V P                  RVRV.R7       T P                  \        ;QJ d&    R V P                   4       F  '       g   K   RM	  RM! R V P                   4       4      4       T P                  \        ;QJ d&    R	 V P                   4       F  '       g   K   RM	  RM! R	 V P                   4       4      4       V P                  \        V P                  P                  4      ^4       V P                  P                  w  pV P                  VR
,          V4       V P                  VR,          4       V P                  \        V P                  P                  4      ^4       V P                  P                  w  pV P                  VR
,          V4       R# )zz
Passing different directories to --image-directory and --dot-directory
writes images and dot files to those directories.
r/  r   r8  rC  r%  c              3  ó,   "  € T F
  pR V9   x € K  	  R# 5ir.  r   r0  s   & r   r3  ÚQVisualizeToolTests.test_saveDotAndImagesInDifferentDirectories.<locals>.<genexpr>»  s   é € ÐMÑ8L°˜G tžOÓ8Lùr5  TFc              3  ó,   "  € T F
  pR V9   x € K  	  R# 5ir@  r   r0  s   & r   r3  rI  ¼  s   é € ÐKÑ6J¨d˜E TžMÓ6Jùr5  Ú	directoryrB  N)
r  r  rD  r9  r  rx   r«   r  rè   ré   )r'   ÚimageDirectoryÚdotDirectoryÚ
renderCallÚsaveCalls   &    r   Ú+test_saveDotAndImagesInDifferentDirectoriesÚ>VisualizeToolTests.test_saveDotAndImagesInDifferentDirectoriesª  sB  € ð
 !ˆØˆØ�	‰	à—‘Ø#ØØ!Øðð 	ô 	
ð 	�‰Ÿ›ÑM¸×8LÒ8LÓMŸŸšÑM¸×8LÒ8LÓMÓMÔNØ�‰Ÿ›ÑK°d×6JÒ6JÓKŸŸšÑK°d×6JÒ6JÓKÓKÔLà×Ñœ˜T×1Ñ1×=Ñ=Ó>ÀÔBØ×,Ñ,×8Ñ8‰ˆØ×Ñ˜ KÕ0°.ÔAØ�‰˜
 9Õ-Ô.à×Ñœ˜T×1Ñ1×;Ñ;Ó<¸aÔ@Ø×*Ñ*×4Ñ4‰ˆØ×Ñ˜ +Õ.°Ö=r   c                óF  € RpV P                  V P                  RVRV.R7       T P                  \        ;QJ d&    R V P                   4       F  '       g   K   RM	  RM! R V P                   4       4      4       V P                  \        V P                  P                  4      ^4       V P                  P                  w  pV P                  VR,          V4       V P                  VR	,          4       V P                  \        V P                  P                  4      4       R
# )zx
Passing the same directory to --image-directory and --dot-directory
writes images and dot files to that one directory.
ÚimagesAndDotr8  rC  r%  c              3  ó,   "  € T F
  pR V9   x € K  	  R# 5i)zimage and dotNr   r0  s   & r   r3  ÚJVisualizeToolTests.test_saveDotAndImagesInSameDirectory.<locals>.<genexpr>×  s   é € ÐUÑ@T¸˜O¨tÖ3Ó@Tùr5  TFrK  rB  N)r  r  rD  r9  r  rx   r«   r  rè   r)  ré   )r'   rK  rN  s   &  r   Ú$test_saveDotAndImagesInSameDirectoryÚ7VisualizeToolTests.test_saveDotAndImagesInSameDirectoryÇ  sâ   € ð
 #ˆ	Ø�	‰	à—‘Ø#ØØ!Øðð 	ô 	
ð 	�‰Ÿ›ÑUÀ×@TÒ@TÓUŸŸšÑUÀ×@TÒ@TÓUÓUÔVà×Ñœ˜T×1Ñ1×=Ñ=Ó>ÀÔBØ×,Ñ,×8Ñ8‰ˆØ×Ñ˜ KÕ0°)Ô<Ø×Ñ˜ IÕ.Ô/à×Ñœ˜T×1Ñ1×;Ñ;Ó<Ö=r   )r  r  r  r  r	  r
  )NNNNN)r4   r5   r6   r7   rl   r  r  r  r&  r*  r<  rE  rP  rV  r<   r   r   r   r  r  S  s4   † ò$ò4ò<ô
ò2ò/ò?ò$=ò&>ö:>r   r  )'Ú
__future__r   r    r   r   Údataclassesr   Útypingr   Úunittestr   r   Úautomatr   r	   Ú_methodicalr
   Ú_typedr   Útest_discoverr   r   r    rA   rC   rP   re   rg   r?   r…   r�   rŒ   r–   rÂ   rÖ   rá   rì   rü   r  r   r   r   Ú<module>r`     s  ðÝ "ã Û 	Û Ý !Ý ß %ç .å +Ý  Ý -ò	ò	òô<ˆXô ç �õñ* Ñ%Ó'Ô'Ð)LÓMÙÑÓ Ô Ð"=Ó>ô!=˜ó !=ó ?ó Nð!=ðH ô�&ó ó ðòò"0ñ Ñ%Ó'Ô'Ð)LÓMÙÑÓ Ô Ð"=Ó>ôI
�hó I
ó ?ó NðI
ñX Ñ%Ó'Ô'Ð)LÓMÙÑÓ!Ô!Ð#FÓGÙÑÓ Ô Ð"=Ó>ô*�xó *ó ?ó Hó Nð*ñ" Ñ%Ó'Ô'Ð)LÓMÙÑÓ Ô Ð"=Ó>ô$�ó $ó ?ó Nð$ô<
˜Fô 
ô0�&ô 0ô 	˜Fô 	ñ Ñ%Ó'Ô'Ð)LÓMÙÑÓ!Ô!Ð#FÓGÙÑÓ Ô Ð"=Ó>ôH>˜ó H>ó ?ó Hó NòH>r   