Module Source: src\poodle\data_types\work.py

Project: poodle version 1.2.0   <Index
Mutants: 22, Found: 22, Not Found: 0, Timeout: 0, Error: 0
Module Score: 100.00%
1
"""Containers for Work-in-progress data."""
2

        
3
from __future__ import annotations
4

        
5
import logging
6
from dataclasses import dataclass
7
from typing import IO, TYPE_CHECKING, Any, AnyStr, Callable
8

        
9
import click
10

        
11
logger = logging.getLogger(__name__)

Status: Mutant Found

Mutator Name: FuncCall

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:11
@@ -8,7 +8,7 @@
 
 import click
 
-logger = logging.getLogger(__name__)
+logger = None
 
 if TYPE_CHECKING:
     from collections.abc import Generator
12

        
13
if TYPE_CHECKING:
14
    from collections.abc import Generator
15
    from pathlib import Path
16

        
17
    from .data import PoodleConfig
18
    from .interfaces import Mutator
19

        
20

        
21
class PoodleWork:
22
    """Work-in-progress data gathered into single structure for easy passing between functions."""
23

        
24
    def __init__(self, config: PoodleConfig) -> None:
25
        """Init from PoodleConfig."""
26
        self.config = config
27
        self.folder_zips: dict[Path, Path] = {}
28
        self.mutators: list[Mutator | Callable] = []
29
        self.runner: Callable = lambda *_, **__: None

Status: Mutant Found

Mutator Name: Keyword

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:29
@@ -26,7 +26,7 @@
         self.config = config
         self.folder_zips: dict[Path, Path] = {}
         self.mutators: list[Mutator | Callable] = []
-        self.runner: Callable = lambda *_, **__: None
+        self.runner: Callable = lambda *_, **__: ' '
         self.reporters: list[Callable] = []
 
         self._echo_wrapper = EchoWrapper(config.echo_enabled, config.echo_no_color)

Status: Mutant Found

Mutator Name: Lambda

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:29
@@ -26,7 +26,7 @@
         self.config = config
         self.folder_zips: dict[Path, Path] = {}
         self.mutators: list[Mutator | Callable] = []
-        self.runner: Callable = lambda *_, **__: None
+        self.runner: Callable = lambda *_, **__: ''
         self.reporters: list[Callable] = []
 
         self._echo_wrapper = EchoWrapper(config.echo_enabled, config.echo_no_color)
30
        self.reporters: list[Callable] = []
31

        
32
        self._echo_wrapper = EchoWrapper(config.echo_enabled, config.echo_no_color)

Status: Mutant Found

Mutator Name: FuncCall

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:32
@@ -29,7 +29,7 @@
         self.runner: Callable = lambda *_, **__: None
         self.reporters: list[Callable] = []
 
-        self._echo_wrapper = EchoWrapper(config.echo_enabled, config.echo_no_color)
+        self._echo_wrapper = None
         self.echo: Callable = self._echo_wrapper.echo
 
         def number_generator() -> Generator[int, Any, None]:
33
        self.echo: Callable = self._echo_wrapper.echo
34

        
35
        def number_generator() -> Generator[int, Any, None]:
36
            i = 1

Status: Mutant Found

Mutator Name: Number

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:36
@@ -33,7 +33,7 @@
         self.echo: Callable = self._echo_wrapper.echo
 
         def number_generator() -> Generator[int, Any, None]:
-            i = 1
+            i = 2
             while True:
                 yield i
                 i += 1

Status: Mutant Found

Mutator Name: Number

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:36
@@ -33,7 +33,7 @@
         self.echo: Callable = self._echo_wrapper.echo
 
         def number_generator() -> Generator[int, Any, None]:
-            i = 1
+            i = 0
             while True:
                 yield i
                 i += 1
37
            while True:

Status: Mutant Found

Mutator Name: Keyword

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:37
@@ -34,7 +34,7 @@
 
         def number_generator() -> Generator[int, Any, None]:
             i = 1
-            while True:
+            while False:
                 yield i
                 i += 1
 
38
                yield i
39
                i += 1

Status: Mutant Found

Mutator Name: AugAssign

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:39
@@ -36,7 +36,7 @@
             i = 1
             while True:
                 yield i
-                i += 1
+                i = 1
 
         self._num_gen = number_generator()
 

Status: Mutant Found

Mutator Name: AugAssign

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:39
@@ -36,7 +36,7 @@
             i = 1
             while True:
                 yield i
-                i += 1
+                i -= 1
 
         self._num_gen = number_generator()
 

Status: Mutant Found

Mutator Name: AugAssign

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:39
@@ -36,7 +36,7 @@
             i = 1
             while True:
                 yield i
-                i += 1
+                i *= 1
 
         self._num_gen = number_generator()
 

