
    <i                     <    S SK rSSKJr  S rS rS rS rS rS	 r	g)
    N   )Networkc                  `    [        SS5      n U R                  S:X  a  U R                  S:X  d   eg)z
Test the canvas size
i  N)r   widthheightnets    M/home/james-whalen/.local/lib/python3.13/site-packages/pyvis/tests/test_me.pytest_canvas_sizer      s0     #s
C99

c 121 1    c                      [        5       n U R                  SS5        SU R                  S   R                  5       ;   d   eg)z$
Test adding a node to the network.
r   TestN)r   add_nodenodesvaluesr   s    r
   test_add_noder      s8     )CLLFSYYq\((**+*r   c                      [        5       n [        S5       H!  nU R                  US[        U5      -   5        M#     [	        U R
                  5      S:X  d   eg)z,
Test adding multiple nodes to this network

   zTest N)r   ranger   strlenr   r	   is     r
   test_add_ten_nodesr      sH     )C2YQ#a&()  syy>R r   c                     ^ [        5       n / SQmU R                  SSSSS9  U R                  SSS	S
S9  U R                  SSSSS9  U4S jU R                   5       (       d   eg)z*
Test adding nodes with different options
)r         r   zNode 0greenr   )colorsize   zNode 1bluer   r   zNode 2yellowr   c              3   @   >#    U  H  nTUS       US   :H  v   M     g7f)idr    N ).0nodesizess     r
   	<genexpr>.test_add_nodes_with_options.<locals>.<genexpr>1   s#     
C5dV,s   N)r   r   r   )r	   r)   s    @r
   test_add_nodes_with_optionsr,   %   sb     )CELLHG"L5LLHFL4LLHH2L6
C
C
CC
Cr   c                     [        5       n [        S5       H!  nU R                  US[        U5      -   5        M#     U R	                  SS5        U R	                  SS5        U R	                  SS5        U R	                  SS5        U R	                  SS5        U R	                  SS	5        U R	                  SS
5        U R	                  SS5        U R	                  SS5        U R                  5       S   [        / SQ5      :X  d   eg)z#
Test adding an edge between nodes
r   zNode r   r!   r                     	   )	r   r!   r.   r/   r0   r1   r2   r3   r4   N)r   r   r   r   add_edgeget_adj_listsetr   s     r
   test_add_edger8   4   s    
 )C2YQ#a&()  LLALLALLALLALLALLALLALLALLAa C(C$DDEDr   c                      [         R                  " / SQ5      n [        5       nUR                  [         R                  " / SQ5      5        UR	                  5       / SQ:X  d   eg)zP
Test adding numpy array nodes since these
nodes will have specific numpy types
)r!   r   r.   r/   N)nparrayr   	add_nodes	get_nodes)
arrayNodesgs     r
   test_add_numpy_nodesr@   J   sB    
 )$J	AKK#$;;=I%%%r   )
numpyr:   networkr   r   r   r   r,   r8   r@   r&   r   r
   <module>rC      s+     3,	!DF,&r   