)]}'
{"nova/tests/unit/utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"8c584807a43a15f8eb7437c1f66f826d863d7290","unresolved":false,"context_lines":[{"line_number":327,"context_line":"              but it shouldn\u0027t::"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"                # Duplicated item"},{"line_number":330,"context_line":"                my_mock(..., listy_kwarg\u003d[\u0027foo\u0027, \u0027foo\u0027, \u0027bar\u0027, \u0027baz\u0027], ...)"},{"line_number":331,"context_line":"    \"\"\""},{"line_number":332,"context_line":"    def __init__(self, iterable):"},{"line_number":333,"context_line":"        self.items \u003d set(iterable)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_90e6aa4a","line":330,"updated":"2019-10-18 14:47:23.000000000","message":"I considered testing the len(), but that will spuriously succeed with e.g. [1, 1, 2] \u003d\u003d [1, 2, 2].\n\nI could avoid the problem by enforcing that `iterable` and `other` be actual lists, and sorting them to compare them. But this is way simpler, and yagni.","commit_id":"8e73efa9f3f21ce7b336ca1d37f0da052ed6aa98"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"06c5c72dbe72fe6071f99e9ce0ee5ae451f5255a","unresolved":false,"context_lines":[{"line_number":323,"context_line":"    But the following will fail::"},{"line_number":324,"context_line":"        my_mock(..., listy_kwarg\u003d[\u0027foo\u0027, \u0027bar\u0027], ...)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    .. todo:: Because we internally use set()s, the following will **pass**,"},{"line_number":327,"context_line":"              but it shouldn\u0027t::"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"                # Duplicated item"},{"line_number":330,"context_line":"                my_mock(..., listy_kwarg\u003d[\u0027foo\u0027, \u0027foo\u0027, \u0027bar\u0027, \u0027baz\u0027], ...)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_dcb431d4","line":327,"range":{"start_line":326,"start_character":0,"end_line":327,"end_character":32},"updated":"2019-10-21 08:24:50.000000000","message":"I think a collections.Counter (a.k.a a bag) can solve it.\n\n    assert collections.Counter([]) !\u003d collections.Counter([1])\n    assert collections.Counter({}) !\u003d collections.Counter((1,))\n    assert collections.Counter({}) !\u003d collections.Counter({1})\n\n    assert collections.Counter([1]) \u003d\u003d collections.Counter({1})\n    assert collections.Counter([1, 2, 3]) \u003d\u003d collections.Counter([3, 2, 1])\n    assert collections.Counter([3, 2, 1]) \u003d\u003d collections.Counter(range(1, 4))\n\n    assert collections.Counter([1, 1, 2]) !\u003d collections.Counter([1, 2, 2])\n    assert (collections.Counter([1, 2, 2, 3])\n            !\u003d collections.Counter(range(1, 4)))\n\n\nSee my followup in https://review.opendev.org/689690","commit_id":"acb8b7c4a43008ded820c777fee157e8085ca6a7"}]}
