o
    HXh8                     @   sF   d dl Z d dlZd dlmZ G dd dejZedkr!e  dS dS )    N)supportc                   @   s   e Zd Zdd Zdd ZdS )
FLUFLTestsc                 C   s   d}t |dddtj | t}t |dddtj W d    n1 s(w   Y  | t|jd | 	d|jj
 | |jjd | |jjd	 | |jjd
 d S )Nz-from __future__ import barry_as_FLUFL
2 {0} 3<><BDFL test>exec!=<FLUFL test>z,with Barry as BDFL, use '<>' instead of '!='z2 != 3      )compileformat
__future__ZCO_FUTURE_BARRY_AS_BDFLassertRaisesSyntaxErrorassertRegexstr	exceptionassertIntextassertEqualfilenamelinenooffsetselfcodecm r   9/opt/python-3.10.19/usr/lib/python3.10/test/test_flufl.pytest_barry_as_bdfl   s    zFLUFLTests.test_barry_as_bdflc                 C   s   d}t |ddd | t}t |ddd W d    n1 s$w   Y  | t|jd | d|jj | 	|jj
d | 	|jjd	 | 	|jjd
 d S )Nz2 {0} 3r   r   r   r   r   zinvalid syntaxz2 <> 3   r
   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   test_guido_as_bdfl   s   zFLUFLTests.test_guido_as_bdflN)__name__
__module____qualname__r   r!   r   r   r   r   r      s    r   __main__)r   Zunittesttestr   ZTestCaser   r"   mainr   r   r   r   <module>   s    !