-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix an issue where the text would not be vertically centered
- Loading branch information
Showing
4 changed files
with
68 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
|
||
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) | ||
|
||
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters