diff --git a/src/transformers/testing_utils.py b/src/transformers/testing_utils.py index 4dcca595a1dc61..6469ffdd51b727 100644 --- a/src/transformers/testing_utils.py +++ b/src/transformers/testing_utils.py @@ -133,9 +133,9 @@ _is_mocked, _patch_unwrap_mock_aware, get_optionflags, - import_path, ) from _pytest.outcomes import skip + from _pytest.pathlib import import_path from pytest import DoctestItem else: Module = object