+
    )i,                         ^ RI t ^ RIt^ RIHtHt  ! R R4      t ! R R4      tR t ! R R	4      t	 ! R
 R4      t
 ! R R4      tR# )    N)edges_equalnodes_equalc                   D   a  ] tR t^	t o R tR tR tR tR tR t	Rt
V tR# )	TestReverseViewc                    \         P                  ! ^	\         P                  ! 4       R7      V n        \         P                  ! V P                  4      V n        R# 	   create_usingN)nx
path_graphDiGraphGreverse_viewrvselfs   &d/var/www/html/photoedit/myenv/lib/python3.14/site-packages/networkx/classes/tests/test_graphviews.pysetup_methodTestReverseView.setup_method
   s.    qrzz|<//$&&)    c                   ^ RI pV P                  pVP                  VP                  VR4      4      pVP                  VP                  8X  g   Q hVP
                  VP
                  8X  g   Q hVP                  VP                  8X  g   Q hR# r   Npickler   loadsdumps_node_adjgraphr   r   r   prvs   &   r   test_pickleTestReverseView.test_pickle   i    WWll6<<B/0xx399$$$ww#(("""xx399$$$r   c                    RV P                   P                  9   g   Q hRV P                   P                  9  g   Q hRV P                  P                  9  g   Q hRV P                  P                  9   g   Q hR#    N)r)      )r*   r)   r   edgesr   r   s   &r   test_containsTestReverseView.test_contains   sZ    %%%TVV\\)))TWW]]***&&&r   c                    \        R  V P                  P                   4       4      p\        V P                  P                  4      V8X  g   Q hR# )c              3   J   "   T F  p\        \        V4      4      x  K  	  R # 5iN)tuplereversed).0es   & r   	<genexpr>,TestReverseView.test_iter.<locals>.<genexpr>   s     Cl%,,ls   !#Nsortedr   r,   r   r   expecteds   & r   	test_iterTestReverseView.test_iter   s5    CdffllCCdggmm$000r   c                    \         P                  ! 4       p\        P                  ! \         P                  \         P
                  V4       R # r1   )r   GraphpytestraisesNetworkXNotImplementedr   r   r   s   & r   test_exceptionsTestReverseView.test_exceptions!   s'    HHJb//!Dr   c                l  a  ! V3R  lR\         P                  4      oS! 4       pVP                  ^^4       \         P                  ! V4      pVP                  S8X  g   Q hVP                  4       pVP                  S8X  g   Q hVP                  ^^4      '       g   Q hVP                  4       R8X  g   Q hR# )c                   4   <a  ] tR t^&t o R tV3R ltRtV tR# ).TestReverseView.test_subclass.<locals>.MyGraphc                    R # me r   s   &r   	my_method8TestReverseView.test_subclass.<locals>.MyGraph.my_method'       r   c                   < S! 4       # r1   rL   r   MyGraphs   &r   to_directed_class@TestReverseView.test_subclass.<locals>.MyGraph.to_directed_class*       y r   rL   N__name__
__module____qualname____firstlineno__rM   rS   __static_attributes____classdictcell____classdict__rR   s   @r   rR   rH   &        ! !r   rR   rK   N)r   r   add_edger   	__class__copyhas_edgerM   )r   MRMRMCrR   s   &   @r   test_subclassTestReverseView.test_subclass%   s    	!bjj 	! I	

