Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In test_lru.py: line 121 test_update() #19

Open
ArchieMeng opened this issue Jun 20, 2017 · 0 comments
Open

In test_lru.py: line 121 test_update() #19

ArchieMeng opened this issue Jun 20, 2017 · 0 comments

Comments

@ArchieMeng
Copy link

You test command l.update({'a':1, 'b':2})
But in Python, the order that 'a' and 'b' is visited is random.
So it might update key 'b' first, and then b become the last node in LRU,
at last, self.assertEqual(('b', 2), l.peek_first_item()) might fail.

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

No branches or pull requests

1 participant