diff --git a/tests/common_test.py b/tests/common_test.py index 74224e6..778666f 100644 --- a/tests/common_test.py +++ b/tests/common_test.py @@ -2,6 +2,10 @@ from unittest import mock import importlib.resources +try: + from importlib.resources import files # ignore: type +except ImportError: # pragma: cover + from importlib_resources import files # ignore: type from swagger_spec_validator.common import read_file from swagger_spec_validator.common import read_resource_file @@ -19,5 +23,5 @@ def test_read_resource_file(monkeypatch): read_resource_file(resource_path) m.assert_called_once_with( - importlib.resources.files("swagger_spec_validator") / resource_path + files("swagger_spec_validator") / resource_path )