From 9a6dafd569db0d0b5dc9d7b5b34b17e3f411a9ee Mon Sep 17 00:00:00 2001 From: Paul Vinciguerra Date: Wed, 6 Mar 2019 15:11:28 -0800 Subject: Tests: use self.assertNotIn(). Many tests use self.assertEqual(error.find("failed"), -1) Use self.assertNotIn("failed", error) to provide more meaningful errors such as AssertionError: 'Failed' not found in '' instead of 0 != -1. Change-Id: I670acdc977b788b2cedf94cfeafc12097781463f Signed-off-by: Paul Vinciguerra --- test/test_ip_mcast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test_ip_mcast.py') diff --git a/test/test_ip_mcast.py b/test/test_ip_mcast.py index cca4f802089..41c6f3bdcaa 100644 --- a/test/test_ip_mcast.py +++ b/test/test_ip_mcast.py @@ -34,7 +34,7 @@ class TestMFIB(VppTestCase): if error: self.logger.critical(error) - self.assertEqual(error.find("Failed"), -1) + self.assertNotIn("Failed", error) class TestIPMcast(VppTestCase): -- cgit 1.2.3-korg