
    e                     N    d Z ddlmZmZmZmZmZ ddlmZ  G d de          Z	dS )z=
Test cases for the Comparisons class over the Path elements
    )BoundsBoxContoursEllipsePath)ComparisonTestCasec                   V    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd ZdS )PathComparisonTestc                    t          g d          | _        t          g d          | _        t          g dd          | _        t          g dd          | _        t          g dd          | _        t          d          | _        t          d	          | _	        t          d
dd          | _        t          d
dd	          | _        t          d
dd          | _        t          d
dd	          | _        d S )N)333333ӿ皙?r   333333?皙ɿr   r   r   r   )r   r   r   r   )   )r   r      r   r   r   r   r   r   r   r   r   r   Level)vdims)r   r   r   r   )r   r   r   )r   r      )r   r   r   )r   r   r   )r   r   r   r   r   r   g      п)r   path1path2r   	contours1	contours2	contours3r   bounds1bounds2r   box1box2r   ellipse1ellipse2selfs    Klib/python3.11/site-packages/holoviews/tests/element/test_comparisonpath.pysetUpzPathComparisonTest.setUp   s=    4 4 4 5 5
  0 0 0 1 1
 " #B #B #BIPR R R " #? #? #?FMO O O " #C #C #CJQS S S c{{c{{sC((	sC((	sC00sC00    c                 F    |                      | j        | j                   d S N)assertEqualr   r*   s    r,   test_paths_equalz#PathComparisonTest.test_paths_equal$   s"    TZ00000r.   c                     	 |                      | j        | j                   d S # t          $ rB}t	          |                              d          s|                     d          Y d }~d S d }~ww xY w)Nz#Path not almost equal to 6 decimalszPath mismatch error not raised.)r1   r   r    AssertionErrorstr
startswithfailureExceptionr+   es     r,   test_paths_unequalz%PathComparisonTest.test_paths_unequal'   s    	OTZ44444 	O 	O 	Oq66$$%JKK O++,MNNNO O O O O O	O    $ 
A07A++A0c                 F    |                      | j        | j                   d S r0   )r1   r!   r*   s    r,   test_contours_equalz&PathComparisonTest.test_contours_equal.   s"    88888r.   c                     	 |                      | j        | j                   d S # t          $ rB}t	          |                              d          s|                     d          Y d }~d S d }~ww xY w)N'Contours not almost equal to 6 decimalsz#Contours mismatch error not raised.)r1   r!   r"   r4   r5   r6   r7   r8   s     r,   test_contours_unequalz(PathComparisonTest.test_contours_unequal1   s    	ST^T^<<<<< 	S 	S 	Sq66$$%NOO S++,QRRRS S S S S S	Sr;   c                     	 |                      | j        | j                   d S # t          $ rB}t	          |                              d          s|                     d          Y d }~d S d }~ww xY w)Nr?   z,Contour level are mismatch error not raised.)r1   r!   r#   r4   r5   r6   r7   r8   s     r,   test_contour_levels_unequalz.PathComparisonTest.test_contour_levels_unequal8   s    	\T^T^<<<<< 	\ 	\ 	\q66$$%NOO \++,Z[[[\ \ \ \ \ \	\r;   c                 F    |                      | j        | j                   d S r0   )r1   r$   r*   s    r,   test_bounds_equalz$PathComparisonTest.test_bounds_equal@   s"    t|44444r.   c                     	 |                      | j        | j                   d S # t          $ rB}t	          |                              d          s|                     d          Y d }~d S d }~ww xY w)Nz%Bounds not almost equal to 6 decimalsz!Bounds mismatch error not raised.)r1   r$   r%   r4   r5   r6   r7   r8   s     r,   test_bounds_unequalz&PathComparisonTest.test_bounds_unequalC   s    	QT\4<88888 	Q 	Q 	Qq66$$%LMM Q++,OPPPQ Q Q Q Q Q	Qr;   c                 F    |                      | j        | j                   d S r0   )r1   r&   r*   s    r,   test_boxs_equalz"PathComparisonTest.test_boxs_equalJ   s"    DI.....r.   c                     	 |                      | j        | j                   d S # t          $ rB}t	          |                              d          s|                     d          Y d }~d S d }~ww xY w)Nz"Box not almost equal to 6 decimalszBox mismatch error not raised.)r1   r&   r'   r4   r5   r6   r7   r8   s     r,   test_boxs_unequalz$PathComparisonTest.test_boxs_unequalM   s    	NTY	22222 	N 	N 	Nq66$$%IJJ N++,LMMMN N N N N N	Nr;   c                 F    |                      | j        | j                   d S r0   )r1   r(   r*   s    r,   test_ellipses_equalz&PathComparisonTest.test_ellipses_equalT   s"    66666r.   c                     	 |                      | j        | j                   d S # t          $ rB}t	          |                              d          s|                     d          Y d }~d S d }~ww xY w)Nz&Ellipse not almost equal to 6 decimalsz"Ellipse mismatch error not raised.)r1   r(   r)   r4   r5   r6   r7   r8   s     r,   test_ellipses_unequalz(PathComparisonTest.test_ellipses_unequalW   s    	RT]DM::::: 	R 	R 	Rq66$$%MNN R++,PQQQR R R R R R	Rr;   N)__name__
__module____qualname__r-   r2   r:   r=   r@   rB   rD   rF   rH   rJ   rL   rN    r.   r,   r
   r
   	   s        1 1 121 1 1O O O9 9 9S S S\ \ \5 5 5Q Q Q/ / /N N N7 7 7R R R R Rr.   r
   N)
__doc__	holoviewsr   r   r   r   r   holoviews.element.comparisonr   r
   rR   r.   r,   <module>rV      s     ; : : : : : : : : : : : : : ; ; ; ; ; ;SR SR SR SR SR+ SR SR SR SR SRr.   