
    h                     F    S SK Jr  S SKJr   " S S\R                  5      rg)    )roots)unittestc                   <    \ rS rSrSS jrSS jrSS jrSS jrSrg)	
RootsTests	   Nc                     [         R                  " 5       n UR                  S5        U R                  5          UR                  5         U R                  5         g ! [         a     N.f = f! [         a     g f = f)Ns   blah)r   RequestwritefailNotImplementedErrorfinish)selfrequests     ^/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/test/test_roots.pytestExceptionsRootsTests.testExceptions
   sj    --/	MM'" IIK	NN IIK # 		 # 		s"   A A* 
A'&A'*
A76A7c                    [         R                  " 5       nUR                  SS5        U R                  UR	                  S5      S5        UR                  S5        U R                  UR	                  S5      S 5         UR                  SS 5        U R                  5          UR                  SS 5        U R                  5         g ! [         a     N0f = f! [         a     g f = f)Nxtest)
r   
Collection	putEntityassertEqualgetStaticEntity	delEntitystoreEntityr   r   removeEntity)r   
collections     r   testCollectionRootsTests.testCollection   s    %%'
S&)33C8&AS!33C8$?	""3- IIK	##C. IIK # 		 # 		s$   <C C 
CC
CCc                      " S S[         R                  5      nU" 5       nU R                  UR                  SS5      5        U R	                  [         R
                  UR                  SS5        g )Nc                   &    \ rS rSrS\S\4S jrSrg))RootsTests.testConstrained.<locals>.const-   namereturnc                     US:H  $ )Nr    )r   r$   s     r   nameConstraint8RootsTests.testConstrained.<locals>.const.nameConstraint.   s    s{"    r'   N)__name__
__module____qualname____firstlineno__strboolr(   __static_attributes__r'   r*   r   constr"   -   s    #3 #4 #r*   r2   r   r   y)r   ConstrainedassertIsNoner   assertRaisesConstraintViolation)r   r2   cs      r   testConstrainedRootsTests.testConstrained,   sT    	#E%% 	# G!++c623%33Q[[#vNr*   c                    [         R                  " 5       n[        Ul        UR	                  SS5        U R                  UR                  S5      S5        U R                  [         R                  UR                  SS5        g )Na   r   r3   )	r   
Homogenousint
entityTyper   r   r   r6   r7   )r   hs     r   testHomogenousRootsTests.testHomogenous5   s^    	C**3/3%33Q[[#sKr*   r'   )r%   N)	r+   r,   r-   r.   r   r   r9   rB   r1   r'   r*   r   r   r   	   s    &OLr*   r   N)twisted.pythonr   twisted.trialr   TestCaser   r'   r*   r   <module>rG      s!   
 ! "1L"" 1Lr*   