Inkycal/tests/test_functions.py

23 lines
535 B
Python
Raw Permalink Normal View History

2024-02-08 12:51:06 +01:00
"""
Test the functions in the functions module.
"""
import unittest
2024-02-08 12:51:06 +01:00
from PIL import Image, ImageFont
from inkycal.custom import write, fonts, get_system_tz
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)
2024-02-08 12:51:06 +01:00