Skip to content

Commit

Permalink
add poly test case
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Oct 11, 2024
1 parent 60d0c79 commit 6867d98
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/common/test_utils_reconstitution.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ def test_synthesize_page():
assert isinstance(render_one_line, np.ndarray)
assert render_one_line.shape == (*pages[0].dimensions, 3)

# Test with polygons
pages_poly = pages[0].export()
pages_poly["blocks"][0]["lines"][0]["geometry"] = [(0, 0), (0, 1), (1, 1), (1, 0)]
render_poly = reconstitution.synthesize_page(pages_poly, draw_proba=True)
assert isinstance(render_poly, np.ndarray)
assert render_poly.shape == (*pages[0].dimensions, 3)


def test_synthesize_kie_page():
pages = _mock_kie_pages()
Expand Down

0 comments on commit 6867d98

Please sign in to comment.