1a__Q||w&&&ggi}}'''||Aq!!!!}}$&&&r   r   r   N)rW   rX   rY   rZ   r   r$   r-   r<   rD   rg   r[   r\   r^   s   @r   r   r   	   s)     *%'1E' 'r   r   c                   >   a  ] tR t^7t o R tR tR tR tR tRt	V t
R# )TestMultiReverseViewc                    \         P                  ! ^	\         P                  ! 4       R7      V n        V P                  P	                  ^^4       \         P
                  ! V P                  4      V n        R# r   )r   r   MultiDiGraphr   r`   r   r   r   s   &r   r   !TestMultiReverseView.setup_method8   sA    qr/@A1//$&&)r   c                   ^ RI pV P                  pVP                  VP                  VR4      4      pVP                  VP                  8X  g   Q hVP
                  VP
                  8X  g   Q hVP                  VP                  8X  g   Q hR# r   r   r"   s   &   r   r$    TestMultiReverseView.test_pickle=   r&   r   c                b   RV P                   P                  9   g   Q hRV P                   P                  9  g   Q hRV P                  P                  9  g   Q hRV P                  P                  9   g   Q hRV P                  P                  9   g   Q hRV P                  P                  9  g   Q hR# )r)   N)r)   r*   r   )r*   r)   r   )         )rt   rs   ru   r+   r   s   &r   r-   "TestMultiReverseView.test_containsF   s    DFFLL(((,,,---DGGMM)))DGGMM)))---r   c                    \        R  V P                  P                   4       4      p\        V P                  P                  4      V8X  g   Q hR# )c              3   .   "   T F  w  rq2W3x  K  	  R # 5ir1   rL   )r4   uvks   &   r   r6   1TestMultiReverseView.test_iter.<locals>.<genexpr>O   s     @<aa)<s   Nr8   r:   s   & r   r<   TestMultiReverseView.test_iterN   s5    @466<<@@dggmm$000r   c                    \         P                  ! V P                  4      p\        P                  ! \         P
                  \         P                  V4       R # r1   )r   
MultiGraphr   r@   rA   rB   r   )r   MGs   & r   rD   $TestMultiReverseView.test_exceptionsR   s.    ]]466"b//"Er   ri   N)rW   rX   rY   rZ   r   r$   r-   r<   rD   r[   r\   rj   s   @r   rl   rl   7   s%     *
%.1F Fr   rl   c                  (   \         P                  p \         P                  ! R.4      p\        P                  ! \         P
                  4      ;_uu_ 4        V P                  V\         P                  R7       RRR4       \         P                  ! R.4      p\        P                  ! \         P
                  4      ;_uu_ 4        V P                  V\         P                  R7       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)ru   r
   N)ru   r)   )	r   
graphviewsr   r@   rA   NetworkXErrorgeneric_graph_viewr   rn   )nxgr   s     r   test_generic_multityper   W   s    
--C


F8A	r''	(	(qr}}= 
)
!A	r''	(	(qrzz: 
)	( 
)	( 
)	(	(s   "C-"D -C=	 D	c                   D   a  ] tR t^at o R tR tR tR tR tR t	Rt
V tR# )	TestToDirectedc                0   \         P                  ! ^	4      V n        \         P                  ! V P                  4      V n        \         P                  ! ^	\         P
                  ! 4       R7      V n        \         P                  ! V P                  4      V n        R# r   )r   r   r   to_directeddvr   r   Mdvr   s   &r   r   TestToDirected.setup_methodb   sR    q!..(--@>>$''*r   c                    V P                   P                  4       '       d   Q hV P                  P                  4       '       g   Q hR # r1   )r   is_directedr   r   s   &r   test_directedTestToDirected.test_directedh   s4    66%%''''ww""$$$$r   c                V   \         P                  ! V P                  4      p\         P                  ! V P                  4      p\	        VP
                  V P                  P
                  R R7      '       g   Q h\	        VP
                  V P                  P
                  R R7      '       g   Q hR# )TdirectedN)r   r   r   r   r   r,   )r   ddMdds   &  r   test_already_directed$TestToDirected.test_already_directedl   sh    ^^DGG$nnTXX&288TWW]]TBBBB399dhhnntDDDDr   c                P   ^ RI pV P                  pVP                  VP                  VR4      4      pVP                  VP                  8X  g   Q hVP
                  VP
                  8X  g   Q hVP                  VP                  8X  g   Q hVP                  VP                  8X  g   Q hR# r   )r   r   r   r   r   _succ_predr!   )r   r   r   pdvs   &   r   r$   TestToDirected.test_pickler   s    WWll6<<B/0xx399$$$xx399$$$xx399$$$xx399$$$r   c                    RV P                   P                  9   g   Q hRV P                   P                  9   g   Q hRV P                  P                  9   g   Q hRV P                  P                  9   g   Q hR# r(   )r   r,   r   r   s   &r   r-   TestToDirected.test_contains|   sZ    %%%%%%&&&&&&r   c                (   V P                   P                   Uu. uF  p\        \        V4      4      NK  	  pp\	        \        V P                   P                  4      V,           4      p\	        V P                  P                  4      V8X  g   Q hR # u upi r1   )r   r,   r2   r3   r9   listr   )r   r5   revdr;   s   &   r   r<   TestToDirected.test_iter   sc    ,0FFLL9Lqhqk"L9$tvv||,t34dggmm$000 :s   B)r   r   r   r   N)rW   rX   rY   rZ   r   r   r   r$   r-   r<   r[   r\   rj   s   @r   r   r   a   s)     +%E%'1 1r   r   c                   D   a  ] tR t^t o R tR tR tR tR tR t	Rt
