Skip to content

Conversation

@jzysak25
Copy link

There is a flaky test in ClassifyTest test_init by running:

pytest --flake-finder

The failed test is due to the uncleaned cache for test rerunning. When cache existed, the _load_cache will not be called and the assertion will fail
failed to assert:

mock_load.assert_called_once_with('random')

Solution:
added a getter to see whether the cache is created.

Changed code passed all flaky rerun and normal pytest runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant