+
    Ù’÷jµ  ã                  óp  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ]P                  P                  ]P                  P                  ]P                  P                  ]4      4      4      t]P                  P                  ]R4      t]P                  P                  ]R4      tR R ltR
R R	 lltR# )a¹  Shared helpers for the standalone Asymptote test scripts in tests/.

Those scripts are run directly (``python3 tests/test_foo.py``) with this
directory on ``sys.path``, so they import this module to share the small amount
of boilerplate each one would otherwise repeat: locating the asy executable and
base directory, running a snippet of Asymptote code in a subprocess, and the
matching ``--asy`` / ``--asy-base-dir`` command-line options.
)ÚannotationsN)ÚSequenceÚasyÚbasec               ó    € V ^8„  d   QhRRRR/# )é   Úparserzargparse.ArgumentParserÚreturnÚNone© )Úformats   "Ú1/home/src/asymptote-3.16/tests/asy_test_common.pyÚ__annotate__r      s   € ÷ ñ Ð5ð ¸$ñ ó    c                óf   € V P                  R\        RR7       V P                  R\        RR7       R# )zGRegister the --asy and --asy-base-dir options used by the test scripts.z--asyz1path to the asy executable (default: %(default)s))ÚdefaultÚhelpz--asy-base-dirz2path to the asy base/sysdir (default: %(default)s)N)Úadd_argumentÚDEFAULT_ASYÚDEFAULT_BASE_DIR)r   s   &r   Úadd_asy_argumentsr      s<   € à
×ÑØÜØ@ð ô ð
 ×ÑØÜ ØAð ö r   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   r   ÚstrÚbase_dirÚcodeÚ
extra_argszSequence[str]r	   ztuple[str, int]r   )r   s   "r   r   r   '   s:   € ÷ ñ Ø	ðàðð ðð ð	ð
 ñr   c                óø  € \         P                  ! RR7      w  rE \        P                  ! VR4      ;_uu_ 4       pVP	                  \
        P                  ! V4      P                  R4      4       RRR4       \        P                  ! V R.VORNVNVN\        RRR	R
7      pVP                  VP                  3\        P                  ! V4       #   + '       g   i     Lg; i  \        P                  ! T4       i ; i)z´Write *code* to a temporary .asy file and run asy on it.

Returns a (stderr, returncode) pair.  Any *extra_args* are inserted into
the command line between ``-q`` and ``-sysdir``.
z.asy)ÚsuffixÚwÚ
Nz-qz-sysdirTF)ÚcwdÚcapture_outputÚtextÚcheck)ÚtempfileÚmkstempÚosÚfdopenÚwriteÚtextwrapÚdedentÚlstripÚ
subprocessÚrunÚ
SCRIPT_DIRÚstderrÚ
returncodeÚunlink)r   r   r   r   ÚfdÚtmpfileÚfÚresults   &&&&    r   Úrun_asyr6   '   sÃ   € ô ×"Ò"¨&Ô1�K€Bðô �YŠY�r˜3×Ô 1Ø�G‰G”H—O’O DÓ)×0Ñ0°Ó6Ô7÷  ä—’Ø�$ÐB˜ÐB YÐB°ÐB¸'ÐBÜØØØô
ˆð �}‰}˜f×/Ñ/Ð/ä
�	Š	�'Õ÷  ×ûô 	�	Š	�'Õús#   ›C! º5CÁ/AC! ÃC	ÃC! Ã!C9)r   )Ú__doc__Ú
__future__r   Úargparser&   r,   r$   r)   Úcollections.abcr   ÚpathÚdirnameÚabspathÚ__file__r.   Újoinr   r   r   r6   r   r   r   Ú<module>r@      s‡   ðñõ #ã Û 	Û Û Û Ý $ð �W‰W�_‰_˜RŸW™WŸ_™_¨R¯W©W¯_©_¸XÓ-FÓGÓH€
Ø�g‰g�l‰l˜: uÓ-€Ø—7‘7—<‘< 
¨FÓ3Ð õ÷ñ r   