def test_random_fill_sparse(): size_rows = 2 size_cols = 5 myTab = numpy.zeros([size_rows, size_cols], dtype=str) v = size_rows * size_cols vfill = algo.alea(v) result = numpy.sum(algo.random_fill_sparse(myTab, vfill) == 'X') assert result == vfill
def test_random_fill_sparse(): ## #@details Testing random fill #First basic test n=5; tab=numpy.chararray((n, n)); tab[:] = ''; v= tab.size; random = algo.alea(v); result = algo.random_fill_sparse(tab,random);
def test_alea_integers_Ok(): assert S1.alea(5) == 4
def test_alea_Right(): result = sa.alea(10) assert result <= 10 and result >= 0
def test_alea(): assert main.alea(5)
def test_alea(): nb_test = tobetested.alea() assert type(nb_test) == int