From 78f4636a615014fa4feb737d66d23a227ab5a17e Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 13 Sep 2026 20:01:27 +0200 Subject: [PATCH] Fix order-dependent failure in TestGetValidHistoryWithoutCurrent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/entrypoints/test_fix_command.py sets TF_HISTORY, which makes the real _get_raw_command call get_all_executables() and memoize the machine's actual PATH. TestGetValidHistoryWithoutCurrent then mocks thefuck.utils.Path to plant a fake café binary, but gets the stale memoized list, so the café history line is filtered out and the four parametrized cases fail whenever the entrypoint tests ran first. Use the existing no_memoize fixture, like the neighboring executables tests already do. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- tests/test_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_utils.py b/tests/test_utils.py index 95f92bc..ce47e92 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -234,6 +234,7 @@ class TestCache(object): assert shelve == {key: {'etag': '0', 'value': 'test'}} +@pytest.mark.usefixtures('no_memoize') class TestGetValidHistoryWithoutCurrent(object): @pytest.fixture(autouse=True) def fail_on_warning(self):