cBFjipdZddlZddlZddlmZddlZddlZdZdZ dZ ej dd Z ej dd Z ddlZdZn #e$rd ZYnwxYw ddlZdZn #e$rd ZYnwxYw ddlZdZn #e$rd ZYnwxYw ddlZdZn #e$rd ZYnwxYw ddlZdZn #e$rd ZYnwxYw ddlZdZn #e$rd ZYnwxYw ddlZdZ n #e$rd Z YnwxYwgZ!gd Z"gd Z#ddgZ$dgZ%dgZ&dgZ'dgZ(ese!e"z Z!ese!e#z Z!ese!e$z Z!ese!e%z Z!ese!e&z Z!ese!e'z Z!e se!e(z Z!dSdS)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|dddd|dddd|d ddd dS) N --runslow store_trueFzrun slow tests)actiondefaulthelp --backendstorezGRun 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:\PYTHON\_runtimes\venv\Lib\site-packages\networkx/conftest.pypytest_addoptionrs L%>N  V    c(|dd|d}|tjd}t dd}|st jd||_|r|dtj j j d<itj j j d<tj j d dtj itjj tj_ |d }|stjd }t|tj_tj j jjtj j j_dSdS) Nmarkerszslow: mark test as slow to runr NETWORKX_TEST_BACKEND nx_loopbackznetworkx.backends)namegroupac 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 getoptionosenvirongetrwarningswarnbackendnxutilsbackends backend_infoConfigconfigboolfallback_to_nx _dispatchable_call_if_any_backends_installed__call__)r'r! loopback_epr)s rpytest_configurer.+sh I'GHHH{++G*..!899M9LMMMK    S   FN 5@ 4N"=18:&}5X_  )) i     ))*<== GZ^^,EFFN#'#7#7  H  + K '000  rc"|jr|j}|dkrdtjjj_|gtjj_|gtjj_ tjjj| }t|drt|d|| drdStjd}|D] }d|jvr||!dS)NnetworkxTon_start_testsrzneed --runslow option to run)reasonslow)r!r"r#r$r* _is_testingr'backend_priorityalgos generatorsloadhasattrgetattrrpytestmarkskipkeywords add_marker)r'items backend_namer! skip_slowitems rpytest_collection_modifyitemsrDNs ~ :~ : % %:>BH  + 70<~BI & ,5ANBI & 1h'0>CCEEGw 011 :2!1225999  $$   (F GGI'' T] " " OOI & & &''rT)autousectjdtdtjdtdtjdtdtjdtdtjdtddS)Nignorez:Exited (at iteration \d+|postprocessing) with accuracies.*)categorymessagezThe hashes produced for z The `normalized`maybe_regular_expanderzmetric_closure is deprecated)rfilterwarnings UserWarningDeprecationWarningrrr set_warningsrNgs M  +  -7M -7O -7Urct|d<dS)Nr")r")doctest_namespaces radd_nxrQ~s drF) .algorithms/approximation/traveling_salesman.pyz/algorithms/centrality/current_flow_closeness.py"algorithms/centrality/laplacian.py!algorithms/node_classification.pyzalgorithms/non_randomness.pyalgorithms/polynomials.pyz"algorithms/shortest_paths/dense.pyalgorithms/tree/mst.pyzdrawing/nx_latex.pygenerators/expanders.pylinalg/bethehessianmatrix.pylinalg/laplacianmatrix.pyz utils/misc.py)&rRz'algorithms/assortativity/correlation.pyz"algorithms/assortativity/mixing.pyz!algorithms/assortativity/pairs.pyzalgorithms/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.pyzalgorithms/centrality/katz.pyrSz%algorithms/centrality/second_order.pyz%algorithms/centrality/subgraph_alg.pyz!algorithms/communicability_alg.pyz algorithms/community/divisive.pyz$algorithms/community/bipartitions.pyzalgorithms/distance_measures.pyz$algorithms/link_analysis/hits_alg.pyz(algorithms/link_analysis/pagerank_alg.pyrTzalgorithms/similarity.pyrVzalgorithms/walks.pyconvert_matrix.pyzdrawing/layout.pydrawing/nx_pylab.pyz"generators/spectral_graph_forge.pyzgenerators/geometric.pyrWzlinalg/algebraicconnectivity.pyzlinalg/attrmatrix.pyrXzlinalg/graphmatrix.pyrYzlinalg/modularitymatrix.pyzlinalg/spectrum.pyz utils/rcm.pyr[zgenerators/classic.pyrZzdrawing/nx_agraph.pyzdrawing/nx_pydot.pyrU))__doc__rrimportlib.metadatarr;r0r"rr.rDfixturerNrQnumpynp has_numpy ImportErrorscipysp has_scipy matplotlibmplhas_matplotlibpandaspd has_pandas pygraphvizhas_pygraphvizpydot has_pydotsympy has_sympycollect_ignore needs_numpy needs_scipyneeds_matplotlib needs_pandasneeds_pygraphviz needs_pydot needs_sympyrrrrzsS   ++++++ &    F'''2,!!! IIIIIIIIIINNNNNJJJJJNNNNNLLLIIIIILLLIIIII  ''' P*+BC#$ *+$% *+ "k!N"k!N'&&N#l"N'&&N"k!N"k!NNN""s~AA('A(,A33A=<A=BBBBB'&B'+B22B<;B<CCCCC&%C&