From 0ca6271697e95a2d68b50034a7673150b2772f13 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Sun, 3 Mar 2024 22:03:49 +0000 Subject: [PATCH] clear functools cache on each test --- tests/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index dd84756131c..7efefd8930a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -26,6 +26,7 @@ from poetry.config.dict_config_source import DictConfigSource from poetry.factory import Factory from poetry.layouts import layout +from poetry.packages.direct_origin import _get_package_from_git from poetry.repositories import Repository from poetry.repositories import RepositoryPool from poetry.utils.cache import ArtifactCache @@ -308,6 +309,8 @@ def git_mock(mocker: MockerFixture) -> None: p = mocker.patch("poetry.vcs.git.Git.get_revision") p.return_value = MOCK_DEFAULT_GIT_REVISION + _get_package_from_git.cache_clear() + @pytest.fixture def http() -> Iterator[type[httpretty.httpretty]]: