【Fix PIR Unittest No.462 BUAA】Fix some test case in PIR #66312
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Category
Others
PR Types
Others
Description
def test_start_dtype():
start = paddle.static.data(
shape=[1], dtype="float64", name="start"
)
paddle.linspace(start, 10, 1, dtype="float32")
# test_start_dtype()
self.assertRaises(ValueError, test_start_dtype)
在新版静态图测试下没有raise ValueError
调试方法:
首先注释掉self.assertRaises(ValueError, test_start_dtype)
添加test_start_dtype(),让旧版静态图测试挂掉
找到对应旧版静态图测试实现的功能,添加到新版静态图测试下