
    )+Ci                     z    S SK r S SKJrJrJr   " S S\ R
                  5      r\S:X  a  \ R                  " 5         gg)    N)bounding_boxconvex_hullRectc                   2    \ rS rSrS rS rS rS rS rSr	g)	TestLocations   c           	          U R                  [        [        / 5        U R                  [	        SSSSS9[        S/5      5        U R                  [	        SSSSS9[        / SQ5      5        g )	Nr   )lefttopwidthheightr   r   %   &  iD  L   ))r   i'  )r   iq  )i  ir  )r   r   )assertRaises
ValueErrorr   assertEqualr   selfs    U/home/james-whalen/.local/lib/python3.13/site-packages/pyzbar/tests/test_locations.pytest_bounding_boxTestLocations.test_bounding_box   sa    *lB7aQa2&"	
 	bcR8GH	
    c                 :    U R                  / [        / 5      5        g )Nr   r   r   s    r   test_convex_hull_empty$TestLocations.test_convex_hull_empty   s    [_-r   c                 D    / SQnU R                  U[        U5      5      4  g )Nr   )r      r"   r"   )r"   r   r   r   pointss     r   test_convex_square TestLocations.test_convex_square   s    1V!456r   c                 J    / SQnU R                  U[        US-  5      5      4  g )Nr!   
   r   r$   s     r   test_convex_duplicates$TestLocations.test_convex_duplicates   s#    1Vb[!9:;r   c                     [        / SQ5      nU R                  / SQU5        [        / SQ5      n/ SQnU R                  X!5        g )N)r#   )   r-      r/   r"   r/   )r#   r0   r.   )g@   g@g     .@)g@g)@g @g333333&@      #@g-@gffffff*@g'@)g$@g(@)g333333@r6   )gffffff
@g@g333333?gffffff@g333333@g333333@)gfffff @g@)g      '@g333333#@g+@g333333@g)@g@   g?)
r8   r4   r1   r3   r5   r7   r:   r;   r<   r9   )r   r   )r   resexpecteds      r   
test_otherTestLocations.test_other   sF     :;137 
 
 	'r    N)
__name__
__module____qualname____firstlineno__r   r   r&   r*   r@   __static_attributes__rB   r   r   r   r      s    	
.7<(r   r   __main__)	unittestpyzbar.locationsr   r   r   TestCaser   rC   mainrB   r   r   <module>rM      s9     < <((H%% ((V zMMO r   