)]}'
{"tests/unit/doc/test_task_samples.py":[{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"7312d5d06d09efa8d53dd7e42a0759ba61548a59","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.assertEqual(missing, [],"},{"line_number":100,"context_line":"                         \"These scenarios don\u0027t have samples: %s\" % missing)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_json_correct_syntax(self):"},{"line_number":103,"context_line":"        for path in self.iterate_samples():"},{"line_number":104,"context_line":"            with open(path) as task_file:"},{"line_number":105,"context_line":"                try:"},{"line_number":106,"context_line":"                    json.loads(self.rapi.task.render_template("},{"line_number":107,"context_line":"                        task_template\u003dtask_file.read()))"},{"line_number":108,"context_line":"                except Exception:"},{"line_number":109,"context_line":"                    print(traceback.format_exc())"},{"line_number":110,"context_line":"                    self.fail(\"Invalid JSON file: %s\" % path)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def test_task_config_pair_existence(self):"},{"line_number":113,"context_line":"        missed_paths \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_94ba14be","line":110,"range":{"start_line":102,"start_character":0,"end_line":110,"end_character":61},"updated":"2017-08-17 03:57:13.000000000","message":"I propose we could remove this test case, and move it to test_schema_is_valid, we just need to add one exception yaml.ParserError or not.","commit_id":"9d34cb3ad363ee8a62c98d297ba463070aa61913"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"005af025662744aa6797f987671f14651497c341","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.assertEqual(missing, [],"},{"line_number":100,"context_line":"                         \"These scenarios don\u0027t have samples: %s\" % missing)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def test_json_correct_syntax(self):"},{"line_number":103,"context_line":"        for path in self.iterate_samples():"},{"line_number":104,"context_line":"            with open(path) as task_file:"},{"line_number":105,"context_line":"                try:"},{"line_number":106,"context_line":"                    json.loads(self.rapi.task.render_template("},{"line_number":107,"context_line":"                        task_template\u003dtask_file.read()))"},{"line_number":108,"context_line":"                except Exception:"},{"line_number":109,"context_line":"                    print(traceback.format_exc())"},{"line_number":110,"context_line":"                    self.fail(\"Invalid JSON file: %s\" % path)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def test_task_config_pair_existence(self):"},{"line_number":113,"context_line":"        missed_paths \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_19853a07","line":110,"range":{"start_line":102,"start_character":0,"end_line":110,"end_character":61},"in_reply_to":"9f436f4f_94ba14be","updated":"2017-08-31 15:08:59.000000000","message":"Done","commit_id":"9d34cb3ad363ee8a62c98d297ba463070aa61913"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"7312d5d06d09efa8d53dd7e42a0759ba61548a59","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def test_task_config_pair_existence(self):"},{"line_number":113,"context_line":"        missed_paths \u003d []"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        for json_path in self.iterate_samples():"},{"line_number":116,"context_line":"            yaml_path \u003d json_path.replace(\".json\", \".yaml\")"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            if not os.path.exists(yaml_path):"},{"line_number":119,"context_line":"                missed_paths.append(yaml_path)"},{"line_number":120,"context_line":"            elif not os.path.exists(json_path):"},{"line_number":121,"context_line":"                missed_paths.append(json_path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        if missed_paths:"},{"line_number":124,"context_line":"            self.fail(\"Sample task configs are missing:\\n%r\""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_34b7e8f7","line":121,"range":{"start_line":115,"start_character":2,"end_line":121,"end_character":46},"updated":"2017-08-17 03:57:13.000000000","message":"looks there is a bug here. self.iterate_sample only returns json files, so maybe miss json file if yaml file exists.\nAlso, here we should not check json file, they were found in directories.","commit_id":"9d34cb3ad363ee8a62c98d297ba463070aa61913"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"005af025662744aa6797f987671f14651497c341","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def test_task_config_pair_existence(self):"},{"line_number":113,"context_line":"        missed_paths \u003d []"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        for json_path in self.iterate_samples():"},{"line_number":116,"context_line":"            yaml_path \u003d json_path.replace(\".json\", \".yaml\")"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            if not os.path.exists(yaml_path):"},{"line_number":119,"context_line":"                missed_paths.append(yaml_path)"},{"line_number":120,"context_line":"            elif not os.path.exists(json_path):"},{"line_number":121,"context_line":"                missed_paths.append(json_path)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        if missed_paths:"},{"line_number":124,"context_line":"            self.fail(\"Sample task configs are missing:\\n%r\""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_f9c70e95","line":121,"range":{"start_line":115,"start_character":2,"end_line":121,"end_character":46},"in_reply_to":"9f436f4f_34b7e8f7","updated":"2017-08-31 15:08:59.000000000","message":"\u003e looks there is a bug here. self.iterate_sample only returns json files, so maybe miss json file if yaml file exists.\n\ngood catch. fixed \n\n\u003e Also, here we should not check json file, they were found in directories.\n\nwhy? for example, sahara samples have an inner directory with grouped tasks.","commit_id":"9d34cb3ad363ee8a62c98d297ba463070aa61913"},{"author":{"_account_id":21528,"name":"chenhb","email":"chen.haibing1@zte.com.cn","username":"chenhb"},"change_message_id":"7312d5d06d09efa8d53dd7e42a0759ba61548a59","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        for json_path in self.iterate_samples():"},{"line_number":130,"context_line":"            yaml_path \u003d json_path.replace(\".json\", \".yaml\")"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            if os.path.exists(yaml_path) and os.path.exists(json_path):"},{"line_number":133,"context_line":"                with open(json_path) as json_file:"},{"line_number":134,"context_line":"                    json_config \u003d yaml.safe_load("},{"line_number":135,"context_line":"                        self.rapi.task.render_template("}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_54a94c8d","line":132,"updated":"2017-08-17 03:57:13.000000000","message":"the same here, we should not check json_path exists","commit_id":"9d34cb3ad363ee8a62c98d297ba463070aa61913"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"005af025662744aa6797f987671f14651497c341","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        for json_path in self.iterate_samples():"},{"line_number":130,"context_line":"            yaml_path \u003d json_path.replace(\".json\", \".yaml\")"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            if os.path.exists(yaml_path) and os.path.exists(json_path):"},{"line_number":133,"context_line":"                with open(json_path) as json_file:"},{"line_number":134,"context_line":"                    json_config \u003d yaml.safe_load("},{"line_number":135,"context_line":"                        self.rapi.task.render_template("}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_f9d14e24","line":132,"in_reply_to":"9f436f4f_54a94c8d","updated":"2017-08-31 15:08:59.000000000","message":"Done","commit_id":"9d34cb3ad363ee8a62c98d297ba463070aa61913"}]}
