fix tests for image module

This commit is contained in:
aceisace
2022-04-14 05:53:10 +02:00
parent 661aab45d4
commit c718d4831f
2 changed files with 13 additions and 3 deletions

View File

@@ -6,6 +6,10 @@ Copyright by aceisace
"""
import unittest
import requests
from PIL import Image
from inkycal.modules import Inkyimage as Module
from inkycal.custom import top_level
from helper_functions import *
@@ -15,7 +19,11 @@ environment = get_environment()
# Set to True to preview images. Only works on Raspberry Pi OS with Desktop
use_preview = False
test_path = f'{top_level}/Gallery/coffee.png'
url = "https://github.com/aceisace/Inkycal/raw/assets/Repo/coffee.png"
im = Image.open(requests.get(url, stream=True).raw)
im.save("test.png", "PNG")
test_path = "test.png"
tests = [
{