)]}'
{"swiftclient/shell.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0a03bae5cb66925b6bd0c1f95ca92de80445c430","unresolved":false,"context_lines":[{"line_number":459,"context_line":""},{"line_number":460,"context_line":"            if options.totals and not options.long and not options.human:"},{"line_number":461,"context_line":"                output_manager.print_msg("},{"line_number":462,"context_line":"                    \"Listing totals only works with -l or --lh.\")"},{"line_number":463,"context_line":"        except SwiftError as e:"},{"line_number":464,"context_line":"            output_manager.error(e.value)"},{"line_number":465,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_16198822","line":462,"updated":"2014-10-29 16:15:30.000000000","message":"I would prefer the check to happen earlier (line 386) and exit if there is a bad combination of options","commit_id":"b3f24afe787df75f31f496f48726b9d3cbd76c9f"},{"author":{"_account_id":9963,"name":"Jiri Suchomel","email":"jiri.suchomel@suse.com","username":"jsuchome"},"change_message_id":"113953d609c59d286898aac2d4c2237b1179d8c6","unresolved":false,"context_lines":[{"line_number":459,"context_line":""},{"line_number":460,"context_line":"            if options.totals and not options.long and not options.human:"},{"line_number":461,"context_line":"                output_manager.print_msg("},{"line_number":462,"context_line":"                    \"Listing totals only works with -l or --lh.\")"},{"line_number":463,"context_line":"        except SwiftError as e:"},{"line_number":464,"context_line":"            output_manager.error(e.value)"},{"line_number":465,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_ea809848","line":462,"in_reply_to":"9aa7fdbe_16198822","updated":"2014-10-29 16:41:46.000000000","message":"Yes, that\u0027s also the option I\u0027ve considered. However, the output is still meaningful even with the wrong argument, so I thought it might be better to just warn the user...","commit_id":"b3f24afe787df75f31f496f48726b9d3cbd76c9f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"c20ca3e7ad322655b4475431068e131857612016","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            if options.totals and not options.long and not options.human:"},{"line_number":402,"context_line":"                output_manager.print_msg("},{"line_number":403,"context_line":"                    \"Listing totals only works with -l or --lh.\")"},{"line_number":404,"context_line":"                return"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"            for stats in stats_parts_gen:"},{"line_number":407,"context_line":"                total_count \u003d total_bytes \u003d 0"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_c3e1a3d1","line":404,"updated":"2014-11-13 15:49:36.000000000","message":"In this case we should exit with status 1 - use output_manager.error or see how delimiter option is handled at line 379","commit_id":"26f64e7f34d252c9d309d2506fe513a2d4241979"}],"tests/unit/test_shell.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"c20ca3e7ad322655b4475431068e131857612016","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        ]"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        argv \u003d [\"\", \"list\", \"--totals\"]"},{"line_number":222,"context_line":"        swiftclient.shell.main(argv)"},{"line_number":223,"context_line":"        connection.return_value.get_account.assert_has_calls([])"},{"line_number":224,"context_line":"        calls \u003d [mock.call(\u0027Listing totals only works with -l or --lh.\u0027)]"},{"line_number":225,"context_line":"        mock_print.assert_has_calls(calls)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_96327b0e","line":222,"updated":"2014-11-13 15:49:36.000000000","message":"Here I\u0027d expect to see:\n\n self.assertRaises(SystemExit, swiftclient.shell.main, argv)\n\nSee pattern at line 535 - however note that the mocking of sys.stdout  line 535 will only works because exit(msg) is called - if you use output_manager.error you will need to mock it - you may want to rebase onto the CaptureOutput patch","commit_id":"26f64e7f34d252c9d309d2506fe513a2d4241979"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b27e29d4f1552b2b328e2304f091c0ee00f42514","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        calls \u003d [mock.call(marker\u003d\u0027\u0027, prefix\u003dNone)]"},{"line_number":236,"context_line":"        connection.return_value.get_account.assert_has_calls(calls)"},{"line_number":237,"context_line":"        calls \u003d [mock.call(\u0027    6    3\u0027)]"},{"line_number":238,"context_line":"        mock_print.assert_has_calls(calls)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    @mock.patch(\u0027swiftclient.shell.OutputManager._print\u0027)"},{"line_number":241,"context_line":"    @mock.patch(\u0027swiftclient.service.Connection\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_0e84e4af","line":238,"updated":"2014-12-17 14:12:06.000000000","message":"This does not verify that *only* the totals are printed because assert_has_calls allows other calls to be in the call list. Should be:\n\n  mock_print.assert_called_once_with(\u0027    6    3\u0027)","commit_id":"e8c2e8c18c64bb3071949c51c13a283ff1623e1c"}]}
