Skip to content

Commit 8c7006d

Browse files
committed
Fixes unit tests
1 parent f4005f4 commit 8c7006d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/unitary/with_extras/aqua/test_model.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@
4545
from ads.model.service.oci_datascience_model import OCIDataScienceModel
4646

4747

48+
# Fixture that reloads the module before any patching is applied.
49+
@pytest.fixture(autouse=True, scope="class")
50+
def reload_model_module():
51+
reload(ads.aqua.model.model)
52+
yield
53+
54+
4855
@pytest.fixture(autouse=True, scope="class")
4956
def mock_auth():
5057
with patch("ads.common.auth.default_signer") as mock_default_signer:
@@ -276,7 +283,7 @@ def setup_class(cls):
276283
os.environ["ODSC_MODEL_COMPARTMENT_OCID"] = TestDataset.SERVICE_COMPARTMENT_ID
277284
reload(ads.config)
278285
reload(ads.aqua)
279-
reload(ads.aqua.model.model)
286+
# reload(ads.aqua.model.model)
280287

281288
@classmethod
282289
def teardown_class(cls):

0 commit comments

Comments
 (0)