From 86b03626a12571e3f1343b57b66046bbbae6bcca Mon Sep 17 00:00:00 2001 From: Francesco Petrini Date: Wed, 27 Mar 2024 11:55:30 -0700 Subject: [PATCH] Gitbot Fixes --- qa/L0_shared_memory/shared_memory_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/L0_shared_memory/shared_memory_test.py b/qa/L0_shared_memory/shared_memory_test.py index 05e8694e53..4cfd682fd2 100755 --- a/qa/L0_shared_memory/shared_memory_test.py +++ b/qa/L0_shared_memory/shared_memory_test.py @@ -247,9 +247,9 @@ def test_invalid_create_shm(self, protocol): shm.destroy_shared_memory_region(shm_op0_handle) except Exception as ex: if self._test_windows: - self.assertTrue(str(ex) == "unable to create file mapping") + self.assertEqual(str(ex), "unable to create file mapping") else: - self.assertTrue(str(ex) == "unable to initialize the size") + self.assertEqual(str(ex), "unable to initialize the size") self._test_passed = True @parameterized.expand([("grpc"), ("http")]) @@ -271,7 +271,7 @@ def test_invalid_registration(self, protocol): ) except Exception as ex: print(str(ex)) - self.assertTrue("Unable to open shared memory region" in str(ex)) + self.assertIn("Unable to open shared memory region", str(ex)) self._test_passed = True @parameterized.expand([("grpc"), ("http")]) @@ -366,8 +366,8 @@ def test_reregister_after_register(self, protocol): "dummy_data", "/dummy_data", 8 ) except Exception as ex: - self.assertTrue( - "shared memory region 'dummy_data' already in manager" in str(ex) + self.assertIn( + "shared memory region 'dummy_data' already in manager", str(ex) ) shm_status = self._triton_client.get_system_shared_memory_status() if self._protocol == "http":