)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"999c51d6d9dbc0f3b7dd6acf67cdf4e95de4cf3f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix tests for call_until_true function."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I43009e18987c73be2412db10dc605e4fc6661d97"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bf659307_5a28d4e0","line":9,"updated":"2018-03-28 17:51:15.000000000","message":"Can you write the body of the commit message here to explain why and how to fix tests?","commit_id":"e60f423489c7acfba0100e208281930751ed370d"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"41940eb5917e2417d94835a1bcb2c32bf3bc251c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Federico Ressi \u003cfressi@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-06-06 14:38:18 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix tests for call_until_true function."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Unit tests for call_until_true function has to check"},{"line_number":10,"context_line":"if passed function is actually called expected number"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"5f7c97a3_b0557352","line":7,"updated":"2018-06-11 07:02:38.000000000","message":"very nit: The last period isn\u0027t necessary for the first line.\nhttps://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"d903e1db532018bbed51977c2bfdd689d7582906"}],"tempest/lib/common/thread.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"cad51bf27e7eba28f9157eb9ec751d9fbdceef09","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# This make disable relative module import"},{"line_number":17,"context_line":"from __future__ import absolute_import"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import six"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_a34e1994","line":18,"updated":"2018-06-04 14:26:15.000000000","message":"Might not need this file, as this can really just go into the consuming module itself, but will let others chime in.","commit_id":"930fdf98cf5457540fa2223b4ccb946019c9db04"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"cad51bf27e7eba28f9157eb9ec751d9fbdceef09","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if six.PY2:"},{"line_number":23,"context_line":"    # module thread is removed in Python 3"},{"line_number":24,"context_line":"    from thread import get_ident  # noqa: H237,F401"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"else:"},{"line_number":27,"context_line":"    # On Python3 thread module has been deprecated and get_ident has been moved"}],"source_content_type":"text/x-python","patch_set":26,"id":"5f7c97a3_633d61dc","line":24,"range":{"start_line":24,"start_character":42,"end_line":24,"end_character":46},"updated":"2018-06-04 14:26:15.000000000","message":"I see: [H237] Don\u0027t use modules that were removed in Python 3.","commit_id":"930fdf98cf5457540fa2223b4ccb946019c9db04"}],"tempest/tests/lib/common/utils/test_test_utils.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"3dc21287bfbf927d1046da3d5775174ed6cb218f","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        self.assertEqual("},{"line_number":90,"context_line":"            False, test_utils.call_until_true(set_value, timeout, sleep, False)"},{"line_number":91,"context_line":"        )"},{"line_number":92,"context_line":"        m_sleep.call_args_list \u003d [mock.call(sleep)] * 2"},{"line_number":93,"context_line":"        m_time.call_args_list \u003d [mock.call()] * 2"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @mock.patch(\u0027time.sleep\u0027)"},{"line_number":96,"context_line":"    @mock.patch(\u0027time.time\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_8b901697","side":"PARENT","line":93,"range":{"start_line":92,"start_character":8,"end_line":93,"end_character":49},"updated":"2018-04-02 17:34:47.000000000","message":"These look like syntax issues to me: https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.call_args_list\n\nLooks like they should\u0027ve been:\n\n    self.assertEqual([mock.call(sleep)] * 2, m_sleep.call_args_list)\n    self.assertEqual([mock.call()] * 2, m_time.call_args_list)","commit_id":"cad11526e3f5175722c26c4bae90f4357da9a067"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"707e05dea1650b4226c14b28b8350710c2964203","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        self.assertEqual("},{"line_number":90,"context_line":"            False, test_utils.call_until_true(set_value, timeout, sleep, False)"},{"line_number":91,"context_line":"        )"},{"line_number":92,"context_line":"        m_sleep.call_args_list \u003d [mock.call(sleep)] * 2"},{"line_number":93,"context_line":"        m_time.call_args_list \u003d [mock.call()] * 2"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @mock.patch(\u0027time.sleep\u0027)"},{"line_number":96,"context_line":"    @mock.patch(\u0027time.time\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_ebaf5227","side":"PARENT","line":93,"range":{"start_line":92,"start_character":8,"end_line":93,"end_character":49},"in_reply_to":"bf659307_8b901697","updated":"2018-04-02 18:20:14.000000000","message":"The old code is a bit messy. Anyway I saw problems with a race condition patching time.time: it looks like some other thread in the test runner uses the same function affecting the old test. A part this it doesn\u0027t check main function spec: calling target function.","commit_id":"cad11526e3f5175722c26c4bae90f4357da9a067"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"3dc21287bfbf927d1046da3d5775174ed6cb218f","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self.assertEqual("},{"line_number":121,"context_line":"            False, test_utils.call_until_true(set_value, timeout, sleep)"},{"line_number":122,"context_line":"        )"},{"line_number":123,"context_line":"        m_sleep.call_args_list \u003d [mock.call(sleep)] * 2"},{"line_number":124,"context_line":"        m_time.call_args_list \u003d [mock.call()] * 2"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_ab8b9a65","side":"PARENT","line":124,"range":{"start_line":123,"start_character":0,"end_line":124,"end_character":49},"updated":"2018-04-02 17:34:47.000000000","message":"Ditto.","commit_id":"cad11526e3f5175722c26c4bae90f4357da9a067"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"3dc21287bfbf927d1046da3d5775174ed6cb218f","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        # GIVEN"},{"line_number":131,"context_line":"        func \u003d mock.Mock(side_effect\u003dreturn_values)"},{"line_number":132,"context_line":"        sleep \u003d 10.  # this value has no effect as time.sleep is being mocked"},{"line_number":133,"context_line":"        sleep_func \u003d self._patch(\u0027time.sleep\u0027)"},{"line_number":134,"context_line":"        time_func \u003d self._patch_time(time_sequence)"},{"line_number":135,"context_line":"        args \u003d args or tuple()"},{"line_number":136,"context_line":"        kwargs \u003d kwargs or dict()"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_abb95a15","line":133,"range":{"start_line":133,"start_character":21,"end_line":133,"end_character":46},"updated":"2018-04-02 17:34:47.000000000","message":"We can use self.patch(\u0027time.sleep\u0027) here instead: https://github.com/openstack/tempest/blob/cad11526e3f5175722c26c4bae90f4357da9a067/tempest/tests/base.py#L21","commit_id":"09bcae3d53eb48d008d49086859d10d0c4344621"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"707e05dea1650b4226c14b28b8350710c2964203","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        # GIVEN"},{"line_number":131,"context_line":"        func \u003d mock.Mock(side_effect\u003dreturn_values)"},{"line_number":132,"context_line":"        sleep \u003d 10.  # this value has no effect as time.sleep is being mocked"},{"line_number":133,"context_line":"        sleep_func \u003d self._patch(\u0027time.sleep\u0027)"},{"line_number":134,"context_line":"        time_func \u003d self._patch_time(time_sequence)"},{"line_number":135,"context_line":"        args \u003d args or tuple()"},{"line_number":136,"context_line":"        kwargs \u003d kwargs or dict()"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_4bf3de74","line":133,"range":{"start_line":133,"start_character":21,"end_line":133,"end_character":46},"in_reply_to":"bf659307_abb95a15","updated":"2018-04-02 18:20:14.000000000","message":"Cool. I didn\u0027t saw it ;-)","commit_id":"09bcae3d53eb48d008d49086859d10d0c4344621"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"3dc21287bfbf927d1046da3d5775174ed6cb218f","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # call_until_true use a mocked function to make the test reliable"},{"line_number":151,"context_line":"        # and the test actually provide the right sequence of numbers to"},{"line_number":152,"context_line":"        # reproduce the behavior has to be tested"},{"line_number":153,"context_line":"        time_func._assert_called_n_times(time_func, len(time_sequence))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _patch_time(self, time_sequence):"},{"line_number":156,"context_line":"        # Iterator over time sequence"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_abfcfab4","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":17},"updated":"2018-04-02 17:34:47.000000000","message":"Should be:\n\n    self\n\nThis doesn\u0027t appear to be doing any assertions as you\u0027re calling this on mock obj.","commit_id":"09bcae3d53eb48d008d49086859d10d0c4344621"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"707e05dea1650b4226c14b28b8350710c2964203","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # call_until_true use a mocked function to make the test reliable"},{"line_number":151,"context_line":"        # and the test actually provide the right sequence of numbers to"},{"line_number":152,"context_line":"        # reproduce the behavior has to be tested"},{"line_number":153,"context_line":"        time_func._assert_called_n_times(time_func, len(time_sequence))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def _patch_time(self, time_sequence):"},{"line_number":156,"context_line":"        # Iterator over time sequence"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_8b7fb6a9","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":17},"in_reply_to":"bf659307_abfcfab4","updated":"2018-04-02 18:20:14.000000000","message":"ops :-o","commit_id":"09bcae3d53eb48d008d49086859d10d0c4344621"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"3dc21287bfbf927d1046da3d5775174ed6cb218f","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                # Other threads \u003d\u003e call original time function"},{"line_number":168,"context_line":"                return original_time()"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        return self._patch(\u0027time.time\u0027, side_effect\u003dmocked_time)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _patch(self, *args, **kwargs):"},{"line_number":173,"context_line":"        patch \u003d mock.patch(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_4b3afe98","line":170,"range":{"start_line":170,"start_character":15,"end_line":170,"end_character":38},"updated":"2018-04-02 17:34:47.000000000","message":"self.patch(\u0027time.time\u0027, ...)","commit_id":"09bcae3d53eb48d008d49086859d10d0c4344621"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"a2c9f2548b4c51851682af8d87307f60c409c904","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _test_call_until_true("},{"line_number":122,"context_line":"            self, return_values, duration, time_sequence,"},{"line_number":123,"context_line":"            args\u003dNone, kwargs\u003dNone):"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        # all values except the last are False"},{"line_number":126,"context_line":"        self.assertEqual([False] * len(return_values[:-1]), return_values[:-1])"}],"source_content_type":"text/x-python","patch_set":7,"id":"bf659307_64ea4fad","line":123,"updated":"2018-04-05 06:11:38.000000000","message":"I feel it\u0027s good to have docstrings for these arguments to understand this helper function.","commit_id":"9d42c9cabe823c12f4a8957fe327bc8696bcebeb"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"41c78d012ec28dc4ecf1cc0e1c447bcf38f3388e","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                return next(time_iterator)"},{"line_number":185,"context_line":"            else:"},{"line_number":186,"context_line":"                # Other threads \u003d\u003e call original time function"},{"line_number":187,"context_line":"                return original_time()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        return self.patch(\u0027time.time\u0027, side_effect\u003dmocked_time)"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bf659307_632a3091","line":187,"updated":"2018-04-06 02:44:03.000000000","message":"I think this causes an error like below. Do I miss something?\n\n \u003e\u003e\u003e import time\n \u003e\u003e\u003e original_time \u003d time.time()\n \u003e\u003e\u003e original_time\n 1522982384.827967\n \u003e\u003e\u003e original_time()\n Traceback (most recent call last):\n   File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n TypeError: \u0027float\u0027 object is not callable","commit_id":"1361ea0bc7c27bc586b9b4f12746fa285ffa9a99"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"00bac42e3360c475861c47307f3724954f569ef1","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                return next(time_iterator)"},{"line_number":185,"context_line":"            else:"},{"line_number":186,"context_line":"                # Other threads \u003d\u003e call original time function"},{"line_number":187,"context_line":"                return original_time()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        return self.patch(\u0027time.time\u0027, side_effect\u003dmocked_time)"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bf659307_1b75d8fa","line":187,"in_reply_to":"bf659307_632a3091","updated":"2018-04-06 06:52:01.000000000","message":"There is a bug indeed! Thanks for spotting it. We don\u0027t see failures on CI because it could happen only from a separate thread. I actually saw this interference happening only on my notebook until now, and I still don\u0027t know if is actually because of another thread. After applying this trick the test stopped failing.","commit_id":"1361ea0bc7c27bc586b9b4f12746fa285ffa9a99"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"191ac709f5b6b5bb1f78f8c3c72fb6b9e3c1f54f","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import time"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"from six.moves import _thread as thread"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from tempest.lib.common.utils import test_utils"},{"line_number":22,"context_line":"from tempest.lib import exceptions"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_102739cc","line":19,"range":{"start_line":19,"start_character":22,"end_line":19,"end_character":29},"updated":"2018-05-15 21:12:42.000000000","message":"nit: Is this the supported way to import this? I do see it listed under https://pythonhosted.org/six/#module-six.moves but not sure why it is renamed using _ prefix.\n\nOtherwise I believe it might be possible to do:\n\n\nimport threading\n...\ntry:\n    get_ident \u003d threading.get_ident\nexcept AttributeError:\n    get_ident \u003d lambda: threading.ident","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"57e8831b833dc04795d9090ee104e840befdeae3","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import time"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"from six.moves import _thread as thread"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from tempest.lib.common.utils import test_utils"},{"line_number":22,"context_line":"from tempest.lib import exceptions"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_e17d4d1c","line":19,"range":{"start_line":19,"start_character":22,"end_line":19,"end_character":29},"in_reply_to":"5f7c97a3_102739cc","updated":"2018-05-30 10:28:18.000000000","message":"The _thread name is because of the name given to this low level module in Python3 (probably now deprecated?)\n\nIt could be I should better use threading.local function for implementing this change.","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"191ac709f5b6b5bb1f78f8c3c72fb6b9e3c1f54f","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _test_call_until_true("},{"line_number":122,"context_line":"            self, return_values, duration, time_sequence,"},{"line_number":123,"context_line":"            args\u003dNone, kwargs\u003dNone):"},{"line_number":124,"context_line":"        \"\"\"Test call_until_true function"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param return_values: list of booleans values to be returned"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_d31a2b6d","line":123,"range":{"start_line":123,"start_character":12,"end_line":123,"end_character":34},"updated":"2018-05-15 21:12:42.000000000","message":"Why not just use *args, **kwargs here?","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"44ae72f9367af43d65eed8183e34d6110c82ca1c","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _test_call_until_true("},{"line_number":122,"context_line":"            self, return_values, duration, time_sequence,"},{"line_number":123,"context_line":"            args\u003dNone, kwargs\u003dNone):"},{"line_number":124,"context_line":"        \"\"\"Test call_until_true function"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param return_values: list of booleans values to be returned"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_bac992ac","line":123,"range":{"start_line":123,"start_character":12,"end_line":123,"end_character":34},"in_reply_to":"5f7c97a3_1eaa0370","updated":"2018-05-31 15:36:37.000000000","message":"Thanks, I missed this syntax.","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"d326e33f740aa91c18b5d73a2e22ef8a7895401d","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _test_call_until_true("},{"line_number":122,"context_line":"            self, return_values, duration, time_sequence,"},{"line_number":123,"context_line":"            args\u003dNone, kwargs\u003dNone):"},{"line_number":124,"context_line":"        \"\"\"Test call_until_true function"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        :param return_values: list of booleans values to be returned"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_1eaa0370","line":123,"range":{"start_line":123,"start_character":12,"end_line":123,"end_character":34},"in_reply_to":"5f7c97a3_d31a2b6d","updated":"2018-05-31 07:17:21.000000000","message":"Because I want to reserve the option to add more optional parameters in the future without having to modify all the calls to this method. It also make these calls more explicit regarding what is being tested. For example:\n\n self._test_call_until_true(\n     return_values\u003d[False, True],\n     duration\u003d30.,\n     time_sequence\u003d[10., 30., 60.],\n     args\u003d(1, 2),\n     kwargs\u003ddict(foo\u003d\u0027bar\u0027, bar\u003d\u0027foo\u0027))\n\nAbove call looks to me far more explicit to below one:\n\n self._test_call_until_true(\n     [False, True],\n     30.,\n     [10., 30., 60.],\n     1, 2,  # What are these?\n     foo\u003d\u0027bar\u0027, bar\u003d\u0027foo\u0027) # What are these?","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"191ac709f5b6b5bb1f78f8c3c72fb6b9e3c1f54f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        behavior when handling timeout condition. The sequence must"},{"line_number":136,"context_line":"        contain the exact number of values expected to be consumed by"},{"line_number":137,"context_line":"        each time call_until_true calls time.time function."},{"line_number":138,"context_line":"        :param args: squence of positional arguments to be passed"},{"line_number":139,"context_line":"        to call_until_true function."},{"line_number":140,"context_line":"        :param kwargs: squence of named arguments to be passed"},{"line_number":141,"context_line":"        to call_until_true function."}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_b01f656a","line":138,"range":{"start_line":138,"start_character":21,"end_line":138,"end_character":28},"updated":"2018-05-15 21:12:42.000000000","message":"sequence","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"d326e33f740aa91c18b5d73a2e22ef8a7895401d","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        behavior when handling timeout condition. The sequence must"},{"line_number":136,"context_line":"        contain the exact number of values expected to be consumed by"},{"line_number":137,"context_line":"        each time call_until_true calls time.time function."},{"line_number":138,"context_line":"        :param args: squence of positional arguments to be passed"},{"line_number":139,"context_line":"        to call_until_true function."},{"line_number":140,"context_line":"        :param kwargs: squence of named arguments to be passed"},{"line_number":141,"context_line":"        to call_until_true function."}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_9efdb36f","line":138,"range":{"start_line":138,"start_character":21,"end_line":138,"end_character":28},"in_reply_to":"5f7c97a3_b01f656a","updated":"2018-05-31 07:17:21.000000000","message":"Done","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"191ac709f5b6b5bb1f78f8c3c72fb6b9e3c1f54f","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        each time call_until_true calls time.time function."},{"line_number":138,"context_line":"        :param args: squence of positional arguments to be passed"},{"line_number":139,"context_line":"        to call_until_true function."},{"line_number":140,"context_line":"        :param kwargs: squence of named arguments to be passed"},{"line_number":141,"context_line":"        to call_until_true function."},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_50129163","line":140,"range":{"start_line":140,"start_character":23,"end_line":140,"end_character":30},"updated":"2018-05-15 21:12:42.000000000","message":"sequence","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"d326e33f740aa91c18b5d73a2e22ef8a7895401d","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        each time call_until_true calls time.time function."},{"line_number":138,"context_line":"        :param args: squence of positional arguments to be passed"},{"line_number":139,"context_line":"        to call_until_true function."},{"line_number":140,"context_line":"        :param kwargs: squence of named arguments to be passed"},{"line_number":141,"context_line":"        to call_until_true function."},{"line_number":142,"context_line":"        \"\"\""},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_fe0aa787","line":140,"range":{"start_line":140,"start_character":23,"end_line":140,"end_character":30},"in_reply_to":"5f7c97a3_50129163","updated":"2018-05-31 07:17:21.000000000","message":"Done","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"191ac709f5b6b5bb1f78f8c3c72fb6b9e3c1f54f","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        # all values except the last are False"},{"line_number":145,"context_line":"        self.assertEqual([False] * len(return_values[:-1]), return_values[:-1])"},{"line_number":146,"context_line":"        # last value can be True or False"},{"line_number":147,"context_line":"        self.assertIn(return_values[-1], [True, False])"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        # GIVEN"},{"line_number":150,"context_line":"        func \u003d mock.Mock(side_effect\u003dreturn_values)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_b3044f16","line":147,"range":{"start_line":147,"start_character":13,"end_line":147,"end_character":21},"updated":"2018-05-15 21:12:42.000000000","message":"Can also do:\n\n    self.assertIsInstance(return_values[-1], bool)","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"d326e33f740aa91c18b5d73a2e22ef8a7895401d","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        # all values except the last are False"},{"line_number":145,"context_line":"        self.assertEqual([False] * len(return_values[:-1]), return_values[:-1])"},{"line_number":146,"context_line":"        # last value can be True or False"},{"line_number":147,"context_line":"        self.assertIn(return_values[-1], [True, False])"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        # GIVEN"},{"line_number":150,"context_line":"        func \u003d mock.Mock(side_effect\u003dreturn_values)"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_febce7bb","line":147,"range":{"start_line":147,"start_character":13,"end_line":147,"end_character":21},"in_reply_to":"5f7c97a3_b3044f16","updated":"2018-05-31 07:17:21.000000000","message":"In this case assert In is more explicit about what I want and produced error in case of failure more clear. Than True and False are of class bool is just a detail I don\u0027t expect who have to fix failing code has to know.","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"191ac709f5b6b5bb1f78f8c3c72fb6b9e3c1f54f","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        return self.patch(\u0027time.time\u0027, side_effect\u003dmocked_time)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _test_func_calls(self, func, return_values, args, kwargs):"},{"line_number":192,"context_line":"        self._assert_called_n_times(func, len(return_values), *args, **kwargs)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _test_sleep_calls(self, sleep_func, return_values, sleep):"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_33391fd6","line":191,"range":{"start_line":191,"start_character":52,"end_line":191,"end_character":63},"updated":"2018-05-15 21:12:42.000000000","message":"Why not use *args, **kwargs?","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"},{"author":{"_account_id":27329,"name":"Federico Ressi","email":"fressi@redhat.com","username":"fressi_redhat"},"change_message_id":"d326e33f740aa91c18b5d73a2e22ef8a7895401d","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        return self.patch(\u0027time.time\u0027, side_effect\u003dmocked_time)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _test_func_calls(self, func, return_values, args, kwargs):"},{"line_number":192,"context_line":"        self._assert_called_n_times(func, len(return_values), *args, **kwargs)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _test_sleep_calls(self, sleep_func, return_values, sleep):"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_de07ab81","line":191,"range":{"start_line":191,"start_character":52,"end_line":191,"end_character":63},"in_reply_to":"5f7c97a3_33391fd6","updated":"2018-05-31 07:17:21.000000000","message":"Done","commit_id":"aa5f1732b9189c65ca1389e7a285dd66b7c2ac6a"}]}