V tR# )	TestToUndirectedc                Z   \         P                  ! ^	\         P                  ! 4       R7      V n        \         P                  ! V P                  4      V n        \         P                  ! ^	\         P                  ! 4       R7      V n        \         P                  ! V P                  4      V n        R# r   )	r   r   r   DGto_undirecteduvrn   MDGMuvr   s   &r   r   TestToUndirected.setup_method   s_    --

=""477+==1BC##DHH-r   c                    V P                   P                  4       '       g   Q hV P                  P                  4       '       d   Q hR # r1   )r   r   r   r   s   &r   r   TestToUndirected.test_directed   s7    ww""$$$$77&&(((((r   c                N   \         P                  ! V P                  4      p\         P                  ! V P                  4      p\	        VP
                  V P                  P
                  4      '       g   Q h\	        VP
                  V P                  P
                  4      '       g   Q hR # r1   )r   r   r   r   r   r,   )r   uuMuus   &  r   test_already_undirected(TestToUndirected.test_already_undirected   sh    dgg&txx(288TWW]]3333399dhhnn5555r   c                >   ^ RI pV P                  pVP                  VP                  VR4      4      pVP                  VP                  8X  g   Q hVP
                  VP
                  8X  g   Q hVP                  VP                  8X  g   Q h\        VR4      '       g   Q hR# )r   N_graphr   )r   r   r   r   r   r    r!   hasattr)r   r   r   puvs   &   r   r$   TestToUndirected.test_pickle   s|    WWll6<<B/0xx399$$$ww#(("""xx399$$$r8$$$$r   c                    RV P                   P                  9   g   Q hRV P                   P                  9  g   Q hRV P                  P                  9   g   Q hRV P                  P                  9   g   Q hR# r(   )r   r,   r   r   s   &r   r-   TestToUndirected.test_contains   sZ    &&&TWW]]***&&&&&&r   c                    \        V P                  P                  4      p\        V P                  P                  4      V8X  g   Q hR # r1   )r9   r   r,   r   r:   s   & r   r<   TestToUndirected.test_iter   s/    $''--(dggmm$000r   )r   r   r   r   N)rW   rX   rY   rZ   r   r   r   r$   r-   r<   r[   r\   rj   s   @r   r   r      s(     .)6%'1 1r   r   c                      a  ] tR t^t o ]R 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR tR tR tR tR tRtV tR# )TestChainsOfViewsc           
     V   \         P                  ! ^	4      V n        \         P                  ! ^	\         P                  ! 4       R7      V n        \         P                  ! ^	\         P
                  ! 4       R7      V n        \         P                  ! ^	\         P                  ! 4       R7      V n        \         P                  ! V P                  4      V n
        \         P                  ! V P                  4      V n        \         P                  ! V P                  4      V n        \         P                  ! V P                  4      V n        V P                  P                  4       V n        V P                  P                  4       V n        V P                  V P                  V P                  V P                  V P                  V P                  V P                  V P                  V P                   V P"                  .
