U
    ¹mœdè  ã                   @   sl  d Z ddlZddlZddlZddlZdd„ Zdd„ Zdd„ Zejd	d
�dd„ ƒZ	ejd	d
�dd„ ƒZ
zddlZd	ZW n ek
rŒ   dZY nX zddlZd	ZW n ek
r¶   dZY nX zddlZd	ZW n ek
rà   dZY nX zddlZd	ZW n ek
�r   dZY nX zddlZd	ZW n ek
�r8   dZY nX zddlZd	ZW n ek
�rd   dZY nX zddlZd	ZW n ek
�r�   dZY nX g Zdddddddddg	Zddddddddd d!d"d#d$d%d&dd'd(d)d*d+d,dd-d.d/d0dgZd1gZd(gZd2gZd3gZ d4gZ!e�see7 Ze�s"ee7 Ze�s0ee7 Ze�s>ee7 Ze�sLee7 Ze�sZee 7 Ze�shee!7 ZdS )5ax  
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.

é    Nc                 C   s   | j ddddd� d S )Nú	--runslowÚ
store_trueFzrun slow tests)ÚactionÚdefaultÚhelp)Z	addoption)Úparser© r   úJ/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/networkx/conftest.pyÚpytest_addoption   s       ÿr
   c                 C   s   |   dd¡ d S )NÚmarkerszslow: mark test as slow to run)Zaddinivalue_line)Úconfigr   r   r	   Úpytest_configure   s    r   c                 C   sL   t jj |¡ |  d¡rd S tjjdd�}|D ]}d|jkr.| 	|¡ q.d S )Nr   zneed --runslow option to run)ÚreasonZslow)
ÚnetworkxÚclassesÚbackendsZ_mark_testsZ	getoptionÚpytestÚmarkÚskipÚkeywordsZ
add_marker)r   ÚitemsZ	skip_slowÚitemr   r   r	   Úpytest_collection_modifyitems    s    

r   T)Zautousec                   C   s„   t jdtdd� t jdtdd� t jdtdd� t jdtdd� t jdtdd� t jdtdd� t jdtd	d� t jdtd
d� d S )NÚignorez literal_stringizer is deprecated)ÚcategoryÚmessagez"literal_destringizer is deprecatedzThe create_using argumentznx.nx_pydotz+

The `attrs` keyword argument of node_linkz'single_target_shortest_path_length willzshortest_path for all_pairsz
forest_str is deprecated)ÚwarningsÚfilterwarningsÚDeprecationWarningr   r   r   r	   Úset_warnings/   sP    ýý  ÿ  ÿýýý  ÿr   c                 C   s   t | d< d S )NÚnx)r   )Zdoctest_namespacer   r   r	   Úadd_nxV   s    r!   Fz.algorithms/approximation/traveling_salesman.pyz/algorithms/centrality/current_flow_closeness.pyz!algorithms/node_classification.pyzalgorithms/non_randomness.pyz"algorithms/shortest_paths/dense.pyzlinalg/bethehessianmatrix.pyzlinalg/laplacianmatrix.pyzutils/misc.pyz"algorithms/centrality/laplacian.pyz'algorithms/assortativity/correlation.pyz"algorithms/assortativity/mixing.pyz!algorithms/assortativity/pairs.pyzalgorithms/bipartite/matrix.pyz algorithms/bipartite/spectral.pyz1algorithms/centrality/current_flow_betweenness.pyz8algorithms/centrality/current_flow_betweenness_subset.pyz$algorithms/centrality/eigenvector.pyzalgorithms/centrality/katz.pyz%algorithms/centrality/second_order.pyz%algorithms/centrality/subgraph_alg.pyz!algorithms/communicability_alg.pyz$algorithms/link_analysis/hits_alg.pyz(algorithms/link_analysis/pagerank_alg.pyzalgorithms/similarity.pyzconvert_matrix.pyzdrawing/layout.pyz"generators/spectral_graph_forge.pyzlinalg/algebraicconnectivity.pyzlinalg/attrmatrix.pyzlinalg/graphmatrix.pyzlinalg/modularitymatrix.pyzlinalg/spectrum.pyzutils/rcm.pyzdrawing/nx_pylab.pyzdrawing/nx_agraph.pyzdrawing/nx_pydot.pyzalgorithms/polynomials.py)"Ú__doc__Úsysr   r   r   r
   r   r   Zfixturer   r!   ÚnumpyZ	has_numpyÚImportErrorZscipyZ	has_scipyZ
matplotlibZhas_matplotlibZpandasZ
has_pandasZ
pygraphvizZhas_pygraphvizZpydotZ	has_pydotZsympyZ	has_sympyZcollect_ignoreZneeds_numpyZneeds_scipyZneeds_matplotlibZneeds_pandasZneeds_pygraphvizZneeds_pydotZneeds_sympyr   r   r   r	   Ú<module>   sÒ   

&








÷ä