ó
    ™“,ji  ã                   ó¢  • S r SSKrSSKrSSKJr  SSKrSSKrS rS r	S r
\R                  " SS9S	 5       r\R                  " SS9S
 5       r SSKrSr SSKrSr SSKrSr SSKrSr SSKrSr SSKrSr SSKrSr / r!/ SQr"/ SQr#SS/r$S/r%S/r&S/r'S/r(\(       d  \!\"-  r!\(       d  \!\#-  r!\(       d  \!\$-  r!\(       d  \!\%-  r!\(       d  \!\&-  r!\(       d  \!\'-  r!\ (       d  \!\(-  r!gg! \ a    Sr N¤f = f! \ a    Sr N«f = f! \ a    Sr N²f = f! \ a    Sr N¹f = f! \ a    Sr NÀf = f! \ a    Sr NÇf = f! \ a    Sr  NÎf = f)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                 óp   • U R                  SSSSS9  U R                  SSS SS9  U R                  S	SSS
S9  g )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    ÚŸC:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\networkx/conftest.pyÚpytest_addoptionr      sc   € Ø
×ÑØ˜L°%Ð>Nð ñ ð ×ÑØØØØVð	 ñ ð ×ÑØØØð ð	 ò ó    c                 óÂ  • U R                  SS5        U R                  S5      nUc  [        R                  R	                  S5      n[        SSS9nU(       d  [        R                  " S5        Xl        U(       Gae  US   [        R                  R                  R                  S'   0 [        R                  R                  R                  S'   [        R                  R                  " SS[        R                  R                  5       0[        R                  R                  D6[        R                  l        U R                  S	5      nU(       d  [        R                  R	                  S
5      n[        U5      [        R                  l        [        R                  R                  R"                  R$                  [        R                  R                  R"                  l        g g )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.   +   sQ  € Ø
×Ñ˜IÐ'GÔHØ×Ñ˜{Ó+€GØ�Ü—*‘*—.‘.Ð!8Ó9ˆä MÐ9LÑM€KÞÜ�ŠðSô	
ð „Nßð 5@ÀÑ4NŒ�‰×Ñ×"Ñ" =Ñ1Ø8:Œ�‰×Ñ×&Ñ& }Ñ5ÜŸX™XŸ_š_ñ 
ÜŸ™Ÿ™Ó)ð
ä�i‰i× Ñ ñ
Œ�	‰	Ôð  ×)Ñ)Ð*<Ó=ˆÞÜŸZ™ZŸ^™^Ð,EÓFˆNÜ#'¨Ó#7Œ�	‰	Ô ä�H‰H×Ñ×+Ñ+×KÑKô 	�‰×Ñ×'Ñ'Õ0ð r   c                 óŒ  • U R                   (       aÓ  U R                   nUS:w  aÁ  S[        R                  R                  R                  l        U/[        R                  R                  l        U/[        R                  R                  l	        [        R                  R                  R                  U   R                  5       n[        US5      (       a  [        US5      " U5        U R                  S5      (       a  g [        R                  R!                  SS9nU H&  nSUR"                  ;   d  M  UR%                  U5        M(     g )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Ñ1Ü˜Ð!1Ô2°5Ô9à×Ñ˜×$Ñ$àÜ—‘× Ñ Ð(FÐ ÐG€IÛˆØ�T—]‘]Õ"Ø�O‰O˜IÖ&ò r   T)Úautousec                  ó  • [         R                  " S[        SS9  [         R                  " S[        SS9  [         R                  " S[        SS9  [         R                  " S[        SS9  [         R                  " S[        SS9  g )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                 ó   • [         U S'   g )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= ÁD Á$D Á+D' Á2D5 Á9E Ã/C:Ã9C:Ã=DÄDÄDÄDÄD$Ä#D$Ä'D2Ä1D2Ä5E Ä?E ÅEÅE