2023-09-13 22:27:44 +00:00
|
|
|
import unittest
|
|
|
|
|
2023-11-20 00:39:39 +00:00
|
|
|
from onnx_web.chain.result import StageResult
|
2023-09-13 22:27:44 +00:00
|
|
|
from onnx_web.chain.upscale_highres import UpscaleHighresStage
|
|
|
|
from onnx_web.params import HighresParams, UpscaleParams
|
|
|
|
|
|
|
|
|
|
|
|
class UpscaleHighresStageTests(unittest.TestCase):
|
|
|
|
def test_empty(self):
|
|
|
|
stage = UpscaleHighresStage()
|
2023-11-19 03:35:00 +00:00
|
|
|
sources = StageResult.empty()
|
2023-11-20 05:18:57 +00:00
|
|
|
result = stage.run(
|
|
|
|
None,
|
|
|
|
None,
|
|
|
|
None,
|
|
|
|
None,
|
|
|
|
sources,
|
|
|
|
highres=HighresParams(False, 1, 0, 0),
|
|
|
|
upscale=UpscaleParams(""),
|
|
|
|
)
|
2024-01-06 02:13:57 +00:00
|
|
|
result.validate()
|
2023-09-13 22:27:44 +00:00
|
|
|
|
2023-09-14 03:56:23 +00:00
|
|
|
self.assertEqual(len(result), 0)
|