Ë
    ÷Ç:ji  ã                   óZ  — d Z ddlZddlZddlmZ ddlZddlZd„ Zd„ Z	d„ Z
 ej                  d¬«      d	„ «       Z ej                  d¬«      d
„ «       Z	 ddlZdZ	 ddlZdZ	 ddlZdZ	 ddlZdZ	 ddlZdZ	 ddlZdZ	 ddlZdZ g Z!g d¢Z"g d¢Z#ddgZ$dgZ%dgZ&dgZ'dgZ(ese!e"z  Z!ese!e#z  Z!ese!e$z  Z!ese!e%z  Z!ese!e&z  Z!ese!e'z  Z!e se!e(z  Z!yy# e$ r dZY Œ€w xY w# e$ r dZY Œ†w xY w# e$ r dZY ŒŒw xY w# e$ r dZY Œ’w xY w# e$ r dZY Œ˜w xY w# e$ r dZY Œžw xY w# e$ r dZ Y Œ¤w xY w)ax  
Testing
=======

General guidelines for writing good tests:

- doctests always assume ``import networkx as nx`` so don't add that
- prefer pytest fixtures over classes with setup methods.
- use the ``@pytest.mark.parametrize``  decorator
- use ``pytest.importorskip`` for numpy, scipy, pandas, and matplotlib b/c of PyPy.
  and add the module to the relevant entries below.

é    N)Úentry_pointsc                 ó‚   — | j                  dddd¬«       | j                  ddd d¬«       | j                  d	ddd
¬«       y )Nú	--runslowÚ
store_trueFzrun slow tests)ÚactionÚdefaultÚhelpú	--backendÚstorezGRun tests with a backend by auto-converting nx graphs to backend graphsú--fallback-to-nxz[Run nx function if a backend doesn't implement a dispatchable function (use with --backend))Ú	addoption)Úparsers    úf/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/networkx/conftest.pyÚpytest_addoptionr      sc   € Ø
×ÑØ˜L°%Ð>Nð ô ð ×ÑØØØØVð	 ô ð ×ÑØØØð ð	 õ ó    c                 ó¦  — | j                  dd«       | j                  d«      }|€t        j                  j	                  d«      }t        dd¬«      }|st        j                  d«       || _        |�r_|d   t        j                  j                  j                  d<   i t        j                  j                  j                  d<   t        j                  j                  ddt        j                  j                  «       it        j                  j                  ¤Žt        j                  _        | j                  d	«      }|st        j                  j	                  d
«      }t        |«      t        j                  _        t        j                  j                  j"                  j$                  t        j                  j                  j"                  _        y y )NÚmarkerszslow: mark test as slow to runr
   ÚNETWORKX_TEST_BACKENDÚnx_loopbackznetworkx.backends)ÚnameÚgroupac  

             WARNING: Mixed NetworkX configuration! 

        This environment has mixed configuration for networkx.
        The test object nx_loopback is not configured correctly.
        You should not be seeing this message.
        Try `pip install -e .`, or change your PYTHONPATH
        Make sure python finds the networkx repo you are testing

r   ÚNETWORKX_FALLBACK_TO_NX© )Úaddinivalue_lineÚ	getoptionÚosÚenvironÚgetr   ÚwarningsÚwarnÚbackendÚnxÚutilsÚbackendsÚbackend_infoÚConfigÚconfigÚboolÚfallback_to_nxÚ_dispatchableÚ_call_if_any_backends_installedÚ__call__)r'   r!   Úloopback_epr)   s       r   Úpytest_configurer.   +   sS  € Ø
×Ñ˜IÐ'GÔHØ×Ñ˜{Ó+€GØ€Ü—*‘*—.‘.Ð!8Ó9ˆä MÐ9LÔM€KÙÜ�‰ðSô	
ð €F„NÚð 5@ÀÑ4NŒ�‰×Ñ×"Ñ" =Ñ1Ø8:Œ�‰×Ñ×&Ñ& }Ñ5ÜŸX™XŸ_™_ñ 
ÜŸ™Ÿ™Ó)ð
ä�i‰i× Ñ ñ
Œ�	‰	Ôð  ×)Ñ)Ð*<Ó=ˆÙÜŸZ™ZŸ^™^Ð,EÓFˆNÜ#'¨Ó#7Œ�	‰	Ô ä�H‰H×Ñ×+Ñ+×KÑKô 	�‰×Ñ×'Ñ'Õ0ð r   c                 óh  — | j                   rÍ| j                   }|dk7  r¼dt        j                  j                  j                  _        |gt        j                  j                  _        |gt        j                  j                  _	        t        j                  j                  j                  |   j                  «       }t        |d«      r t        |d«      |«       | j                  d«      ry t        j                  j!                  d¬«      }|D ]"  }d|j"                  v sŒ|j%                  |«       Œ$ y )NÚnetworkxTÚon_start_testsr   zneed --runslow option to run)ÚreasonÚslow)r!   r"   r#   r$   r*   Ú_is_testingr'   Úbackend_priorityÚalgosÚ
generatorsÚloadÚhasattrÚgetattrr   ÚpytestÚmarkÚskipÚkeywordsÚ
add_marker)r'   ÚitemsÚbackend_namer!   Ú	skip_slowÚitems         r   Úpytest_collection_modifyitemsrD   N   sî   € ð ‡~‚~ð —~‘~ˆØ˜:Ò%Ø:>ŒB�H‰H×Ñ×+Ñ+Ô7Ø0<¨~ŒB�I‰I×&Ñ&Ô,Ø5A°NŒB�I‰I×&Ñ&Ô1Ü—h‘h×'Ñ'×0Ñ0°Ñ>×CÑCÓEˆGÜ�wÐ 0Ô1Ø2”˜Ð!1Ó2°5Ô9à×Ñ˜Ô$àÜ—‘× Ñ Ð(FÐ ÓG€IØò 'ˆØ�T—]‘]Ò"Ø�O‰O˜IÕ&ñ'r   T)Úautousec                  ó  — t        j                  dt        d¬«       t        j                  dt        d¬«       t        j                  dt        d¬«       t        j                  dt        d¬«       t        j                  dt        d¬«       y )NÚignorez:Exited (at iteration \d+|postprocessing) with accuracies.*)ÚcategoryÚmessagezThe hashes produced for z

