Skip to content

Commit

Permalink
tests(*): updated test file paths and removed unused dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: k4yt3x <i@k4yt3x.com>
  • Loading branch information
k4yt3x committed Sep 24, 2023
1 parent 7c70032 commit b4b7cad
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/test_upscaler.py
@@ -1,9 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

import ctypes
import multiprocessing
import os
from pathlib import Path

import utils
Expand All @@ -14,9 +11,11 @@

def test_upscaling():
video2x = Video2X()
output_path = Path("data/test_video_output.mp4")

output_path = Path("tests/data/test_video_output.mp4")

video2x.upscale(
Path("data/test_video.mp4"),
Path("tests/data/test_video.mp4"),
output_path,
None,
720,
Expand All @@ -32,9 +31,9 @@ def test_upscale_image():
# initialize upscaler instance
upscaler = Upscaler()

image = Image.open("data/test_image.png")
image = Image.open("tests/data/test_image.png")
upscaled_image = upscaler.upscale_image(image, 1680, 960, "waifu2x", 3)
reference_image = Image.open("data/test_image_ref.png")
reference_image = Image.open("tests/data/test_image_ref.png")
assert utils.get_image_diff(upscaled_image, reference_image) < 0.5


Expand Down

0 comments on commit b4b7cad

Please sign in to comment.