K iZdZddlZddlZddlmZddlZddlZdZdZ dZ ejdd Z ejdd Z ddlZdZ ddlZdZ ddlZdZ ddlZdZ ddlZdZ ddlZdZ ddlZdZ gZ!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!yy#e$rd ZYwxYw#e$rd ZYwxYw#e$rd ZYwxYw#e$rd ZYwxYw#e$rd ZYwxYw#e$rd ZYwxYw#e$rd Z YwxYw)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|jdddd|jdddd|jd ddd y) 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 W/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/networkx/conftest.pypytest_addoptionrsc L%>N  V    c|jdd|jd}|tjj d}t dd}|st jd||_|r_|dtjjjd<itjjjd<tjjd dtjjitjjtj_ |jd }|stjj d }t|tj_tjjj"j$tjjj"_yy) 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.+sS I'GH{+G**..!89M9LMK   S FN5@ 4N""=18:&&}5XX__ ) ii     ))*<=ZZ^^,EFN#'#7  HH   + + K K ''0rch|jr|j}|dk7rdtjjj_|gtj j_|gtj j_ tjjj|j}t|drt|d||jdrytjj!d}|D]"}d|j"vs|j%|$y)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~~~~ : %:>BHH   + + 70<~BII & & ,5ANBII & & 1hh''00>CCEGw 012!1259  $   (F GI' T]] " OOI &'rT)autousectjdtdtjdtdtjdtdtjdtdy)Nignorez:Exited (at iteration \d+|postprocessing) with accuracies.*)categorymessagez The `normalized`z `compute_v_structureszKeyword argument 'link')rfilterwarnings UserWarningDeprecationWarningrrr set_warningsrMgsd M  -7M -7R -7Prct|d<y)Nr")r")doctest_namespaces radd_nxrPys  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/structuralholes.pyalgorithms/tree/mst.pyzdrawing/nx_latex.pygenerators/expanders.pylinalg/bethehessianmatrix.pylinalg/laplacianmatrix.pyz utils/misc.py)&rQz'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.pyrRz%algorithms/centrality/second_order.pyz%algorithms/centrality/subgraph_alg.pyz!algorithms/communicability_alg.pyz algorithms/community/divisive.pyzalgorithms/distance_measures.pyz$algorithms/link_analysis/hits_alg.pyz(algorithms/link_analysis/pagerank_alg.pyrSzalgorithms/similarity.pyrUrVzalgorithms/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.pyrT))__doc__rrimportlib.metadatarr;r0r"rr.rDfixturerMrPnumpynp 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_sympyrrrrzs  + &  F'2"!! IINJNII ' P*+BC#$ *+$% *+ k!Nk!N&&Nl"N&&Nk!Nk!NyIINJNIIs~CC#C,*C91D8D?D CCC)(C),C65C69DDDDDD D*)D*