The `normalized`Úmaybe_regular_expanderzmetric_closure is deprecated)r   ÚfilterwarningsÚUserWarningÚDeprecationWarningr   r   r   Úset_warningsrN   g   s}   € ä×ÑØÜØMõô
 ×ÑØÜØ+õô
 ×ÑØÔ-Ð7Mõô ×ÑØÔ-Ð7Oõô ×ÑØÔ-Ð7Uör   c                 ó   — t         | d<   y )Nr"   )r"   )Údoctest_namespaces    r   Úadd_nxrQ   ~   s   € ä Ð�dÒr   F)ú.algorithms/approximation/traveling_salesman.pyz/algorithms/centrality/current_flow_closeness.pyú"algorithms/centrality/laplacian.pyú!algorithms/node_classification.pyzalgorithms/non_randomness.pyúalgorithms/polynomials.pyz"algorithms/shortest_paths/dense.pyúalgorithms/tree/mst.pyzdrawing/nx_latex.pyúgenerators/expanders.pyúlinalg/bethehessianmatrix.pyúlinalg/laplacianmatrix.pyzutils/misc.py)&rR   z'algorithms/assortativity/correlation.pyz"algorithms/assortativity/mixing.pyz!algorithms/assortativity/pairs.pyzalgorithms/bipartite/matrix.pyz algorithms/bipartite/spectral.pyz%algorithms/bipartite/link_analysis.pyz1algorithms/centrality/current_flow_betweenness.pyz8algorithms/centrality/current_flow_betweenness_subset.pyz$algorithms/centrality/eigenvector.pyzalgorithms/centrality/katz.pyrS   z%algorithms/centrality/second_order.pyz%algorithms/centrality/subgraph_alg.pyz!algorithms/communicability_alg.pyz algorithms/community/divisive.pyz$algorithms/community/bipartitions.pyzalgorithms/distance_measures.pyz$algorithms/link_analysis/hits_alg.pyz(algorithms/link_analysis/pagerank_alg.pyrT   zalgorithms/similarity.pyrV   zalgorithms/walks.pyúconvert_matrix.pyzdrawing/layout.pyúdrawing/nx_pylab.pyz"generators/spectral_graph_forge.pyzgenerators/geometric.pyrW   zlinalg/algebraicconnectivity.pyzlinalg/attrmatrix.pyrX   zlinalg/graphmatrix.pyrY   zlinalg/modularitymatrix.pyzlinalg/spectrum.pyzutils/rcm.pyr[   zgenerators/classic.pyrZ   zdrawing/nx_agraph.pyzdrawing/nx_pydot.pyrU   ))Ú__doc__r   r   Úimportlib.metadatar   r;   r0   r"   r   r.   rD   ÚfixturerN   rQ   ÚnumpyÚnpÚ	has_numpyÚImportErrorÚscipyÚspÚ	has_scipyÚ
matplotlibÚmplÚhas_matplotlibÚpandasÚpdÚ
has_pandasÚ
pygraphvizÚhas_pygraphvizÚpydotÚ	has_pydotÚsympyÚ	has_sympyÚcollect_ignoreÚneeds_numpyÚneeds_scipyÚneeds_matplotlibÚneeds_pandasÚneeds_pygraphvizÚneeds_pydotÚneeds_sympyr   r   r   ú<module>rz      s   ðñó 
Û Ý +ã ã òò& 
òF'ð2 €‡�˜Ôñó ðð, €‡�˜Ôñ!ó ð!ðÛà€IðÛà€IðÛà€NðÛà€JðÛà€NðÛà€IðÛà€Ið €ò€ò'€ðP *Ð+BÐCÐ Ø#Ð$€Ø*Ð+Ð Ø$Ð%€Ø*Ð+€áØ�kÑ!€NÙØ�kÑ!€NÙØÐ&Ñ&€NÙØ�lÑ"€NÙØÐ&Ñ&€NÙØ�kÑ!€NÙØ�kÑ!�Nð øðw ò Ø‚Iðûð ò Ø‚Iðûð ò Ø‚Nðûð ò Ø‚Jðûð ò Ø‚Nðûð ò Ø‚Iðûð ò Ø‚Iðús~   ÁC ÁC Á#C, Á*C9 Á1D Á8D Á?D  ÃCÃCÃC)Ã(C)Ã,C6Ã5C6Ã9DÄDÄDÄDÄDÄDÄ D*Ä)D*