
    :Qgg                        d dl Z d dlZd dlmZ dZd Zd Zd Zd Zd Z	d	 Z
d
 Zd Zd Zd Zej                  j!                  dg d      d        Zej                  j!                  dg d      d        Zej                  j!                  dddgfddgfddgfdddgfdg fdg fdddgfddgfddgfd dgfg
      d!        Zy)"    N)extractzfrom ABC.DEF.local ([ba23::58b5:2236:45g2:88h2]) by
    
 ABC.DEF.local ([ba23::58b5:2236:45g2:88h2%25]) with mapi id    n 32.88.5467.123; Fri, 26 Mar 2021 11:04:09 +1200c                      t        j                  t              5  t        j                  ddd       d d d        y # 1 sw Y   y xY w)NBLAH BLAH BLAHBLAHpytestraises
ValueErrorr   _get_indexed_match     d/var/www/html/answerous/venv/lib/python3.12/site-packages/test_unstructured/cleaners/test_extract.py,test_get_indexed_match_raises_with_bad_indexr      s:    	z	" A""#3VR@A A A	   ;Ac                      t        j                  t              5  t        j                  ddd       d d d        y # 1 sw Y   y xY w)Nr   r      r   r   r   r   1test_get_indexed_match_raises_with_index_too_highr      s:    	z	" @""#3VQ?@ @ @r   c                  @    d} t        j                  | dd      dk(  sJ y )N1Teacher: BLAH BLAH BLAH; Student: BLAH BLAH BLAH!r      zTeacher: BLAH)r   extract_text_beforetexts    r   test_extract_text_beforer      s$    >D&&tVQ7?JJJr   c                  @    d} t        j                  | dd      dk(  sJ y )Nr   zBLAH;r   zStudent: BLAH BLAH BLAH!)r   extract_text_afterr   s    r   test_extract_text_afterr      s%    >D%%dGQ7;UUUUr   c                  >    d} t        j                  |       dgk(  sJ y )NzIm Rabn <Im.Rabn@npf.gov.nr>zim.rabn@npf.gov.nr)r   extract_email_addressr   s    r   test_extract_email_addressr!       s$    )D((.3G2HHHHr   c                  D    t        j                  t              ddgk(  sJ y )Nzba23::58b5:2236:45g2:88h2zba23::58b5:2236:45g2:88h2%25)r   extract_ip_addressEMAIL_META_DATA_INPUTr   r   r   test_extract_ip_addressr%   %   s,    %%&;<#&A   r   c                  D    t        j                  t              ddgk(  sJ y )NzABC.DEF.local)r   extract_ip_address_namer$   r   r   r   test_extract_ip_address_namer(   ,   s,    **+@AF   r   c                  B    t        j                  t              dgk(  sJ y )Nz32.88.5467.123)r   extract_mapi_idr$   r   r   r   test_extract_mapi_idr+   3   s     ""#89>N=OOOOr   c                      t        j                  t              t        j                  ddddddt        j                  t        j
                  d            	      k(  sJ y )
Ni           r   	   i  )seconds)tzinfo)r   extract_datetimetzr$   datetimetimezone	timedeltar   r   r   test_extract_datetimetzr7   7   sY    %%&;<@Q@Q	

		  !3!3E!BCA   r   c                  2    t        j                  d      J y )NzNO DATE HERE)r   r3   r   r   r   *test_extract_datetimetz_works_with_no_dater9   C   s    %%n5===r   r   expected))215-867-5309r<   )zPhone Number: +1 215.867.5309z+1 215.867.5309)zPhone Number: Just Kidding c                 <    t        j                  |       }||k(  sJ y )N)r   extract_us_phone_number)r   r;   phone_numbers      r   test_extract_us_phone_numberrA   G   s"     2248L8###r   ))z1. Introduction:)1NN)za. Introduction:)aNN)u   20.3 Morse code ●●●)203N)z5.3.1 Convolutional Networks )5rE   rB   )zD.b.C Recurrent Neural Networks)DbC)z2.b.1 Recurrent Neural Networks)2rH   rB   )zeins. Neural NetworksNNN)z!bb.c Feed Forward Neural Networks)bbcN)zaaa.ccc MetricsrK   )z version = 3.8rK   )z1 2. 3 4rK   )z	1) 2. 3 4rK   )u   2,3. Morse code 3. ●●●rK   )z1..2.3 fourrK   )zFig. 2: The relationshiprK   )z23 is everywhererK   c                 :    t        j                  |       |k(  sJ y Nr   )r   extract_ordered_bulletsr:   s     r   test_extract_ordered_bulletsrQ   T   s    , **5AAAr   zhttps://my-image.jpgz#https://my-image.png with some textzhttps://my-image.pngz#https://my-image/with/some/path.pngz?some text https://my-image.jpg with another http://my-image.bmpzhttp://my-image.bmpzhttp://not-an-image.comz	some textz?some text https://my-image.JPG with another http://my-image.BMPzhttps://my-image.JPGzhttp://my-image.BMPz%http://my-path-with-CAPS/my-image.JPGzhttp://my-path/my%20image.JPGzhttps://my-image.jpg#refc                 :    t        j                  |       |k(  sJ y rO   )r   extract_image_urls_from_htmlr:   s     r   !test_extract_image_urls_from_htmlrT   m   s    ^ //T:hFFFr   )r4   r	   unstructured.cleanersr   r$   r   r   r   r   r!   r%   r(   r+   r7   r9   markparametrizerA   rQ   rT   r   r   r   <module>rX      sy     )9 
A
@
K
V
I
P	> $$
 *B+*B  #$%	

 2$%	

 234	

 N$&;<	

 &	

 	

 N$&;<	

 456	

 ,-.	
 '$%	
M*-\G]-\Gr   