def test_y_offset(self):
    ttf = ImageFont.truetype('Tests/fonts/NotoNastaliqUrdu-Regular.ttf', FONT_SIZE)
    im = Image.new(mode='RGB', size=(300, 100))
    draw = ImageDraw.Draw(im)
    draw.text((0, 0), 'العالم العربي', font=ttf, fill=500)
    target = 'Tests/images/test_y_offset.png'
    target_img = Image.open(target)
    self.assert_image_similar(im, target_img, 1.7)
def test_y_offset(self):
    ttf = ImageFont.truetype('Tests/fonts/NotoNastaliqUrdu-Regular.ttf', FONT_SIZE)
    im = Image.new(mode='RGB', size=(300, 100))
    draw = ImageDraw.Draw(im)
    draw.text((0, 0), 'العالم العربي', font=ttf, fill=500)
    target = 'Tests/images/test_y_offset.png'
    target_img = Image.open(target)
    self.assert_image_similar(im, target_img, 1.7)