コード例 #1
0
ファイル: test_grid.py プロジェクト: openalea/container
def test_grid_can_have_a_single_cell():
    shape = ()
    for i in range(10):
        shape = shape + (1,)
        g = Grid(shape)
        assert len(g) == 1
        assert g.dim() == len(shape)
        assert tuple(g.shape()) == shape
コード例 #2
0
ファイル: test_grid.py プロジェクト: openalea/container
def test_grid_can_be_empty():
    g = Grid(())
    assert len(g) == 0
    assert g.dim() == 0
    assert tuple(g.shape()) == ()