Skip to content

Commit 17f9e4f

Browse files
author
Zerline
committed
Testing removing cells from a standard tableau.
1 parent 24fd41a commit 17f9e4f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sage_widget_adapters/combinat/tableau_grid_view_adapter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,20 @@ def remove_cell(self, obj, pos, dirty={}):
166166
sage: ta = TableauGridViewAdapter()
167167
sage: ta.remove_cell(t, (1, 1))
168168
[[1, 2, 5, 6], [3], [4]]
169+
sage: ta.remove_cell(t, (2, 0))
170+
[[1, 2, 5, 6], [3, 7]]
169171
sage: ta.remove_cell(t, (2, 1))
170172
Traceback (most recent call last):
171173
...
172174
ValueError: Cell position '(2, 1)' is not removable.
175+
sage: from sage.combinat.tableau import StandardTableau
176+
sage: from sage_widget_adapters.combinat.tableau_grid_view_adapter import StandardTableauGridViewAdapter
177+
sage: st = StandardTableau([[1, 2, 5, 6], [3, 7], [4]])
178+
sage: sta = StandardTableauGridViewAdapter()
179+
sage: sta.remove_cell(st, (1, 1))
180+
[[1, 2, 5, 6], [3], [4]]
181+
sage: sta.remove_cell(st, (2, 0))
182+
ValueError('the entries in a standard tableau must be in bijection with 1,2,...,n',)
173183
"""
174184
if not pos in self.removable_cells(obj):
175185
raise ValueError("Cell position '%s' is not removable." % str(pos))

0 commit comments

Comments
 (0)