Unverified Commit 6125cc73 authored by Martin Isaksson's avatar Martin Isaksson
Browse files

Update on intervaltree implementation

parent 3243d353
Pipeline #146667563 passed with stage
in 4 minutes and 56 seconds
......@@ -376,13 +376,14 @@ def test_dimensions(pdf_document, config):
# If there are two columns, the gutter should be in the middle.
gutter = list(sorted(full_tree_x))[2]
# Margins are the first and last intervals
left_margin = list(sorted(full_tree_x))[0]
right_margin = list(sorted(full_tree_x))[-1]
top_margin = list(sorted(full_tree_y))[0]
bottom_margin = list(sorted(full_tree_y))[-1]
# Margins are the first and last intervals, the ignored parts
# are the left and right columns.
left_margin, _, gutter, _, right_margin = list(sorted(full_tree_x))
# For top and bottom margins, we only know they are the first and
# last elements in the list
full_tree_y_list = list(sorted(full_tree_y))
top_margin, bottom_margin = full_tree_y_list[::len(full_tree_y_list)-1]
gutter_width = get_interval_width(gutter)
left_margin_width = get_interval_width(left_margin)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment