Coverage for nilearn/plotting/tests/conftest.py: 0%

11 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-16 12:32 +0200

1"""Fixtures for tests for plotting.""" 

2 

3import numpy as np 

4import pytest 

5 

6 

7@pytest.fixture 

8def adjacency(): 

9 """Adjacency matrix symmetric up to 1e-3 relative tolerance.""" 

10 return np.array( 

11 [ 

12 [1.0, -2.0, 0.3, 0.0], 

13 [-2.002, 1, 0.0, 0.0], 

14 [0.3, 0.0, 1.0, 0.0], 

15 [0.0, 0.0, 0.0, 1.0], 

16 ] 

17 ) 

18 

19 

20@pytest.fixture 

21def node_coords(): 

22 """Array of node coordinates for testing.""" 

23 return np.arange(3 * 4).reshape(4, 3) 

24 

25 

26@pytest.fixture 

27def params_plot_connectome(): 

28 """Return basic set of parameters for testing plot_connectome.""" 

29 return {"edge_threshold": 0.38, "title": "threshold=0.38", "node_size": 10}