fix an issue where the text would not be vertically centered
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
"""
|
||||
Test the functions in the functions module.
|
||||
"""
|
||||
import unittest
|
||||
|
||||
from PIL import Image, ImageFont
|
||||
from inkycal.custom import write, fonts
|
||||
|
||||
from inkycal.custom import write, fonts, get_system_tz
|
||||
|
||||
|
||||
def test_write():
|
||||
im = Image.new("RGB", (500, 200), "white")
|
||||
font = ImageFont.truetype(fonts['NotoSans-SemiCondensed'], size = 40)
|
||||
write(im, (125,75), (250, 50), "Hello World", font)
|
||||
# im.show()
|
||||
class TestIcalendar(unittest.TestCase):
|
||||
|
||||
def test_write(self):
|
||||
im = Image.new("RGB", (500, 200), "white")
|
||||
font = ImageFont.truetype(fonts['NotoSans-SemiCondensed'], size=40)
|
||||
write(im, (125, 75), (250, 50), "Hello World", font)
|
||||
# im.show()
|
||||
|
||||
def test_get_system_tz(self):
|
||||
tz = get_system_tz()
|
||||
assert isinstance(tz, str)
|
||||
|
||||
|
@@ -20,7 +20,7 @@ tests = [
|
||||
{
|
||||
"name": "Calendar",
|
||||
"config": {
|
||||
"size": [500, 500],
|
||||
"size": [500, 600],
|
||||
"week_starts_on": "Monday",
|
||||
"show_events": True,
|
||||
"ical_urls": sample_url,
|
||||
|
Reference in New Issue
Block a user