Ë
    —~ªb¬6  ã                   ó
  — d dl mZ d dlZd dlZd dlZd dlmZmZ d dlZddl	m
Z
 ddlmZ d„ Zd	„ Zd
„ Z e e«        d«       e e«        d«       G d„ de«      «       «       Zej"                   G d„ de«      «       Zd„ Zd„ Z e e«        d«       e e«        d«       G d„ de«      «       «       Z e e«        d«       e e«        d«       e e«        d«       G d„ de«      «       «       «       Z e e«        d«       e e«        d«       G d„ de«      «       «       Z G d„ de«      Z G d„ de«      Z G d„ de«      Z e e«        d«       e e«        d«       e e«        d«       G d „ d!e«      «       «       «       Zy)"é    )Úprint_functionN)ÚTestCaseÚskipIfé   )ÚMethodicalMachineé   )ÚisTwistedInstalledc                  ó:   — 	 t        d«       y# t        $ r Y yw xY w)z2
    Is the graphviz Python module installed?
    ÚgraphvizTF)Ú
__import__ÚImportError© ó    ú>/usr/lib/python3/dist-packages/automat/_test/test_visualize.pyÚisGraphvizModuleInstalledr      s(   € ðÜ�:Ôð øô ò Ùðús   ‚ Ž	™c                  óì   — t        j                  «       \  } }t        j                  |«       	 t        j                  d| d¬«       t        j                  | «       S # t        j                  | «       w xY w)z+
    Are the graphviz tools installed?
    ÚdotT)ÚstdinÚshell)ÚosÚpipeÚcloseÚ
subprocessÚcall)ÚrÚws     r   ÚisGraphvizInstalledr      sM   € ô �7‰7‹9�D€A€qÜ‡H�HˆQ„KðÜ—?‘? 5°¸Ô>Ð>ä
�‰��øŒ�‰��ús   ®A ÁA3c                  ól   ‡— t        «       Š G ˆfd„dt        «      }  | «       }|j                  «        ‰S )zG
    Create a sample L{MethodicalMachine} with some sample states.
    c                   óò   •— e Zd ZW ° j                  d¬«      d„ «       ZW ° j                  «       d„ «       ZW ° j                  «       d„ «       ZW ° j                  «       d„ «       Z	ej                  eee	g«       y)ú#sampleMachine.<locals>.SampleObjectT)Úinitialc                  ó   — y)zinitial stateNr   ©Úselfs    r   Úbeginz)sampleMachine.<locals>.SampleObject.begin.   ó   � r   c                  ó   — y)z	end stateNr   r#   s    r   Úendz'sampleMachine.<locals>.SampleObject.end1   r&   r   c                  ó   — y)zsample inputNr   r#   s    r   Úgoz&sampleMachine.<locals>.SampleObject.go4   r&   r   c                  ó   — y)zsample outputNr   r#   s    r   Úoutz'sampleMachine.<locals>.SampleObject.out7   r&   r   N)Ú__name__Ú
__module__Ú__qualname__Ústater%   r(   Úinputr*   Úoutputr,   Úupon)Úmms   €r   ÚSampleObjectr    -   sz   ø„ Ù	�‰˜$ˆÓ	ñ	ó 
 ð	á	�‰‹ñ	ó 
ð	á	�‰‹ñ	ó 
ð	á	�‰‹ñ	ó 
ð	à�
‰
�2�s˜S˜EÕ"r   r5   )r   Úobjectr*   )r5   Úsor4   s     @r   ÚsampleMachiner8   (   s0   ø€ ô 
Ó	€Bö#”vô #ñ 
‹€BØ‡E�E„GØ€Ir   z!Graphviz module is not installed.zTwisted is not installed.c                   ó(   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zy)ÚElementMakerTestszL
    L{elementMaker} generates HTML representing the specified element.
    c                 ó   — ddl m} || _        y )Nr   )ÚelementMaker)Ú
