o
    8ήc                     @   sd   d Z ddlZddlmZmZ defddZdefdd	ZeG d
d deZe	dkr0e
  dS dS )z
Tests to ensure that typeguard is working as expected.
This mostly contains negative tests as proof that typeguard can catch errors.
    N)TestCaseskip_unless_typeguardvalc                 C      d S N r   r   r   A/tmp/pip-target-vg8gfxp4/lib/python/numba/tests/test_typeguard.py
guard_args	      r
   returnc                 C   s   | S r   r   r   r   r   r	   	guard_ret   r   r   c                   @   s$   e Zd Zdd Zdd Zdd ZdS )TestTypeGuardc                 C   <   |  t ttd W d    d S 1 sw   Y  d S N333333?)assertRaises	TypeErrorr
   floatselfr   r   r	   test_check_args      "zTestTypeGuard.test_check_argsc                 C   r   r   )r   r   r   r   r   r   r   r	   test_check_ret   r   zTestTypeGuard.test_check_retc                 C   s"   dt dt fdd}|td d S )Nr   r   c                 S   r   r   r   r   r   r   r	   guard   r   zETestTypeGuard.test_check_does_not_work_with_inner_func.<locals>.guardr   )intr   )r   r   r   r   r	   (test_check_does_not_work_with_inner_func   s   z6TestTypeGuard.test_check_does_not_work_with_inner_funcN)__name__
__module____qualname__r   r   r   r   r   r   r	   r      s    r   __main__)__doc__unittestnumba.tests.supportr   r   r   r
   r   r   r   mainr   r   r   r	   <module>   s    