Skip to content

Commit fab6f30

Browse files
committed
Add empty sequence case in unitest
1 parent 35e7944 commit fab6f30

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

python/paddle/v2/framework/tests/test_seq_expand.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,14 @@ def set_data(self):
5050
self.inputs = {'X': (x_data, x_lod), 'Y': (y_data, y_lod)}
5151

5252

53+
class TestSeqExpandCase3(TestSeqExpand):
54+
def set_data(self):
55+
x_data = np.random.uniform(0.1, 1, [4, 1]).astype('float32')
56+
x_lod = [[0, 1, 2, 3, 4]]
57+
y_data = np.random.uniform(0.1, 1, [6, 1]).astype('float32')
58+
y_lod = [[0, 2, 4, 4, 6]]
59+
self.inputs = {'X': (x_data, x_lod), 'Y': (y_data, y_lod)}
60+
61+
5362
if __name__ == '__main__':
5463
unittest.main()

0 commit comments

Comments
 (0)