_visualizer<   )r$   r<   s     r   ÚsetUpzElementMakerTests.setUpG   s   € Ý-Ø(ˆÕr   c           	      óR   — d}| j                  || j                  dddd¬«      «       y)zK
        L{elementMaker} orders HTML attributes lexicographically.
        z<div a="1" b="2" c="3"></div>ÚdivÚ2Ú1Ú3©ÚbÚaÚcN©ÚassertEqualr<   ©r$   Úexpecteds     r   Útest_sortsAttrsz!ElementMakerTests.test_sortsAttrsK   s7   € ð 4ˆØ×Ñ˜Ø×*Ñ*¨5Ø-0Ø-0Ø-0ð +ó 2õ	3r   c           	      óR   — d}| j                  || j                  dddd¬«      «       y)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>r@   z	a " quoter   za stringrD   NrH   rJ   s     r   Útest_quotesAttrsz"ElementMakerTests.test_quotesAttrsV   s8   € ð DˆØ×Ñ˜Ø×*Ñ*¨5Ø-8Ø-.Ø-7ð +ó 9õ	:r   c                 óJ   — d}| j                  || j                  d«      «       y)zN
        L{elementMaker} should render an element with no attributes.
        z<div ></div>r@   NrH   rJ   s     r   Útest_noAttrszElementMakerTests.test_noAttrsc   s$   € ð #ˆØ×Ñ˜ 4×#4Ñ#4°UÓ#;Õ<r   N)r-   r.   r/   Ú__doc__r>   rL   rN   rP   r   r   r   r:   r:   @   s   „ ñò)ò	3ò:ó=r   r:   c                   óv   — e Zd ZdZ ej
                  «       Z ej
                  «       Z ej
                  «       Zy)ÚHTMLElementz2Holds an HTML element, as created by elementMaker.N)	r-   r.   r/   rQ   ÚattrÚibÚnameÚchildrenÚ
attributesr   r   r   rS   rS   k   s,   „ á<Øˆ4�7‰7‹9€DØˆt�w‰w‹y€HØ�—‘“�Jr   rS   c                 ó˜   —  || «      r| gS t        | «      rg S | j                  D ��cg c]  }t        ||«      D ]  }|‘Œ Œ c}}S c c}}w )zk
    Recursively collect all elements in an L{HTMLElement} tree that
    match the optional predicate.
    )ÚisLeafrW   ÚfindElements)ÚelementÚ	predicateÚchildÚresults       r   r[   r[   s   sa   € ñ
 �ÔØˆyÐÜ	�ŒØˆ	ð !×)Ñ)÷:ØÜ& u¨iÓ8ò:àò ð :ˆFó :ð :ùó :s   ¨Ac                 ó$   — t        | t        «       S )z2
    This HTML element is actually leaf node.
    )Ú
isinstancerS   ©r\   s    r   rZ   rZ   ‚   s   € ô ˜'¤;Ó/Ð/Ð/r   c                   ó.   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zy)Ú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                 ó   — t        |||¬«      S )N)rV   rW   rX   )rS   )r$   rV   rW   rX   s       r   ÚfakeElementMakerz TableMakerTests.fakeElementMaker”   s   € Ü ¨xÀJÔOÐOr   c                 óx   — ddl m} d| _        d| _        t	        j
                  || j                  ¬«      | _        y )Nr   )Ú
tableMakerúinput labelzthe port)Ú_E)r=   rh   Ú
inputLabelÚportÚ	functoolsÚpartialrf   )r$   rh   s     r   r>   zTableMakerTests.setUp—   s1   € Ý+à'ˆŒØˆŒ	Ü#×+Ñ+¨JØ/3×/DÑ/DôFˆ�r   c                 ó¾  ‡ — ˆ fd„}g dgfD ]Ï  }‰ j                  ‰ j                  |‰ j                  ¬«      }‰ j                  t	        |j
                  «      d«       |j
                  d   }t        ||«      }‰ j                  t	        |«      d«       ‰ j                  |d   j                  d«       ‰ j                  t        |t        «      ‰ j                  g«       ŒÑ y)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                 óp   •— t        | «       xr( | j                  j                  d«      ‰j                  k(  S )Nrl   )rZ   rX   Úgetrl   )r\   r$   s    €r   ÚhasPortz3TableMakerTests.test_inputLabelRow.<locals>.hasPort¦   s6   ø€ Ü˜w›Ð'ò DØ×*Ñ*×.Ñ.¨vÓ6¸$¿)¹)ÑCðEr   zan output label©rl   r   r   ÚtdN)
