Skip to content

Commit

Permalink
🚧
Browse files Browse the repository at this point in the history
  • Loading branch information
aaarrti committed Apr 28, 2024
1 parent 7b91bd9 commit 6d0df67
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/functions/test_pytorch_model.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from collections import OrderedDict
from contextlib import nullcontext
from typing import Any, Union
from types import ModuleType
from typing import Union
import sys
from unittest.mock import MagicMock

import numpy as np
import pytest
Expand Down Expand Up @@ -308,7 +306,7 @@ def test_huggingface_classifier_predict(
def mock_transformers_not_installed(mocker: pytest_mock.MockerFixture):
mock_dict = {k: v for k, v in sys.modules.items() if "transformers" not in k}
mocker.patch.dict("sys.modules", mock_dict)
model = MagicMock(spec=None)
model = mocker.MagicMock(spec=None)
model.training = False
yield model
mocker.resetall(return_value=True, side_effect=True)
Expand Down

0 comments on commit 6d0df67

Please sign in to comment.