diff --git a/src/__init__.py b/src/__init__.py index b374e76e7..c40d77665 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -20308,7 +20308,6 @@ def util_make_irect( *args, p0=None, p1=None, x0=None, y0=None, x1=None, y1=None a, b, c, d = util_make_rect( *args, p0=p0, p1=p1, x0=x0, y0=y0, x1=x1, y1=y1) def convert(x): ret = int(x) - assert ret == x return ret a = convert(a) b = convert(b) diff --git a/tests/test_geometry.py b/tests/test_geometry.py index ca776643c..506e2c7d0 100644 --- a/tests/test_geometry.py +++ b/tests/test_geometry.py @@ -335,3 +335,7 @@ def test_pageboxes(): for key in keys: assert doc.xref_get_key(page.xref, key) == ("array", "[100 142 400 642]") assert page.cropbox == page.artbox == page.bleedbox == page.trimbox + +def test_3163(): + b = {'number': 0, 'type': 0, 'bbox': (403.3577880859375, 330.8871765136719, 541.2731323242188, 349.5766296386719), 'lines': [{'spans': [{'size': 14.0, 'flags': 4, 'font': 'SFHello-Medium', 'color': 1907995, 'ascender': 1.07373046875, 'descender': -0.26123046875, 'text': 'Inclusion and diversity', 'origin': (403.3577880859375, 345.9194030761719), 'bbox': (403.3577880859375, 330.8871765136719, 541.2731323242188, 349.5766296386719)}], 'wmode': 0, 'dir': (1.0, 0.0), 'bbox': (403.3577880859375, 330.8871765136719, 541.2731323242188, 349.5766296386719)}]} + bbox = fitz.IRect(b["bbox"])