a
    Re                     @   s   d dl Zd dlZd dlmZ d dlmZ d dlmZm	Z	m
Z
mZ dd Zdd Zd	d
 Zdd Zejdddgejdee	gdd ZdS )    N)assert_array_almost_equal)	csr_array)breadth_first_treedepth_first_treecsgraph_to_densecsgraph_from_densec                  C   s   t g dg dg dg dg dg} t| dd} t g dg dg d	g d
g d
g}dD ]}t| d|}tt|| q`d S )Nr         r   r   r	   r   r   r      r
   r   r      r   r   r   r   r   r	   r   r   r   r	   r   r   Z
null_valuer   r   r   r   r   )r   r   r   r   r   r   r   r   r   r   TFnparrayr   r   r   r   csgraphZbfirstdirectedZbfirst_test r   ]/var/www/sunrise/env/lib/python3.9/site-packages/scipy/sparse/csgraph/tests/test_traversal.pytest_graph_breadth_first	   s$    

r   c                  C   s   t g dg dg dg dg dg} t| dd} t g dg d	g d
g dg dg}dD ]}t| d|}tt|| q`d S )Nr   r   r   r   r   r   r   )r   r	   r   r   r   r   r   )r   r   r   r   r   )r   r   r   r	   r   r   r   r   r   r   r   r   )r   Zdfirstr   Zdfirst_testr   r   r   test_graph_depth_first   s$    

r   c                  C   sP   t dgg} t| dd} t dgg}dD ]}t| d|}tt|| q,d S Nr   r   r   r   r   r   r   r   &test_graph_breadth_first_trivial_graph1   s    r!   c                  C   sP   t dgg} t| dd} t dgg}dD ]}t| d|}tt|| q,d S r    r   r   r   r   r   $test_graph_depth_first_trivial_graph=   s    r"   r   TF	tree_funcc                 C   sd   t dgtjdgdggtjdfdd}|jjtjks8J | |d|d}tt|ddgddgg d S )Nr	   r   )dtype)r
   r
   )shape)r   )r   r   r   int64indicesr$   r   r   )r#   r   gtreer   r   r   test_int64_indicesI   s    &r*   )numpyr   ZpytestZnumpy.testingr   Zscipy.sparser   Zscipy.sparse.csgraphr   r   r   r   r   r   r!   r"   markZparametrizer*   r   r   r   r   <module>   s   