Skip to content

Commit

Permalink
Test overflowing images
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Mar 16, 2024
1 parent f2ad633 commit 0997d0c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/draw/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@
________
'''

centered_image_overflow = '''
________
________
__rBBBBB
__BBBBBB
__BBBBBB
__BBBBBB
__BBBBBB
__BBBBBB
'''

resized_image = '''
____________
____________
Expand Down Expand Up @@ -176,6 +187,15 @@ def test_resized_images(assert_pixels, filename):
<div><img src="%s"></div>''' % filename)


def test_image_overflow(assert_pixels):
assert_pixels(centered_image_overflow, '''
<style>
@page { size: 8px }
body { margin: 2px 0 0 2px; font-size: 0 }
</style>
<div><img src="pattern.svg"></div>''')


@assert_no_logs
@pytest.mark.parametrize('viewbox, width, height', (
(None, None, None),
Expand Down

0 comments on commit 0997d0c

Please sign in to comment.