Status: Mutant Found

Mutator Name: Number

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:39
@@ -36,7 +36,7 @@
             i = 1
             while True:
                 yield i
-                i += 1
+                i += 2
 
         self._num_gen = number_generator()
 

Status: Mutant Found

Mutator Name: Number

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:39
@@ -36,7 +36,7 @@
             i = 1
             while True:
                 yield i
-                i += 1
+                i += 0
 
         self._num_gen = number_generator()
 
40

        
41
        self._num_gen = number_generator()

Status: Mutant Found

Mutator Name: FuncCall

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:41
@@ -38,7 +38,7 @@
                 yield i
                 i += 1
 
-        self._num_gen = number_generator()
+        self._num_gen = None
 
     def next_num(self) -> str:
         """Return the next value from Sequence as a string."""
42

        
43
    def next_num(self) -> str:
44
        """Return the next value from Sequence as a string."""
45
        return str(next(self._num_gen))

Status: Mutant Found

Mutator Name: FuncCall

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:45
@@ -42,7 +42,7 @@
 
     def next_num(self) -> str:
         """Return the next value from Sequence as a string."""
-        return str(next(self._num_gen))
+        return None
 
 
 @dataclass

Status: Mutant Found

Mutator Name: Return

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:45
@@ -42,7 +42,7 @@
 
     def next_num(self) -> str:
         """Return the next value from Sequence as a string."""
-        return str(next(self._num_gen))
+        return None
 
 
 @dataclass
46

        
47

        
48
@dataclass
49
class EchoWrapper:
50
    """Contains config options related to echo function."""
51

        
52
    echo_enabled: bool | None
53
    echo_no_color: bool | None
54

        
55
    def echo(  # noqa: PLR0913
56
        self,
57
        message: Any | None = None,  # noqa: ANN401

Status: Mutant Found

Mutator Name: Keyword

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:57
@@ -54,7 +54,7 @@
 
     def echo(  # noqa: PLR0913
         self,
-        message: Any | None = None,  # noqa: ANN401
+        message: Any | None = ' ',  # noqa: ANN401
         file: IO[AnyStr] | None = None,
         nl: bool = True,
         err: bool = False,
58
        file: IO[AnyStr] | None = None,

Status: Mutant Found

Mutator Name: Keyword

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:58
@@ -55,7 +55,7 @@
     def echo(  # noqa: PLR0913
         self,
         message: Any | None = None,  # noqa: ANN401
-        file: IO[AnyStr] | None = None,
+        file: IO[AnyStr] | None = ' ',
         nl: bool = True,
         err: bool = False,
         color: bool | None = None,
59
        nl: bool = True,

Status: Mutant Found

Mutator Name: Keyword

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:59
@@ -56,7 +56,7 @@
         self,
         message: Any | None = None,  # noqa: ANN401
         file: IO[AnyStr] | None = None,
-        nl: bool = True,
+        nl: bool = False,
         err: bool = False,
         color: bool | None = None,
         **styles: dict,
60
        err: bool = False,

Status: Mutant Found

Mutator Name: Keyword

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:60
@@ -57,7 +57,7 @@
         message: Any | None = None,  # noqa: ANN401
         file: IO[AnyStr] | None = None,
         nl: bool = True,
-        err: bool = False,
+        err: bool = True,
         color: bool | None = None,
         **styles: dict,
     ) -> None:
61
        color: bool | None = None,

Status: Mutant Found

Mutator Name: Keyword

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:61
@@ -58,7 +58,7 @@
         file: IO[AnyStr] | None = None,
         nl: bool = True,
         err: bool = False,
-        color: bool | None = None,
+        color: bool | None = ' ',
         **styles: dict,
     ) -> None:
         """Calls 'click.secho' with settings from config."""  # noqa: D401
62
        **styles: dict,
63
    ) -> None:
64
        """Calls 'click.secho' with settings from config."""  # noqa: D401
65
        if self.echo_no_color:
66
            color = False

Status: Mutant Found

Mutator Name: Keyword

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:66
@@ -63,6 +63,6 @@
     ) -> None:
         """Calls 'click.secho' with settings from config."""  # noqa: D401
         if self.echo_no_color:
-            color = False
+            color = True
         if self.echo_enabled:
             click.secho(message, file, nl, err, color, **styles)
67
        if self.echo_enabled:
68
            click.secho(message, file, nl, err, color, **styles)

Status: Mutant Found

Mutator Name: FuncCall

Unified Diff:

--- src\poodle\data_types\work.py
+++ [Mutant] src\poodle\data_types\work.py:68
@@ -65,4 +65,4 @@
         if self.echo_no_color:
             color = False
         if self.echo_enabled:
-            click.secho(message, file, nl, err, color, **styles)
+            None