-
Notifications
You must be signed in to change notification settings - Fork 0
/
mutation-testing-report.json
1 lines (1 loc) · 39.4 KB
/
mutation-testing-report.json
1
{"mutant_trials": [{"mutant": {"mutator_name": "String", "lineno": 67, "col_offset": 34, "end_lineno": 67, "end_col_offset": 52, "text": "'XXClean Run FailedXX'", "source_folder": "src", "source_file": "src/poodle/run.py", "unified_diff": "--- src/poodle/run.py\n+++ [Mutant] src/poodle/run.py:67\n@@ -64,7 +64,7 @@\n )\n if mutant_trial.result.found: # not expected\n work.echo(style(\"FAILED\", fg=\"red\"))\n- raise PoodleTrialRunError(\"Clean Run Failed\", mutant_trial.result.reason_desc)\n+ raise PoodleTrialRunError('XXClean Run FailedXX', mutant_trial.result.reason_desc)\n \n work.echo(\"PASSED\")\n logger.info(\"Elapsed Time %.2f s\", time.time() - start)\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 3.9665369987487793}, {"mutant": {"mutator_name": "Number", "lineno": 190, "col_offset": 43, "end_lineno": 190, "end_col_offset": 44, "text": "-1", "source_folder": "src", "source_file": "src/poodle/mutate.py", "unified_diff": "--- src/poodle/mutate.py\n+++ [Mutant] src/poodle/mutate.py:190\n@@ -187,7 +187,7 @@\n add_line_filter(line_filters, lineno, \"all\")\n no_mut_filter: list[str] = re.findall(r\"#\\s*nomut:?\\s*([A-Za-z0-9,\\s]*)[#$]*\", line)\n \n- if no_mut_filter and no_mut_filter[0].strip().lower() in (\"start\", \"on\"):\n+ if no_mut_filter and no_mut_filter[-1].strip().lower() in (\"start\", \"on\"):\n no_mut_on = True\n \n if no_mut_on:\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.466526508331299}, {"mutant": {"mutator_name": "Number", "lineno": 200, "col_offset": 43, "end_lineno": 200, "end_col_offset": 44, "text": "-1", "source_folder": "src", "source_file": "src/poodle/mutate.py", "unified_diff": "--- src/poodle/mutate.py\n+++ [Mutant] src/poodle/mutate.py:200\n@@ -197,7 +197,7 @@\n for mutator in mutators.split(\",\"):\n add_line_filter(line_filters, lineno, mutator.strip())\n \n- if no_mut_filter and no_mut_filter[0].strip().lower() in (\"end\", \"off\"):\n+ if no_mut_filter and no_mut_filter[-1].strip().lower() in (\"end\", \"off\"):\n no_mut_on = False\n \n return line_filters\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.451765775680542}, {"mutant": {"mutator_name": "FuncCall", "lineno": 87, "col_offset": 4, "end_lineno": 87, "end_col_offset": 15, "text": "None", "source_folder": "src", "source_file": "src/poodle/cli.py", "unified_diff": "--- src/poodle/cli.py\n+++ [Mutant] src/poodle/cli.py:87\n@@ -84,7 +84,7 @@\n click.secho(\"Aborted due to Internal Error!\", fg=\"red\")\n click.secho(traceback.format_exc(), fg=\"red\")\n sys.exit(3)\n- sys.exit(0)\n+ None\n \n \n # nomut: start\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.821221113204956}, {"mutant": {"mutator_name": "Decorator", "lineno": 26, "col_offset": 0, "end_lineno": 87, "end_col_offset": 15, "text": "@click.command(context_settings=CONTEXT_SETTINGS)\n@click.argument('sources', type=click.Path(exists=True, path_type=Path), nargs=-1)\n@click.option('-c', 'config_file', help='Configuration File.', type=click.Path(exists=True, path_type=Path))\n@click.option('-q', 'quiet', help='Quiet mode: q, qq, or qqq', count=True)\n@click.option('-v', 'verbose', help='Verbose mode: v, vv, or vvv', count=True)\n@click.option('-w', 'workers', help='Maximum number of parallel workers.', type=int)\n@click.option('--exclude', help='Add a glob exclude file filter. Multiple allowed.', multiple=True)\n@click.option('--only', help='Glob pattern for files to mutate. Multiple allowed.', multiple=True)\n@click.option('--report', help='Enable reporter by name. Multiple allowed.', multiple=True)\n@click.option('--html', help='Folder name to store HTML report in.', type=click.Path(path_type=Path))\n@click.option('--json', help='File to create with JSON report.', type=click.Path(path_type=Path))\n@click.option('--fail_under', help='Fail if mutation score is under this value.', type=float)\ndef main(sources: tuple[Path], config_file: Path | None, quiet: int, verbose: int, workers: int | None, exclude: tuple[str], only: tuple[str], report: tuple[str], html: Path | None, json: Path | None, fail_under: float | None) -> None:\n \"\"\"Poodle Mutation Test Tool.\"\"\"\n try:\n config = build_config(sources, config_file, quiet, verbose, workers, exclude, only, report, html, json, fail_under)\n except PoodleInputError as err:\n for arg in err.args:\n click.secho(arg, fg='red')\n sys.exit(4)\n try:\n core.main_process(config)\n except PoodleTestingFailedError as err:\n for arg in err.args:\n click.secho(arg, fg='yellow')\n sys.exit(1)\n except KeyboardInterrupt:\n click.secho('Aborted due to Keyboard Interrupt!', fg='yellow')\n sys.exit(2)\n except PoodleTrialRunError as err:\n for arg in err.args:\n click.secho(arg, fg='red')\n sys.exit(3)\n except PoodleInputError as err:\n for arg in err.args:\n click.secho(arg, fg='red')\n sys.exit(4)\n except PoodleNoMutantsFoundError as err:\n for arg in err.args:\n click.secho(arg, fg='yellow')\n sys.exit(5)\n except:\n click.secho('Aborted due to Internal Error!', fg='red')\n click.secho(traceback.format_exc(), fg='red')\n sys.exit(3)\n sys.exit(0)", "source_folder": "src", "source_file": "src/poodle/cli.py", "unified_diff": "--- src/poodle/cli.py\n+++ [Mutant] src/poodle/cli.py:26\n@@ -24,65 +24,49 @@\n \n \n @click.command(context_settings=CONTEXT_SETTINGS)\n-@click.argument(\"sources\", type=click.Path(exists=True, path_type=Path), nargs=-1)\n-@click.option(\"-c\", \"config_file\", help=\"Configuration File.\", type=click.Path(exists=True, path_type=Path))\n-@click.option(\"-q\", \"quiet\", help=\"Quiet mode: q, qq, or qqq\", count=True)\n-@click.option(\"-v\", \"verbose\", help=\"Verbose mode: v, vv, or vvv\", count=True)\n-@click.option(\"-w\", \"workers\", help=\"Maximum number of parallel workers.\", type=int)\n-@click.option(\"--exclude\", help=\"Add a glob exclude file filter. Multiple allowed.\", multiple=True)\n-@click.option(\"--only\", help=\"Glob pattern for files to mutate. Multiple allowed.\", multiple=True)\n-@click.option(\"--report\", help=\"Enable reporter by name. Multiple allowed.\", multiple=True)\n-@click.option(\"--html\", help=\"Folder name to store HTML report in.\", type=click.Path(path_type=Path))\n-@click.option(\"--json\", help=\"File to create with JSON report.\", type=click.Path(path_type=Path))\n-@click.option(\"--fail_under\", help=\"Fail if mutation score is under this value.\", type=float)\n-@click.version_option(version=__version__)\n-def main( # noqa: C901, PLR0912\n- sources: tuple[Path],\n- config_file: Path | None,\n- quiet: int,\n- verbose: int,\n- workers: int | None,\n- exclude: tuple[str],\n- only: tuple[str],\n- report: tuple[str],\n- html: Path | None,\n- json: Path | None,\n- fail_under: float | None,\n-) -> None:\n+@click.argument('sources', type=click.Path(exists=True, path_type=Path), nargs=-1)\n+@click.option('-c', 'config_file', help='Configuration File.', type=click.Path(exists=True, path_type=Path))\n+@click.option('-q', 'quiet', help='Quiet mode: q, qq, or qqq', count=True)\n+@click.option('-v', 'verbose', help='Verbose mode: v, vv, or vvv', count=True)\n+@click.option('-w', 'workers', help='Maximum number of parallel workers.', type=int)\n+@click.option('--exclude', help='Add a glob exclude file filter. Multiple allowed.', multiple=True)\n+@click.option('--only', help='Glob pattern for files to mutate. Multiple allowed.', multiple=True)\n+@click.option('--report', help='Enable reporter by name. Multiple allowed.', multiple=True)\n+@click.option('--html', help='Folder name to store HTML report in.', type=click.Path(path_type=Path))\n+@click.option('--json', help='File to create with JSON report.', type=click.Path(path_type=Path))\n+@click.option('--fail_under', help='Fail if mutation score is under this value.', type=float)\n+def main(sources: tuple[Path], config_file: Path | None, quiet: int, verbose: int, workers: int | None, exclude: tuple[str], only: tuple[str], report: tuple[str], html: Path | None, json: Path | None, fail_under: float | None) -> None:\n \"\"\"Poodle Mutation Test Tool.\"\"\"\n try:\n- config = build_config(\n- sources, config_file, quiet, verbose, workers, exclude, only, report, html, json, fail_under\n- )\n+ config = build_config(sources, config_file, quiet, verbose, workers, exclude, only, report, html, json, fail_under)\n except PoodleInputError as err:\n for arg in err.args:\n- click.secho(arg, fg=\"red\")\n+ click.secho(arg, fg='red')\n sys.exit(4)\n-\n try:\n core.main_process(config)\n except PoodleTestingFailedError as err:\n for arg in err.args:\n- click.secho(arg, fg=\"yellow\")\n+ click.secho(arg, fg='yellow')\n sys.exit(1)\n except KeyboardInterrupt:\n- click.secho(\"Aborted due to Keyboard Interrupt!\", fg=\"yellow\")\n+ click.secho('Aborted due to Keyboard Interrupt!', fg='yellow')\n sys.exit(2)\n except PoodleTrialRunError as err:\n for arg in err.args:\n- click.secho(arg, fg=\"red\")\n+ click.secho(arg, fg='red')\n sys.exit(3)\n except PoodleInputError as err:\n for arg in err.args:\n- click.secho(arg, fg=\"red\")\n+ click.secho(arg, fg='red')\n sys.exit(4)\n except PoodleNoMutantsFoundError as err:\n for arg in err.args:\n- click.secho(arg, fg=\"yellow\")\n+ click.secho(arg, fg='yellow')\n sys.exit(5)\n- except: # noqa: E722\n- click.secho(\"Aborted due to Internal Error!\", fg=\"red\")\n- click.secho(traceback.format_exc(), fg=\"red\")\n+ except:\n+ click.secho('Aborted due to Internal Error!', fg='red')\n+ click.secho(traceback.format_exc(), fg='red')\n sys.exit(3)\n sys.exit(0)\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.195350408554077}, {"mutant": {"mutator_name": "Keyword", "lineno": 109, "col_offset": 79, "end_lineno": 109, "end_col_offset": 83, "text": "False", "source_folder": "src", "source_file": "src/poodle/util.py", "unified_diff": "--- src/poodle/util.py\n+++ [Mutant] src/poodle/util.py:109\n@@ -106,7 +106,7 @@\n def create_unified_diff(mutant: Mutant) -> str | None:\n \"\"\"Add unified diff to mutant.\"\"\"\n if mutant.source_file:\n- file_lines = mutant.source_file.read_text(\"utf-8\").splitlines(keepends=True)\n+ file_lines = mutant.source_file.read_text(\"utf-8\").splitlines(keepends=False)\n file_name = str(mutant.source_file)\n mutant_lines = \"\".join(mutate_lines(mutant, file_lines)).splitlines(keepends=True)\n return \"\".join(\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.511196613311768}, {"mutant": {"mutator_name": "String", "lineno": 109, "col_offset": 50, "end_lineno": 109, "end_col_offset": 57, "text": "'XXutf-8XX'", "source_folder": "src", "source_file": "src/poodle/util.py", "unified_diff": "--- src/poodle/util.py\n+++ [Mutant] src/poodle/util.py:109\n@@ -106,7 +106,7 @@\n def create_unified_diff(mutant: Mutant) -> str | None:\n \"\"\"Add unified diff to mutant.\"\"\"\n if mutant.source_file:\n- file_lines = mutant.source_file.read_text(\"utf-8\").splitlines(keepends=True)\n+ file_lines = mutant.source_file.read_text('XXutf-8XX').splitlines(keepends=True)\n file_name = str(mutant.source_file)\n mutant_lines = \"\".join(mutate_lines(mutant, file_lines)).splitlines(keepends=True)\n return \"\".join(\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.283833026885986}, {"mutant": {"mutator_name": "Compare", "lineno": 26, "col_offset": 7, "end_lineno": 26, "end_col_offset": 25, "text": "summary.trials <= 1", "source_folder": "src", "source_file": "src/poodle/reporters/basic.py", "unified_diff": "--- src/poodle/reporters/basic.py\n+++ [Mutant] src/poodle/reporters/basic.py:26\n@@ -23,7 +23,7 @@\n \"\"\"Echo quick summary to console.\"\"\"\n echo(\"\")\n summary = testing_results.summary\n- if summary.trials < 1:\n+ if summary.trials <= 1:\n echo(\"!!! No mutants found to test !!!\", fg=\"yellow\")\n return\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.478880167007446}, {"mutant": {"mutator_name": "Compare", "lineno": 49, "col_offset": 12, "end_lineno": 49, "end_col_offset": 47, "text": "str(trial.mutant.source_file) and ''", "source_folder": "src", "source_file": "src/poodle/reporters/basic.py", "unified_diff": "--- src/poodle/reporters/basic.py\n+++ [Mutant] src/poodle/reporters/basic.py:49\n@@ -46,7 +46,7 @@\n failed_trials.sort(\n key=lambda trial: (\n trial.mutant.source_folder,\n- str(trial.mutant.source_file) or \"\",\n+ str(trial.mutant.source_file) and '',\n trial.mutant.lineno,\n trial.mutant.mutator_name,\n )\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.7900969982147217}, {"mutant": {"mutator_name": "Number", "lineno": 26, "col_offset": 24, "end_lineno": 26, "end_col_offset": 25, "text": "2", "source_folder": "src", "source_file": "src/poodle/reporters/basic.py", "unified_diff": "--- src/poodle/reporters/basic.py\n+++ [Mutant] src/poodle/reporters/basic.py:26\n@@ -23,7 +23,7 @@\n \"\"\"Echo quick summary to console.\"\"\"\n echo(\"\")\n summary = testing_results.summary\n- if summary.trials < 1:\n+ if summary.trials < 2:\n echo(\"!!! No mutants found to test !!!\", fg=\"yellow\")\n return\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 3.2498791217803955}, {"mutant": {"mutator_name": "String", "lineno": 49, "col_offset": 45, "end_lineno": 49, "end_col_offset": 47, "text": "'XXXX'", "source_folder": "src", "source_file": "src/poodle/reporters/basic.py", "unified_diff": "--- src/poodle/reporters/basic.py\n+++ [Mutant] src/poodle/reporters/basic.py:49\n@@ -46,7 +46,7 @@\n failed_trials.sort(\n key=lambda trial: (\n trial.mutant.source_folder,\n- str(trial.mutant.source_file) or \"\",\n+ str(trial.mutant.source_file) or 'XXXX',\n trial.mutant.lineno,\n trial.mutant.mutator_name,\n )\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.396276950836182}, {"mutant": {"mutator_name": "String", "lineno": 23, "col_offset": 42, "end_lineno": 23, "end_col_offset": 53, "text": "'XXtemplatesXX'", "source_folder": "src", "source_file": "src/poodle/reporters/html.py", "unified_diff": "--- src/poodle/reporters/html.py\n+++ [Mutant] src/poodle/reporters/html.py:23\n@@ -20,7 +20,7 @@\n \n def template_path() -> Path:\n \"\"\"Return the path to the HTML Template folder.\"\"\"\n- return Path(__file__).parent.parent / \"templates\"\n+ return Path(__file__).parent.parent / 'XXtemplatesXX'\n \n \n STATIC_FILES = [\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.9976208209991455}, {"mutant": {"mutator_name": "Compare", "lineno": 72, "col_offset": 15, "end_lineno": 72, "end_col_offset": 32, "text": "n.lineno <= lineno", "source_folder": "src", "source_file": "src/poodle/data_types/interfaces.py", "unified_diff": "--- src/poodle/data_types/interfaces.py\n+++ [Mutant] src/poodle/data_types/interfaces.py:72\n@@ -69,7 +69,7 @@\n if not hasattr(n, \"lineno\"):\n continue\n \n- if n.lineno < lineno: # decorators\n+ if n.lineno <= lineno: # decorators\n lineno = n.lineno\n if n.col_offset < col_offset:\n col_offset = n.col_offset\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.9240190982818604}, {"mutant": {"mutator_name": "Compare", "lineno": 74, "col_offset": 19, "end_lineno": 74, "end_col_offset": 44, "text": "n.col_offset <= col_offset", "source_folder": "src", "source_file": "src/poodle/data_types/interfaces.py", "unified_diff": "--- src/poodle/data_types/interfaces.py\n+++ [Mutant] src/poodle/data_types/interfaces.py:74\n@@ -71,7 +71,7 @@\n \n if n.lineno < lineno: # decorators\n lineno = n.lineno\n- if n.col_offset < col_offset:\n+ if n.col_offset <= col_offset:\n col_offset = n.col_offset\n elif n.lineno == lineno and n.col_offset < col_offset:\n col_offset = n.col_offset\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 3.9438788890838623}, {"mutant": {"mutator_name": "Compare", "lineno": 119, "col_offset": 11, "end_lineno": 119, "end_col_offset": 25, "text": "len(lines) >= 1", "source_folder": "src", "source_file": "src/poodle/data_types/interfaces.py", "unified_diff": "--- src/poodle/data_types/interfaces.py\n+++ [Mutant] src/poodle/data_types/interfaces.py:119\n@@ -116,7 +116,7 @@\n def unparse(cls, node: ast.AST, indent: int) -> str:\n \"\"\"Unparse AST node to string. Indent any lines that are not the first line.\"\"\"\n lines = ast.unparse(node).splitlines(keepends=True)\n- if len(lines) > 1:\n+ if len(lines) >= 1:\n lines[1:] = [f\"{' ' * indent}{line}\" for line in lines[1:]]\n return \"\".join(lines)\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.481808662414551}, {"mutant": {"mutator_name": "Number", "lineno": 119, "col_offset": 24, "end_lineno": 119, "end_col_offset": 25, "text": "0", "source_folder": "src", "source_file": "src/poodle/data_types/interfaces.py", "unified_diff": "--- src/poodle/data_types/interfaces.py\n+++ [Mutant] src/poodle/data_types/interfaces.py:119\n@@ -116,7 +116,7 @@\n def unparse(cls, node: ast.AST, indent: int) -> str:\n \"\"\"Unparse AST node to string. Indent any lines that are not the first line.\"\"\"\n lines = ast.unparse(node).splitlines(keepends=True)\n- if len(lines) > 1:\n+ if len(lines) > 0:\n lines[1:] = [f\"{' ' * indent}{line}\" for line in lines[1:]]\n return \"\".join(lines)\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.810591220855713}, {"mutant": {"mutator_name": "Decorator", "lineno": 60, "col_offset": 4, "end_lineno": 89, "end_col_offset": 63, "text": "def get_location(node: ast.AST) -> tuple[int, int, int, int]:\n \"\"\"Get location lines and columns that encompasses node and all child nodes.\"\"\"\n lineno = node.lineno\n col_offset = node.col_offset\n end_lineno = node.end_lineno or node.lineno\n end_col_offset = node.end_col_offset or node.col_offset\n for n in ast.walk(node):\n if not hasattr(n, 'lineno'):\n continue\n if n.lineno < lineno:\n lineno = n.lineno\n if n.col_offset < col_offset:\n col_offset = n.col_offset\n elif n.lineno == lineno and n.col_offset < col_offset:\n col_offset = n.col_offset\n if not hasattr(n, 'end_lineno') or not n.end_lineno:\n continue\n if n.end_lineno > end_lineno:\n end_lineno = n.end_lineno\n if n.end_col_offset:\n end_col_offset = n.end_col_offset\n elif n.end_lineno == end_lineno and n.end_col_offset and (n.end_col_offset > end_col_offset):\n end_col_offset = n.end_col_offset\n return (lineno, col_offset, end_lineno, end_col_offset)", "source_folder": "src", "source_file": "src/poodle/data_types/interfaces.py", "unified_diff": "--- src/poodle/data_types/interfaces.py\n+++ [Mutant] src/poodle/data_types/interfaces.py:60\n@@ -57,35 +57,29 @@\n text=text,\n )\n \n- @staticmethod\n def get_location(node: ast.AST) -> tuple[int, int, int, int]:\n \"\"\"Get location lines and columns that encompasses node and all child nodes.\"\"\"\n lineno = node.lineno\n col_offset = node.col_offset\n end_lineno = node.end_lineno or node.lineno\n end_col_offset = node.end_col_offset or node.col_offset\n-\n for n in ast.walk(node):\n- if not hasattr(n, \"lineno\"):\n+ if not hasattr(n, 'lineno'):\n continue\n-\n- if n.lineno < lineno: # decorators\n+ if n.lineno < lineno:\n lineno = n.lineno\n if n.col_offset < col_offset:\n col_offset = n.col_offset\n elif n.lineno == lineno and n.col_offset < col_offset:\n col_offset = n.col_offset\n-\n- if not hasattr(n, \"end_lineno\") or not n.end_lineno:\n+ if not hasattr(n, 'end_lineno') or not n.end_lineno:\n continue\n-\n if n.end_lineno > end_lineno:\n end_lineno = n.end_lineno\n if n.end_col_offset:\n end_col_offset = n.end_col_offset\n- elif n.end_lineno == end_lineno and n.end_col_offset and n.end_col_offset > end_col_offset:\n+ elif n.end_lineno == end_lineno and n.end_col_offset and (n.end_col_offset > end_col_offset):\n end_col_offset = n.end_col_offset\n-\n return (lineno, col_offset, end_lineno, end_col_offset)\n \n @staticmethod\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.7958321571350098}, {"mutant": {"mutator_name": "Decorator", "lineno": 115, "col_offset": 4, "end_lineno": 121, "end_col_offset": 29, "text": "def unparse(cls, node: ast.AST, indent: int) -> str:\n \"\"\"Unparse AST node to string. Indent any lines that are not the first line.\"\"\"\n lines = ast.unparse(node).splitlines(keepends=True)\n if len(lines) > 1:\n lines[1:] = [f'{' ' * indent}{line}' for line in lines[1:]]\n return ''.join(lines)", "source_folder": "src", "source_file": "src/poodle/data_types/interfaces.py", "unified_diff": "--- src/poodle/data_types/interfaces.py\n+++ [Mutant] src/poodle/data_types/interfaces.py:115\n@@ -112,13 +112,12 @@\n \n return cls.is_annotation(node.parent, child_node=node)\n \n- @classmethod\n def unparse(cls, node: ast.AST, indent: int) -> str:\n \"\"\"Unparse AST node to string. Indent any lines that are not the first line.\"\"\"\n lines = ast.unparse(node).splitlines(keepends=True)\n if len(lines) > 1:\n- lines[1:] = [f\"{' ' * indent}{line}\" for line in lines[1:]]\n- return \"\".join(lines)\n+ lines[1:] = [f'{' ' * indent}{line}' for line in lines[1:]]\n+ return ''.join(lines)\n \n \n # runner method signature:\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 3.2957942485809326}, {"mutant": {"mutator_name": "Compare", "lineno": 95, "col_offset": 11, "end_lineno": 95, "end_col_offset": 64, "text": "'source_file' in d or d['source_folder'] is not None", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:95\n@@ -92,7 +92,7 @@\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n if \"source_folder\" in d:\n d[\"source_folder\"] = Path(d[\"source_folder\"])\n- if \"source_file\" in d and d[\"source_folder\"] is not None:\n+ if 'source_file' in d or d['source_folder'] is not None:\n d[\"source_file\"] = Path(d[\"source_file\"])\n return d\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 3.5375661849975586}, {"mutant": {"mutator_name": "Keyword", "lineno": 88, "col_offset": 31, "end_lineno": 88, "end_col_offset": 35, "text": "' '", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:88\n@@ -85,7 +85,7 @@\n \n source_folder: Path\n source_file: Path | None\n- unified_diff: str | None = None\n+ unified_diff: str | None = ' '\n \n @staticmethod\n def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.7950730323791504}, {"mutant": {"mutator_name": "Keyword", "lineno": 95, "col_offset": 60, "end_lineno": 95, "end_col_offset": 64, "text": "' '", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:95\n@@ -92,7 +92,7 @@\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n if \"source_folder\" in d:\n d[\"source_folder\"] = Path(d[\"source_folder\"])\n- if \"source_file\" in d and d[\"source_folder\"] is not None:\n+ if \"source_file\" in d and d[\"source_folder\"] is not ' ':\n d[\"source_file\"] = Path(d[\"source_file\"])\n return d\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.491614103317261}, {"mutant": {"mutator_name": "Keyword", "lineno": 191, "col_offset": 30, "end_lineno": 191, "end_col_offset": 34, "text": "' '", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:191\n@@ -188,7 +188,7 @@\n @staticmethod\n def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n- d.pop(\"success_rate\", None)\n+ d.pop(\"success_rate\", ' ')\n d.pop(\"coverage_display\", None)\n return d\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 3.0085864067077637}, {"mutant": {"mutator_name": "Keyword", "lineno": 192, "col_offset": 34, "end_lineno": 192, "end_col_offset": 38, "text": "' '", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:192\n@@ -189,7 +189,7 @@\n def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n d.pop(\"success_rate\", None)\n- d.pop(\"coverage_display\", None)\n+ d.pop(\"coverage_display\", ' ')\n return d\n \n def to_dict(self) -> dict[str, Any]:\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.025105953216553}, {"mutant": {"mutator_name": "Number", "lineno": 162, "col_offset": 25, "end_lineno": 162, "end_col_offset": 26, "text": "1", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:162\n@@ -159,7 +159,7 @@\n @property\n def success_rate(self) -> float:\n \"\"\"Return the success rate of the test run.\"\"\"\n- if self.trials > 0:\n+ if self.trials > 1:\n return self.found / self.trials\n if self.tested > 0:\n return self.found / self.tested\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.8328800201416016}, {"mutant": {"mutator_name": "Number", "lineno": 164, "col_offset": 25, "end_lineno": 164, "end_col_offset": 26, "text": "1", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:164\n@@ -161,7 +161,7 @@\n \"\"\"Return the success rate of the test run.\"\"\"\n if self.trials > 0:\n return self.found / self.trials\n- if self.tested > 0:\n+ if self.tested > 1:\n return self.found / self.tested\n return 0.0\n \n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 3.463620901107788}, {"mutant": {"mutator_name": "Decorator", "lineno": 19, "col_offset": 4, "end_lineno": 22, "end_col_offset": 16, "text": "def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n return d", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:19\n@@ -16,7 +16,6 @@\n class PoodleSerialize:\n \"\"\"Base Class for Data Classes that need to be serialized to JSON.\"\"\"\n \n- @staticmethod\n def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n return d\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.361137866973877}, {"mutant": {"mutator_name": "Decorator", "lineno": 90, "col_offset": 4, "end_lineno": 97, "end_col_offset": 16, "text": "def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n if 'source_folder' in d:\n d['source_folder'] = Path(d['source_folder'])\n if 'source_file' in d and d['source_folder'] is not None:\n d['source_file'] = Path(d['source_file'])\n return d", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:90\n@@ -87,13 +87,12 @@\n source_file: Path | None\n unified_diff: str | None = None\n \n- @staticmethod\n- def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n- \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n- if \"source_folder\" in d:\n- d[\"source_folder\"] = Path(d[\"source_folder\"])\n- if \"source_file\" in d and d[\"source_folder\"] is not None:\n- d[\"source_file\"] = Path(d[\"source_file\"])\n+ def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n+ \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n+ if 'source_folder' in d:\n+ d['source_folder'] = Path(d['source_folder'])\n+ if 'source_file' in d and d['source_folder'] is not None:\n+ d['source_file'] = Path(d['source_file'])\n return d\n \n def to_dict(self) -> dict[str, Any]:\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.8416762351989746}, {"mutant": {"mutator_name": "Decorator", "lineno": 131, "col_offset": 4, "end_lineno": 138, "end_col_offset": 16, "text": "def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n if 'mutant' in d:\n d['mutant'] = Mutant(**Mutant.from_dict(d['mutant']))\n if 'result' in d:\n d['result'] = MutantTrialResult(**d['result'])\n return d", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:131\n@@ -128,13 +128,12 @@\n result: MutantTrialResult\n duration: float\n \n- @staticmethod\n- def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n- \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n- if \"mutant\" in d:\n- d[\"mutant\"] = Mutant(**Mutant.from_dict(d[\"mutant\"]))\n- if \"result\" in d:\n- d[\"result\"] = MutantTrialResult(**d[\"result\"])\n+ def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n+ \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n+ if 'mutant' in d:\n+ d['mutant'] = Mutant(**Mutant.from_dict(d['mutant']))\n+ if 'result' in d:\n+ d['result'] = MutantTrialResult(**d['result'])\n return d\n \n def to_dict(self) -> dict[str, Any]:\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.313053369522095}, {"mutant": {"mutator_name": "Decorator", "lineno": 188, "col_offset": 4, "end_lineno": 193, "end_col_offset": 16, "text": "def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n d.pop('success_rate', None)\n d.pop('coverage_display', None)\n return d", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:188\n@@ -185,11 +185,10 @@\n \n return self\n \n- @staticmethod\n- def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n- \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n- d.pop(\"success_rate\", None)\n- d.pop(\"coverage_display\", None)\n+ def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n+ \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n+ d.pop('success_rate', None)\n+ d.pop('coverage_display', None)\n return d\n \n def to_dict(self) -> dict[str, Any]:\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.509523630142212}, {"mutant": {"mutator_name": "Decorator", "lineno": 210, "col_offset": 4, "end_lineno": 217, "end_col_offset": 16, "text": "def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n if 'mutant_trials' in d:\n d['mutant_trials'] = [MutantTrial(**MutantTrial.from_dict(trial)) for trial in d['mutant_trials']]\n if 'summary' in d and d['summary'] is not None:\n d['summary'] = TestingSummary(**TestingSummary.from_dict(d['summary']))\n return d", "source_folder": "src", "source_file": "src/poodle/data_types/data.py", "unified_diff": "--- src/poodle/data_types/data.py\n+++ [Mutant] src/poodle/data_types/data.py:210\n@@ -207,13 +207,12 @@\n mutant_trials: list[MutantTrial]\n summary: TestingSummary\n \n- @staticmethod\n- def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n- \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n- if \"mutant_trials\" in d:\n- d[\"mutant_trials\"] = [MutantTrial(**MutantTrial.from_dict(trial)) for trial in d[\"mutant_trials\"]]\n- if \"summary\" in d and d[\"summary\"] is not None:\n- d[\"summary\"] = TestingSummary(**TestingSummary.from_dict(d[\"summary\"]))\n+ def from_dict(d: dict[str, Any]) -> dict[str, Any]:\n+ \"\"\"Correct fields in Dictionary for JSON deserialization.\"\"\"\n+ if 'mutant_trials' in d:\n+ d['mutant_trials'] = [MutantTrial(**MutantTrial.from_dict(trial)) for trial in d['mutant_trials']]\n+ if 'summary' in d and d['summary'] is not None:\n+ d['summary'] = TestingSummary(**TestingSummary.from_dict(d['summary']))\n return d\n \n def to_dict(self) -> dict[str, Any]:\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.8191254138946533}, {"mutant": {"mutator_name": "String", "lineno": 72, "col_offset": 44, "end_lineno": 72, "end_col_offset": 58, "text": "'XXfile_filtersXX'", "source_folder": "src", "source_file": "src/poodle/config.py", "unified_diff": "--- src/poodle/config.py\n+++ [Mutant] src/poodle/config.py:72\n@@ -69,7 +69,7 @@\n )\n logging.basicConfig(format=log_format, level=log_level)\n \n- file_filters = get_str_list_from_config(\"file_filters\", config_file_data, default=default_file_filters)\n+ file_filters = get_str_list_from_config('XXfile_filtersXX', config_file_data, default=default_file_filters)\n # TODO: append file excludes and append py excludes\n # file_filters += get_str_list_from_config(\"exclude\", config_file_data, default=[]) # noqa: ERA001\n file_filters += cmd_excludes\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 3.9708008766174316}, {"mutant": {"mutator_name": "String", "lineno": 84, "col_offset": 41, "end_lineno": 84, "end_col_offset": 55, "text": "'XXproject_nameXX'", "source_folder": "src", "source_file": "src/poodle/config.py", "unified_diff": "--- src/poodle/config.py\n+++ [Mutant] src/poodle/config.py:84\n@@ -81,7 +81,7 @@\n merge(cmd_reporter_opts, {\"json_report_file\": cmd_json})\n \n return PoodleConfig(\n- project_name=get_str_from_config(\"project_name\", config_file_data, default=project_name),\n+ project_name=get_str_from_config('XXproject_nameXX', config_file_data, default=project_name),\n project_version=get_str_from_config(\"project_version\", config_file_data, default=project_version),\n config_file=config_file_path,\n source_folders=get_source_folders(cmd_sources, config_file_data),\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 2.880633592605591}, {"mutant": {"mutator_name": "String", "lineno": 85, "col_offset": 44, "end_lineno": 85, "end_col_offset": 61, "text": "'XXproject_versionXX'", "source_folder": "src", "source_file": "src/poodle/config.py", "unified_diff": "--- src/poodle/config.py\n+++ [Mutant] src/poodle/config.py:85\n@@ -82,7 +82,7 @@\n \n return PoodleConfig(\n project_name=get_str_from_config(\"project_name\", config_file_data, default=project_name),\n- project_version=get_str_from_config(\"project_version\", config_file_data, default=project_version),\n+ project_version=get_str_from_config('XXproject_versionXX', config_file_data, default=project_version),\n config_file=config_file_path,\n source_folders=get_source_folders(cmd_sources, config_file_data),\n only_files=get_str_list_from_config(\"only_files\", config_file_data, default=[], command_line=cmd_only_files),\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.573322296142578}, {"mutant": {"mutator_name": "String", "lineno": 134, "col_offset": 41, "end_lineno": 134, "end_col_offset": 52, "text": "'XXreportersXX'", "source_folder": "src", "source_file": "src/poodle/config.py", "unified_diff": "--- src/poodle/config.py\n+++ [Mutant] src/poodle/config.py:134\n@@ -131,7 +131,7 @@\n cmd_json: Path | None,\n ) -> list[str]:\n \"\"\"Retrieve list of reporters to use.\"\"\"\n- reporters = get_str_list_from_config(\"reporters\", config_file_data, default=default_reporters)\n+ reporters = get_str_list_from_config('XXreportersXX', config_file_data, default=default_reporters)\n reporters += [reporter for reporter in cmd_report if reporter not in reporters]\n if cmd_html:\n reporters.append(\"html\")\n"}, "result": {"found": false, "reason_code": "Mutant Not Found", "reason_desc": null}, "duration": 4.538825750350952}], "summary": {"trials": 1638, "tested": 1638, "found": 1604, "not_found": 34, "timeout": 0, "errors": 0, "success_rate": 0.9792429792429792, "coverage_display": "97.9%"}}