Skip to content

Commit

Permalink
Clean PROPER_CHILDREN
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Apr 14, 2023
1 parent 3bfa374 commit 90981d2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@
os.path.dirname(__file__), '..', 'weasyprint', 'css', 'tests_ua.css'
))

PROPER_CHILDREN = dict((key, tuple(map(tuple, value))) for key, value in {
PROPER_CHILDREN = {
# Children can be of *any* type in *one* of the lists.
boxes.BlockContainerBox: [[boxes.BlockLevelBox], [boxes.LineBox]],
boxes.LineBox: [[boxes.InlineLevelBox]],
boxes.InlineBox: [[boxes.InlineLevelBox]],
boxes.TableBox: [[boxes.TableCaptionBox,
boxes.TableColumnGroupBox, boxes.TableColumnBox,
boxes.TableRowGroupBox, boxes.TableRowBox]],
boxes.InlineTableBox: [[boxes.TableCaptionBox,
boxes.TableColumnGroupBox, boxes.TableColumnBox,
boxes.TableRowGroupBox, boxes.TableRowBox]],
boxes.TableColumnGroupBox: [[boxes.TableColumnBox]],
boxes.TableRowGroupBox: [[boxes.TableRowBox]],
boxes.TableRowBox: [[boxes.TableCellBox]],
}.items())
boxes.BlockContainerBox: ((boxes.BlockLevelBox,), (boxes.LineBox,)),
boxes.LineBox: ((boxes.InlineLevelBox,),),
boxes.InlineBox: ((boxes.InlineLevelBox,),),
boxes.TableBox: ((
boxes.TableCaptionBox, boxes.TableColumnGroupBox, boxes.TableColumnBox,
boxes.TableRowGroupBox, boxes.TableRowBox),),
boxes.InlineTableBox: ((
boxes.TableCaptionBox, boxes.TableColumnGroupBox, boxes.TableColumnBox,
boxes.TableRowGroupBox, boxes.TableRowBox),),
boxes.TableColumnGroupBox: ((boxes.TableColumnBox,),),
boxes.TableRowGroupBox: ((boxes.TableRowBox,),),
boxes.TableRowBox: ((boxes.TableCellBox,),),
}


class FakeHTML(HTML):
Expand Down

0 comments on commit 90981d2

Please sign in to comment.