diff --git a/.gitignore b/.gitignore index cd9572c91..a666f452a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,10 +12,6 @@ __pycache__/ venv/ .venv/ -# -.mutmut-cache -mutmut-results.* - # Code coverage artifacts .coverage* coverage.xml diff --git a/Makefile b/Makefile index 2807d2cda..b1159705a 100644 --- a/Makefile +++ b/Makefile @@ -23,13 +23,6 @@ test: testtype: pytest tests --cov --cov-report term-missing -vv --cov-report html --durations=3 --timeout=30 --typeguard-packages=pypdf -mutation-test: - mutmut run - -mutation-results: - mutmut junitxml --suspicious-policy=ignore --untested-policy=ignore > mutmut-results.xml - junit2html mutmut-results.xml mutmut-results.html - benchmark: pytest tests/bench.py diff --git a/mutmut-test.sh b/mutmut-test.sh deleted file mode 100755 index 9a8bb1d73..000000000 --- a/mutmut-test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -e -pytest -x -mypy pypdf --show-error-codes --disallow-untyped-defs --disallow-incomplete-defs --ignore-missing-imports diff --git a/mutmut_config.py b/mutmut_config.py deleted file mode 100644 index ae08b2338..000000000 --- a/mutmut_config.py +++ /dev/null @@ -1,25 +0,0 @@ -""" -Configuration for mutmut. - -See https://mutmut.readthedocs.io/en/latest/ -""" - -from mutmut import Context - - -def pre_mutation(context: Context) -> None: - """ - Filter what to mutate. - - Args: - context: A mutmut Context object - - """ - line = context.current_source_line.strip() - if ( - "_codecs" in context.filename - or "pragma: no cover" in line - or "deprecate" in line - or line.startswith("logger") - ): - context.skip = True diff --git a/pyproject.toml b/pyproject.toml index e85630d7d..33cc4e1bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,16 +53,11 @@ image = ["Pillow>=8.0.0"] dev = ["black", "flit", "pip-tools", "pre-commit<2.18.0", "pytest-cov", "pytest-socket", "pytest-timeout", "pytest-xdist", "wheel"] docs = ["myst_parser", "sphinx", "sphinx_rtd_theme"] -[tool.mutmut] -backup = false -runner = "./mutmut-test.sh" -tests_dir = "tests/" - [tool.check-wheel-contents] package = "./pypdf" [tool.flit.sdist] -exclude = [".github/*", "docs/*", "sample-files/.github/*", "sample-files/.gitignore", "sample-files/.pre-commit-config.yaml", "requirements/*", ".flake8", ".gitignore", ".gitmodules", ".pylintrc", "tox.ini", "make_release.py", "mutmut-test.sh", ".pre-commit-config.yaml", ".gitblame-ignore-revs", "Makefile", "mutmut_config.py"] +exclude = [".github/*", "docs/*", "sample-files/.github/*", "sample-files/.gitignore", "sample-files/.pre-commit-config.yaml", "requirements/*", ".flake8", ".gitignore", ".gitmodules", ".pylintrc", "tox.ini", "make_release.py", ".pre-commit-config.yaml", ".gitblame-ignore-revs", "Makefile"] include = ["resources/", "tests/"] [tool.pytest.ini_options] diff --git a/setup.cfg b/setup.cfg index 84859aa19..65a463b63 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,8 +1,3 @@ -[mutmut] -backup = False -runner = ./mutmut-test.sh -tests_dir = tests/ - [tool:check-wheel-contents] package = ./pypdf