Replace resolution tuple with dataclass

This commit is contained in:
2022-08-08 11:23:49 +02:00
parent 0212937aa1
commit 29bca4dd18
4 changed files with 23 additions and 14 deletions

View File

@ -2,14 +2,14 @@ import imghdr
import os
from discord_embed import settings
from discord_embed.video import make_thumbnail, video_resolution
from discord_embed.video import Resolution, make_thumbnail, video_resolution
TEST_FILE = "tests/test.mp4"
def test_video_resolution():
"""Test video_resolution() works."""
assert video_resolution(TEST_FILE) == (422, 422)
assert video_resolution(TEST_FILE) == Resolution(height=422, width=422)
def test_make_thumbnail():