)]}'
{"os_testr/ostestr.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59cfc9e23ce6d013f9fe1a362a709cae4365c491","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    group_regex \u003d None"},{"line_number":116,"context_line":"    if not os.path.isfile(\u0027.stestr.conf\u0027) and os.path.isfile(\u0027.testr.conf\u0027):"},{"line_number":117,"context_line":"        msg \u003d (\u0027No .stestr.conf file found in the CWD. Please create one to \u0027"},{"line_number":118,"context_line":"               \u0027to replace the .testr.conf. You can find a script to do this \u0027"},{"line_number":119,"context_line":"               \u0027in the stestr git repository.\u0027)"},{"line_number":120,"context_line":"        warnings.warn(msg)"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7f287b81_e4192188","line":118,"range":{"start_line":118,"start_character":16,"end_line":118,"end_character":19},"updated":"2017-09-06 16:58:18.000000000","message":"double \"to\"","commit_id":"7dd678e3720c326afb3ca7adfd01ec7324d5f5c7"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"f14779c5011ce8bfca93abbd17e462eaa6f40626","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    group_regex \u003d None"},{"line_number":116,"context_line":"    if not os.path.isfile(\u0027.stestr.conf\u0027) and os.path.isfile(\u0027.testr.conf\u0027):"},{"line_number":117,"context_line":"        msg \u003d (\u0027No .stestr.conf file found in the CWD. Please create one to \u0027"},{"line_number":118,"context_line":"               \u0027to replace the .testr.conf. You can find a script to do this \u0027"},{"line_number":119,"context_line":"               \u0027in the stestr git repository.\u0027)"},{"line_number":120,"context_line":"        warnings.warn(msg)"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7f287b81_014d3c99","line":118,"range":{"start_line":118,"start_character":16,"end_line":118,"end_character":19},"in_reply_to":"7f287b81_e4192188","updated":"2017-09-06 17:54:07.000000000","message":"We can fix this in a follow up change after this merges.","commit_id":"7dd678e3720c326afb3ca7adfd01ec7324d5f5c7"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"59cfc9e23ce6d013f9fe1a362a709cae4365c491","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    test_dir \u003d None"},{"line_number":114,"context_line":"    top_dir \u003d None"},{"line_number":115,"context_line":"    group_regex \u003d None"},{"line_number":116,"context_line":"    if not os.path.isfile(\u0027.stestr.conf\u0027) and os.path.isfile(\u0027.testr.conf\u0027):"},{"line_number":117,"context_line":"        msg \u003d (\u0027No .stestr.conf file found in the CWD. Please create one to \u0027"},{"line_number":118,"context_line":"               \u0027to replace the .testr.conf. You can find a script to do this \u0027"},{"line_number":119,"context_line":"               \u0027in the stestr git repository.\u0027)"},{"line_number":120,"context_line":"        warnings.warn(msg)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        with open(\u0027.testr.conf\u0027, \u0027r\u0027) as testr_conf_file:"},{"line_number":123,"context_line":"            config \u003d six.moves.configparser.ConfigParser()"},{"line_number":124,"context_line":"            config.readfp(testr_conf_file)"},{"line_number":125,"context_line":"            test_command \u003d config.get(\u0027DEFAULT\u0027, \u0027test_command\u0027)"},{"line_number":126,"context_line":"            group_regex \u003d None"},{"line_number":127,"context_line":"            if config.has_option(\u0027DEFAULT\u0027, \u0027group_regex\u0027):"},{"line_number":128,"context_line":"                group_regex \u003d config.get(\u0027DEFAULT\u0027, \u0027group_regex\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        for line in test_command.split(\u0027\\n\u0027):"},{"line_number":131,"context_line":"            if \u0027subunit.run discover\u0027 in line:"},{"line_number":132,"context_line":"                command_parts \u003d line.split(\u0027 \u0027)"},{"line_number":133,"context_line":"                top_dir_present \u003d \u0027-t\u0027 in line"},{"line_number":134,"context_line":"                for idx, val in enumerate(command_parts):"},{"line_number":135,"context_line":"                    if top_dir_present:"},{"line_number":136,"context_line":"                        if val \u003d\u003d \u0027-t\u0027:"},{"line_number":137,"context_line":"                            top_dir \u003d command_parts[idx + 1]"},{"line_number":138,"context_line":"                            test_dir \u003d command_parts[idx + 2]"},{"line_number":139,"context_line":"                    else:"},{"line_number":140,"context_line":"                        if val \u003d\u003d \u0027discover\u0027:"},{"line_number":141,"context_line":"                            test_dir \u003d command_parts[idx + 2]"},{"line_number":142,"context_line":"    elif not os.path.isfile("},{"line_number":143,"context_line":"        \u0027.testr.conf\u0027) and not os.path.isfile(\u0027.stestr.conf\u0027):"},{"line_number":144,"context_line":"        msg \u003d (\u0027No .stestr.conf found, please create one.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f287b81_9e586d31","line":141,"range":{"start_line":116,"start_character":0,"end_line":141,"end_character":61},"updated":"2017-09-06 16:58:18.000000000","message":"One idea: How about auto-creating .stestr.conf from .testr.conf with the script here instead of warning message?","commit_id":"7dd678e3720c326afb3ca7adfd01ec7324d5f5c7"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"ddf81986764b2b82041eb9cc389d881881d9d9fc","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    test_dir \u003d None"},{"line_number":114,"context_line":"    top_dir \u003d None"},{"line_number":115,"context_line":"    group_regex \u003d None"},{"line_number":116,"context_line":"    if not os.path.isfile(\u0027.stestr.conf\u0027) and os.path.isfile(\u0027.testr.conf\u0027):"},{"line_number":117,"context_line":"        msg \u003d (\u0027No .stestr.conf file found in the CWD. Please create one to \u0027"},{"line_number":118,"context_line":"               \u0027to replace the .testr.conf. You can find a script to do this \u0027"},{"line_number":119,"context_line":"               \u0027in the stestr git repository.\u0027)"},{"line_number":120,"context_line":"        warnings.warn(msg)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        with open(\u0027.testr.conf\u0027, \u0027r\u0027) as testr_conf_file:"},{"line_number":123,"context_line":"            config \u003d six.moves.configparser.ConfigParser()"},{"line_number":124,"context_line":"            config.readfp(testr_conf_file)"},{"line_number":125,"context_line":"            test_command \u003d config.get(\u0027DEFAULT\u0027, \u0027test_command\u0027)"},{"line_number":126,"context_line":"            group_regex \u003d None"},{"line_number":127,"context_line":"            if config.has_option(\u0027DEFAULT\u0027, \u0027group_regex\u0027):"},{"line_number":128,"context_line":"                group_regex \u003d config.get(\u0027DEFAULT\u0027, \u0027group_regex\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        for line in test_command.split(\u0027\\n\u0027):"},{"line_number":131,"context_line":"            if \u0027subunit.run discover\u0027 in line:"},{"line_number":132,"context_line":"                command_parts \u003d line.split(\u0027 \u0027)"},{"line_number":133,"context_line":"                top_dir_present \u003d \u0027-t\u0027 in line"},{"line_number":134,"context_line":"                for idx, val in enumerate(command_parts):"},{"line_number":135,"context_line":"                    if top_dir_present:"},{"line_number":136,"context_line":"                        if val \u003d\u003d \u0027-t\u0027:"},{"line_number":137,"context_line":"                            top_dir \u003d command_parts[idx + 1]"},{"line_number":138,"context_line":"                            test_dir \u003d command_parts[idx + 2]"},{"line_number":139,"context_line":"                    else:"},{"line_number":140,"context_line":"                        if val \u003d\u003d \u0027discover\u0027:"},{"line_number":141,"context_line":"                            test_dir \u003d command_parts[idx + 2]"},{"line_number":142,"context_line":"    elif not os.path.isfile("},{"line_number":143,"context_line":"        \u0027.testr.conf\u0027) and not os.path.isfile(\u0027.stestr.conf\u0027):"},{"line_number":144,"context_line":"        msg \u003d (\u0027No .stestr.conf found, please create one.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f287b81_f80b018b","line":141,"range":{"start_line":116,"start_character":0,"end_line":141,"end_character":61},"in_reply_to":"7f287b81_617400d0","updated":"2017-09-06 20:21:27.000000000","message":"OK, thanks for your explanation.\nI guessed you have some concrete reasons like the above, then +2d :-)\nLet\u0027s merge this.","commit_id":"7dd678e3720c326afb3ca7adfd01ec7324d5f5c7"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"f14779c5011ce8bfca93abbd17e462eaa6f40626","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    test_dir \u003d None"},{"line_number":114,"context_line":"    top_dir \u003d None"},{"line_number":115,"context_line":"    group_regex \u003d None"},{"line_number":116,"context_line":"    if not os.path.isfile(\u0027.stestr.conf\u0027) and os.path.isfile(\u0027.testr.conf\u0027):"},{"line_number":117,"context_line":"        msg \u003d (\u0027No .stestr.conf file found in the CWD. Please create one to \u0027"},{"line_number":118,"context_line":"               \u0027to replace the .testr.conf. You can find a script to do this \u0027"},{"line_number":119,"context_line":"               \u0027in the stestr git repository.\u0027)"},{"line_number":120,"context_line":"        warnings.warn(msg)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        with open(\u0027.testr.conf\u0027, \u0027r\u0027) as testr_conf_file:"},{"line_number":123,"context_line":"            config \u003d six.moves.configparser.ConfigParser()"},{"line_number":124,"context_line":"            config.readfp(testr_conf_file)"},{"line_number":125,"context_line":"            test_command \u003d config.get(\u0027DEFAULT\u0027, \u0027test_command\u0027)"},{"line_number":126,"context_line":"            group_regex \u003d None"},{"line_number":127,"context_line":"            if config.has_option(\u0027DEFAULT\u0027, \u0027group_regex\u0027):"},{"line_number":128,"context_line":"                group_regex \u003d config.get(\u0027DEFAULT\u0027, \u0027group_regex\u0027)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        for line in test_command.split(\u0027\\n\u0027):"},{"line_number":131,"context_line":"            if \u0027subunit.run discover\u0027 in line:"},{"line_number":132,"context_line":"                command_parts \u003d line.split(\u0027 \u0027)"},{"line_number":133,"context_line":"                top_dir_present \u003d \u0027-t\u0027 in line"},{"line_number":134,"context_line":"                for idx, val in enumerate(command_parts):"},{"line_number":135,"context_line":"                    if top_dir_present:"},{"line_number":136,"context_line":"                        if val \u003d\u003d \u0027-t\u0027:"},{"line_number":137,"context_line":"                            top_dir \u003d command_parts[idx + 1]"},{"line_number":138,"context_line":"                            test_dir \u003d command_parts[idx + 2]"},{"line_number":139,"context_line":"                    else:"},{"line_number":140,"context_line":"                        if val \u003d\u003d \u0027discover\u0027:"},{"line_number":141,"context_line":"                            test_dir \u003d command_parts[idx + 2]"},{"line_number":142,"context_line":"    elif not os.path.isfile("},{"line_number":143,"context_line":"        \u0027.testr.conf\u0027) and not os.path.isfile(\u0027.stestr.conf\u0027):"},{"line_number":144,"context_line":"        msg \u003d (\u0027No .stestr.conf found, please create one.\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f287b81_617400d0","line":141,"range":{"start_line":116,"start_character":0,"end_line":141,"end_character":61},"in_reply_to":"7f287b81_9e586d31","updated":"2017-09-06 17:54:07.000000000","message":"I didn\u0027t do this very specifically, for 2 reasons. The first is that.stestr.conf is something that needs to be included in the project repo which means added as a commit. That\u0027s something that should be done willfully by someone. Just dumping the file in cwd doesn\u0027t really solve anything. The second reason is this code (and the script in the stestr repo) are just a guess. It should work for most cases, but if the .testr.conf is not following a very specific pattern this falls apart quickly.","commit_id":"7dd678e3720c326afb3ca7adfd01ec7324d5f5c7"}]}
