Fix order-dependent failure in TestGetValidHistoryWithoutCurrent

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 <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Alexander
2026-09-13 20:01:27 +02:00
parent 1d3e4b7e8a
commit 78f4636a61
+1
View File
@@ -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):