V n        V P$                   F&  pVP&                  VP(                  VP*                  3 K(  	  R# r   )r   r   r   r   r   r   r   rn   r   r   Gvr   DGvMGvMDGvreverseRvMRvgraphsr,   nodesdegree)clsr   s   & r   setup_classTestChainsOfViews.setup_class   sH   a qrzz|<qr}}?--0AB!!#&&)..'""377+>>#&&)!''//#EEFFFFGGFFGGGGHHFFGG

 AGGQWWahh& r   c                6   ^ RI pV P                   F  pVP                  VP                  VR4      4      p\	        VP
                  VP
                  VP                  4       R7      '       g   Q h\        VP                  VP                  4      '       d   K  Q h	  R# )r   Nr   r   )	r   r   r   r   r   r,   r   r   r   )r   r   r   Hs   &   r   r$   TestChainsOfViews.test_pickle   sj    AV\\!R01Aqww!--/JJJJqww0000 r   c                `   \         P                  ! V P                  \        ^^4      4      p\         P                  ! V P                  \        ^^4      4      p\         P                  ! V P
                  \        ^^4      4      p\         P                  ! V P                  \        ^^4      4      pV P                  WW4.,            Fh  p\         P                  ! V. RO4      p\        V4      . RO8X  g   Q hVP                  ^^.4      p\        V4      ^.8X  g   Q hVP                  VJ d   Kh  Q h	  R# )r*   Nrt   rs      )r   subgraphr   ranger   r   r   r   induced_subgraphr   r   )r   SGvSDGvSMGvSMDGvr   SGSSGs   &       r   test_subgraph_of_subgraph+TestChainsOfViews.test_subgraph_of_subgraph   s    kk$&&%1+.{{477E!QK0{{477E!QK0DHHeAqk24777A$$Q	2B8y(((++q!f%C9###::?"? 8r   c                   . ROpR.p\         P                  ! V P                  W4      p. ROp\         P                  ! W44      pVP	                  V4      pVP
                  V P                  J g   Q hVP
                  V P                  J g   Q hVP
                  VJ g   Q h\        VP                  VP                  4      '       g   Q hV P                  P                  4       pVP                  V4       VP                  V4       \        VP                  V4      VP                  4      '       g   Q hVP                  . RO4       \        VP                  VP                  4      '       g   Q hV P                  P	                  V4      p\         P                  ! WV4      p	V	P
                  V P                  Jg   Q h\        V	P                  VP                  4      '       g   Q hR# )a  Test subgraph chains that both restrict and show nodes/edges.

A restricted_view subgraph should allow induced subgraphs using
G.subgraph that automagically without a chain (meaning the result
is a subgraph view of the original graph not a subgraph-of-subgraph.
N)r*   rt   rs   )r      )rt   rs   r   r      )r   ru   r)   r*   )r   restricted_viewr   r   r   r   r   r,   rb   remove_nodes_fromremove_edges_from)
r   
hide_nodes
hide_edgesRGr   r   r   CGSSSGRSGs
   &         r   'test_restricted_induced_subgraph_chains9TestChainsOfViews.test_restricted_induced_subgraph_chains   sh    
X

