| 1 |
"""Various utility functions.""" |
|
| 2 | ||
| 3 |
from __future__ import annotations |
|
| 4 | ||
| 5 |
import difflib |
|
| 6 |
import json |
|
| 7 |
import logging |
|
| 8 |
from copy import deepcopy |
|
| 9 |
from io import StringIO |
|
| 10 |
from pprint import pprint |
|
| 11 |
from typing import TYPE_CHECKING, Any |
|
| 12 |
from zipfile import ZipFile |
|
| 13 | ||
| 14 |
from wcmatch.pathlib import Path |
|
| 15 | ||
| 16 |
if TYPE_CHECKING: |
|
| 17 |
import pathlib |
|
| 18 | ||
| 19 |
from .data_types import Mutant, MutantTrial, PoodleConfig, PoodleSerialize, PoodleWork |
|
| 20 | ||
| ▸ | 21 |
logger = logging.getLogger(__name__) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:21
@@ -18,7 +18,7 @@
from .data_types import Mutant, MutantTrial, PoodleConfig, PoodleSerialize, PoodleWork
-logger = logging.getLogger(__name__)
+logger = None
def files_list_for_folder(
|
||
| 22 | ||
| 23 | ||
| 24 |
def files_list_for_folder( |
|
| 25 |
folder: pathlib.Path, |
|
| 26 |
match_glob: str, |
|
| 27 |
flags: int | None, |
|
| 28 |
filter_globs: list[str], |
|
| 29 |
) -> list[pathlib.Path]: |
|
| 30 |
"""Retrieve list of files in specified folder. |
|
| 31 | ||
| 32 |
Search recursively for files matching match_glob. |
|
| 33 |
Remove files matching any of the filter_globs values. |
|
| 34 |
""" |
|
| ▸ | 35 |
logger.debug("files_list_for_folder folder=%s, match_glob=%s filter_globs=%s", folder, match_glob, filter_globs)
|
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:35
@@ -32,7 +32,7 @@
Search recursively for files matching match_glob.
Remove files matching any of the filter_globs values.
"""
- logger.debug("files_list_for_folder folder=%s, match_glob=%s filter_globs=%s", folder, match_glob, filter_globs)
+ logger.debug('XXfiles_list_for_folder folder=%s, match_glob=%s filter_globs=%sXX', folder, match_glob, filter_globs)
files: list[pathlib.Path] = list(Path(folder).rglob(match_glob, flags=flags, exclude=filter_globs)) # type: ignore [arg-type]
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:35
@@ -32,7 +32,7 @@
Search recursively for files matching match_glob.
Remove files matching any of the filter_globs values.
"""
- logger.debug("files_list_for_folder folder=%s, match_glob=%s filter_globs=%s", folder, match_glob, filter_globs)
+ None
files: list[pathlib.Path] = list(Path(folder).rglob(match_glob, flags=flags, exclude=filter_globs)) # type: ignore [arg-type]
|
||
| 36 | ||
| ▸ | 37 |
files: list[pathlib.Path] = list(Path(folder).rglob(match_glob, flags=flags, exclude=filter_globs)) # type: ignore [arg-type] |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:37
@@ -34,7 +34,7 @@
"""
logger.debug("files_list_for_folder folder=%s, match_glob=%s filter_globs=%s", folder, match_glob, filter_globs)
- files: list[pathlib.Path] = list(Path(folder).rglob(match_glob, flags=flags, exclude=filter_globs)) # type: ignore [arg-type]
+ files: list[pathlib.Path] = None # type: ignore [arg-type]
logger.debug("files_list_for_folder results: folder=%s files=%s", folder, files)
return files
|
||
| 38 | ||
| ▸ | 39 |
logger.debug("files_list_for_folder results: folder=%s files=%s", folder, files)
|
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:39
@@ -36,7 +36,7 @@
files: list[pathlib.Path] = list(Path(folder).rglob(match_glob, flags=flags, exclude=filter_globs)) # type: ignore [arg-type]
- logger.debug("files_list_for_folder results: folder=%s files=%s", folder, files)
+ logger.debug('XXfiles_list_for_folder results: folder=%s files=%sXX', folder, files)
return files
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:39
@@ -36,7 +36,7 @@
files: list[pathlib.Path] = list(Path(folder).rglob(match_glob, flags=flags, exclude=filter_globs)) # type: ignore [arg-type]
- logger.debug("files_list_for_folder results: folder=%s files=%s", folder, files)
+ None
return files
|
||
| ▸ | 40 |
return files |
|
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:40
@@ -37,7 +37,7 @@
files: list[pathlib.Path] = list(Path(folder).rglob(match_glob, flags=flags, exclude=filter_globs)) # type: ignore [arg-type]
logger.debug("files_list_for_folder results: folder=%s files=%s", folder, files)
- return files
+ return None
def files_list_for_source_folders(work: PoodleWork) -> dict[pathlib.Path, list[pathlib.Path]]:
|
||
| 41 | ||
| 42 | ||
| 43 |
def files_list_for_source_folders(work: PoodleWork) -> dict[pathlib.Path, list[pathlib.Path]]: |
|
| 44 |
"""Build map of Folder to all files in folder to include in zips.""" |
|
| ▸ | 45 |
return {
|
|
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:45
@@ -42,15 +42,7 @@
def files_list_for_source_folders(work: PoodleWork) -> dict[pathlib.Path, list[pathlib.Path]]:
"""Build map of Folder to all files in folder to include in zips."""
- return {
- folder: files_list_for_folder(
- folder=folder,
- match_glob="*",
- flags=work.config.file_copy_flags,
- filter_globs=work.config.file_copy_filters,
- )
- for folder in work.config.source_folders
- }
+ return None
def create_temp_zips(work: PoodleWork) -> None:
|
||
| ▸ | 46 |
folder: files_list_for_folder( |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:46
@@ -43,12 +43,7 @@
def files_list_for_source_folders(work: PoodleWork) -> dict[pathlib.Path, list[pathlib.Path]]:
"""Build map of Folder to all files in folder to include in zips."""
return {
- folder: files_list_for_folder(
- folder=folder,
- match_glob="*",
- flags=work.config.file_copy_flags,
- filter_globs=work.config.file_copy_filters,
- )
+ folder: None
for folder in work.config.source_folders
}
|
||
| 47 |
folder=folder, |
|
| ▸ | 48 |
match_glob="*", |
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:48
@@ -45,7 +45,7 @@
return {
folder: files_list_for_folder(
folder=folder,
- match_glob="*",
+ match_glob='XX*XX',
flags=work.config.file_copy_flags,
filter_globs=work.config.file_copy_filters,
)
|
||
| 49 |
flags=work.config.file_copy_flags, |
|
| 50 |
filter_globs=work.config.file_copy_filters, |
|
| 51 |
) |
|
| 52 |
for folder in work.config.source_folders |
|
| 53 |
} |
|
| 54 | ||
| 55 | ||
| 56 |
def create_temp_zips(work: PoodleWork) -> None: |
|
| 57 |
"""Create a temporary zip file for each folder in source_folders.""" |
|
| ▸ | 58 |
work.config.work_folder.mkdir(parents=True, exist_ok=True) |
|
Status: Mutant Found Mutator Name: Keyword Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:58
@@ -55,7 +55,7 @@
def create_temp_zips(work: PoodleWork) -> None:
"""Create a temporary zip file for each folder in source_folders."""
- work.config.work_folder.mkdir(parents=True, exist_ok=True)
+ work.config.work_folder.mkdir(parents=False, exist_ok=True)
for folder, files in files_list_for_source_folders(work).items():
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
logger.info("Creating zip file: %s", zip_file)
Status: Mutant Found Mutator Name: Keyword Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:58
@@ -55,7 +55,7 @@
def create_temp_zips(work: PoodleWork) -> None:
"""Create a temporary zip file for each folder in source_folders."""
- work.config.work_folder.mkdir(parents=True, exist_ok=True)
+ work.config.work_folder.mkdir(parents=True, exist_ok=False)
for folder, files in files_list_for_source_folders(work).items():
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
logger.info("Creating zip file: %s", zip_file)
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:58
@@ -55,7 +55,7 @@
def create_temp_zips(work: PoodleWork) -> None:
"""Create a temporary zip file for each folder in source_folders."""
- work.config.work_folder.mkdir(parents=True, exist_ok=True)
+ None
for folder, files in files_list_for_source_folders(work).items():
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
logger.info("Creating zip file: %s", zip_file)
|
||
| ▸ | 59 |
for folder, files in files_list_for_source_folders(work).items(): |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:59
@@ -56,7 +56,7 @@
def create_temp_zips(work: PoodleWork) -> None:
"""Create a temporary zip file for each folder in source_folders."""
work.config.work_folder.mkdir(parents=True, exist_ok=True)
- for folder, files in files_list_for_source_folders(work).items():
+ for folder, files in None:
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
logger.info("Creating zip file: %s", zip_file)
work.folder_zips[folder] = zip_file
|
||
| ▸ | 60 |
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
|
|
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:60
@@ -57,7 +57,7 @@
"""Create a temporary zip file for each folder in source_folders."""
work.config.work_folder.mkdir(parents=True, exist_ok=True)
for folder, files in files_list_for_source_folders(work).items():
- zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
+ zip_file = work.config.work_folder * ('src-' + work.next_num() + '.zip')
logger.info("Creating zip file: %s", zip_file)
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:60
@@ -57,7 +57,7 @@
"""Create a temporary zip file for each folder in source_folders."""
work.config.work_folder.mkdir(parents=True, exist_ok=True)
for folder, files in files_list_for_source_folders(work).items():
- zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
+ zip_file = work.config.work_folder - ('src-' + work.next_num() + '.zip')
logger.info("Creating zip file: %s", zip_file)
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:60
@@ -57,7 +57,7 @@
"""Create a temporary zip file for each folder in source_folders."""
work.config.work_folder.mkdir(parents=True, exist_ok=True)
for folder, files in files_list_for_source_folders(work).items():
- zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
+ zip_file = work.config.work_folder / ('XXsrc-XX' + work.next_num() + ".zip")
logger.info("Creating zip file: %s", zip_file)
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:60
@@ -57,7 +57,7 @@
"""Create a temporary zip file for each folder in source_folders."""
work.config.work_folder.mkdir(parents=True, exist_ok=True)
for folder, files in files_list_for_source_folders(work).items():
- zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
+ zip_file = work.config.work_folder / ("src-" + work.next_num() + 'XX.zipXX')
logger.info("Creating zip file: %s", zip_file)
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:60
@@ -57,7 +57,7 @@
"""Create a temporary zip file for each folder in source_folders."""
work.config.work_folder.mkdir(parents=True, exist_ok=True)
for folder, files in files_list_for_source_folders(work).items():
- zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
+ zip_file = work.config.work_folder / ("src-" + None + ".zip")
logger.info("Creating zip file: %s", zip_file)
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
|
||
| ▸ | 61 |
logger.info("Creating zip file: %s", zip_file)
|
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:61
@@ -58,7 +58,7 @@
work.config.work_folder.mkdir(parents=True, exist_ok=True)
for folder, files in files_list_for_source_folders(work).items():
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
- logger.info("Creating zip file: %s", zip_file)
+ logger.info('XXCreating zip file: %sXX', zip_file)
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
for file in files:
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:61
@@ -58,7 +58,7 @@
work.config.work_folder.mkdir(parents=True, exist_ok=True)
for folder, files in files_list_for_source_folders(work).items():
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
- logger.info("Creating zip file: %s", zip_file)
+ None
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
for file in files:
|
||
| ▸ | 62 |
work.folder_zips[folder] = zip_file |
|
Status: Mutant Found Mutator Name: DictArray Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:62
@@ -59,7 +59,7 @@
for folder, files in files_list_for_source_folders(work).items():
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
logger.info("Creating zip file: %s", zip_file)
- work.folder_zips[folder] = zip_file
+ None = zip_file
with ZipFile(zip_file, "w") as target_zip:
for file in files:
logger.info("Adding file: %s", file)
|
||
| ▸ | 63 |
with ZipFile(zip_file, "w") as target_zip: |
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:63
@@ -60,7 +60,7 @@
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
logger.info("Creating zip file: %s", zip_file)
work.folder_zips[folder] = zip_file
- with ZipFile(zip_file, "w") as target_zip:
+ with ZipFile(zip_file, 'XXwXX') as target_zip:
for file in files:
logger.info("Adding file: %s", file)
target_zip.write(file)
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:63
@@ -60,7 +60,7 @@
zip_file = work.config.work_folder / ("src-" + work.next_num() + ".zip")
logger.info("Creating zip file: %s", zip_file)
work.folder_zips[folder] = zip_file
- with ZipFile(zip_file, "w") as target_zip:
+ with None as target_zip:
for file in files:
logger.info("Adding file: %s", file)
target_zip.write(file)
|
||
| 64 |
for file in files: |
|
| ▸ | 65 |
logger.info("Adding file: %s", file)
|
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:65
@@ -62,7 +62,7 @@
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
for file in files:
- logger.info("Adding file: %s", file)
+ logger.info('XXAdding file: %sXX', file)
target_zip.write(file)
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:65
@@ -62,7 +62,7 @@
work.folder_zips[folder] = zip_file
with ZipFile(zip_file, "w") as target_zip:
for file in files:
- logger.info("Adding file: %s", file)
+ None
target_zip.write(file)
|
||
| ▸ | 66 |
target_zip.write(file) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:66
@@ -63,7 +63,7 @@
with ZipFile(zip_file, "w") as target_zip:
for file in files:
logger.info("Adding file: %s", file)
- target_zip.write(file)
+ None
def dynamic_import(object_to_import: str) -> Any: # noqa: ANN401
|
||
| 67 | ||
| 68 | ||
| 69 |
def dynamic_import(object_to_import: str) -> Any: # noqa: ANN401 |
|
| 70 |
"""Import an Object represented by provided python name.""" |
|
| ▸ | 71 |
logger.debug("Import object: %s", object_to_import)
|
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:71
@@ -68,7 +68,7 @@
def dynamic_import(object_to_import: str) -> Any: # noqa: ANN401
"""Import an Object represented by provided python name."""
- logger.debug("Import object: %s", object_to_import)
+ logger.debug('XXImport object: %sXX', object_to_import)
parts = object_to_import.split(".")
module_str = ".".join(parts[:-1])
obj_def = parts[-1]
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:71
@@ -68,7 +68,7 @@
def dynamic_import(object_to_import: str) -> Any: # noqa: ANN401
"""Import an Object represented by provided python name."""
- logger.debug("Import object: %s", object_to_import)
+ None
parts = object_to_import.split(".")
module_str = ".".join(parts[:-1])
obj_def = parts[-1]
|
||
| ▸ | 72 |
parts = object_to_import.split(".")
|
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:72
@@ -69,7 +69,7 @@
def dynamic_import(object_to_import: str) -> Any: # noqa: ANN401
"""Import an Object represented by provided python name."""
logger.debug("Import object: %s", object_to_import)
- parts = object_to_import.split(".")
+ parts = object_to_import.split('XX.XX')
module_str = ".".join(parts[:-1])
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:72
@@ -69,7 +69,7 @@
def dynamic_import(object_to_import: str) -> Any: # noqa: ANN401
"""Import an Object represented by provided python name."""
logger.debug("Import object: %s", object_to_import)
- parts = object_to_import.split(".")
+ parts = None
module_str = ".".join(parts[:-1])
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
|
||
| ▸ | 73 |
module_str = ".".join(parts[:-1]) |
|
Status: Mutant Found Mutator Name: UnaryOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:73
@@ -70,7 +70,7 @@
"""Import an Object represented by provided python name."""
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
- module_str = ".".join(parts[:-1])
+ module_str = ".".join(parts[:+1])
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:73
@@ -70,7 +70,7 @@
"""Import an Object represented by provided python name."""
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
- module_str = ".".join(parts[:-1])
+ module_str = ".".join(parts[:-2])
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:73
@@ -70,7 +70,7 @@
"""Import an Object represented by provided python name."""
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
- module_str = ".".join(parts[:-1])
+ module_str = ".".join(parts[:-0])
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:73
@@ -70,7 +70,7 @@
"""Import an Object represented by provided python name."""
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
- module_str = ".".join(parts[:-1])
+ module_str = 'XX.XX'.join(parts[:-1])
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:73
@@ -70,7 +70,7 @@
"""Import an Object represented by provided python name."""
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
- module_str = ".".join(parts[:-1])
+ module_str = None
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
Status: Mutant Found Mutator Name: DictArray Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:73
@@ -70,7 +70,7 @@
"""Import an Object represented by provided python name."""
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
- module_str = ".".join(parts[:-1])
+ module_str = ".".join(None)
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
|
||
| ▸ | 74 |
obj_def = parts[-1] |
|
Status: Mutant Found Mutator Name: UnaryOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:74
@@ -71,7 +71,7 @@
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
module_str = ".".join(parts[:-1])
- obj_def = parts[-1]
+ obj_def = parts[+1]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:74
@@ -71,7 +71,7 @@
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
module_str = ".".join(parts[:-1])
- obj_def = parts[-1]
+ obj_def = parts[-2]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:74
@@ -71,7 +71,7 @@
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
module_str = ".".join(parts[:-1])
- obj_def = parts[-1]
+ obj_def = parts[-0]
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
Status: Mutant Found Mutator Name: DictArray Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:74
@@ -71,7 +71,7 @@
logger.debug("Import object: %s", object_to_import)
parts = object_to_import.split(".")
module_str = ".".join(parts[:-1])
- obj_def = parts[-1]
+ obj_def = None
module = __import__(module_str, fromlist=[obj_def])
return getattr(module, obj_def)
|
||
| ▸ | 75 |
module = __import__(module_str, fromlist=[obj_def]) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:75
@@ -72,7 +72,7 @@
parts = object_to_import.split(".")
module_str = ".".join(parts[:-1])
obj_def = parts[-1]
- module = __import__(module_str, fromlist=[obj_def])
+ module = None
return getattr(module, obj_def)
|
||
| ▸ | 76 |
return getattr(module, obj_def) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:76
@@ -73,7 +73,7 @@
module_str = ".".join(parts[:-1])
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
- return getattr(module, obj_def)
+ return None
def pprint_str(obj: Any) -> str: # noqa: ANN401
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:76
@@ -73,7 +73,7 @@
module_str = ".".join(parts[:-1])
obj_def = parts[-1]
module = __import__(module_str, fromlist=[obj_def])
- return getattr(module, obj_def)
+ return None
def pprint_str(obj: Any) -> str: # noqa: ANN401
|
||
| 77 | ||
| 78 | ||
| 79 |
def pprint_str(obj: Any) -> str: # noqa: ANN401 |
|
| 80 |
"""Pretty Print an object to a string.""" |
|
| ▸ | 81 |
out = StringIO() |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:81
@@ -78,7 +78,7 @@
def pprint_str(obj: Any) -> str: # noqa: ANN401
"""Pretty Print an object to a string."""
- out = StringIO()
+ out = None
pprint(obj, stream=out, width=150) # noqa: T203
return out.getvalue()
|
||
| ▸ | 82 |
pprint(obj, stream=out, width=150) # noqa: T203 |
|
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:82
@@ -79,7 +79,7 @@
def pprint_str(obj: Any) -> str: # noqa: ANN401
"""Pretty Print an object to a string."""
out = StringIO()
- pprint(obj, stream=out, width=150) # noqa: T203
+ pprint(obj, stream=out, width=151) # noqa: T203
return out.getvalue()
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:82
@@ -79,7 +79,7 @@
def pprint_str(obj: Any) -> str: # noqa: ANN401
"""Pretty Print an object to a string."""
out = StringIO()
- pprint(obj, stream=out, width=150) # noqa: T203
+ pprint(obj, stream=out, width=149) # noqa: T203
return out.getvalue()
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:82
@@ -79,7 +79,7 @@
def pprint_str(obj: Any) -> str: # noqa: ANN401
"""Pretty Print an object to a string."""
out = StringIO()
- pprint(obj, stream=out, width=150) # noqa: T203
+ None # noqa: T203
return out.getvalue()
|
||
| ▸ | 83 |
return out.getvalue() |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:83
@@ -80,7 +80,7 @@
"""Pretty Print an object to a string."""
out = StringIO()
pprint(obj, stream=out, width=150) # noqa: T203
- return out.getvalue()
+ return None
def calc_timeout(config: PoodleConfig, clean_run_results: dict[pathlib.Path, MutantTrial]) -> float:
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:83
@@ -80,7 +80,7 @@
"""Pretty Print an object to a string."""
out = StringIO()
pprint(obj, stream=out, width=150) # noqa: T203
- return out.getvalue()
+ return None
def calc_timeout(config: PoodleConfig, clean_run_results: dict[pathlib.Path, MutantTrial]) -> float:
|
||
| 84 | ||
| 85 | ||
| 86 |
def calc_timeout(config: PoodleConfig, clean_run_results: dict[pathlib.Path, MutantTrial]) -> float: |
|
| 87 |
"""Determine timeout value to use in runner.""" |
|
| ▸ | 88 |
max_clean_run = max([trial.duration for trial in clean_run_results.values()]) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:88
@@ -85,7 +85,7 @@
def calc_timeout(config: PoodleConfig, clean_run_results: dict[pathlib.Path, MutantTrial]) -> float:
"""Determine timeout value to use in runner."""
- max_clean_run = max([trial.duration for trial in clean_run_results.values()])
+ max_clean_run = None
return max(float(max_clean_run) * config.timeout_multiplier, config.min_timeout)
|
||
| ▸ | 89 |
return max(float(max_clean_run) * config.timeout_multiplier, config.min_timeout) |
|
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:89
@@ -86,7 +86,7 @@
def calc_timeout(config: PoodleConfig, clean_run_results: dict[pathlib.Path, MutantTrial]) -> float:
"""Determine timeout value to use in runner."""
max_clean_run = max([trial.duration for trial in clean_run_results.values()])
- return max(float(max_clean_run) * config.timeout_multiplier, config.min_timeout)
+ return max(float(max_clean_run) / config.timeout_multiplier, config.min_timeout)
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:89
@@ -86,7 +86,7 @@
def calc_timeout(config: PoodleConfig, clean_run_results: dict[pathlib.Path, MutantTrial]) -> float:
"""Determine timeout value to use in runner."""
max_clean_run = max([trial.duration for trial in clean_run_results.values()])
- return max(float(max_clean_run) * config.timeout_multiplier, config.min_timeout)
+ return max(float(max_clean_run) + config.timeout_multiplier, config.min_timeout)
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:89
@@ -86,7 +86,7 @@
def calc_timeout(config: PoodleConfig, clean_run_results: dict[pathlib.Path, MutantTrial]) -> float:
"""Determine timeout value to use in runner."""
max_clean_run = max([trial.duration for trial in clean_run_results.values()])
- return max(float(max_clean_run) * config.timeout_multiplier, config.min_timeout)
+ return None
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:89
@@ -86,7 +86,7 @@
def calc_timeout(config: PoodleConfig, clean_run_results: dict[pathlib.Path, MutantTrial]) -> float:
"""Determine timeout value to use in runner."""
max_clean_run = max([trial.duration for trial in clean_run_results.values()])
- return max(float(max_clean_run) * config.timeout_multiplier, config.min_timeout)
+ return None
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
|
||
| 90 | ||
| 91 | ||
| 92 |
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]: |
|
| 93 |
"""Apply mutation to list of lines from file.""" |
|
| ▸ | 94 |
mut_lines = deepcopy(file_lines) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:94
@@ -91,7 +91,7 @@
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
"""Apply mutation to list of lines from file."""
- mut_lines = deepcopy(file_lines)
+ mut_lines = None
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
|
||
| ▸ | 95 |
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset] |
|
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:95
@@ -92,7 +92,7 @@
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
- prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
+ prefix = mut_lines[mutant.lineno + 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:95
@@ -92,7 +92,7 @@
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
- prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
+ prefix = mut_lines[mutant.lineno / 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:95
@@ -92,7 +92,7 @@
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
- prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
+ prefix = mut_lines[mutant.lineno - 2][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:95
@@ -92,7 +92,7 @@
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
- prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
+ prefix = mut_lines[mutant.lineno - 0][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
Status: Mutant Found Mutator Name: DictArray Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:95
@@ -92,7 +92,7 @@
def mutate_lines(mutant: Mutant, file_lines: list[str]) -> list[str]:
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
- prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
+ prefix = None
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
|
||
| ▸ | 96 |
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :] |
|
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:96
@@ -93,7 +93,7 @@
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
- suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
+ suffix = mut_lines[mutant.end_lineno + 1][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:96
@@ -93,7 +93,7 @@
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
- suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
+ suffix = mut_lines[mutant.end_lineno / 1][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:96
@@ -93,7 +93,7 @@
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
- suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
+ suffix = mut_lines[mutant.end_lineno - 2][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:96
@@ -93,7 +93,7 @@
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
- suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
+ suffix = mut_lines[mutant.end_lineno - 0][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
Status: Mutant Found Mutator Name: DictArray Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:96
@@ -93,7 +93,7 @@
"""Apply mutation to list of lines from file."""
mut_lines = deepcopy(file_lines)
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
- suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
+ suffix = None
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
|
||
| 97 | ||
| ▸ | 98 |
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix |
|
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:98
@@ -95,7 +95,7 @@
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
- mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
+ mut_lines[mutant.lineno + 1] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
mut_lines.pop(mutant.lineno)
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:98
@@ -95,7 +95,7 @@
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
- mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
+ mut_lines[mutant.lineno / 1] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
mut_lines.pop(mutant.lineno)
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:98
@@ -95,7 +95,7 @@
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
- mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
+ mut_lines[mutant.lineno - 1] = prefix + mutant.text - suffix
for _ in range(mutant.lineno, mutant.end_lineno):
mut_lines.pop(mutant.lineno)
Status: Mutant Found Mutator Name: BinOp Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:98
@@ -95,7 +95,7 @@
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
- mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
+ mut_lines[mutant.lineno - 1] = (prefix + mutant.text) * suffix
for _ in range(mutant.lineno, mutant.end_lineno):
mut_lines.pop(mutant.lineno)
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:98
@@ -95,7 +95,7 @@
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
- mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
+ mut_lines[mutant.lineno - 2] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
mut_lines.pop(mutant.lineno)
Status: Mutant Found Mutator Name: Number Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:98
@@ -95,7 +95,7 @@
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
- mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
+ mut_lines[mutant.lineno - 0] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
mut_lines.pop(mutant.lineno)
Status: Mutant Found Mutator Name: DictArray Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:98
@@ -95,7 +95,7 @@
prefix = mut_lines[mutant.lineno - 1][: mutant.col_offset]
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
- mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
+ None = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
mut_lines.pop(mutant.lineno)
|
||
| ▸ | 99 |
for _ in range(mutant.lineno, mutant.end_lineno): |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:99
@@ -96,7 +96,7 @@
suffix = mut_lines[mutant.end_lineno - 1][mutant.end_col_offset :]
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
- for _ in range(mutant.lineno, mutant.end_lineno):
+ for _ in None:
mut_lines.pop(mutant.lineno)
return mut_lines
|
||
| ▸ | 100 |
mut_lines.pop(mutant.lineno) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:100
@@ -97,7 +97,7 @@
mut_lines[mutant.lineno - 1] = prefix + mutant.text + suffix
for _ in range(mutant.lineno, mutant.end_lineno):
- mut_lines.pop(mutant.lineno)
+ None
return mut_lines
|
||
| 101 | ||
| ▸ | 102 |
return mut_lines |
|
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:102
@@ -99,7 +99,7 @@
for _ in range(mutant.lineno, mutant.end_lineno):
mut_lines.pop(mutant.lineno)
- return mut_lines
+ return None
def create_unified_diff(mutant: Mutant) -> str | None:
|
||
| 103 | ||
| 104 | ||
| 105 |
def create_unified_diff(mutant: Mutant) -> str | None: |
|
| 106 |
"""Add unified diff to mutant.""" |
|
| 107 |
if mutant.source_file: |
|
| ▸ | 108 |
file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
|
|
Status: Mutant Not Found Mutator Name: Keyword Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:108
@@ -105,7 +105,7 @@
def create_unified_diff(mutant: Mutant) -> str | None:
"""Add unified diff to mutant."""
if mutant.source_file:
- file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
+ file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=False)
file_name = str(mutant.source_file)
return "".join(
difflib.unified_diff(
Status: Mutant Not Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:108
@@ -105,7 +105,7 @@
def create_unified_diff(mutant: Mutant) -> str | None:
"""Add unified diff to mutant."""
if mutant.source_file:
- file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
+ file_lines = mutant.source_file.read_text('XXutf-8XX').splitlines(keepends=True)
file_name = str(mutant.source_file)
return "".join(
difflib.unified_diff(
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:108
@@ -105,7 +105,7 @@
def create_unified_diff(mutant: Mutant) -> str | None:
"""Add unified diff to mutant."""
if mutant.source_file:
- file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
+ file_lines = None
file_name = str(mutant.source_file)
return "".join(
difflib.unified_diff(
|
||
| ▸ | 109 |
file_name = str(mutant.source_file) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:109
@@ -106,7 +106,7 @@
"""Add unified diff to mutant."""
if mutant.source_file:
file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
- file_name = str(mutant.source_file)
+ file_name = None
return "".join(
difflib.unified_diff(
a=file_lines,
|
||
| ▸ | 110 |
return "".join( |
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:110
@@ -107,7 +107,7 @@
if mutant.source_file:
file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
file_name = str(mutant.source_file)
- return "".join(
+ return 'XXXX'.join(
difflib.unified_diff(
a=file_lines,
b=mutate_lines(mutant, file_lines),
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:110
@@ -107,14 +107,7 @@
if mutant.source_file:
file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
file_name = str(mutant.source_file)
- return "".join(
- difflib.unified_diff(
- a=file_lines,
- b=mutate_lines(mutant, file_lines),
- fromfile=file_name,
- tofile=f"[Mutant] {file_name}:{mutant.lineno}",
- )
- )
+ return None
return None
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:110
@@ -107,14 +107,7 @@
if mutant.source_file:
file_lines = mutant.source_file.read_text("utf-8").splitlines(keepends=True)
file_name = str(mutant.source_file)
- return "".join(
- difflib.unified_diff(
- a=file_lines,
- b=mutate_lines(mutant, file_lines),
- fromfile=file_name,
- tofile=f"[Mutant] {file_name}:{mutant.lineno}",
- )
- )
+ return None
return None
|
||
| 111 |
difflib.unified_diff( |
|
| 112 |
a=file_lines, |
|
| 113 |
b=mutate_lines(mutant, file_lines), |
|
| 114 |
fromfile=file_name, |
|
| ▸ | 115 |
tofile=f"[Mutant] {file_name}:{mutant.lineno}",
|
|
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:115
@@ -112,7 +112,7 @@
a=file_lines,
b=mutate_lines(mutant, file_lines),
fromfile=file_name,
- tofile=f"[Mutant] {file_name}:{mutant.lineno}",
+ tofile=f"'XX[Mutant] XX'{file_name}:{mutant.lineno}",
)
)
return None
Status: Mutant Found Mutator Name: String Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:115
@@ -112,7 +112,7 @@
a=file_lines,
b=mutate_lines(mutant, file_lines),
fromfile=file_name,
- tofile=f"[Mutant] {file_name}:{mutant.lineno}",
+ tofile=f"[Mutant] {file_name}'XX:XX'{mutant.lineno}",
)
)
return None
|
||
| 116 |
) |
|
| 117 |
) |
|
| ▸ | 118 |
return None |
|
Status: Mutant Found Mutator Name: Keyword Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:118
@@ -115,7 +115,7 @@
tofile=f"[Mutant] {file_name}:{mutant.lineno}",
)
)
- return None
+ return ' '
def to_json(obj: PoodleSerialize, indent: int | str | None = None) -> str:
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:118
@@ -115,7 +115,7 @@
tofile=f"[Mutant] {file_name}:{mutant.lineno}",
)
)
- return None
+ return ''
def to_json(obj: PoodleSerialize, indent: int | str | None = None) -> str:
|
||
| 119 | ||
| 120 | ||
| ▸ | 121 |
def to_json(obj: PoodleSerialize, indent: int | str | None = None) -> str: |
|
Status: Mutant Found Mutator Name: Keyword Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:121
@@ -118,7 +118,7 @@
return None
-def to_json(obj: PoodleSerialize, indent: int | str | None = None) -> str:
+def to_json(obj: PoodleSerialize, indent: int | str | None = ' ') -> str:
"""Convert dataclass to json string."""
return json.dumps(obj, indent=indent, default=lambda x: x.to_dict())
|
||
| 122 |
"""Convert dataclass to json string.""" |
|
| ▸ | 123 |
return json.dumps(obj, indent=indent, default=lambda x: x.to_dict()) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:123
@@ -120,7 +120,7 @@
def to_json(obj: PoodleSerialize, indent: int | str | None = None) -> str:
"""Convert dataclass to json string."""
- return json.dumps(obj, indent=indent, default=lambda x: x.to_dict())
+ return None
def from_json(data: str, datatype: type[PoodleSerialize]) -> PoodleSerialize:
Status: Mutant Found Mutator Name: Lambda Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:123
@@ -120,7 +120,7 @@
def to_json(obj: PoodleSerialize, indent: int | str | None = None) -> str:
"""Convert dataclass to json string."""
- return json.dumps(obj, indent=indent, default=lambda x: x.to_dict())
+ return json.dumps(obj, indent=indent, default=lambda x: None)
def from_json(data: str, datatype: type[PoodleSerialize]) -> PoodleSerialize:
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:123
@@ -120,7 +120,7 @@
def to_json(obj: PoodleSerialize, indent: int | str | None = None) -> str:
"""Convert dataclass to json string."""
- return json.dumps(obj, indent=indent, default=lambda x: x.to_dict())
+ return None
def from_json(data: str, datatype: type[PoodleSerialize]) -> PoodleSerialize:
|
||
| 124 | ||
| 125 | ||
| 126 |
def from_json(data: str, datatype: type[PoodleSerialize]) -> PoodleSerialize: |
|
| 127 |
"""Convert json string to dataclass.""" |
|
| ▸ | 128 |
return datatype(**json.loads(data, object_hook=datatype.from_dict)) |
|
Status: Mutant Found Mutator Name: FuncCall Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:128
@@ -125,4 +125,4 @@
def from_json(data: str, datatype: type[PoodleSerialize]) -> PoodleSerialize:
"""Convert json string to dataclass."""
- return datatype(**json.loads(data, object_hook=datatype.from_dict))
+ return None
Status: Mutant Found Mutator Name: Return Unified Diff: --- src\poodle\util.py
+++ [Mutant] src\poodle\util.py:128
@@ -125,4 +125,4 @@
def from_json(data: str, datatype: type[PoodleSerialize]) -> PoodleSerialize:
"""Convert json string to dataclass."""
- return datatype(**json.loads(data, object_hook=datatype.from_dict))
+ return None
|