diff --git a/qa/L0_lifecycle/lifecycle_test.py b/qa/L0_lifecycle/lifecycle_test.py index 8ba271d201..00d052c17f 100755 --- a/qa/L0_lifecycle/lifecycle_test.py +++ b/qa/L0_lifecycle/lifecycle_test.py @@ -3427,7 +3427,7 @@ def test_add_custom_config(self): except Exception as ex: self.assertTrue(False, "unexpected error {}".format(ex)) - # Run inference on the model on all versions + # Run inference on the model on all versions. Only version 1, 3 should work. for model_name, model_shape in zip(models_base, models_shape): try: iu.infer_exact( @@ -3453,14 +3453,11 @@ def test_add_custom_config(self): np.float32, np.float32, np.float32, - swap=False, - model_version=2, - ) - self.assertTrue( - False, "expected error for unavailable model " + model_name + swap=True, + model_version=3, ) except Exception as ex: - self.assertIn("Request for unknown model", ex.message()) + self.assertTrue(False, "unexpected error {}".format(ex)) try: iu.infer_exact( @@ -3471,11 +3468,13 @@ def test_add_custom_config(self): np.float32, np.float32, np.float32, - swap=True, - model_version=3, + model_version=2, + ) + self.assertTrue( + False, "expected error for unavailable model " + model_name ) except Exception as ex: - self.assertTrue(False, "unexpected error {}".format(ex)) + self.assertIn("Request for unknown model", ex.message()) # Add custom model configuration, which cause model to be # re-loaded and use custom config inside configs folder, which @@ -3502,7 +3501,7 @@ def test_add_custom_config(self): except Exception as ex: self.assertTrue(False, "unexpected error {}".format(ex)) - # Only version 2 should work... + # Only version 2 should work. for model_name, model_shape in zip(models_base, models_shape): try: iu.infer_exact( @@ -3528,7 +3527,6 @@ def test_add_custom_config(self): np.float32, np.float32, np.float32, - swap=False, model_version=1, ) self.assertTrue( @@ -3546,7 +3544,6 @@ def test_add_custom_config(self): np.float32, np.float32, np.float32, - swap=False, model_version=3, ) self.assertTrue( @@ -3577,7 +3574,7 @@ def test_delete_custom_config(self): except Exception as ex: self.assertTrue(False, "unexpected error {}".format(ex)) - # Run inference on the model on all versions + # Run inference on the model on all versions. Only version 2 should work. for model_name, model_shape in zip(models_base, models_shape): try: iu.infer_exact( @@ -3588,14 +3585,11 @@ def test_delete_custom_config(self): np.float32, np.float32, np.float32, - swap=False, - model_version=1, - ) - self.assertTrue( - False, "expected error for unavailable model " + model_name + swap=True, + model_version=2, ) except Exception as ex: - self.assertIn("Request for unknown model", ex.message()) + self.assertTrue(False, "unexpected error {}".format(ex)) try: iu.infer_exact( @@ -3606,11 +3600,13 @@ def test_delete_custom_config(self): np.float32, np.float32, np.float32, - swap=True, - model_version=2, + model_version=1, + ) + self.assertTrue( + False, "expected error for unavailable model " + model_name ) except Exception as ex: - self.assertTrue(False, "unexpected error {}".format(ex)) + self.assertIn("Request for unknown model", ex.message()) try: iu.infer_exact( @@ -3621,7 +3617,6 @@ def test_delete_custom_config(self): np.float32, np.float32, np.float32, - swap=False, model_version=3, ) self.assertTrue( @@ -3651,7 +3646,7 @@ def test_delete_custom_config(self): except Exception as ex: self.assertTrue(False, "unexpected error {}".format(ex)) - # Only version 1, 3 should work... + # Only version 1, 3 should work. for model_name, model_shape in zip(models_base, models_shape): try: iu.infer_exact( @@ -3692,7 +3687,6 @@ def test_delete_custom_config(self): np.float32, np.float32, np.float32, - swap=False, model_version=2, ) self.assertTrue(