?  +kk% yyDFF"""zzTVV###yyB288SYY////VV[[]
Z(
Z(288E?CII6666
\*288SYY////vvu%  :>zz'''399bhh////r   c                    V P                    FV  p\        P                  ! V4      pVP                  . RO4      pVP	                  4       p\        V4      \        V4      J d   KV  Q h	  R# )rt   Nr   )r   r   r?   r   rb   type)r   origGr   r   r   s   &    r   test_subgraph_copy$TestChainsOfViews.test_subgraph_copy   sL    [[EAI&B	A7d1g%%%	 !r   c                    \         P                  ! V P                  . RO4      pVP                  4       p\	        V4      . RO8X  g   Q h\	        VP
                  4      . RO8X  g   Q hR# )rt   Nr   )rt   rs   rs   rt   rs   r   )r   rs   )r   r   r   r   r9   r,   r   r   r   s   &  r   test_subgraph_todirected*TestChainsOfViews.test_subgraph_todirected  sN      3nnc{i'''cii $DDDDr   c                    \         P                  ! V P                  . RO4      pVP                  4       p\	        V4      . RO8X  g   Q h\        VP                  4      RR.8X  g   Q hR# )rt   Nr   r   r   )r   r   r   r   r   r9   r,   r   s   &  r   test_subgraph_toundirected,TestChainsOfViews.test_subgraph_toundirected
  sT      3 CyI%%%cii VV$4444r   c                    V P                   P                  R R7      pVP                  . RO4      pVP                  4       p\	        V4      . RO8X  g   Q h\        VP                  4      RR.8X  g   Q hR# )Frb   Nr   r   r   )r   r   r   r   r   r9   r,   )r   r   r   r   s   &   r   "test_reverse_subgraph_toundirected4TestChainsOfViews.test_reverse_subgraph_toundirected  s`    GGOOO'ZZ	" CyI%%%cii VV$4444r   c                   V P                   P                  R R7      pVP                  RR7      pVP                  V P                   P                  8X  g   Q hVP                  V P                   P                  8X  g   Q hV P                  P                  R R7      pVP                  RR7      pVP                  V P                  P                  8X  g   Q hVP                  V P                  P                  8X  g   Q hR# )Fr   TN)r   r   r   r,   r   )r   r   r   s   &  r   test_reverse_reverse_copy+TestChainsOfViews.test_reverse_reverse_copy  s    GGOOO'II4I ww$''--'''ww$''--'''HH%(II4I ww$((..(((ww$((..(((r   c                   V P                   P                  4       pVP                  . RO4      pVP                  RR.4      pVP	                  4       p\        V4      ^^.8X  g   Q h\        VP                  4      R.8X  g   Q hR# )rt   Nr   r   r   )r   rb   r   edge_subgraphr   r   r9   r,   )r   r   r   r   USSGs   &    r   'test_subgraph_edgesubgraph_toundirected9TestChainsOfViews.test_subgraph_edgesubgraph_toundirected!  sq    FFKKMZZ	"/0  "DzaV###djj!fX---r   c                    V P                   P                  4       pVP                  . RO4      pVP                  RR7      pVP                  RR7      p\        VR4      '       g   Q h\        VR4      '       d   Q hR# rt   Tas_viewFr   Nr   )r   rb   r   r   r   r   r   CSGDCSGs   &    r   test_copy_subgraph$TestChainsOfViews.test_copy_subgraph)  sh    FFKKMZZ	"ggdg#wwuw%sH%%%%4*****r   c                    V P                   P                  4       pVP                  . RO4      pVP                  RR7      pVP                  RR7      p\        VR4      '       g   Q h\        VR4      '       d   Q hR# r	  )r   rb   r   r   r  s   &    r   test_copy_disubgraph&TestChainsOfViews.test_copy_disubgraph1  h    GGLLNZZ	"ggdg#wwuw%sH%%%%4*****r   c                    V P                   P                  4       pVP                  . RO4      pVP                  RR7      pVP                  RR7      p\        VR4      '       g   Q h\        VR4      '       d   Q hR# r	  )r   rb   r   r   r  s   &    r   test_copy_multidisubgraph+TestChainsOfViews.test_copy_multidisubgraph9  sh    HHMMOZZ	"ggdg#wwuw%sH%%%%4*****r   c                    V P                   P                  4       pVP                  . RO4      pVP                  RR7      pVP                  RR7      p\        VR4      '       g   Q h\        VR4      '       d   Q hR# r	  )r   rb   r   r   r  s   &    r   test_copy_multisubgraph)TestChainsOfViews.test_copy_multisubgraphA  r  r   c                    \         P                  ! V P                  4      pVP                  P                  R 8X  g   Q hVP                  RR7      pVP                  P                  R 8X  g   Q hR# )r   Tr
  N)r   r   r   ra   rW   rb   rC   s   & r   test_copy_of_view#TestChainsOfViews.test_copy_of_viewI  sT    MM$((#{{##|333FF4F {{##|333r   c                <  a  ! V3R  lR\         P                  4      oV P                   Fn  pS! V4      pVP                  . RO4      pVP	                  4       pVP                  4       R8X  g   Q hVP                  4       R8X  g   Q h^V9  d   Ke  ^V9   d   Kn  Q h	  R# )c                   4   <a  ] tR tRt o R tV3R ltRtV tR# )0TestChainsOfViews.test_subclass.<locals>.MyGraphiP  c                    R # rJ   rL   r   s   &r   rM   :TestChainsOfViews.test_subclass.<locals>.MyGraph.my_methodQ  rO   r   c                   < S! 4       # r1   rL   rQ   s   &r   rS   BTestChainsOfViews.test_subclass.<locals>.MyGraph.to_directed_classT  rU   r   rL   NrV   r]   s   @r   rR   r   P  r_   r   rR   rK   Nr   )r   r   r   r   rb   rM   )r   r   r   r   r   rR   s   &    @r   rg   TestChainsOfViews.test_subclassO  s    	!bjj 	! [[EAI&B	A<<>T)));;=D(((A:b(( !r   rL   N)rW   rX   rY   rZ   classmethodr   r$   r   r   r   r   r   r   r  r  r  r  r  r  r  rg   r[   r\   rj   s   @r   r   r      sh     ' '41#0<&E55).++++4) )r   r   )r@   networkxr   networkx.utilsr   r   r   rl   r   r   r   r   rL   r   r   <module>r)     sM      3
+' +'\F F@;$1 $1N#1 #1Lo) o)r   