import pytest import numpy as np from scipy.spatial import cKDTree from damask import seeds class TestSeeds: @pytest.mark.parametrize('grid',[None,np.ones(3,dtype='i')*10]) def test_from_random(self,grid): N_seeds = np.random.randint(30,300) size = np.ones(3) + np.random.random(3) coords = seeds.from_random(size,N_seeds,grid) assert (0<=coords).all() and (coords=distance