def test_make_grid_layout():
 tempdir = _TempDir()
 tmp_name = 'bar'
 lout_name = 'test_ica'
 lout_orig = read_layout(kind=lout_name, path=lout_path)
 layout = make_grid_layout(_get_test_info())
 layout.save(op.join(tempdir, (tmp_name + '.lout')))
 lout_new = read_layout(kind=tmp_name, path=tempdir)
 assert_array_equal(lout_new.kind, tmp_name)
 assert_array_equal(lout_orig.pos, lout_new.pos)
 assert_array_equal(lout_orig.names, lout_new.names)
 layout = make_grid_layout(_get_test_info(), n_col=2)
 assert_true((layout.pos[(0, 1)] == layout.pos[(1, 1)]))
 assert_true((layout.pos[(0, 0)] != layout.pos[(1, 0)]))
 assert_array_equal(layout.pos[0, 3:], layout.pos[1, 3:])

def test_make_grid_layout ( ) : tempdir = _TempDir ( ) tmp_name = 'bar' lout_name = 'test_ica' lout_orig = read_layout ( kind = lout_name , path = lout_path ) layout = make_grid_layout ( _get_test_info ( ) ) layout . save ( op . join ( tempdir , ( tmp_name + '.lout' ) ) ) lout_new = read_layout ( kind = tmp_name , path = tempdir ) assert_array_equal ( lout_new . kind , tmp_name ) assert_array_equal ( lout_orig . pos , lout_new . pos ) assert_array_equal ( lout_orig . names , lout_new . names ) layout = make_grid_layout ( _get_test_info ( ) , n_col = 2 ) assert_true ( ( layout . pos [ ( 0 , 1 ) ] == layout . pos [ ( 1 , 1 ) ] ) ) assert_true ( ( layout . pos [ ( 0 , 0 ) ] != layout . pos [ ( 1 , 0 ) ] ) ) assert_array_equal ( layout . pos [ 0 , 3 : ] , layout . pos [ 1 , 3 : ] )
test creation of grid layout .