rh   rk   rl   ÚassertGreaterÚlenrW   r[   rI   rV   rZ   )r$   rr   ÚoutputLabelsÚtableÚinputLabelRowÚportCandidatess   `     r   Útest_inputLabelRowz"TableMakerTests.test_inputLabelRowŸ   sÉ   ø€ ô	Eð  Ð"3Ð!4Ð5ò 	0ˆLØ—O‘O D§O¡O°\Ø)-¯©ð $ó 4ˆEà×Ñœs 5§>¡>Ó2°AÔ6Ø!ŸN™N¨1Ñ-ˆMä)¨%°Ó9ˆNà×ÑœS Ó0°!Ô4Ø×Ñ˜^¨AÑ.×3Ñ3°TÔ:Ø×Ñœ\¨-¼Ó@Ø"Ÿo™oÐ.õ0ñ	0r   c                 óÞ   — | j                  dd| j                  ¬«      }| j                  t        |j                  «      d«       |j                  \  }| j                  d|j                  «       y)z�
        L{tableMaker} does not add a colspan attribute to the input
        label's cell or a second row if there no output labels.
        ri   r   rs   r   ÚcolspanN)rh   rl   rI   rv   rW   ÚassertNotInrX   )r$   rx   ry   s      r   Útest_noOutputLabelsz#TableMakerTests.test_noOutputLabels·   sW   € ð
 —‘ ¨r¸¿	¹	�ÓBˆØ×Ñœ˜UŸ^™^Ó,¨aÔ0Ø Ÿ>™>ÑˆØ×Ñ˜ M×$<Ñ$<Õ=r   c                 óP  — | j                  | j                  d| j                  ¬«      }| j                  t	        |j
                  «      d«       |j
                  \  }}d„ }| j                  t	        t        ||«      «      d«       | j                  t        |t        «      ddg«       y)	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 2rs   r   c                 ó|   — t        | «       xr/ | j                  dk(  xr | j                  j                  d«      dk(  S )Nrt   r}   rA   )rZ   rV   rX   rq   rb   s    r   ÚhasCorrectColspanz@TableMakerTests.test_withOutputLabels.<locals>.hasCorrectColspanÎ   sC   € Ü˜w›Ð'ò AØŸ™¨Ñ,òAà×*Ñ*×.Ñ.¨yÓ9¸SÑ@ðBr   r   r�   r‚   N)rh   rk   rl   rI   rv   rW   r[   rZ   )r$   rx   ÚinputRowÚ	outputRowr„   s        r   Útest_withOutputLabelsz%TableMakerTests.test_withOutputLabelsÁ   sŸ   € ð —‘ §¡ð 2Dà%)§Y¡Yð  ó 0ˆð 	×Ñœ˜UŸ^™^Ó,¨aÔ0Ø#Ÿn™nÑˆ�)ò	Bð
 	×Ñœœ\¨(Ð4EÓFÓGØô	à×Ñœ i´Ó8Ð;KØ;Kð;Mõ 	Nr   N)	r-   r.   r/   rQ   rf   r>   r{   r   r‡   r   r   r   rd   rd   ‰   s#   „ ñòPòFò0ò0>óNr   rd   z!Graphviz tools are not installed.c                   ó   — e Zd ZdZd„ Zy)ÚIntegrationTestsz[
    Tests which make sure Graphviz can understand the output produced by
    Automat.
    c                 ó4  — t        j                  dt         j                  t         j                  ¬«      }|j                  dj	                  t        «       j                  «       «      j                  d«      «      \  }}| j                  |j                  d«       y)z8
        L{graphviz} emits valid graphviz data.
        r   )r   ÚstdoutÚ zutf-8r   N)
r   ÚPopenÚPIPEÚcommunicateÚjoinr8   Ú	asDigraphÚencoderI   Ú
returncode)r$   Úpr,   Úerrs       r   Útest_validGraphvizz#IntegrationTests.test_validGraphvizâ   sh   € ô ×Ñ˜U¬*¯/©/Ü$.§O¡Oô5ˆà—=‘= §¡¬«×)BÑ)BÓ)DÓ!Eß"(¡&¨£/ó3‰ˆˆSà×Ñ˜Ÿ™ qÕ)r   N)r-   r.   r/   rQ   r–   r   r   r   r‰   r‰   Ù   s   „ ñó
*r   r‰   c                   ó   — e Zd ZdZd„ Zy)Ú
SpotCheckszj
    Tests to make sure that the output contains salient features of the machine
    being generated.
    c                 óâ   — dj                  t        «       j                  «       «      }| j                  d|«       | j                  d|«       | j                  d|«       | j                  d|«       y)z�
        The output of L{graphviz} should contain the names of the states,
        inputs, outputs in the state machine.
        rŒ   r%   r(   r*   r,   N)r�   r8   r‘   ÚassertIn)r$   Úgvouts     r   Útest_containsMachineFeaturesz'SpotChecks.test_containsMachineFeaturesõ   sU   € ð
 —‘œ›×1Ñ1Ó3Ó4ˆØ�‰�g˜uÔ%Ø�‰�e˜UÔ#Ø�‰�d˜EÔ"Ø�‰�e˜UÕ#r   N)r-   r.   r/   rQ   rœ   r   r   r   r˜   r˜   í   s   „ ñó
	$r   r˜   c                   ó   — e Zd ZdZd„ Zd„ Zy)ÚRecordsDigraphActionsz/
    Records calls made to L{FakeDigraph}.
    c                 ó$   — | j                  «        y ©N)Úresetr#   s    r   Ú__init__zRecordsDigraphActions.__init__  s   € Ø�
‰
�r   c                 ó    — g | _         g | _        y r    )ÚrenderCallsÚ	saveCallsr#   s    r   r¡   zRecordsDigraphActions.reset	  s   € ØˆÔØˆ�r   N)r-   r.   r/   rQ   r¢   r¡   r   r   r   rž   rž     s   „ ñòór   rž   c                   ó"   — e Zd ZdZd„ Zd„ Zd„ Zy)ÚFakeDigraphzZ
    A fake L{graphviz.Digraph}.  Instantiate it with a
    L{RecordsDigraphActions}.
    c                 ó   — || _         y r    )Ú	_recorder)r$   Úrecorders     r   r¢   zFakeDigraph.__init__  s	   € Ø!ˆ�r   c                 óN   — | j                   j                  j                  |«       y r    )r©   r¤   Úappend©r$   Úkwargss     r   ÚrenderzFakeDigraph.render  s   € Ø�‰×"Ñ"×)Ñ)¨&Õ1r   c                 óN   — | j                   j                  j                  |«       y r    )r©   r¥   r¬   r­   s     r   ÚsavezFakeDigraph.save  s   € Ø�‰× Ñ ×'Ñ'¨Õ/r   N)r-   r.   r/   rQ   r¢   r¯   r±   r   r   r   r§   r§     s   „ ñò
"ò2ó0r   r§   c                   ó   — e Zd ZdZd„ Zd„ Zy)ÚFakeMethodicalMachinezL
    A fake L{MethodicalMachine}.  Instantiate it with a L{FakeDigraph}
    c                 ó   — || _         y r    ©Ú_digraph)r$   Údigraphs     r   r¢   zFakeMethodicalMachine.__init__#  s	   € Øˆ�r   c                 ó   — | j                   S r    rµ   r#   s    r   r‘   zFakeMethodicalMachine.asDigraph&  s   € Ø�}‰}Ðr   N)r-   r.   r/   rQ   r¢   r‘   r   r   r   r³   r³     s   „ ñò ór   r³   c                   óT   — e Zd Zd„ Zd„ Zd„ Z	 	 	 	 	 dd„Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zy)ÚVisualizeToolTestsc                 ó�   — t        «       | _        t        | j                  «      | _        d| _        dg| _        g | _        d| _        y )Nz	tool-testÚignoredz	fake.fqpn)rž   ÚdigraphRecorderr§   ÚfakeDigraphÚfakePrognameÚfakeSysPathÚcollectedOutputÚfakeFQPNr#   s    r   r>   zVisualizeToolTests.setUp/  sA   € Ü4Ó6ˆÔÜ& t×';Ñ';Ó<ˆÔà'ˆÔØ%˜;ˆÔØ!ˆÔØ#ˆ�r   c                 óX   — | j                   j                  dj                  |«      «       y )Nú )rÁ   r¬   r�   )r$   Úargss     r   ÚcollectPrintsz VisualizeToolTests.collectPrints8  s   € Ø×Ñ×#Ñ# C§H¡H¨T£NÕ3r   c              #   ó>   K  — |t        | j                  «      f–— y ­wr    )r³   r¾   )r$   Úfqpns     r   ÚfakeFindMachinesz#VisualizeToolTests.fakeFindMachines;  s   è ø€ ØÔ)¨$×*:Ñ*:Ó;Ð;Ó;ùs   ‚Nc                 ó¶   — ddl m}  ||xs | j                  |xs | j                  g|xs | j                  |xs | j
                  |xs | j                  ¬«      S )Nr   )Útool)Ú	_prognameÚ_argvÚ_syspathÚ_findMachinesÚ_print)r=   rË   r¿   rÂ   rÀ   rÉ   rÆ   )r$   ÚprognameÚargvÚsyspathÚfindMachinesÚprintrË   s          r   rË   zVisualizeToolTests.tool>  sZ   € õ 	&ÙØÒ3 $×"3Ñ"3ØÒ)˜4Ÿ=™=˜/ØÒ0 × 0Ñ 0Ø&Ò?¨$×*?Ñ*?ØÒ.˜D×.Ñ.ô0ð 	0r   c                 ó|   — | j                  | j                  g¬«       | j                  | j                  d   d«       y)z‰
        L{tool} adds '' to sys.path to ensure
        L{automat._discover.findMachines} searches the current
        directory.
        ©rÒ   r   rŒ   N)rË   rÂ   rI   rÀ   r#   s    r   Útest_checksCurrentDirectoryz.VisualizeToolTests.test_checksCurrentDirectoryL  s3   € ð 	�	‰	˜Ÿ™�ˆ	Ô'Ø×Ñ˜×)Ñ)¨!Ñ,¨bÕ1r   c                 óè   — | j                  | j                  dg¬«       | j                  | j                  «       | j                  | j                  dg¬«       | j                  | j                  «       y)z6
        Passing -q/--quiet hides all output.
        z--quietr×   z-qN)rË   rÂ   ÚassertFalserÁ   r#   s    r   Útest_quietHidesOutputz(VisualizeToolTests.test_quietHidesOutputU  sZ   € ð 	�	‰	˜Ÿ™ yÐ1ˆ	Ô2Ø×Ñ˜×-Ñ-Ô.Ø�	‰	˜Ÿ™ tÐ,ˆ	Ô-Ø×Ñ˜×-Ñ-Õ.r   c                 ó   — dD �]  }| j                   j                  «        g | _        | j                  | j                  |dg¬«       | j                  t        d„ | j                  D «       «      «       | j                  t        | j                   j                  «      d«       | j                   j                  \  }| j                  dj                  | j                  «      |d   «       | j                  | j                   j                  «       �Œ y)	ze
        Passing an empty string for --image-directory/-i disables
        rendering images.
        )ú--image-directoryz-irŒ   r×   c              3   ó$   K  — | ]  }d |v –— Œ
 y­w©ÚimageNr   ©Ú.0Úlines     r   ú	<genexpr>z6VisualizeToolTests.test_onlySaveDot.<locals>.<genexpr>h  s   è ø€ ò !CØ%)ð ")¨D¤ñ !Cùó   ‚r   ú{}.dotÚfilenameN)r½   r¡   rÁ   rË   rÂ   rÚ   ÚanyrI   rv   r¥   Úformatr¤   ©r$   Úargr   s      r   Útest_onlySaveDotz#VisualizeToolTests.test_onlySaveDot^  sé   € ð
 /ó 	?ˆCØ× Ñ ×&Ñ&Ô(Ø#%ˆDÔ à�I‰I˜DŸM™M¨3°Ð3ˆIÔ4Ø×ÑœSñ !CØ-1×-AÑ-Aô!Có Cô Dð ×ÑœS ×!5Ñ!5×!?Ñ!?Ó@À!ÔDØ×*Ñ*×4Ñ4‰GˆTØ×Ñ˜XŸ_™_¨T¯]©]Ó;Ø! *Ñ-ô/ð ×Ñ˜T×1Ñ1×=Ñ=Ö>ñ	?r   c                 óH  — dD �]  }| j                   j                  «        g | _        | j                  | j                  |dg¬«       | j                  t        d„ | j                  D «       «      «       | j                  t        | j                   j                  «      d«       | j                   j                  \  }| j                  dj                  | j                  «      |d   «       | j                  |d   «       | j                  | j                   j                  «       �Œ y	)
zc
        Passing an empty string for --dot-directory/-d disables saving dot
        files.
        )ú--dot-directoryz-drŒ   r×   c              3   ó$   K  — | ]  }d |v –— Œ
 y­w©r   Nr   rá   s     r   rä   z8VisualizeToolTests.test_saveOnlyImage.<locals>.<genexpr>|  s   è ø€ ò !CØ%)ð "'¨$¤ñ !Cùrå   r   ræ   rç   ÚcleanupN)r½   r¡   rÁ   rË   rÂ   rÚ   rè   rI   rv   r¤   ré   Ú
assertTruer¥   rê   s      r   Útest_saveOnlyImagez%VisualizeToolTests.test_saveOnlyImager  s÷   € ð
 -ó 	=ˆCØ× Ñ ×&Ñ&Ô(Ø#%ˆDÔ Ø�I‰I˜DŸM™M¨3°Ð3ˆIÔ4à×ÑœSñ !CØ-1×-AÑ-Aô!Có Cô Dð ×ÑœS ×!5Ñ!5×!AÑ!AÓBÀAÔFØ×*Ñ*×6Ñ6‰GˆTØ×Ñ˜XŸ_™_¨T¯]©]Ó;Ø! *Ñ-ô/à�O‰O˜D ™OÔ,à×Ñ˜T×1Ñ1×;Ñ;Ö<ñ	=r   c                 ó’  — d}d}| j                  | j                  d|d|g¬«       | j                  t        d„ | j                  D «       «      «       | j                  t        d„ | j                  D «       «      «       | j                  t        | j                  j                  «      d«       | j                  j                  \  }| j                  |d	   |«       | j                  |d
   «       | j                  t        | j                  j                  «      d«       | j                  j                  \  }| j                  |d	   |«       y)z’
        Passing different directories to --image-directory and --dot-directory
        writes images and dot files to those directories.
        rà   r   rÝ   rî   r×   c              3   ó$   K  — | ]  }d |v –— Œ
 y­wrß   r   rá   s     r   rä   zQVisualizeToolTests.test_saveDotAndImagesInDifferentDirectories.<locals>.<genexpr>’  s   è ø€ ò >Ø $ð $ tœOñ >ùrå   c              3   ó$   K  — | ]  }d |v –— Œ
 y­wrð   r   rá   s     r   rä   zQVisualizeToolTests.test_saveDotAndImagesInDifferentDirectories.<locals>.<genexpr>”  s   è ø€ ò >Ø $ð " TœMñ >ùrå   r   Ú	directoryrñ   N)
rË   rÂ   rò   rè   rÁ   rI   rv   r½   r¤   r¥   )r$   ÚimageDirectoryÚdotDirectoryÚ
renderCallÚsaveCalls        r   Ú+test_saveDotAndImagesInDifferentDirectoriesz>VisualizeToolTests.test_saveDotAndImagesInDifferentDirectories‡  s$  € ð
 !ˆØˆØ�	‰	˜Ÿ™Ø+¨^Ø)¨<ð9ˆ	ô 	:ð 	�‰œñ >Ø(,×(<Ñ(<ô>ó >ô 	?à�‰œñ >Ø(,×(<Ñ(<ô>ó >ô 	?ð 	×Ñœ˜T×1Ñ1×=Ñ=Ó>ÀÔBØ×,Ñ,×8Ñ8‰ˆØ×Ñ˜ KÑ0°.ÔAØ�‰˜
 9Ñ-Ô.à×Ñœ˜T×1Ñ1×;Ñ;Ó<¸aÔ@Ø×*Ñ*×4Ñ4‰ˆØ×Ñ˜ +Ñ.°Õ=r   c                 óÜ  — d}| j                  | j                  d|d|g¬«       | j                  t        d„ | j                  D «       «      «       | j                  t        | j                  j                  «      d«       | j                  j                  \  }| j                  |d   |«       | j                  |d   «       | j                  t        | j                  j                  «      «       y	)
z�
        Passing the same directory to --image-directory and --dot-directory
        writes images and dot files to that one directory.
        ÚimagesAndDotrÝ   rî   r×   c              3   ó$   K  — | ]  }d |v –— Œ
 y­w)zimage and dotNr   rá   s     r   rä   zJVisualizeToolTests.test_saveDotAndImagesInSameDirectory.<locals>.<genexpr>ª  s   è ø€ ò >Ø $ð ,¨tÔ3ñ >ùrå   r   r÷   rñ   N)rË   rÂ   rò   rè   rÁ   rI   rv   r½   r¤   rÚ   r¥   )r$   r÷   rú   s      r   Ú$test_saveDotAndImagesInSameDirectoryz7VisualizeToolTests.test_saveDotAndImagesInSameDirectory   sÑ   € ð
 #ˆ	Ø�	‰	˜Ÿ™Ø+¨YØ)¨9ð6ˆ	ô 	7ð 	�‰œñ >Ø(,×(<Ñ(<ô>ó >ô 	?ð 	×Ñœ˜T×1Ñ1×=Ñ=Ó>ÀÔBØ×,Ñ,×8Ñ8‰ˆØ×Ñ˜ KÑ0°)Ô<Ø×Ñ˜ IÑ.Ô/à×Ñœ˜T×1Ñ1×;Ñ;Ó<Õ=r   )NNNNN)r-   r.   r/   r>   rÆ   rÉ   rË   rØ   rÛ   rì   ró   rü   r   r   r   r   rº   rº   *  sE   „ ò
$ò4ò<ð ØØØØó0ò2ò/ò?ò(=ò*>ó2>r   rº   )Ú
__future__r   rm   r   r   Úunittestr   r   rT   Ú_methodicalr   Útest_discoverr	   r   r   r8   r:   Úsr6   rS   r[   rZ   rd   r‰   r˜   rž   r§   r³   rº   r   r   r   ú<module>r     sþ  ðÝ %Û ã 	Û ß %ã å +å -ò	ò	òñ0 Ñ%Ó'Ð'Ð)LÓMÙÑÓ Ð Ð"=Ó>ô&=˜ó &=ó ?ó Nð&=ðR ‡�ô�&ó ó ðò:ò0ñ Ñ%Ó'Ð'Ð)LÓMÙÑÓ Ð Ð"=Ó>ôKN�hó KNó ?ó NðKNñ\ Ñ%Ó'Ð'Ð)LÓMÙÑÓ!Ð!Ð#FÓGÙÑÓ Ð Ð"=Ó>ô*�xó *ó ?ó Hó Nð*ñ" Ñ%Ó'Ð'Ð)LÓMÙÑÓ Ð Ð"=Ó>ô$�ó $ó ?ó Nð$ô$
˜Fô 
ô0�&ô 0ô 	˜Fô 	ñ Ñ%Ó'Ð'Ð)LÓMÙÑÓ!Ð!Ð#FÓGÙÑÓ Ð Ð"=Ó>ôE>˜ó E>ó ?ó Hó NñE>r   