1
0
Fork 0
onnx-web/api/tests/chain/test_reduce_crop.py

25 lines
655 B
Python
Raw Normal View History

2023-09-14 03:56:23 +00:00
import unittest
from onnx_web.chain.reduce_crop import ReduceCropStage
from onnx_web.chain.result import StageResult
2023-09-14 03:56:23 +00:00
from onnx_web.params import HighresParams, Size, UpscaleParams
class ReduceCropStageTests(unittest.TestCase):
def test_empty(self):
stage = ReduceCropStage()
sources = StageResult.empty()
2023-09-14 03:56:23 +00:00
result = stage.run(
None,
None,
None,
None,
sources,
highres=HighresParams(False, 1, 0, 0),
upscale=UpscaleParams(""),
origin=Size(0, 0),
size=Size(128, 128),
)
self.assertEqual(len(result), 0)