From e3190645ea81b7c11a53491241c90ed9b7d4a1e3 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Mon, 4 Dec 2023 11:27:21 +0800 Subject: [PATCH] `assertTrue` -> `assertIn` --- test/dygraph_to_static/test_place.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/dygraph_to_static/test_place.py b/test/dygraph_to_static/test_place.py index e40aea701a013..8ef18fc26441d 100644 --- a/test/dygraph_to_static/test_place.py +++ b/test/dygraph_to_static/test_place.py @@ -33,9 +33,7 @@ def test_place(self): self.assertIsNone(x.place()) self.assertTrue(len(w) == 1) if paddle.framework.use_pir_api(): - self.assertTrue( - "Value do not have 'place'" in str(w[-1].message) - ) + self.assertIn("Value do not have 'place'", str(w[-1].message)) if __name__ == '__main__':