From 518c641c430ea0867f2f1cbf1b967a330fa1225f Mon Sep 17 00:00:00 2001 From: zhengqiwen1997 Date: Wed, 29 Mar 2023 08:57:21 +0000 Subject: [PATCH] add test case of same axis of roll --- python/tests/op_mappers/test_roll_op.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/tests/op_mappers/test_roll_op.py b/python/tests/op_mappers/test_roll_op.py index 55a731b5cf..efdf90555f 100644 --- a/python/tests/op_mappers/test_roll_op.py +++ b/python/tests/op_mappers/test_roll_op.py @@ -102,6 +102,15 @@ def init_input_data(self): self.shifts = [121, 122] +class TestRollCase7(TestRollOp): + def init_input_data(self): + self.feed_data = { + 'x': self.random([10, 2, 3], 'float32'), + } + self.axis = [0, 1, 1, -2, 2, 2, 1, -1] + self.shifts = [1, 2, 3, 4, 5, 6, 7, 8] + + class TestRollAxesEmpty(TestRollOp): def set_op_attrs(self): return {"shifts": self.shifts, "axis": []}