repo
stringclasses 37
values | instance_id
stringlengths 17
34
| base_commit
stringlengths 40
40
| patch
stringlengths 291
1.62M
| test_patch
stringlengths 307
76.5k
| problem_statement
stringlengths 40
59.9k
| hints_text
stringlengths 0
149k
| created_at
stringdate 2018-06-13 17:01:37
2024-12-20 00:40:00
| merged_at
stringdate 2018-09-24 06:57:54
2024-12-20 20:16:12
| PASS_TO_PASS
stringlengths 2
601k
| PASS_TO_FAIL
stringclasses 11
values | FAIL_TO_PASS
stringlengths 18
605k
| FAIL_TO_FAIL
stringclasses 60
values | install
stringlengths 217
12.7k
| test_framework
stringclasses 10
values | test_commands
stringclasses 10
values | version
null | environment_setup_commit
null | docker_image_root
stringclasses 1
value |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hynek/structlog | hynek__structlog-198 | 53ec2bbd011c9c2fad77bfb310ba102b4c3abcac | diff --git a/src/structlog/stdlib.py b/src/structlog/stdlib.py
index fff4e28c..95ef0fdb 100644
--- a/src/structlog/stdlib.py
+++ b/src/structlog/stdlib.py
@@ -120,9 +120,52 @@ def _proxy_to_logger(self, method_name, event, *event_args, **event_kw):
)
#
- # Pass-through methods to mimick the stdlib's logger interface.
+ # Pass-through attributes and methods to mimick the stdlib's logger
+ # interface.
#
+ @property
+ def name(self):
+ """
+ Returns :attr:`logging.Logger.name`
+ """
+ return self._logger.name
+
+ @property
+ def level(self):
+ """
+ Returns :attr:`logging.Logger.level`
+ """
+ return self._logger.level
+
+ @property
+ def parent(self):
+ """
+ Returns :attr:`logging.Logger.parent`
+ """
+ return self._logger.parent
+
+ @property
+ def propagate(self):
+ """
+ Returns :attr:`logging.Logger.propagate`
+ """
+ return self._logger.propagate
+
+ @property
+ def handlers(self):
+ """
+ Returns :attr:`logging.Logger.handlers`
+ """
+ return self._logger.handlers
+
+ @property
+ def disabled(self):
+ """
+ Returns :attr:`logging.Logger.disabled`
+ """
+ return self._logger.disabled
+
def setLevel(self, level):
"""
Calls :meth:`logging.Logger.setLevel` with unmodified arguments.
| diff --git a/tests/test_stdlib.py b/tests/test_stdlib.py
index c02e3f6e..d0209b9e 100644
--- a/tests/test_stdlib.py
+++ b/tests/test_stdlib.py
@@ -191,6 +191,21 @@ def test_positional_args_proxied(self):
assert "baz" == kwargs.get("bar")
assert ("foo",) == kwargs.get("positional_args")
+ @pytest.mark.parametrize(
+ "attribute_name",
+ ["name", "level", "parent", "propagate", "handlers", "disabled"],
+ )
+ def test_stdlib_passthrough_attributes(self, attribute_name):
+ """
+ stdlib logger attributes are also available in stdlib BoundLogger.
+ """
+ stdlib_logger = logging.getLogger("Test")
+ stdlib_logger_attribute = getattr(stdlib_logger, attribute_name)
+ bl = BoundLogger(stdlib_logger, [], {})
+ bound_logger_attribute = getattr(bl, attribute_name)
+
+ assert bound_logger_attribute == stdlib_logger_attribute
+
@pytest.mark.parametrize(
"method_name,method_args",
[
| Inconsistency of BoundLogger with logging.Logger
There are no public attributes of `logging.Logger` available within `BoundLogger` (`propagate` for instance).
Also there are no attributes or methods of `logging.Filterer` (which is parent class of `logging.Logger`) available within `BoundLogger`.
| That’s on purpose…what would you expect them to do?
@hynek I expect them to proxy to original attributes or methods.
The problem occured when I tried to replace my Flask app's default logger with `BoundLogger`. I use `raven` library and it checks `propagate` attribute of logger: https://github.com/getsentry/raven-python/blob/master/raven/contrib/flask.py#L297. Of course it leads to an error.
Another one example of logger's `name` attribute usage: https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web.py#L394 (raises exception if `BoundLogger` was specified at `aiohttp.web.run_app(access_log=...)`).
I suppose the easiest way for you would be to use the dynamic default logger that will just proxy everything to the wrapped logger? I’m not sure it’s worth it to play whack-a-mole with the whole API to catch all possible usages. 🤔
What do you mean by "dynamic default logger" and how it can be used with the `BoundLogger`? Currently I just sublclassed `BoundLogger` and implemented methods I need to use.
If I’m not mistaken, it should be enough to _not_ configure `wrapper_class`. Then you'll get https://www.structlog.org/en/stable/api.html#structlog.BoundLogger which will forward every unknown method call (i.e. everything except bind/unbind/new) to the wrapped logger. | 2019-03-11T18:06:23Z | 2019-03-13T14:10:55Z | ["tests/test_stdlib.py::TestProcessorFormatter::test_log_dict", "tests/test_stdlib.py::TestBoundLogger::test_exception_exc_info", "tests/test_stdlib.py::TestBoundLogger::test_proxies_to_correct_method[critical]", "tests/test_stdlib.py::TestFilterByLevel::test_passes_higher_levels", "tests/test_stdlib.py::TestAddLogLevelNumber::test_log_level_number_added[critical-50]", "tests/test_stdlib.py::TestProcessorFormatter::test_formatter_unsets_exc_info[False]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[setLevel-method_args5]", "tests/test_stdlib.py::TestBoundLogger::test_positional_args_proxied", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[isEnabledFor-method_args7]", "tests/test_stdlib.py::TestAddLogLevelNumber::test_log_level_number_added[warning-30]", "tests/test_stdlib.py::TestPositionalArgumentsFormatter::test_nop_no_args", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[handle-method_args4]", "tests/test_stdlib.py::TestProcessorFormatter::test_formatter_unsets_stack_info[False]", "tests/test_stdlib.py::TestBoundLogger::test_proxies_to_correct_method[debug]", "tests/test_stdlib.py::TestProcessorFormatter::test_formatter_unsets_exc_info[True]", "tests/test_stdlib.py::TestAddLoggerName::test_logger_name_added_with_record", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[makeRecord-method_args9]", "tests/test_stdlib.py::TestProcessorFormatter::test_foreign_pre_chain_add_logger_name", "tests/test_stdlib.py::TestBoundLogger::test_proxies_to_correct_method[error]", "tests/test_stdlib.py::TestProcessorFormatter::test_foreign_chain_can_pass_dictionaries_without_excepting", "tests/test_stdlib.py::TestAddLogLevel::test_log_level_alias_normalized", "tests/test_stdlib.py::TestLoggerFactory::test_deduces_correct_caller", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[findCaller-None]", "tests/test_stdlib.py::TestAddLogLevelNumber::test_log_level_number_added[error-40]", "tests/test_stdlib.py::TestAddLogLevelNumber::test_log_level_number_added[notset-0]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[callHandlers-method_args3]", "tests/test_stdlib.py::TestLoggerFactory::test_sets_correct_logger", "tests/test_stdlib.py::TestLoggerFactory::test_positional_argument_avoids_guessing", "tests/test_stdlib.py::TestAddLoggerName::test_logger_name_added", "tests/test_stdlib.py::TestProcessorFormatter::test_foreign_pre_chain_gets_exc_info", "tests/test_stdlib.py::TestPositionalArgumentsFormatter::test_formats_dict", "tests/test_stdlib.py::TestLoggerFactory::test_stack_info", "tests/test_stdlib.py::TestRenderToLogKW::test_add_extra_event_dict", "tests/test_stdlib.py::TestBoundLogger::test_proxies_exception", "tests/test_stdlib.py::TestProcessorFormatter::test_foreign_delegate", "tests/test_stdlib.py::TestBoundLogger::test_proxies_log", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[getChild-method_args10]", "tests/test_stdlib.py::TestLoggerFactory::test_find_caller", "tests/test_stdlib.py::TestAddLogLevelNumber::test_log_level_number_added[info-20]", "tests/test_stdlib.py::TestProcessorFormatter::test_other_handlers_get_original_record", "tests/test_stdlib.py::TestBoundLogger::test_proxies_to_correct_method[info]", "tests/test_stdlib.py::TestRenderToLogKW::test_default", "tests/test_stdlib.py::TestAddLogLevelNumber::test_log_level_number_added[debug-10]", "tests/test_stdlib.py::TestProcessorFormatter::test_formatter_unsets_stack_info[True]", "tests/test_stdlib.py::TestProcessorFormatter::test_foreign_pre_chain", "tests/test_stdlib.py::TestPositionalArgumentsFormatter::test_args_removed_if_empty", "tests/test_stdlib.py::TestPositionalArgumentsFormatter::test_positional_args_retained", "tests/test_stdlib.py::TestFilterByLevel::test_filters_lower_levels", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[removeHandler-method_args1]", "tests/test_stdlib.py::TestAddLogLevelNumber::test_log_level_number_added[exception-40]", "tests/test_stdlib.py::TestAddLogLevelNumber::test_log_level_number_added[warn-30]", "tests/test_stdlib.py::TestLoggerFactory::test_ignores_frames", "tests/test_stdlib.py::TestLoggerFactory::test_deduces_correct_name", "tests/test_stdlib.py::TestAddLogLevel::test_log_level_added", "tests/test_stdlib.py::TestLoggerFactory::test_no_stack_info_by_default", "tests/test_stdlib.py::TestBoundLogger::test_proxies_to_correct_method[warning]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[hasHandlers-None]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[getEffectiveLevel-None]", "tests/test_stdlib.py::TestBoundLogger::test_exception_exc_info_override", "tests/test_stdlib.py::TestPositionalArgumentsFormatter::test_formats_tuple", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_methods[addHandler-method_args0]", "tests/test_stdlib.py::TestProcessorFormatter::test_clears_args"] | [] | ["tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[propagate]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[parent]", "tests/test_stdlib.py::TestProcessorFormatter::test_native", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[disabled]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[level]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[handlers]", "tests/test_stdlib.py::TestBoundLogger::test_stdlib_passthrough_attributes[name]"] | [] | {"install": [], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = # lint,{py27,py34,py35,py36,py37,pypy,pypy3}-threads,{py27,py37,pypy}-{greenlets,colorama,oldtwisted},# docs,pypi-description,manifest,coverage-report\nisolated_build = True\n\n\n[testenv:lint]\nbasepython = python3.7\nskip_install = true\ndeps = pre-commit\npassenv = HOMEPATH # needed on Windows\ncommands = pre-commit run --all-files\n\n\n[testenv]\nextras = tests\ndeps =\n greenlets: greenlet\n threads,greenlets,colorama: twisted\n oldtwisted: twisted < 17\n colorama: colorama\nsetenv =\n PYTHONHASHSEED = 0\ncommands = python -m pytest --color=no -rA --tb=no -p no:cacheprovider {posargs}\n\n\n[testenv:py37-threads]\ndeps = twisted\nsetenv =\n PYTHONHASHSEED = 0\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider {posargs}\n\n\n[testenv:py37-greenlets]\ndeps =\n greenlet\n twisted\nsetenv =\n PYTHONHASHSEED = 0\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider {posargs}\n\n\n[testenv:py27-threads]\ndeps = twisted\nsetenv =\n PYTHONHASHSEED = 0\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider {posargs}\n\n\n[testenv:py27-colorama]\ndeps =\n colorama\n twisted\nsetenv =\n PYTHONHASHSEED = 0\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider {posargs}\n\n\n[testenv:docs]\nbasepython = python3.7\nextras =\n docs\npassenv = TERM\nsetenv =\n PYTHONHASHSEED = 0\ncommands =\n sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html\n sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html\n\n\n[testenv:pypi-description]\nbasepython = python3.7\nskip_install = true\ndeps =\n twine\n pip >= 18.0.0\ncommands =\n pip wheel -w {envtmpdir}/build --no-deps .\n twine check {envtmpdir}/build/*\n\n\n[testenv:manifest]\nbasepython = python3.7\nskip_install = true\ndeps = check-manifest\ncommands = check-manifest\n\n\n[testenv:coverage-report]\nbasepython = python3.7\ndeps = coverage\nskip_install = true\ncommands =\n coverage combine\n coverage report\n\nEOF_1234810234"], "python": "3.7", "pip_packages": ["filelock==3.0.10", "pip==22.3.1", "pluggy==0.9.0", "py==1.8.0", "setuptools==65.6.3", "six==1.12.0", "toml==0.10.0", "tox==3.7.0", "virtualenv==16.4.3", "wheel==0.38.4"]} | tox -- | null | null | null | swa-bench:sw.eval |
simonw/datasette | simonw__datasette-1766 | 9f1eb0d4eac483b953392157bd9fd6cc4df37de7 | diff --git a/datasette/app.py b/datasette/app.py
index f43700d45e..9243bf21fe 100644
--- a/datasette/app.py
+++ b/datasette/app.py
@@ -218,6 +218,7 @@ def __init__(
assert config_dir is None or isinstance(
config_dir, Path
), "config_dir= should be a pathlib.Path"
+ self.config_dir = config_dir
self.pdb = pdb
self._secret = secret or secrets.token_hex(32)
self.files = tuple(files or []) + tuple(immutables or [])
| diff --git a/tests/test_config_dir.py b/tests/test_config_dir.py
index 015c6aceeb..fe927c42a6 100644
--- a/tests/test_config_dir.py
+++ b/tests/test_config_dir.py
@@ -1,4 +1,5 @@
import json
+import pathlib
import pytest
from datasette.app import Datasette
@@ -150,3 +151,11 @@ def test_metadata_yaml(tmp_path_factory, filename):
response = client.get("/-/metadata.json")
assert 200 == response.status
assert {"title": "Title from metadata"} == response.json
+
+
+def test_store_config_dir(config_dir_client):
+ ds = config_dir_client.ds
+
+ assert hasattr(ds, "config_dir")
+ assert ds.config_dir is not None
+ assert isinstance(ds.config_dir, pathlib.Path)
| Keep track of config_dir in directory mode (for plugins)
I started working on using `config_dir` with my [datasette-query-files plugin](https://github.com/eyeseast/datasette-query-files) and realized Datasette doesn't actually hold onto the `config_dir` argument. It gets used in `__init__` but then forgotten. It would be nice to be able to use it in plugins, though.
Here's the reference issue: https://github.com/eyeseast/datasette-query-files/issues/4
| 2022-07-03T17:37:02Z | 2022-07-18T01:12:45Z | ["tests/test_config_dir.py::test_metadata_yaml[metadata.yml]", "tests/test_config_dir.py::test_settings", "tests/test_config_dir.py::test_static_directory_browsing_not_allowed", "tests/test_config_dir.py::test_databases", "tests/test_config_dir.py::test_templates_and_plugin", "tests/test_config_dir.py::test_plugins", "tests/test_config_dir.py::test_static", "tests/test_config_dir.py::test_error_on_config_json", "tests/test_config_dir.py::test_metadata"] | [] | ["tests/test_config_dir.py::test_store_config_dir", "tests/test_config_dir.py::test_metadata_yaml[metadata.yaml]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nfilterwarnings = \n\tignore:Using or importing the ABCs::jinja2\n\tignore:Using or importing the ABCs::bs4.element\n\tignore:.*current_task.*:PendingDeprecationWarning\nmarkers = \n\tserial: tests to avoid using with pytest-xdist\nasyncio_mode = strict\naddopts = --color=no -rA --tb=no -p no:cacheprovider\n\n\nEOF_1234810234"], "python": "3.10", "pip_packages": ["aiofiles==0.8.0", "alabaster==0.7.16", "anyio==4.4.0", "appdirs==1.4.4", "asgi-csrf==0.10", "asgiref==3.5.2", "attrs==24.2.0", "babel==2.16.0", "beautifulsoup4==4.11.2", "black==22.6.0", "blacken-docs==1.12.1", "certifi==2024.7.4", "cffi==1.17.0", "charset-normalizer==3.3.2", "click==8.1.7", "click-default-group==1.2.4", "click-default-group-wheel==1.2.3", "codespell==2.3.0", "cogapp==3.4.1", "colorama==0.4.6", "cryptography==43.0.0", "docutils==0.17.1", "exceptiongroup==1.2.2", "execnet==2.1.1", "flexcache==0.3", "flexparser==0.3.1", "furo==2022.4.7", "h11==0.14.0", "httpcore==1.0.5", "httpx==0.27.0", "hupper==1.12.1", "idna==3.7", "imagesize==1.4.1", "iniconfig==2.0.0", "itsdangerous==2.2.0", "janus==1.0.0", "jinja2==3.0.3", "markupsafe==2.1.5", "mergedeep==1.3.4", "mypy-extensions==1.0.0", "packaging==24.1", "pathspec==0.12.1", "pint==0.24.3", "platformdirs==4.2.2", "pluggy==1.0.0", "py==1.11.0", "pycparser==2.22", "pygments==2.18.0", "pytest==7.1.3", "pytest-asyncio==0.18.3", "pytest-forked==1.6.0", "pytest-timeout==2.1.0", "pytest-xdist==2.5.0", "python-multipart==0.0.9", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "soupsieve==2.6", "sphinx==4.5.0", "sphinx-autobuild==2024.4.16", "sphinx-copybutton==0.5.2", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "starlette==0.38.2", "tomli==2.0.1", "trustme==0.9.0", "typing-extensions==4.12.2", "urllib3==2.2.2", "uvicorn==0.30.6", "watchfiles==0.23.0", "websockets==12.0", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-8485 | 331e4e751733eb0af018602ef26746a7e0571107 | diff --git a/src/PIL/WmfImagePlugin.py b/src/PIL/WmfImagePlugin.py
index 68f8a74f599..cad6c98d53f 100644
--- a/src/PIL/WmfImagePlugin.py
+++ b/src/PIL/WmfImagePlugin.py
@@ -128,7 +128,7 @@ def _open(self) -> None:
size = x1 - x0, y1 - y0
# calculate dots per inch from bbox and frame
- xdpi = 2540.0 * (x1 - y0) / (frame[2] - frame[0])
+ xdpi = 2540.0 * (x1 - x0) / (frame[2] - frame[0])
ydpi = 2540.0 * (y1 - y0) / (frame[3] - frame[1])
self.info["wmf_bbox"] = x0, y0, x1, y1
| diff --git a/Tests/test_file_wmf.py b/Tests/test_file_wmf.py
index 79e707263d6..424640d7b18 100644
--- a/Tests/test_file_wmf.py
+++ b/Tests/test_file_wmf.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+from io import BytesIO
from pathlib import Path
from typing import IO
@@ -61,6 +62,12 @@ def test_load_float_dpi() -> None:
with Image.open("Tests/images/drawing.emf") as im:
assert im.info["dpi"] == 1423.7668161434979
+ with open("Tests/images/drawing.emf", "rb") as fp:
+ data = fp.read()
+ b = BytesIO(data[:8] + b"\x06\xFA" + data[10:])
+ with Image.open(b) as im:
+ assert im.info["dpi"][0] == 2540
+
def test_load_set_dpi() -> None:
with Image.open("Tests/images/drawing.wmf") as im:
| EMF aspect ratio issues
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/questions/tagged/python-imaging-library
Do not ask a question in both places.
If you think you have found a bug or have an unexplained exception
then file a bug report here.
2. Bug report: include a self-contained, copy-pastable example that
generates the issue if possible. Be concise with code posted.
Guidelines on how to provide a good bug report:
* https://stackoverflow.com/help/mcve
Bug reports which follow these guidelines are easier to diagnose,
and are often handled much more quickly.
3. Feature request: do a quick search of existing issues
to make sure this has not been asked before.
We know asking good questions takes effort, and we appreciate your time.
Thank you.
-->
### What did you do?
Attempted to use imsize and save to convert an EMF to a PNG. For certain EMFs, the final aspect ratio is incorrect.
[image94.zip](https://github.com/user-attachments/files/17350860/image94.zip)
```python
filein = 'image100.emf'
conversion_path = 'image100.png'
from PIL import Image
with open(filein, "rb") as file:
with Image.open(file) as im:
width, height = im.size
new_width = 400
new_height = int((new_width / width) * height)
resized_image = im.resize((new_width, new_height), Image.LANCZOS)
resized_image.save(conversion_path)
```
### What did you expect to happen?
It should have been converted to PNG with the original aspect ratio.
### What actually happened?
It converted with the wrong aspect ratio, as shown here:

It seems to be inferring the wrong width and height. I attempted getting the width and height using various low-level means, but that also didn't work.
### What are your OS, Python and Pillow versions?
* OS: Windows 10 Home, version 22H2, build 19045.5011
* Python: 3.9.20
* Pillow: 10.4.0
```text
--------------------------------------------------------------------
Pillow 10.4.0
Python 3.9.20 (main, Oct 3 2024, 07:38:01) [MSC v.1929 64 bit (AMD64)]
--------------------------------------------------------------------
Python executable is C:\Users\burgh\anaconda3\python.exe
System Python files loaded from C:\Users\burgh\anaconda3
--------------------------------------------------------------------
Python Pillow modules loaded from C:\Users\burgh\anaconda3\lib\site-packages\PIL
Binary Pillow modules loaded from C:\Users\burgh\anaconda3\lib\site-packages\PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 10.4.0
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.12.1
--- LITTLECMS2 support ok, loaded 2.12
--- WEBP support ok, loaded 1.3.2
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for 9.0
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.2.13
--- LIBTIFF support ok, loaded 4.5.1
*** RAQM (Bidirectional Text) support not installed
*** LIBIMAGEQUANT (Quantization method) support not installed
*** XCB (X protocol) support not installed
--------------------------------------------------------------------
--------------------------------------------------------------------
Pillow 10.4.0
Python 3.9.20 (main, Oct 3 2024, 07:38:01) [MSC v.1929 64 bit (AMD64)]
--------------------------------------------------------------------
Python executable is C:\Users\burgh\anaconda3\python.exe
System Python files loaded from C:\Users\burgh\anaconda3
--------------------------------------------------------------------
Python Pillow modules loaded from C:\Users\burgh\anaconda3\lib\site-packages\PIL
Binary Pillow modules loaded from C:\Users\burgh\anaconda3\lib\site-packages\PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 10.4.0
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.12.1
--- LITTLECMS2 support ok, loaded 2.12
--- WEBP support ok, loaded 1.3.2
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for 9.0
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.2.13
--- LIBTIFF support ok, loaded 4.5.1
*** RAQM (Bidirectional Text) support not installed
*** LIBIMAGEQUANT (Quantization method) support not installed
*** XCB (X protocol) support not installed
--------------------------------------------------------------------
```
| Investigating, I found that the DPI has two dimensions in your image.
See what you think of this.
```python
filein = 'image100.emf'
conversion_path = 'image100.png'
from PIL import Image
with open(filein, "rb") as file:
with Image.open(file) as im:
width, height = im.size
new_width = 400
new_height = (new_width / width) * height
if len(im.info["dpi"]) == 2:
new_height /= im.info["dpi"][1] / im.info["dpi"][0]
new_height = int(new_height)
resized_image = im.resize((new_width, new_height), Image.LANCZOS)
resized_image.save(conversion_path)
```
Much better (thanks), but still not completely correct. This is how it appears in Inkscape & Powerpoint: . Using the non-uniform DPI gives a correct height (.388 in), but an incorrect width (2.87 in, when it should be 2.14 in).
I should point out that even if you skip the resizing, you get the same issue. I'm not sure if this is intended behavior or not—to me a non-uniform DPI should be taken into account when saving, but maybe that's the intended behavior.
Would you happen to have any images with different DPIs that we could add to our test suite, and distribute under the Pillow license?
Your second comment is not as helpful as it could be, as you're talking about a different image. Would you be able to express your expectations of the pixel dimensions after opening the first image? | 2024-10-19T09:44:43Z | 2024-10-26T09:45:53Z | ["Tests/test_file_wmf.py::test_register_handler", "Tests/test_file_wmf.py::test_load_set_dpi", "Tests/test_file_wmf.py::test_load", "Tests/test_file_wmf.py::test_save[.wmf]", "Tests/test_file_wmf.py::test_load_raw"] | [] | ["Tests/test_file_wmf.py::test_load_float_dpi", "Tests/test_file_wmf.py::test_save[.emf]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.5.0", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.6.4", "distlib==0.3.9", "filelock==3.16.1", "iniconfig==2.0.0", "packaging==24.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pyproject-api==1.8.0", "pytest==8.3.3", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.23.2", "uv==0.4.27", "virtualenv==20.27.0", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8366 | 22c333289e3009f8dd5f345e3328220daf11d929 | diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
index f206fbb9cef..57c29179273 100644
--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -553,7 +553,9 @@ def _normalize_palette(
if im.mode == "P":
if not source_palette:
- source_palette = im.im.getpalette("RGB")[:768]
+ im_palette = im.getpalette(None)
+ assert im_palette is not None
+ source_palette = bytearray(im_palette)
else: # L-mode
if not source_palette:
source_palette = bytearray(i // 3 for i in range(768))
@@ -629,7 +631,10 @@ def _write_single_frame(
def _getbbox(
base_im: Image.Image, im_frame: Image.Image
) -> tuple[Image.Image, tuple[int, int, int, int] | None]:
- if _get_palette_bytes(im_frame) != _get_palette_bytes(base_im):
+ palette_bytes = [
+ bytes(im.palette.palette) if im.palette else b"" for im in (base_im, im_frame)
+ ]
+ if palette_bytes[0] != palette_bytes[1]:
im_frame = im_frame.convert("RGBA")
base_im = base_im.convert("RGBA")
delta = ImageChops.subtract_modulo(im_frame, base_im)
@@ -984,7 +989,13 @@ def _get_palette_bytes(im: Image.Image) -> bytes:
:param im: Image object
:returns: Bytes, len<=768 suitable for inclusion in gif header
"""
- return bytes(im.palette.palette) if im.palette else b""
+ if not im.palette:
+ return b""
+
+ palette = bytes(im.palette.palette)
+ if im.palette.mode == "RGBA":
+ palette = b"".join(palette[i * 4 : i * 4 + 3] for i in range(len(palette) // 3))
+ return palette
def _get_background(
diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index e6d9047f5b9..a7a158d35c7 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -1066,7 +1066,7 @@ def convert_transparency(
trns_im = new(self.mode, (1, 1))
if self.mode == "P":
assert self.palette is not None
- trns_im.putpalette(self.palette)
+ trns_im.putpalette(self.palette, self.palette.mode)
if isinstance(t, tuple):
err = "Couldn't allocate a palette color for transparency"
assert trns_im.palette is not None
@@ -2182,6 +2182,9 @@ def remap_palette(
source_palette = self.im.getpalette(palette_mode, palette_mode)
else: # L-mode
source_palette = bytearray(i // 3 for i in range(768))
+ elif len(source_palette) > 768:
+ bands = 4
+ palette_mode = "RGBA"
palette_bytes = b""
new_positions = [0] * 256
| diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index 571fe1b9ac0..16c8466f331 100644
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -1429,3 +1429,21 @@ def test_saving_rgba(tmp_path: Path) -> None:
with Image.open(out) as reloaded:
reloaded_rgba = reloaded.convert("RGBA")
assert reloaded_rgba.load()[0, 0][3] == 0
+
+
+def test_optimizing_p_rgba(tmp_path: Path) -> None:
+ out = str(tmp_path / "temp.gif")
+
+ im1 = Image.new("P", (100, 100))
+ d = ImageDraw.Draw(im1)
+ d.ellipse([(40, 40), (60, 60)], fill=1)
+ data = [0, 0, 0, 0, 0, 0, 0, 255] + [0, 0, 0, 0] * 254
+ im1.putpalette(data, "RGBA")
+
+ im2 = Image.new("P", (100, 100))
+ im2.putpalette(data, "RGBA")
+
+ im1.save(out, save_all=True, append_images=[im2])
+
+ with Image.open(out) as reloaded:
+ assert reloaded.n_frames == 2
| GIF optimizer acts wrongly with black pixels when `disposal=2`
### What did you do?
- Create a GIF with these two identically sized (250x217) frames: `green.png` and `red.png`


```python
from PIL import Image
green = Image.open("green.png")
red = Image.open("red.png")
green.save("opt.gif", save_all=True, append_images=[red], disposal=2, loop=0, duration=500)
```
### What did you expect to happen?
Pillow should create this GIF:

### What actually happened?
Pillow actually creates this GIF, with the second frame "missing" two pixels in height, which get shown as transparent:

```sh
> identify opt.gif
opt.gif[0] GIF 250x217 250x217+0+0 8-bit sRGB 32c 0.000u 0:00.000
opt.gif[1] GIF 250x215 250x217+0+0 8-bit sRGB 64c 5237B 0.000u 0:00.000
```
What I discovered so far:
- If the black color gets changed to a black-ish color (e.g., rgb(2, 0, 0)), the issue disappears
- If the `disposal` method is not `2`, the issue disappears
- If `optimize=False`, the issue disappears (see the `no_opt.gif` created above in the "expect to happen" section)
This problem seems related, but not identical, to #8003.
### What are your OS, Python and Pillow versions?
* OS: macOS 14.5
* Python: 3.12.3
* Pillow: 10.4.0
```sh
--------------------------------------------------------------------
Pillow 10.4.0
Python 3.12.3 (main, Apr 9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)]
--------------------------------------------------------------------
Python executable is /Users/lucach/Library/Caches/pypoetry/virtualenvs/pytamaro-5GgIxOWM-py3.12/bin/python
Environment Python files loaded from /Users/lucach/Library/Caches/pypoetry/virtualenvs/pytamaro-5GgIxOWM-py3.12
System Python files loaded from /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12
--------------------------------------------------------------------
Python Pillow modules loaded from /Users/lucach/Library/Caches/pypoetry/virtualenvs/pytamaro-5GgIxOWM-py3.12/lib/python3.12/site-packages/PIL
Binary Pillow modules loaded from /Users/lucach/Library/Caches/pypoetry/virtualenvs/pytamaro-5GgIxOWM-py3.12/lib/python3.12/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 10.4.0
*** TKINTER support not installed
--- FREETYPE2 support ok, loaded 2.13.2
--- LITTLECMS2 support ok, loaded 2.16
--- WEBP support ok, loaded 1.4.0
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for libjpeg-turbo 3.0.3
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.3.1
--- LIBTIFF support ok, loaded 4.6.0
--- RAQM (Bidirectional Text) support ok, loaded 0.10.1, fribidi 1.0.14, harfbuzz 8.5.0
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------
```
| 2024-09-10T09:10:13Z | 2024-09-10T11:37:03Z | ["Tests/test_file_gif.py::test_dispose_none", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_gif.py::test_extents[test_extents.gif-0]", "Tests/test_file_gif.py::test_context_manager", "Tests/test_file_gif.py::test_seek_info", "Tests/test_file_gif.py::test_append_images", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Tests/test_file_gif.py::test_l_mode_after_rgb", "Tests/test_file_gif.py::test_seek_rewind", "Tests/test_file_gif.py::test_version", "Tests/test_file_gif.py::test_lzw_bits", "Tests/test_file_gif.py::test_save_dispose", "Tests/test_file_gif.py::test_dispose_previous", "Tests/test_file_gif.py::test_number_of_loops", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration2]", "Tests/test_file_gif.py::test_sanity", "Tests/test_file_gif.py::test_background", "Tests/test_file_gif.py::test_seek", "Tests/test_file_gif.py::test_n_frames[Tests/images/hopper.gif-1]", "Tests/test_file_gif.py::test_missing_background", "Tests/test_file_gif.py::test_dispose2_palette", "Tests/test_file_gif.py::test_optimize_correctness[128-513-256]", "Tests/test_file_gif.py::test_eoferror", "Tests/test_file_gif.py::test_dispose_background", "Tests/test_file_gif.py::test_palette_save_all_P", "Tests/test_file_gif.py::test_identical_frames", "Tests/test_file_gif.py::test_webp_background", "Tests/test_file_gif.py::test_roundtrip_save_all", "Tests/test_file_gif.py::test_optimize_correctness[129-511-129]", "Tests/test_file_gif.py::test_optimize_correctness[128-511-128]", "Tests/test_file_gif.py::test_no_change", "Tests/test_file_gif.py::test_optimize_correctness[4-513-256]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd.gif-RGB]", "Tests/test_file_gif.py::test_dispose_background_transparency", "Tests/test_file_gif.py::test_optimize_correctness[255-511-255]", "Tests/test_file_gif.py::test_optimize_correctness[256-511-256]", "Tests/test_file_gif.py::test_append_different_size_image", "Tests/test_file_gif.py::test_palette_handling", "Tests/test_file_gif.py::test_palette_save_duplicate_entries", "Tests/test_file_gif.py::test_comment", "Tests/test_file_gif.py::test_multiple_duration", "Tests/test_file_gif.py::test_read_multiple_comment_blocks", "Tests/test_file_gif.py::test_previous_frame_loaded", "Tests/test_file_gif.py::test_roundtrip_info_duration_combined", "Tests/test_file_gif.py::test_empty_string_comment", "Tests/test_file_gif.py::test_n_frames[Tests/images/comment_after_last_frame.gif-2]", "Tests/test_file_gif.py::test_transparent_dispose[1-expected_colors1]", "Tests/test_file_gif.py::test_optimize_full_l", "Tests/test_file_gif.py::test_full_palette_second_frame", "Tests/test_file_gif.py::test_invalid_file", "Tests/test_file_gif.py::test_removed_transparency", "Tests/test_file_gif.py::test_roundtrip_info_duration", "Tests/test_file_gif.py::test_optimize_correctness[64-511-64]", "Tests/test_file_gif.py::test_dispose2_previous_frame", "Tests/test_file_gif.py::test_no_transparency_in_second_frame", "Tests/test_file_gif.py::test_palette_not_needed_for_second_frame", "Tests/test_file_gif.py::test_save_I", "Tests/test_file_gif.py::test_optimize_correctness[64-513-256]", "Tests/test_file_gif.py::test_transparent_optimize", "Tests/test_file_gif.py::test_optimize_if_palette_can_be_reduced_by_half", "Tests/test_file_gif.py::test_comment_over_255", "Tests/test_file_gif.py::test_l_mode_transparency", "Tests/test_file_gif.py::test_extents[test_extents.gif-1]", "Tests/test_file_gif.py::test_unclosed_file", "Tests/test_file_gif.py::test_n_frames[Tests/images/iss634.gif-42]", "Tests/test_file_gif.py::test_dispose_previous_first_frame", "Tests/test_file_gif.py::test_optimize_correctness[4-511-4]", "Tests/test_file_gif.py::test_rgb_transparency", "Tests/test_file_gif.py::test_retain_comment_in_subsequent_frames", "Tests/test_file_gif.py::test_duration", "Tests/test_file_gif.py::test_first_frame_transparency", "Tests/test_file_gif.py::test_palette_434", "Tests/test_file_gif.py::test_palette_save_P", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd_rgba.gif-RGBA]", "Tests/test_file_gif.py::test_loop_none", "Tests/test_file_gif.py::test_palette_save_L", "Tests/test_file_gif.py::test_zero_comment_subblocks", "Tests/test_file_gif.py::test_roundtrip", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[1500]", "Tests/test_file_gif.py::test_closed_file", "Tests/test_file_gif.py::test_strategy", "Tests/test_file_gif.py::test_bbox_alpha", "Tests/test_file_gif.py::test_saving_rgba", "Tests/test_file_gif.py::test_extents[test_extents_transparency.gif-0]", "Tests/test_file_gif.py::test_optimize", "Tests/test_file_gif.py::test_roundtrip_save_all_1", "Tests/test_file_gif.py::test_dispose2_background", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration1]", "Tests/test_file_gif.py::test_seek_after_close", "Tests/test_file_gif.py::test_roundtrip2", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration0]", "Tests/test_file_gif.py::test_rgba_transparency", "Tests/test_file_gif.py::test_remapped_transparency", "Tests/test_file_gif.py::test_palette_save_ImagePalette", "Tests/test_file_gif.py::test_dispose2_background_frame", "Tests/test_file_gif.py::test_background_outside_palettte", "Tests/test_file_gif.py::test_headers_saving_for_animated_gifs", "Tests/test_file_gif.py::test_bbox", "Tests/test_file_gif.py::test_getdata", "Tests/test_file_gif.py::test_dispose_none_load_end", "Tests/test_file_gif.py::test_dispose2_diff"] | [] | ["Tests/test_file_gif.py::test_optimizing_p_rgba"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.5.0", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.6.1", "distlib==0.3.8", "filelock==3.16.0", "iniconfig==2.0.0", "packaging==24.1", "platformdirs==4.3.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.3.3", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.18.1", "uv==0.4.9", "virtualenv==20.26.4", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-8350 | 6377321625b93f5241305a7b301026cbbcd21e96 | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index 1c0cf293633..2fb677ead3f 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -3968,7 +3968,7 @@ def load(self, data: bytes) -> None:
self._data.clear()
self._hidden_data.clear()
self._ifds.clear()
- if data and data.startswith(b"Exif\x00\x00"):
+ while data and data.startswith(b"Exif\x00\x00"):
data = data[6:]
if not data:
self._info = None
| diff --git a/Tests/test_image.py b/Tests/test_image.py
index b0d71966779..97e97acaabd 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -775,6 +775,14 @@ def test_empty_exif(self) -> None:
exif.load(b"Exif\x00\x00")
assert not dict(exif)
+ def test_duplicate_exif_header(self) -> None:
+ with Image.open("Tests/images/exif.png") as im:
+ im.load()
+ im.info["exif"] = b"Exif\x00\x00" + im.info["exif"]
+
+ exif = im.getexif()
+ assert exif[274] == 1
+
def test_empty_get_ifd(self) -> None:
exif = Image.Exif()
ifd = exif.get_ifd(0x8769)
| Error reading EXIF from file: SyntaxError: not a TIFF file (header b'' not valid)
### What did you do?
Tried to load image (attached below) and rotate it using `image = ImageOps.exif_transpose(image)`
Related to #4852 and #6123
### What did you expect to happen?
Image rotated according to EXIF
### What actually happened?
Processing failed with an error due to EXIF metadata being broken. Looking at exif information, I see it contains a duplicate `Exif\x00\x00Exif\x00\x00` at the beginning. This image is uploaded by one of the clients, so I don't know how exactly that happened.
`b'Exif\x00\x00Exif\x00\x00II*\x00\x08\x00\x00\x00\x06\x00\x12\x01\x03\x00\x01\x00\x00\x00\x01\x00\x00\x00\x1a\x01\x05\x00\x01\x00\x00\x00V\x00\x00\x00\x1b\x01\x05\x00\x01\x00\x00\x00^\x00\x00\x00(\x01\x03\x00\x01\x00\x00\x00\x02\x00\x00\x00\x13\x02\x03\x00\x01\x00\x00\x00\x01\x00\x00\x00i\x87\x04\x00\x01\x00\x00\x00f\x00\x00\x00\x00\x00\x00\x00H\x00\x00\x00\x01\x00\x00\x00H\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x90\x07\x00\x04\x00\x00\x000210\x01\x91\x07\x00\x04\x00\x00\x00\x01\x02\x03\x00\x00\xa0\x07\x00\x04\x00\x00\x000100\x01\xa0\x03\x00\x01\x00\x00\x00\xff\xff\x00\x00\x02\xa0\x04\x00\x01\x00\x00\x00\x08\x07\x00\x00\x03\xa0\x04\x00\x01\x00\x00\x00\x08\x07\x00\x00\x00\x00\x00\x00'`
exiftool shows there is error with exif
`Warning : Malformed APP1 EXIF segment`
### What are your OS, Python and Pillow versions?
* OS: MacOS
* Python: 3.10
* Pillow: 10.2.0
```text
Please paste here the output of running:
Pillow 10.2.0
Python 3.10.14 (main, Mar 19 2024, 21:46:16) [Clang 15.0.0 (clang-1500.3.9.4)]
--------------------------------------------------------------------
Python modules loaded from /opt/homebrew/lib/python3.10/site-packages/PIL
Binary modules loaded from /opt/homebrew/lib/python3.10/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 10.2.0
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.13.3
--- LITTLECMS2 support ok, loaded 2.16
--- WEBP support ok, loaded 1.4.0
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for libjpeg-turbo 3.0.2
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.2.12
--- LIBTIFF support ok, loaded 4.6.0
*** RAQM (Bidirectional Text) support not installed
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
```
```python
image = Image.open("broken_exif.jpg")
image = ImageOps.exif_transpose(image)
```
Image itself

| For an immediate solution, you can use this code to repair the EXIF data yourself.
```python
from PIL import Image, ImageOps
image = Image.open("in.jpg")
if "exif" in image.info and image.info["exif"].startswith(b"Exif\x00\x00Exif\x00\x00"):
image.info["exif"] = image.info["exif"][6:]
image = ImageOps.exif_transpose(image)
image.save("out.jpg")
```
> This image is uploaded by one of the clients, so I don't know how exactly that happened.
If this is just a single image, not something that has happened repeatedly, is it possible to just accept that this is broken, and not something that Pillow needs to handle?
exiftool agrees that it is malformed, so it's not just us that think so.
This specific image, the only one you know of with this problem, isn't even transposed when the data is correctly parsed. The image retains its original orientation - meaning that just catching the error
```python
from PIL import Image, ImageOps
image = Image.open('in.jpg')
try:
image = ImageOps.exif_transpose(image)
except Exception:
pass
```
would actually serve you equally well.
There are actually 3 similar images with the same problem that were uploaded, I attached a single one for simplicity. I will add the try .. .except block logic, just wanted to push a workaround if anyone will meet same problem in the future | 2024-09-05T11:36:03Z | 2024-09-07T09:31:19Z | ["Tests/test_image.py::TestImage::test_dump", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16B]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16N]", "Tests/test_image.py::TestImage::test_storage_neg", "Tests/test_image.py::TestImage::test_exif_jpeg", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[LAB]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[LA]", "Tests/test_image.py::TestImage::test_radial_gradient[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[HSV]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[CMYK]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[LAB]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBA]", "Tests/test_image.py::TestImage::test_radial_gradient[P]", "Tests/test_image.py::TestImage::test_effect_spread_zero", "Tests/test_image.py::TestImage::test_no_new_file_on_error", "Tests/test_image.py::TestImage::test_image_modes_success[RGB]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16]", "Tests/test_image.py::TestImage::test_getbands", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow2.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGB]", "Tests/test_image.py::TestImage::test_getbbox", "Tests/test_image.py::TestImage::test_image_modes_success[I;16]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;24]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBa]", "Tests/test_image.py::TestImage::test_image_modes_success[F]", "Tests/test_image.py::TestImage::test_readonly_save", "Tests/test_image.py::TestImage::test_remap_palette_transparency", "Tests/test_image.py::TestImage::test_exif_ifd1", "Tests/test_image.py::TestImage::test_image_modes_fail[very very long]", "Tests/test_image.py::TestImage::test_register_open_duplicates", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;15]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBA]", "Tests/test_image.py::TestImage::test_getchannel_wrong_params", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16]", "Tests/test_image.py::TestImage::test_registered_extensions", "Tests/test_image.py::TestRegistry::test_encode_registry", "Tests/test_image.py::TestImage::test_register_extensions", "Tests/test_image.py::TestImage::test_linear_gradient[P]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;15]", "Tests/test_image.py::TestImage::test_width_height", "Tests/test_image.py::TestImage::test_fp_name", "Tests/test_image.py::TestImage::test_radial_gradient[L]", "Tests/test_image.py::TestImage::test_overrun[fli_overrun.bin]", "Tests/test_image.py::TestImage::test_image_modes_success[LAB]", "Tests/test_image.py::TestImage::test_comparison_with_other_type", "Tests/test_image.py::TestImage::test_alpha_composite", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16N]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[PA]", "Tests/test_image.py::TestImage::test_image_modes_success[L]", "Tests/test_image.py::TestImage::test_exit_fp", "Tests/test_image.py::TestImage::test_image_modes_success[I;16B]", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun2.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;24]", "Tests/test_image.py::TestImage::test_ne", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[LA]", "Tests/test_image.py::TestImage::test_zero_tobytes[size1]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[P]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGB]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-#DDEEFF]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[1]", "Tests/test_image.py::TestImage::test_zero_tobytes[size2]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBA]", "Tests/test_image.py::TestImage::test_expand_x", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16B]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16B]", "Tests/test_image.py::TestImage::test_effect_spread", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGBA-color2]", "Tests/test_image.py::TestImage::test_open_verbose_failure", "Tests/test_image.py::TestImage::test_effect_noise", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[F]", "Tests/test_image.py::TestImage::test_linear_gradient_wrong_mode", "Tests/test_image.py::TestImage::test_open_formats", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[1]", "Tests/test_image.py::TestImage::test_constants", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[La]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16N]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;24]", "Tests/test_image.py::TestImage::test_image_modes_success[PA]", "Tests/test_image.py::TestImage::test_zero_frombytes[size0]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[F]", "Tests/test_image.py::TestImage::test_linear_gradient[F]", "Tests/test_image.py::TestImage::test_expand_xy", "Tests/test_image.py::TestImage::test_registered_extensions_uninitialized", "Tests/test_image.py::TestImage::test_empty_exif", "Tests/test_image.py::TestImage::test_image_modes_success[YCbCr]", "Tests/test_image.py::TestImage::test_image_modes_success[La]", "Tests/test_image.py::TestImage::test_tempfile", "Tests/test_image.py::TestImage::test_load_on_nonexclusive_multiframe", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[La]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[CMYK]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[L]", "Tests/test_image.py::TestImage::test_close_graceful", "Tests/test_image.py::TestImage::test_image_modes_success[I;16N]", "Tests/test_image.py::TestImage::test_exif_load_from_fp", "Tests/test_image.py::TestImage::test_overrun[01r_00.pcx]", "Tests/test_image.py::TestImage::test_radial_gradient[F]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun.bin]", "Tests/test_image.py::TestImage::test_one_item_tuple", "Tests/test_image.py::TestImage::test_exif_png", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow.bin]", "Tests/test_image.py::TestImage::test_zero_frombytes[size1]", "Tests/test_image.py::TestImage::test_image_modes_success[CMYK]", "Tests/test_image.py::TestImage::test_exception_inheritance", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBA]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBa]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;15]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[F]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBX]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[P]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[PA]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;24]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-color1]", "Tests/test_image.py::TestImage::test_unknown_extension", "Tests/test_image.py::TestImage::test_exif_hide_offsets", "Tests/test_image.py::TestImage::test_getchannel", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[HSV]", "Tests/test_image.py::TestImage::test_internals", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[YCbCr]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[CMYK]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[YCbCr]", "Tests/test_image.py::TestImage::test_overrun[ossfuzz-4836216264589312.pcx]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16L]", "Tests/test_image.py::TestImage::test_zero_tobytes[size0]", "Tests/test_image.py::TestImage::test_image_modes_success[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[PA]", "Tests/test_image.py::TestImage::test_getxmp_padded", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBa]", "Tests/test_image.py::TestImage::test_effect_mandelbrot_bad_arguments", "Tests/test_image.py::TestImage::test_zero_frombytes[size2]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGB]", "Tests/test_image.py::TestImage::test_image_modes_fail[]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[HSV]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;16]", "Tests/test_image.py::TestImage::test_effect_mandelbrot", "Tests/test_image.py::TestImage::test_set_mode", "Tests/test_image.py::TestImage::test_stringio", "Tests/test_image.py::TestRegistry::test_encode_registry_fail", "Tests/test_image.py::TestImage::test_invalid_image", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[L]", "Tests/test_image.py::TestImage::test_image_modes_success[HSV]", "Tests/test_image.py::TestImage::test_empty_get_ifd", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[P]", "Tests/test_image.py::TestImage::test_empty_image[size1]", "Tests/test_image.py::TestImage::test_sanity", "Tests/test_image.py::TestImage::test_fli_overrun2", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[La]", "Tests/test_image.py::TestImage::test_apply_transparency", "Tests/test_image.py::TestImage::test_check_size", "Tests/test_image.py::TestImage::test__new", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBX]", "Tests/test_image.py::TestImage::test_image_modes_success[LA]", "Tests/test_image.py::TestImage::test_linear_gradient[I]", "Tests/test_image.py::TestImage::test_has_transparency_data", "Tests/test_image.py::TestImage::test_image_modes_fail[bad]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[LA]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[LAB]", "Tests/test_image.py::TestImage::test_no_resource_warning_on_save", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBX]", "Tests/test_image.py::TestImage::test_exif_interop", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBa]", "Tests/test_image.py::TestImage::test_bad_mode", "Tests/test_image.py::TestImage::test_remap_palette", "Tests/test_image.py::TestImage::test_image_modes_success[RGBX]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[1]", "Tests/test_image.py::TestImage::test_image_modes_success[P]", "Tests/test_image.py::TestImage::test_image_modes_success[1]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16L]", "Tests/test_image.py::TestImage::test_exif_ifd", "Tests/test_image.py::TestImage::test_radial_gradient_wrong_mode", "Tests/test_image.py::TestImage::test_alpha_inplace", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[YCbCr]", "Tests/test_image.py::TestImage::test_empty_xmp", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;15]"] | [] | ["Tests/test_image.py::TestImage::test_duplicate_exif_header"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.5.0", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.6.1", "distlib==0.3.8", "filelock==3.16.0", "iniconfig==2.0.0", "packaging==24.1", "platformdirs==4.3.1", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.3.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.18.1", "uv==0.4.7", "virtualenv==20.26.4", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8231 | 6a9acfa5ca2b3ba462b086e4af776993bbd94a72 | diff --git a/src/PIL/PpmImagePlugin.py b/src/PIL/PpmImagePlugin.py
index 16c9ccbba72..211577e16ac 100644
--- a/src/PIL/PpmImagePlugin.py
+++ b/src/PIL/PpmImagePlugin.py
@@ -333,7 +333,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
rawmode, head = "1;I", b"P4"
elif im.mode == "L":
rawmode, head = "L", b"P5"
- elif im.mode == "I":
+ elif im.mode in ("I", "I;16"):
rawmode, head = "I;16B", b"P5"
elif im.mode in ("RGB", "RGBA"):
rawmode, head = "RGB", b"P6"
| diff --git a/Tests/test_file_ppm.py b/Tests/test_file_ppm.py
index d6451ec18b5..fa50274480f 100644
--- a/Tests/test_file_ppm.py
+++ b/Tests/test_file_ppm.py
@@ -95,7 +95,9 @@ def test_16bit_pgm_write(tmp_path: Path) -> None:
with Image.open("Tests/images/16_bit_binary.pgm") as im:
filename = str(tmp_path / "temp.pgm")
im.save(filename, "PPM")
+ assert_image_equal_tofile(im, filename)
+ im.convert("I;16").save(filename, "PPM")
assert_image_equal_tofile(im, filename)
| Save 16-bit PGM Image?
I am attempting to convert an image in PNG format to a 16-bit PGM format and save it using Python's [PIL](https://python-pillow.org/) library. I'm using Python 3.12.4 in all examples shown.
---
Using the following `test.png` image:

Attempting a simple script like this with the [Image.save()](https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.save) function:
```python
from PIL import Image
image = Image.open("test.png")
image.save("test.pgm")
```
Can save resave the image as PGM, however it's always saved as an 8-bit image, as shown by GIMP:

---
Attempting to specify the amount of pixel bits via the optional `bits` argument as such:
```python
from PIL import Image
image = Image.open("test.png")
image.save("test.pgm", bits = 16)
```
Also results in an 8-bit PGM image being saved.
---
Attempting to manually create a numpy array of the `np.uint16` type & then creating an image from it using the [Image.fromarray()](https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.fromarray) function as such:
```python
from PIL import Image
import numpy as np
image = Image.open("test.png")
imageData = np.array(image.getdata(), dtype = np.uint16)
newImage = Image.fromarray(imageData)
newImage.save("test.pgm", bits = 16)
```
Results in:
```
OSError: cannot write mode I;16 as PPM
```
I also noticed that this appears to break the image, as saving with `np.uint32` saves a blank image with a very narrow horizontal size and a very large vertical size.
---
What is the proper way to save 16-bit PGM images using the Python `PIL` library?
Thanks for reading my post, any guidance is appreciated.
| 2024-07-13T03:08:19Z | 2024-09-04T11:46:31Z | ["Tests/test_file_ppm.py::test_header_token_too_long", "Tests/test_file_ppm.py::test_16bit_pgm", "Tests/test_file_ppm.py::test_invalid_maxval[65536]", "Tests/test_file_ppm.py::test_plain_invalid_data[P1\\n128 128\\n1009]", "Tests/test_file_ppm.py::test_plain_ppm_value_negative", "Tests/test_file_ppm.py::test_plain_data_with_comment[P1\\n2 2-1010-1000000]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 inf \\x00\\x00\\x00\\x00]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P6 3 1 17 \\x00\\x01\\x02\\x08\\t\\n\\x0f\\x10\\x11-RGB-pixels6]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 -inf \\x00\\x00\\x00\\x00]", "Tests/test_file_ppm.py::test_plain_ppm_value_too_large", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_8bit_plain.pgm-Tests/images/hopper_8bit.pgm]", "Tests/test_file_ppm.py::test_pfm_big_endian", "Tests/test_file_ppm.py::test_plain_ppm_token_too_long[P3\\n128 128\\n255\\n012345678910]", "Tests/test_file_ppm.py::test_pfm", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 0.0 \\x00\\x00\\x00\\x00]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P3 3 1 17 0 1 2 8 9 10 15 16 17-RGB-pixels2]", "Tests/test_file_ppm.py::test_plain_invalid_data[P3\\n128 128\\n255\\n100A]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P3 3 1 257 0 1 2 128 129 130 256 257 257-RGB-pixels3]", "Tests/test_file_ppm.py::test_mimetypes", "Tests/test_file_ppm.py::test_arbitrary_maxval[P2 3 1 4 0 2 4-L-pixels0]", "Tests/test_file_ppm.py::test_plain_data_with_comment[P2\\n3 1\\n4-0 2 4-1]", "Tests/test_file_ppm.py::test_truncated_file", "Tests/test_file_ppm.py::test_pnm", "Tests/test_file_ppm.py::test_plain_data_with_comment[P3\\n2 2\\n255-0 0 0 001 1 1 2 2 2 255 255 255-1000000]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P5 3 1 257 \\x00\\x00\\x00\\x80\\x01\\x01-I-pixels5]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P5 3 1 4 \\x00\\x02\\x04-L-pixels4]", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_8bit_plain.ppm-Tests/images/hopper_8bit.ppm]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 NaN \\x00\\x00\\x00\\x00]", "Tests/test_file_ppm.py::test_magic", "Tests/test_file_ppm.py::test_16bit_plain_pgm", "Tests/test_file_ppm.py::test_plain_truncated_data[P3\\n128 128\\n255\\n]", "Tests/test_file_ppm.py::test_non_integer_token", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_1bit_plain.pbm-Tests/images/hopper_1bit.pbm]", "Tests/test_file_ppm.py::test_sanity", "Tests/test_file_ppm.py::test_save_stdout[True]", "Tests/test_file_ppm.py::test_neg_ppm", "Tests/test_file_ppm.py::test_not_enough_image_data", "Tests/test_file_ppm.py::test_header_with_comments", "Tests/test_file_ppm.py::test_invalid_maxval[0]", "Tests/test_file_ppm.py::test_plain_ppm_token_too_long[P3\\n128 128\\n255\\n012345678910 0]", "Tests/test_file_ppm.py::test_plain_truncated_data[P1\\n128 128\\n]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 -0.0 \\x00\\x00\\x00\\x00]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P6 3 1 257 \\x00\\x00\\x00\\x01\\x00\\x02\\x00\\x80\\x00\\x81\\x00\\x82\\x01\\x00\\x01\\x01\\xff\\xff-RGB-pixels7]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P2 3 1 257 0 128 257-I-pixels1]"] | [] | ["Tests/test_file_ppm.py::test_save_stdout[False]", "Tests/test_file_ppm.py::test_16bit_pgm_write"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.5.0", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.6.1", "distlib==0.3.8", "filelock==3.15.4", "iniconfig==2.0.0", "packaging==24.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.3.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.18.0", "uv==0.4.5", "virtualenv==20.26.3", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-8230 | 4721c31b19523e3c86f8d2fef62fdad25d2eb11d | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index fbeecef0e6a..e1cbf533571 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -4111,7 +4111,7 @@ def get_ifd(self, tag: int) -> dict[int, Any]:
ifd = self._get_ifd_dict(tag_data, tag)
if ifd is not None:
self._ifds[tag] = ifd
- ifd = self._ifds.get(tag, {})
+ ifd = self._ifds.setdefault(tag, {})
if tag == ExifTags.IFD.Exif and self._hidden_data:
ifd = {
k: v
| diff --git a/Tests/test_image.py b/Tests/test_image.py
index 5795f6c5cb7..2d35cd277ce 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -774,6 +774,14 @@ def test_empty_exif(self) -> None:
exif.load(b"Exif\x00\x00")
assert not dict(exif)
+ def test_empty_get_ifd(self) -> None:
+ exif = Image.Exif()
+ ifd = exif.get_ifd(0x8769)
+ assert ifd == {}
+
+ ifd[36864] = b"0220"
+ assert exif.get_ifd(0x8769) == {36864: b"0220"}
+
@mark_if_feature_version(
pytest.mark.valgrind_known_error, "libjpeg_turbo", "2.0", reason="Known Failing"
)
| Possible to add an IFD to an image's EXIF data?
(apologies if I'm using wrong/weird terminology)
I'm trying to add EXIF tags to an image that doesn't initially have any. Some of the tags I'm trying to set belong to `IFD.Exif` . When I run `img.getexif().get_ifd(IFD.Exif)` I get back an empty `dict` that doesn't persist anything I try to add to it.
However if the image already has data for `IFD.Exif` (so `img.getexif().get_ifd(IFD.Exif)` isn't `{}`) then I'm able to manipulate it as expected.
I'm not super familiar with how EXIF data works at a technical level, but I *think* I'm missing something that I need to do/set to
the image before I can set the tags I want to set. But I'm not 100% sure if that's the case, and if can I do it with Pillow?
### What are your OS, Python and Pillow versions?
* OS: macOS 14.5
* Python: 3.12.4
* Pillow: 10.3.0
```text
--------------------------------------------------------------------
Pillow 10.3.0
Python 3.12.4 (main, Jun 27 2024, 18:40:44) [Clang 15.0.0 (clang-1500.3.9.4)]
--------------------------------------------------------------------
Python executable is /Users/tegan/Library/Caches/pypoetry/virtualenvs/exifmate-Hu18rg69-py3.12/bin/python3
Environment Python files loaded from /Users/tegan/Library/Caches/pypoetry/virtualenvs/exifmate-Hu18rg69-py3.12
System Python files loaded from /Users/tegan/.pyenv/versions/3.12.4
--------------------------------------------------------------------
Python Pillow modules loaded from /Users/tegan/Library/Caches/pypoetry/virtualenvs/exifmate-Hu18rg69-py3.12/lib/python3.12/site-packages/PIL
Binary Pillow modules loaded from /Users/tegan/Library/Caches/pypoetry/virtualenvs/exifmate-Hu18rg69-py3.12/lib/python3.12/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 10.3.0
*** TKINTER support not installed
--- FREETYPE2 support ok, loaded 2.13.2
--- LITTLECMS2 support ok, loaded 2.16
--- WEBP support ok, loaded 1.3.2
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for libjpeg-turbo 3.0.2
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.3.1
--- LIBTIFF support ok, loaded 4.6.0
*** RAQM (Bidirectional Text) support not installed
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------
```
### Sample Code
```py
from PIL.TiffImagePlugin import IFDRational
from PIL.ExifTags import IFD
from PIL import Image
tag_id = 33434 # exposure time tag
exposure_time = IFDRational(1/500)
# behavior with existing EXIF data
img_one = Image.open("has-exif.jpg")
exif_one = img_one.getexif()
exif_one.get_ifd(IFD.Exif)[tag_id] = exposure_time
assert exif_one.get_ifd(IFD.Exif)[tag_id] == exposure_time
# saving the image with the modified data also works
# img_one.save("has-exif.jpg", exif=exif_one)
# behavior with no existing EXIF data
img_two = Image.open("no-exif.jpg")
exif_two = img_two.getexif() # presumably this is basically the same as `Image.Exif()`
assert exif_two.get_ifd(IFD.Exif) == {}
exif_two.get_ifd(IFD.Exif)[tag_id] = exposure_time
# these assertions pass but I expect them both to fail
assert exif_two.get_ifd(IFD.Exif) == {}
assert exif_two.get_ifd(IFD.Exif).get(tag_id) == None
```
[sample pictures.zip](https://github.com/user-attachments/files/16199554/sample.pictures.zip)
| 2024-07-13T02:41:18Z | 2024-09-04T11:46:18Z | ["Tests/test_image.py::TestImage::test_dump", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16B]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16N]", "Tests/test_image.py::TestImage::test_storage_neg", "Tests/test_image.py::TestImage::test_exif_jpeg", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[LAB]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[LA]", "Tests/test_image.py::TestImage::test_radial_gradient[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[HSV]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[CMYK]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[LAB]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBA]", "Tests/test_image.py::TestImage::test_radial_gradient[P]", "Tests/test_image.py::TestImage::test_effect_spread_zero", "Tests/test_image.py::TestImage::test_no_new_file_on_error", "Tests/test_image.py::TestImage::test_image_modes_success[RGB]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16]", "Tests/test_image.py::TestImage::test_getbands", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow2.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGB]", "Tests/test_image.py::TestImage::test_getbbox", "Tests/test_image.py::TestImage::test_image_modes_success[I;16]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;24]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBa]", "Tests/test_image.py::TestImage::test_image_modes_success[F]", "Tests/test_image.py::TestImage::test_readonly_save", "Tests/test_image.py::TestImage::test_remap_palette_transparency", "Tests/test_image.py::TestImage::test_exif_ifd1", "Tests/test_image.py::TestImage::test_image_modes_fail[very very long]", "Tests/test_image.py::TestImage::test_register_open_duplicates", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;15]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBA]", "Tests/test_image.py::TestImage::test_getchannel_wrong_params", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16]", "Tests/test_image.py::TestImage::test_registered_extensions", "Tests/test_image.py::TestRegistry::test_encode_registry", "Tests/test_image.py::TestImage::test_register_extensions", "Tests/test_image.py::TestImage::test_linear_gradient[P]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;15]", "Tests/test_image.py::TestImage::test_width_height", "Tests/test_image.py::TestImage::test_fp_name", "Tests/test_image.py::TestImage::test_radial_gradient[L]", "Tests/test_image.py::TestImage::test_overrun[fli_overrun.bin]", "Tests/test_image.py::TestImage::test_image_modes_success[LAB]", "Tests/test_image.py::TestImage::test_comparison_with_other_type", "Tests/test_image.py::TestImage::test_alpha_composite", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16N]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[PA]", "Tests/test_image.py::TestImage::test_image_modes_success[L]", "Tests/test_image.py::TestImage::test_exit_fp", "Tests/test_image.py::TestImage::test_image_modes_success[I;16B]", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun2.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;24]", "Tests/test_image.py::TestImage::test_ne", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[LA]", "Tests/test_image.py::TestImage::test_zero_tobytes[size1]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[P]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGB]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-#DDEEFF]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[1]", "Tests/test_image.py::TestImage::test_zero_tobytes[size2]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBA]", "Tests/test_image.py::TestImage::test_expand_x", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16B]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16B]", "Tests/test_image.py::TestImage::test_effect_spread", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGBA-color2]", "Tests/test_image.py::TestImage::test_open_verbose_failure", "Tests/test_image.py::TestImage::test_effect_noise", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[F]", "Tests/test_image.py::TestImage::test_linear_gradient_wrong_mode", "Tests/test_image.py::TestImage::test_open_formats", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[1]", "Tests/test_image.py::TestImage::test_constants", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[La]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16N]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;24]", "Tests/test_image.py::TestImage::test_image_modes_success[PA]", "Tests/test_image.py::TestImage::test_zero_frombytes[size0]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[F]", "Tests/test_image.py::TestImage::test_linear_gradient[F]", "Tests/test_image.py::TestImage::test_expand_xy", "Tests/test_image.py::TestImage::test_registered_extensions_uninitialized", "Tests/test_image.py::TestImage::test_empty_exif", "Tests/test_image.py::TestImage::test_image_modes_success[YCbCr]", "Tests/test_image.py::TestImage::test_image_modes_success[La]", "Tests/test_image.py::TestImage::test_tempfile", "Tests/test_image.py::TestImage::test_load_on_nonexclusive_multiframe", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[La]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[CMYK]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[L]", "Tests/test_image.py::TestImage::test_close_graceful", "Tests/test_image.py::TestImage::test_image_modes_success[I;16N]", "Tests/test_image.py::TestImage::test_exif_load_from_fp", "Tests/test_image.py::TestImage::test_overrun[01r_00.pcx]", "Tests/test_image.py::TestImage::test_radial_gradient[F]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun.bin]", "Tests/test_image.py::TestImage::test_one_item_tuple", "Tests/test_image.py::TestImage::test_exif_png", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow.bin]", "Tests/test_image.py::TestImage::test_zero_frombytes[size1]", "Tests/test_image.py::TestImage::test_image_modes_success[CMYK]", "Tests/test_image.py::TestImage::test_exception_inheritance", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBA]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBa]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;15]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[F]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBX]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[P]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[PA]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;24]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-color1]", "Tests/test_image.py::TestImage::test_unknown_extension", "Tests/test_image.py::TestImage::test_exif_hide_offsets", "Tests/test_image.py::TestImage::test_getchannel", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[HSV]", "Tests/test_image.py::TestImage::test_internals", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[YCbCr]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[CMYK]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[YCbCr]", "Tests/test_image.py::TestImage::test_overrun[ossfuzz-4836216264589312.pcx]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16L]", "Tests/test_image.py::TestImage::test_zero_tobytes[size0]", "Tests/test_image.py::TestImage::test_image_modes_success[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[PA]", "Tests/test_image.py::TestImage::test_getxmp_padded", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBa]", "Tests/test_image.py::TestImage::test_effect_mandelbrot_bad_arguments", "Tests/test_image.py::TestImage::test_zero_frombytes[size2]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGB]", "Tests/test_image.py::TestImage::test_image_modes_fail[]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[HSV]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;16]", "Tests/test_image.py::TestImage::test_effect_mandelbrot", "Tests/test_image.py::TestImage::test_set_mode", "Tests/test_image.py::TestImage::test_stringio", "Tests/test_image.py::TestRegistry::test_encode_registry_fail", "Tests/test_image.py::TestImage::test_invalid_image", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[L]", "Tests/test_image.py::TestImage::test_image_modes_success[HSV]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[P]", "Tests/test_image.py::TestImage::test_empty_image[size1]", "Tests/test_image.py::TestImage::test_sanity", "Tests/test_image.py::TestImage::test_fli_overrun2", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[La]", "Tests/test_image.py::TestImage::test_apply_transparency", "Tests/test_image.py::TestImage::test_check_size", "Tests/test_image.py::TestImage::test__new", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBX]", "Tests/test_image.py::TestImage::test_image_modes_success[LA]", "Tests/test_image.py::TestImage::test_linear_gradient[I]", "Tests/test_image.py::TestImage::test_has_transparency_data", "Tests/test_image.py::TestImage::test_image_modes_fail[bad]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[LA]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[LAB]", "Tests/test_image.py::TestImage::test_no_resource_warning_on_save", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBX]", "Tests/test_image.py::TestImage::test_exif_interop", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBa]", "Tests/test_image.py::TestImage::test_bad_mode", "Tests/test_image.py::TestImage::test_remap_palette", "Tests/test_image.py::TestImage::test_image_modes_success[RGBX]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[1]", "Tests/test_image.py::TestImage::test_image_modes_success[P]", "Tests/test_image.py::TestImage::test_image_modes_success[1]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16L]", "Tests/test_image.py::TestImage::test_exif_ifd", "Tests/test_image.py::TestImage::test_radial_gradient_wrong_mode", "Tests/test_image.py::TestImage::test_alpha_inplace", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[YCbCr]", "Tests/test_image.py::TestImage::test_empty_xmp", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;15]"] | [] | ["Tests/test_image.py::TestImage::test_empty_get_ifd"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.5.0", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.6.1", "distlib==0.3.8", "filelock==3.15.4", "iniconfig==2.0.0", "packaging==24.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.3.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.18.0", "uv==0.4.5", "virtualenv==20.26.3", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-8304 | b14142462e1d4f0205b7e77c647a02c760b99a05 | diff --git a/Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png b/Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png
new file mode 100644
index 00000000000..b225afc2dc1
Binary files /dev/null and b/Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png differ
diff --git a/src/PIL/ImageDraw.py b/src/PIL/ImageDraw.py
index 6f56d023618..5609bf971e8 100644
--- a/src/PIL/ImageDraw.py
+++ b/src/PIL/ImageDraw.py
@@ -505,7 +505,7 @@ def draw_corners(pieslice: bool) -> None:
if full_x:
self.draw.draw_rectangle((x0, y0 + r + 1, x1, y1 - r - 1), fill_ink, 1)
- else:
+ elif x1 - r - 1 > x0 + r + 1:
self.draw.draw_rectangle((x0 + r + 1, y0, x1 - r - 1, y1), fill_ink, 1)
if not full_x and not full_y:
left = [x0, y0, x0 + r, y1]
| diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py
index e397978cbbf..e852b847188 100644
--- a/Tests/test_imagedraw.py
+++ b/Tests/test_imagedraw.py
@@ -857,6 +857,27 @@ def test_rounded_rectangle_corners(
)
+def test_rounded_rectangle_joined_x_different_corners() -> None:
+ # Arrange
+ im = Image.new("RGB", (W, H))
+ draw = ImageDraw.Draw(im, "RGBA")
+
+ # Act
+ draw.rounded_rectangle(
+ (20, 10, 80, 90),
+ 30,
+ fill="red",
+ outline="green",
+ width=5,
+ corners=(True, False, False, False),
+ )
+
+ # Assert
+ assert_image_equal_tofile(
+ im, "Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png"
+ )
+
+
@pytest.mark.parametrize(
"xy, radius, type",
[
| ImageDraw.rounded_rectangle: wrong ValueError
There is a problem in `ImageDraw.ImageDraw.rounded_rectangle`. There is no problem in code's logic. I'll share the code & error.
Code:
```python
from PIL import Image, ImageDraw
board = Image.new("RGBA", (1000, 1000))
draw = ImageDraw.Draw(board)
draw.rounded_rectangle((0, 0, 50 * 2, 500), 50, fill="white", corners=(True, False, False, True))
```
Error:
```python
Traceback (most recent call last):
File "...\file.py", line 60, in <module>
draw.rounded_rectangle((0, 0, 50 * 2, 500), 50, "red", corners=(True, False, False, True))
File "...\.venv\Lib\site-packages\PIL\ImageDraw.py", line 508, in rounded_rectangle
self.draw.draw_rectangle((x0 + r + 1, y0, x1 - r - 1, y1), fill_ink, 1)
ValueError: x1 must be greater than or equal to x0
```
If I don't pass the `corners`, it will work. If I don't pass the `fill`, it will work either as well! But I want them both and I can't use them here.
| 2024-08-15T04:46:43Z | 2024-08-15T13:06:42Z | ["Tests/test_pickle.py::test_pickle_image[1-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_F[factor17]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_mode[RGBA-RGBA-3-3]", "Tests/test_image_filter.py::test_sanity[L-ModeFilter]", "Tests/test_imageops.py::test_colorize_3color_offset", "Tests/test_image.py::TestImage::test_repr_pretty", "Tests/test_imagedraw.py::test_shape2", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_zero_default.png]", "Tests/test_image_transpose.py::test_rotate_180[I;16B]", "Tests/test_image_getpalette.py::test_palette", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_mode[RGB-RGBA-3-3]", "Tests/test_file_mpeg.py::test_load", "Tests/test_image_convert.py::test_rgba", "Tests/test_file_png.py::TestFilePng::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r06.fli]", "Tests/test_image_quantize.py::test_quantize_dither_diff", "Tests/test_file_gbr.py::test_load", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[LA]", "Tests/test_font_pcf_charsets.py::test_sanity[iso8859-1]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[LA]", "Tests/test_image_transform.py::TestImageTransform::test_alpha_premult_transform", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.jp2]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_st.png]", "Tests/test_file_icns.py::test_older_icon", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply19]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-1185209cf7655b5aed8ae5e77784dfdd18ab59e9.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive", "Tests/test_file_gbr.py::test_invalid_file", "Tests/test_imagedraw.py::test_textsize_empty_string", "Tests/test_imagedraw.py::test_discontiguous_corners_polygon", "Tests/test_file_dds.py::test_sanity_ati2_bc5u[Tests/images/ati2.dds]", "Tests/test_bmp_reference.py::test_bad", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-50-50-0]", "Tests/test_image_reduce.py::test_mode_RGBa[factor10]", "Tests/test_file_gif.py::test_dispose_previous", "Tests/test_imagechops.py::test_constant", "Tests/test_file_tiff.py::TestFileTiff::test_context_manager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_frame.png]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_ascii[1-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad_checksum.msp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/empty_gps_ifd.jpg]", "Tests/test_image.py::TestImage::test_registered_extensions_uninitialized", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/effect_mandelbrot.png]", "Tests/test_imagedraw.py::test_ellipse_various_sizes_filled", "Tests/test_file_psd.py::test_layer_crashes[Tests/images/timeout-598843abc37fc080ec36a2699ebbd44f795d3a6f.psd]", "Tests/test_image.py::TestImage::test_overrun[01r_00.pcx]", "Tests/test_file_tiff.py::TestFileTiff::test_load_string", "Tests/test_image_reduce.py::test_mode_I[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_one_band.png]", "Tests/test_imagepalette.py::test_getcolor_rgba_color_rgb_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/raw_negative_stride.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[La]", "Tests/test_image.py::TestImage::test_exif_interop", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_la.png]", "Tests/test_image_reduce.py::test_mode_RGBa[5]", "Tests/test_image_filter.py::test_sanity[CMYK-CONTOUR]", "Tests/test_imagemath_unsafe_eval.py::test_convert", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb24.png]", "Tests/test_file_gif.py::test_roundtrip_save_all_1", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati1.dds]", "Tests/test_image_reduce.py::test_mode_I[factor12]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ls.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_x_resolution", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGBA]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32767-I;16]", "Tests/test_file_ppm.py::test_invalid_maxval[0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.bw]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_horizontal[0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/itxt_chunks.png]", "Tests/test_file_mpo.py::test_seek[Tests/images/frozenpond.mpo]", "Tests/test_imageops.py::test_sanity", "Tests/test_imagedraw.py::test_arc_no_loops[bbox2]", "Tests/test_image_putpalette.py::test_empty_palette", "Tests/test_imagestat.py::test_hopper", "Tests/test_file_png.py::TestFilePng::test_save_grayscale_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_ellipse_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_actl_after_idat.png]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy0]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/pil123p.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1.png]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox3]", "Tests/test_image_reduce.py::test_mode_RGBa[factor16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.s.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r09.fli]", "Tests/test_deprecate.py::test_old_version[Old thing-False-Old thing is deprecated and should be removed\\\\.]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16-565pal.bmp]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy5-y_odd]", "Tests/test_image_convert.py::test_matrix_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/200x32_p_bl_raw_origin.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_2.jpg]", "Tests/test_imagedraw.py::test_polygon_1px_high", "Tests/test_file_palm.py::test_monochrome", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[RGB]", "Tests/test_file_tga.py::test_id_field", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unsupported_bitcount.dds]", "Tests/test_image_filter.py::test_consistency_5x5[L]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox0]", "Tests/test_file_gif.py::test_palette_save_P", "Tests/test_image_filter.py::test_sanity[CMYK-SMOOTH_MORE]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/first_frame_transparency.gif]", "Tests/test_file_ico.py::test_invalid_file", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16N]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_ycbcr_jpeg_1x1_sampling.tif]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox1]", "Tests/test_imageops.py::test_cover[imagedraw_stroke_multiline.png-expected_size1]", "Tests/test_file_tiff.py::TestFileTiff::test_iptc", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[RGBX]", "Tests/test_file_gif.py::test_unclosed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_raw.tif]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif_extents", "Tests/test_file_gif.py::test_version", "Tests/test_file_gif.py::test_webp_background", "Tests/test_file_pdf.py::test_pdf_append_to_bytesio", "Tests/test_imagepalette.py::test_file", "Tests/test_imagemorph.py::test_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_width.png]", "Tests/test_file_apng.py::test_apng_save", "Tests/test_image_reduce.py::test_mode_LA[factor17]", "Tests/test_image_reduce.py::test_mode_I[factor6]", "Tests/test_image_reduce.py::test_mode_I[factor10]", "Tests/test_file_mpo.py::test_mp[Tests/images/frozenpond.mpo]", "Tests/test_file_tiff_metadata.py::test_empty_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_zero_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_ifd_offset.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/num_plays_1.png]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_warning", "Tests/test_core_resources.py::TestCoreMemory::test_large_images", "Tests/test_file_apng.py::test_apng_dispose_region", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/zero_bb.png-None]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynyn.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P6 3 1 257 \\x00\\x00\\x00\\x01\\x00\\x02\\x00\\x80\\x00\\x81\\x00\\x82\\x01\\x00\\x01\\x01\\xff\\xff-RGB-pixels7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/2422.flc]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor18]", "Tests/test_imagedraw.py::test_ellipse[bbox3-L]", "Tests/test_imageshow.py::test_sanity", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat_chunk.png]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-color1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_fdat_fctl.png]", "Tests/test_imageops.py::test_expand_palette[border1]", "Tests/test_imageops.py::test_exif_transpose_xml_without_xmp", "Tests/test_box_blur.py::test_radius_0_05", "Tests/test_image.py::TestImage::test_image_modes_success[LAB]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;24]", "Tests/test_imagechops.py::test_add_modulo", "Tests/test_file_spider.py::test_load_image_series_no_input", "Tests/test_imagepalette.py::test_getcolor_not_special[255-palette1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[L]", "Tests/test_features.py::test_unsupported_codec", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[90-2]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGBX]", "Tests/test_deprecate.py::test_plural", "Tests/test_file_gif.py::test_optimize", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[1]", "Tests/test_file_tiff.py::TestFileTiff::test_save_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_width_fill.png]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/test-card.png-None]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[1]", "Tests/test_image_reduce.py::test_mode_RGBA[factor17]", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage.tiff-3]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle_bottom_right.tga]", "Tests/test_imagedraw.py::test_incorrectly_ordered_coordinates[xy0]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[270-4]", "Tests/test_file_tiff.py::TestFileTiff::test_big_endian", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_7.jpg]", "Tests/test_image_quantize.py::test_quantize_no_dither2", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply20]", "Tests/test_image_load.py::test_close_after_load", "Tests/test_imagefile.py::TestImageFile::test_broken_datastream_with_errors", "Tests/test_image_reduce.py::test_mode_I[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/custom_gimp_palette.gpl]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBa", "Tests/test_image_putdata.py::test_mode_i[I;16B]", "Tests/test_image_reduce.py::test_mode_I[factor18]", "Tests/test_image_reduce.py::test_mode_RGB[factor8]", "Tests/test_image.py::TestImage::test_expand_x", "Tests/test_imagesequence.py::test_all_frames", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-True-True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit_plain.pgm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage.eps]", "Tests/test_image_filter.py::test_sanity[CMYK-EDGE_ENHANCE_MORE]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif_zero_width", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_reorder_chunk.png]", "Tests/test_file_ppm.py::test_plain_truncated_data[P3\\n128 128\\n255\\n]", "Tests/test_image_filter.py::test_modefilter[L-expected1]", "Tests/test_file_bmp.py::test_load_dib", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24lprof.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ignore_frame_size.mpo]", "Tests/test_imagechops.py::test_subtract", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8nonsquare.bmp]", "Tests/test_imagesequence.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.pbm]", "Tests/test_image_putdata.py::test_mode_i[I]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/radial_gradient.png]", "Tests/test_imagedraw2.py::test_chord[bbox3]", "Tests/test_file_eps.py::test_missing_boundingbox_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_imagedraw2.py::test_pieslice[-92-46-bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_shape1.png]", "Tests/test_file_sgi.py::test_unsupported_mode", "Tests/test_imagechops.py::test_subtract_modulo", "Tests/test_imagemath_unsafe_eval.py::test_bitwise_or", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_end_le_start.png]", "Tests/test_image_putdata.py::test_mode_F", "Tests/test_file_png.py::TestFilePng::test_verify_not_ignores_crc_error_in_required_chunk", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_text.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[RGBA]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor14]", "Tests/test_image_filter.py::test_sanity[I-BLUR]", "Tests/test_image_reduce.py::test_mode_LA[factor12]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pnm]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[YCbCr]", "Tests/test_imagemorph.py::test_erosion8", "Tests/test_file_png.py::TestFilePng::test_bad_ztxt", "Tests/test_image_access.py::TestImageGetPixel::test_basic[L]", "Tests/test_file_dcx.py::test_seek_too_far", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.tif-None]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[RGBA]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[None-72.8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_rgb.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_raw.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[90-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/fctl_actl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_la.dds]", "Tests/test_format_lab.py::test_green", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[0]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBX", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny_name.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower2.jpg]", "Tests/test_file_gif.py::test_number_of_loops", "Tests/test_util.py::test_is_not_path", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_undefined[value1]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynnn.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_photoshop_malformed_and_multiple", "Tests/test_image_transpose.py::test_rotate_270[RGB]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/test-card.png-None]", "Tests/test_file_icns.py::test_load", "Tests/test_file_ppm.py::test_16bit_pgm_write", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gbr.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w126.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_end_chunk.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil136.tiff]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_invalid_size", "Tests/test_image.py::TestImage::test_zero_tobytes[size0]", "Tests/test_imagedraw.py::test_bitmap", "Tests/test_file_eps.py::test_readline[\\r-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_reduce.py::test_mode_LA[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badplanes.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrowF04.bin]", "Tests/test_file_gif.py::test_dispose_previous_first_frame", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fdAT]", "Tests/test_lib_pack.py::TestLibPack::test_PA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnnn.png]", "Tests/test_file_tiff.py::TestFileTiff::test_ifd_tag_type", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_right.png]", "Tests/test_imagemorph.py::test_lut[erosion4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_8.tif]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32767-I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd.gif]", "Tests/test_image.py::TestImage::test_close_graceful", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w2px_normal.png]", "Tests/test_file_tiff.py::TestFileTiff::test_32bit_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badpalettesize.bmp]", "Tests/test_imagemath_unsafe_eval.py::test_prevent_builtins", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_black", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_rectangle_L.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size2]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/reproducing]", "Tests/test_imagedraw.py::test_same_color_outline[bbox0]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.j2k]", "Tests/test_image.py::TestImage::test_linear_gradient[F]", "Tests/test_imageops.py::test_pad", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r02.fli]", "Tests/test_file_fli.py::test_seek", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/reproducing]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_mode[RGB-RGBA-4-3]", "Tests/test_imagemorph.py::test_no_operator_loaded", "Tests/test_image.py::TestImage::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_palette_chunk_second.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_square_rotate_45.png]", "Tests/test_imagedraw.py::test_floodfill[bbox3]", "Tests/test_file_bufrstub.py::test_load", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-31c8f86233ea728339c6e586be7af661a09b5b98.blp]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor8]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none_load_end_second.png]", "Tests/test_image_filter.py::test_rankfilter_error[MedianFilter]", "Tests/test_file_gif.py::test_palette_not_needed_for_second_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16.bmp]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w124.png]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16B]", "Tests/test_imagefontpil.py::test_default_font[font0]", "Tests/test_imagedraw.py::test_point[points3]", "Tests/test_imagemorph.py::test_negate", "Tests/test_mode_i16.py::test_basic[I;16L]", "Tests/test_file_gif.py::test_palette_save_all_P", "Tests/test_imagefile.py::TestPyEncoder::test_negsize", "Tests/test_file_gif.py::test_rgb_transparency", "Tests/test_file_ppm.py::test_16bit_plain_pgm", "Tests/test_image_point.py::test_f_lut", "Tests/test_file_bmp.py::test_dib_header_size[124-g/pal8v5.bmp]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[RGBA]", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_8bit_plain.pgm-Tests/images/hopper_8bit.pgm]", "Tests/test_image_reduce.py::test_mode_I[6]", "Tests/test_core_resources.py::TestCoreMemory::test_set_block_size", "Tests/test_imagedraw.py::test_chord[bbox1-L]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-#DDEEFF]", "Tests/test_image_filter.py::test_sanity[RGB-CONTOUR]", "Tests/test_image_transpose.py::test_flip_left_right[I;16]", "Tests/test_imagefile.py::TestPyDecoder::test_setimage", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[0]", "Tests/test_file_png.py::TestFilePng::test_nonunicode_text", "Tests/test_image_reduce.py::test_mode_LA[factor13]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_with_transparency.gif]", "Tests/test_image_reduce.py::test_mode_LA[factor14]", "Tests/test_image.py::TestImage::test_effect_mandelbrot", "Tests/test_imagedraw.py::test_valueerror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower.webp]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[P]", "Tests/test_lib_pack.py::TestLibUnpack::test_BGR", "Tests/test_file_container.py::test_seek_mode[1-66]", "Tests/test_imagemath_unsafe_eval.py::test_bitwise_invert", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_raw_with_overviews.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_from_dpcm_exif", "Tests/test_image_access.py::TestImagePutPixel::test_sanity_negative_index", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16]", "Tests/test_imagechops.py::test_overlay", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_width_I.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_bl_rle.tga]", "Tests/test_file_pdf.py::test_pdf_append_fails_on_nonexistent_file", "Tests/test_imagepath.py::test_path_constructors[coords0]", "Tests/test_imagedraw.py::test_polygon_width_I16[points3]", "Tests/test_image_copy.py::test_copy[L]", "Tests/test_image_reduce.py::test_mode_La[factor11]", "Tests/test_file_tiff.py::TestFileTiff::test_little_endian", "Tests/test_lib_pack.py::TestLibUnpack::test_LAB", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-4fb027452e6988530aa5dabee76eecacb3b79f8a.j2k]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[pHYs]", "Tests/test_file_spider.py::test_tell", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_underscore.xbm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-db8bfa78b19721225425530c5946217720d7df4e.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1bg.png]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_args[RGB-3-3]", "Tests/test_image_putdata.py::test_pypy_performance", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-1ee28a249896e05b83840ae8140622de8e648ba9.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[L]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle3-0-ValueError-bounding_circle should contain 2D coordinates and a radius (e.g. (x, y, r) or ((x, y), r) )]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_zero.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice.png]", "Tests/test_file_eps.py::test_readline[\\r-]", "Tests/test_file_png.py::TestFilePng::test_exif", "Tests/test_file_png.py::TestFilePng::test_getxmp", "Tests/test_file_apng.py::test_apng_save_split_fdat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_point.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32-111110.bmp]", "Tests/test_file_mpo.py::test_image_grab[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_polygon[points3]", "Tests/test_file_container.py::test_file[True]", "Tests/test_file_apng.py::test_apng_dispose_op_background_p_mode", "Tests/test_deprecate.py::test_version[None-Old thing is deprecated and will be removed in a future version\\\\. Use new thing instead\\\\.]", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox1]", "Tests/test_imagedraw.py::test_ellipse[bbox1-L]", "Tests/test_image_rotate.py::test_center_0", "Tests/test_file_png.py::TestFilePng::test_truncated_end_chunk", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ttb.png]", "Tests/test_file_gif.py::test_multiple_duration", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_bmp", "Tests/test_image_reduce.py::test_mode_L[factor11]", "Tests/test_file_tiff.py::TestFileTiff::test_unclosed_file", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[RGBA]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox2]", "Tests/test_file_psd.py::test_closed_file", "Tests/test_file_bmp.py::test_save_dib", "Tests/test_bmp_reference.py::test_good", "Tests/test_file_container.py::test_write[True]", "Tests/test_image_reduce.py::test_mode_I[4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8v5.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiple_comments.gif]", "Tests/test_box_blur.py::test_extreme_large_radius", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[L]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal4rle.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment_after_only_frame.gif]", "Tests/test_file_sgi.py::test_l", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_exif_dpi.jpg]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox3]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox0]", "Tests/test_file_bmp.py::test_fallback_if_mmap_errors", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[F]", "Tests/test_file_gif.py::test_context_manager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.gif]", "Tests/test_imagemath_lambda_eval.py::test_logical", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBA", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-False-False]", "Tests/test_file_tiff.py::TestFileTiff::test_tiled_planar_raw", "Tests/test_imagesequence.py::test_iterator", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.apng]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor11]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-False-True]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-b82e64d4f3f76d7465b6af535283029eda211259.sgi]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-1.5-5.5]", "Tests/test_image_filter.py::test_sanity[I-CONTOUR]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2v2-16.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width_large.png]", "Tests/test_lib_pack.py::TestLibPack::test_CMYK", "Tests/test_image_split.py::test_split", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/bc1_typeless.dds]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.tif-None]", "Tests/test_image_filter.py::test_sanity[L-GaussianBlur]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe.png]", "Tests/test_file_psd.py::test_n_frames", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_16.tga]", "Tests/test_file_tiff.py::TestFileTiff::test_eoferror", "Tests/test_font_pcf_charsets.py::test_sanity[iso8859-2]", "Tests/test_image_reduce.py::test_mode_La[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_wide.png]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/sgi_crash.bin]", "Tests/test_file_tiff.py::TestFileTiff::test_mac_tiff", "Tests/test_imageops.py::test_colorize_2color_offset", "Tests/test_file_tga.py::test_save_l_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.p7]", "Tests/test_file_png.py::TestFilePng::test_seek", "Tests/test_imageops.py::test_autocontrast_mask_real_input", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_no_warning_small_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_optimize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_right.png]", "Tests/test_file_tiff_metadata.py::test_photoshop_info", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox1]", "Tests/test_file_apng.py::test_different_durations", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle.tga]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-6b7f2244da6d0ae297ee0754a424213444e92778.sgi]", "Tests/test_font_pcf.py::test_less_than_256_characters", "Tests/test_image_putdata.py::test_array_F", "Tests/test_file_iptc.py::test_pad_deprecation", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_raw.tif]", "Tests/test_file_eps.py::test_readline[\\n-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_16.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123rgba.qoi]", "Tests/test_psdraw.py::test_stdout[False]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[RGB]", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_apply", "Tests/test_file_ppm.py::test_save_stdout[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_spacing.png]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[BGR;15]", "Tests/test_mode_i16.py::test_basic[I;16]", "Tests/test_file_tiff.py::TestFileTiff::test_bigtiff", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ras]", "Tests/test_imagemorph.py::test_incorrect_mode", "Tests/test_imagepath.py::test_invalid_path_constructors[coords1]", "Tests/test_file_container.py::test_read_eof[False]", "Tests/test_file_png.py::TestFilePng::test_exif_save", "Tests/test_file_tiff_metadata.py::test_empty_subifd", "Tests/test_image.py::TestImage::test_exif_ifd1", "Tests/test_imagesequence.py::test_consecutive", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ls.png]", "Tests/test_image_reduce.py::test_mode_F[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev_first_frame.gif]", "Tests/test_file_apng.py::test_apng_blend", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyny.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyyn.png]", "Tests/test_image_point.py::test_f_mode", "Tests/test_imagemorph.py::test_add_patterns", "Tests/test_image_copy.py::test_copy[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_shape2.png]", "Tests/test_box_blur.py::test_two_passes", "Tests/test_file_gif.py::test_extents", "Tests/test_file_gif.py::test_loop_none", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply18]", "Tests/test_image_reduce.py::test_mode_La[5]", "Tests/test_imagepath.py::test_path_constructors[coords8]", "Tests/test_image_copy.py::test_copy[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1.bmp]", "Tests/test_file_fli.py::test_invalid_file", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-RGBA]", "Tests/test_file_wmf.py::test_save[.wmf]", "Tests/test_image_filter.py::test_sanity[CMYK-GaussianBlur]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_slope1px_w2px.png]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-PA]", "Tests/test_image_filter.py::test_rankfilter_error[MaxFilter]", "Tests/test_file_pdf.py::test_save[P]", "Tests/test_file_fli.py::test_eoferror", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGBA-color2]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[L]", "Tests/test_file_bufrstub.py::test_open", "Tests/test_imagemorph.py::test_corner", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8nonsquare-e.png]", "Tests/test_imagemath_unsafe_eval.py::test_prevent_exec[(lambda: exec('pass'))()]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_1px_high.png]", "Tests/test_file_eps.py::test_readline[\\n-]", "Tests/test_file_gif.py::test_roundtrip_info_duration_combined", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-ifd-offset.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp_bits.ppm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_over.png]", "Tests/test_file_xvthumb.py::test_unexpected_eof", "Tests/test_image_access.py::TestImageGetPixel::test_basic[CMYK]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_equality", "Tests/test_file_sgi.py::test_write", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4IR.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/README.txt]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_wide_line_dot.png]", "Tests/test_imagecolor.py::test_hash", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-63b1dffefc8c075ddc606c0a2f5fdc15ece78863.tif]", "Tests/test_file_hdf5stub.py::test_save", "Tests/test_image_quantize.py::test_sanity", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply20]", "Tests/test_image_putdata.py::test_not_flattened", "Tests/test_file_gimpgradient.py::test_curved", "Tests/test_imageops.py::test_1pxfit", "Tests/test_image_reduce.py::test_mode_LA_opaque[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/five_channels.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_actl.png]", "Tests/test_imagemorph.py::test_load_invalid_mrl", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_lt.png]", "Tests/test_image_reduce.py::test_mode_L[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ld.png]", "Tests/test_lib_pack.py::TestLibUnpack::test_YCbCr", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_BC7_UNORM_SRGB.png]", "Tests/test_image_transpose.py::test_transpose[I;16B]", "Tests/test_file_tiff.py::TestFileTiff::test_planar_configuration_save", "Tests/test_file_eps.py::test_eof_before_bounding_box", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-50-50-0]", "Tests/test_imagechops.py::test_lighter_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-465703f71a0f0094873a3e0e82c9f798161171b8.sgi]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8_grayscale.bmp]", "Tests/test_imageops_usm.py::test_blur_formats", "Tests/test_font_pcf_charsets.py::test_draw[iso8859-1]", "Tests/test_imagepath.py::test_overflow_segfault", "Tests/test_file_ico.py::test_different_bit_depths", "Tests/test_file_tiff_metadata.py::test_read_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/argb-32bpp_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/libtiff_segfault.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_repeat_fctl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_2811.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-c8efc3fded6426986ba867a399791bae544f59bc.psd]", "Tests/test_file_gif.py::test_save_dispose", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-None]", "Tests/test_file_dcx.py::test_tell", "Tests/test_image_filter.py::test_sanity[RGB-SMOOTH_MORE]", "Tests/test_image_filter.py::test_sanity[I-EDGE_ENHANCE_MORE]", "Tests/test_imagedraw.py::test_rectangle_I16[bbox2]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illu10_no_preview.eps]", "Tests/test_image_reduce.py::test_mode_RGB[3]", "Tests/test_imagepath.py::test_invalid_path_constructors[coords4]", "Tests/test_image_rotate.py::test_zero[180]", "Tests/test_imagedraw.py::test_getdraw", "Tests/test_imagedraw.py::test_point[points0]", "Tests/test_image.py::TestImage::test_getbbox", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_nonexclusive", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns.png]", "Tests/test_features.py::test_check_modules[freetype2]", "Tests/test_imagedraw2.py::test_rectangle[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBX]", "Tests/test_format_lab.py::test_white", "Tests/test_file_wmf.py::test_load_raw", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle_top_right.tga]", "Tests/test_imagegrab.py::TestImageGrab::test_grab_no_xcb", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower2.webp]", "Tests/test_image_convert.py::test_8bit", "Tests/test_image_convert.py::test_p2pa_alpha", "Tests/test_image_mode.py::test_sanity", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_wrong_channels_count", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBX]", "Tests/test_image_paste.py::TestImagingPaste::test_incorrect_abbreviated_form", "Tests/test_imagepath.py::test_path_constructors[coords1]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[4]", "Tests/test_image_thumbnail.py::test_aspect", "Tests/test_image_quantize.py::test_rgba_quantize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_1.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing.wmf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_final.png]", "Tests/test_imagechops.py::test_invert", "Tests/test_imageops.py::test_pil163", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[BGR;15-band_numbers2-color must be int, or tuple of one or three elements]", "Tests/test_file_fli.py::test_n_frames", "Tests/test_file_apng.py::test_apng_dispose_op_previous_frame", "Tests/test_file_tiff_metadata.py::test_iccprofile", "Tests/test_imagefontpil.py::test_textbbox[font1]", "Tests/test_file_pdf.py::test_pdf_info", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc-after-SOF.jpg]", "Tests/test_deprecate.py::test_old_version[Old things-True-Old things are deprecated and should be removed\\\\.]", "Tests/test_imagedraw.py::test_ellipse[bbox2-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_pieslice.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_different.png]", "Tests/test_image.py::TestImage::test_apply_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_dpi.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4I.tif]", "Tests/test_pickle.py::test_pickle_la_mode_with_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0da013a13571cc8eb457a39fee8db18f8a3c7127.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_truncated_jpeg_throws_oserror", "Tests/test_imagedraw.py::test_polygon[points1]", "Tests/test_image_thumbnail.py::test_no_resize", "Tests/test_imagedraw.py::test_chord_width_fill[bbox0]", "Tests/test_file_gif.py::test_palette_434", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dilation4.lut]", "Tests/test_imagedraw2.py::test_arc[0.5-180.4-bbox3]", "Tests/test_imagedraw.py::test_floodfill_border[bbox3]", "Tests/test_imageops.py::test_exif_transpose_in_place", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[LA]", "Tests/test_imagefontpil.py::test_textbbox[font0]", "Tests/test_image_reduce.py::test_mode_RGBa[factor8]", "Tests/test_file_gribstub.py::test_invalid_file", "Tests/test_file_tiff.py::TestFileTiff::test_closed_file", "Tests/test_file_mpo.py::test_ultra_hdr", "Tests/test_image_putpalette.py::test_rgba_palette[ARGB-palette2]", "Tests/test_file_gif.py::test_duration", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_tags_orientation.png]", "Tests/test_file_spider.py::test_nonstack_dos", "Tests/test_image.py::TestImage::test_remap_palette", "Tests/test_imagechops.py::test_logical", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[I;16]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox0]", "Tests/test_image_quantize.py::test_quantize_kmeans[1]", "Tests/test_imagedraw2.py::test_arc[0-180-bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sunraster.im1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_one_band.fpx]", "Tests/test_file_tiff_metadata.py::test_iccprofile_binary", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[IHDR]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor16]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_32f", "Tests/test_file_ico.py::test_save_to_bytes_bmp[RGB]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd_rgba.gif-RGBA]", "Tests/test_file_pcx.py::test_break_one_at_end", "Tests/test_image_tobitmap.py::test_sanity", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/p_trns_single.png-None]", "Tests/test_file_gif.py::test_identical_frames", "Tests/test_image_convert.py::test_matrix_illegal_conversion", "Tests/test_file_apng.py::test_seek_after_close", "Tests/test_file_pcx.py::test_odd[L]", "Tests/test_file_pdf.py::test_dpi[params0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_R8G8B8A8_UNORM_SRGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/png_decompression_dos.png]", "Tests/test_image_crop.py::test_negative_crop[box1]", "Tests/test_image_reduce.py::test_mode_La[1]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[sRGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc1_typeless.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r10.fli]", "Tests/test_imagedraw.py::test_point[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1.blp]", "Tests/test_image_reduce.py::test_mode_L[5]", "Tests/test_file_im.py::test_unclosed_file", "Tests/test_image_access.py::TestImageGetPixel::test_basic[LAB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_5.webp]", "Tests/test_core_resources.py::TestCoreMemory::test_clear_cache_stats", "Tests/test_file_hdf5stub.py::test_open", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox1]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration1]", "Tests/test_imagefile.py::TestImageFile::test_negative_stride", "Tests/test_image_reduce.py::test_mode_RGBA[factor10]", "Tests/test_image_filter.py::test_sanity[I-SMOOTH_MORE]", "Tests/test_file_dds.py::test_dx10_r8g8b8a8_unorm_srgb", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_raw.blp]", "Tests/test_features.py::test_check_codecs[jpg_2000]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.0-5.5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-bff0a9dc7243a8e6ede2408d2ffa6a9964698b87.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_bl_rle.tga]", "Tests/test_file_tiff.py::TestFileTiff::test_unknown_pixel_mode", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.3-3.7]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16]", "Tests/test_file_container.py::test_read_n0[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_md_center.png]", "Tests/test_file_icns.py::test_save_fp", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32768-I;16B]", "Tests/test_file_container.py::test_readable[False]", "Tests/test_image.py::TestImage::test_readonly_save", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/zero_bb_scale2.png-None]", "Tests/test_file_gif.py::test_optimize_correctness[129-511-129]", "Tests/test_image_rotate.py::test_translate", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_save_all", "Tests/test_imagemath_lambda_eval.py::test_bitwise_rightshift", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h_sf.dds]", "Tests/test_imagewin.py::TestImageWin::test_hdc", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab-red.tif]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-True-True]", "Tests/test_imagefile.py::TestPyEncoder::test_oversize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/total-pages-zero.tif]", "Tests/test_file_xbm.py::test_pil151", "Tests/test_box_blur.py::test_color_modes", "Tests/test_imagedraw.py::test_line[points3]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[RGB]", "Tests/test_image_quantize.py::test_octree_quantize", "Tests/test_imagedraw.py::test_chord[bbox2-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_45.png]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[-2]", "Tests/test_imagemath_lambda_eval.py::test_bitwise_and", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc.png]", "Tests/test_imageenhance.py::test_alpha[Color]", "Tests/test_file_gif.py::test_dispose_background", "Tests/test_imagedraw2.py::test_mode", "Tests/test_file_tiff.py::TestFileTiff::test_save_bmp_compression", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I;16L]", "Tests/test_image.py::TestImage::test_zero_frombytes[size2]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius2]", "Tests/test_image_reduce.py::test_mode_RGB[factor6]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_eps.py::test_image_mode_not_supported", "Tests/test_file_tiff.py::TestFileTiff::test_save_float_dpi", "Tests/test_image_filter.py::test_consistency_3x3[LA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[4]", "Tests/test_image_filter.py::test_sanity[I-DETAIL]", "Tests/test_image.py::TestImage::test_getchannel", "Tests/test_file_jpeg.py::TestFileJpeg::test_cmyk", "Tests/test_file_gif.py::test_palette_save_ImagePalette", "Tests/test_imagefontpil.py::test_unicode[font0]", "Tests/test_file_im.py::test_name_limit", "Tests/test_file_ppm.py::test_header_token_too_long", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.dds]", "Tests/test_image_transpose.py::test_transpose[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_rt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb.ico]", "Tests/test_file_tar.py::test_contextmanager", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65537]", "Tests/test_imagedraw.py::test_ellipse[bbox3-RGB]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[2]", "Tests/test_util.py::test_is_path[test_path1]", "Tests/test_file_tiff.py::TestFileTiff::test_oom[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_ico", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w126.bmp]", "Tests/test_file_ppm.py::test_plain_data_with_comment[P3\\n2 2\\n255-0 0 0 001 1 1 2 2 2 255 255 255-1000000]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[RGB]", "Tests/test_imageshow.py::test_show_file[viewer6]", "Tests/test_image_crop.py::test_crop_crash", "Tests/test_image_split.py::test_split_open", "Tests/test_imagepalette.py::test_make_linear_lut", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.wal]", "Tests/test_file_spider.py::test_is_int_not_a_number", "Tests/test_image_quantize.py::test_quantize_kmeans[0]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fcTL]", "Tests/test_file_jpeg.py::TestFileJpeg::test_separate_tables", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.3-3.7]", "Tests/test_file_dds.py::test_invalid_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[3-0-5]", "Tests/test_image_rotate.py::test_angle[0]", "Tests/test_file_psd.py::test_combined_larger_than_size", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points3]", "Tests/test_file_ico.py::test_save_256x256", "Tests/test_imagesequence.py::test_palette_mmap", "Tests/test_image_reduce.py::test_mode_LA_opaque[4]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[RGBX]", "Tests/test_file_gif.py::test_n_frames[Tests/images/comment_after_last_frame.gif-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid-exif.jpg]", "Tests/test_binary.py::test_little_endian", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_ellipse_RGB.png]", "Tests/test_imagedraw.py::test_incorrectly_ordered_coordinates[xy1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_frame.gif]", "Tests/test_image_quantize.py::test_palette[1-color1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8rle.bmp]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor10]", "Tests/test_file_eps.py::test_readline[\\n\\r-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[CMYK]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/itxt_chunks.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cbdt_mask.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_x_max_and_y_offset.png]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16N]", "Tests/test_image_filter.py::test_modefilter[RGB-expected3]", "Tests/test_file_container.py::test_seek_mode[0-33]", "Tests/test_file_gimpgradient.py::test_linear_pos_gt_middle", "Tests/test_image_filter.py::test_sanity[L-EDGE_ENHANCE]", "Tests/test_imagedraw.py::test_rectangle_width[bbox1]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[HSV]", "Tests/test_image_reduce.py::test_mode_RGBA[factor12]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P5 3 1 257 \\x00\\x00\\x00\\x80\\x01\\x01-I-pixels5]", "Tests/test_file_ftex.py::test_invalid_file", "Tests/test_image_reduce.py::test_mode_La[factor6]", "Tests/test_file_gif.py::test_headers_saving_for_animated_gifs", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.xpm]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply22]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_height.j2k]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8nonsquare-v.png]", "Tests/test_file_dds.py::test_save[L-Tests/images/linear_gradient.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_large_buffer_highest_quality", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_unorm.dds-Tests/images/bc5_unorm.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_md.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[3]", "Tests/test_image_filter.py::test_sanity[CMYK-DETAIL]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_various_sizes_filled.png]", "Tests/test_image_filter.py::test_sanity[L-BLUR]", "Tests/test_file_dcx.py::test_sanity", "Tests/test_image_reduce.py::test_mode_LA_opaque[1]", "Tests/test_imagedraw.py::test_line_vertical", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev.gif]", "Tests/test_file_pcx.py::test_odd_read", "Tests/test_imagepalette.py::test_getcolor_not_special[0-palette0]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[RGBA]", "Tests/test_imagepath.py::test_path_constructors[\\x00\\x00\\x00\\x00\\x00\\x00\\x80?]", "Tests/test_file_dds.py::test_sanity_ati1_bc4u[Tests/images/bc4u.dds]", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[1-0-15]", "Tests/test_image_rotate.py::test_mode[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r01.fli]", "Tests/test_file_bmp.py::test_rle4", "Tests/test_file_gif.py::test_closed_file", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[1]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_args[RGB-3-table_size5]", "Tests/test_image_reduce.py::test_mode_L[factor6]", "Tests/test_image_reduce.py::test_args_box_error[size2-ValueError]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg.blp]", "Tests/test_imagemath_lambda_eval.py::test_bitwise_xor", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_target.png]", "Tests/test_pdfparser.py::test_indirect_refs", "Tests/test_box_blur.py::test_radius_1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/color_snakes.png]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[LAB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_y_odd.png]", "Tests/test_file_gif.py::test_seek_info", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_5.tif]", "Tests/test_imageshow.py::test_show_file[viewer4]", "Tests/test_imagedraw.py::test_ellipse_edge", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/la.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illuCS6_preview.eps]", "Tests/test_binary.py::test_big_endian", "Tests/test_imagedraw.py::test_pieslice_width[bbox2]", "Tests/test_imagedraw2.py::test_big_rectangle", "Tests/test_file_bmp.py::test_save_bmp_with_dpi", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test.colors.gif]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-0.6-0-9.1]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[1]", "Tests/test_file_xvthumb.py::test_invalid_file", "Tests/test_file_png.py::TestFilePng::test_repr_png", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r05.fli]", "Tests/test_file_mpo.py::test_reload_exif_after_seek", "Tests/test_file_dds.py::test_sanity_dxt5", "Tests/test_image_thumbnail.py::test_float", "Tests/test_imagepath.py::test_transform", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r02.fli]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-1.5-5.5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_name.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r08.fli]", "Tests/test_file_jpeg.py::TestFileJpeg::test_smooth", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_mode[L-RGB-3-3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background.png]", "Tests/test_image_filter.py::test_sanity[L-SMOOTH_MORE]", "Tests/test_util.py::test_is_path[test_path2]", "Tests/test_file_iptc.py::test_getiptcinfo_zero_padding", "Tests/test_file_tiff_metadata.py::test_ifd_signed_rational", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[L]", "Tests/test_file_fli.py::test_seek_tell", "Tests/test_file_pcx.py::test_break_in_count_overflow", "Tests/test_image_filter.py::test_sanity[I-EDGE_ENHANCE]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/zero_bb.png-None]", "Tests/test_image_reduce.py::test_unsupported_modes[P]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-0.6-0-9.1]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-50-50-0]", "Tests/test_file_tiff.py::TestFileTiff::test_int_resolution", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy1-x_odd]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.5-3.7]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illu10_preview.eps]", "Tests/test_imagemath_lambda_eval.py::test_bitwise_invert", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color0-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_tl_raw.tga]", "Tests/test_file_ico.py::test_palette", "Tests/test_file_pcx.py::test_large_count", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none_load_end.gif]", "Tests/test_image_putdata.py::test_array_B", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/jpeg_ff00_header.jpg]", "Tests/test_imagemorph.py::test_lut[edge]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/ossfuzz-5730089102868480.sgi]", "Tests/test_file_mpo.py::test_parallax", "Tests/test_imageops_usm.py::test_usm_accuracy", "Tests/test_file_apng.py::test_apng_chunk_errors", "Tests/test_imagechops.py::test_lighter_pixel", "Tests/test_image_reduce.py::test_mode_La[factor7]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w2px_inverted.png]", "Tests/test_image_rotate.py::test_zero[0]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox3]", "Tests/test_file_gif.py::test_seek_after_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/m13_gzip.fits]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyny.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_large_exif", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/copyleft.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati1.png]", "Tests/test_imagemorph.py::test_lut[erosion8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cmx3g8_wv_1998.260_0745_mcidas.ara]", "Tests/test_file_mpo.py::test_sanity[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/rletopdown.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_polygon_L.png]", "Tests/test_image.py::TestImage::test_exif_load_from_fp", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[BGR;15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_ter_pl_target.png]", "Tests/test_file_mpo.py::test_app[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/binary_preview_map.eps]", "Tests/test_image.py::TestImage::test_empty_exif", "Tests/test_image_reduce.py::test_mode_RGB[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_round.png]", "Tests/test_file_gif.py::test_save_I", "Tests/test_image.py::TestImage::test_unknown_extension", "Tests/test_box_blur.py::test_radius_bigger_then_half", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/p_trns_single.png-None]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle7-0-ValueError-rotation should be an int or float]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/seek_too_large.tif]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/03r00.fli]", "Tests/test_psdraw.py::test_stdout[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-bba4f2e026b5786529370e5dfe9a11b1bf991f07.blp]", "Tests/test_file_xpm.py::test_sanity", "Tests/test_image_filter.py::test_sanity[RGB-MedianFilter]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-True-False]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-60d8b7c8469d59fc9ffff6b3a3dc0faeae6ea8ee.blp]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[L]", "Tests/test_imagemath_unsafe_eval.py::test_logical_eq", "Tests/test_features.py::test_check_modules[littlecms2]", "Tests/test_tiff_ifdrational.py::test_nonetype", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_zero_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_1_raqm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-5762152299364352.fli]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_bitmap.png]", "Tests/test_file_im.py::test_tell", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage_transparency.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.deflate.tif]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-2]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gimp_gradient.ggr]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ls.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-0.1-0-3.7]", "Tests/test_image.py::TestImage::test_internals", "Tests/test_imagemath_unsafe_eval.py::test_bitwise_and", "Tests/test_image_transpose.py::test_rotate_270[I;16B]", "Tests/test_file_dds.py::test_short_header", "Tests/test_image_draft.py::test_mode", "Tests/test_image_reduce.py::test_mode_RGB[factor16]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox3]", "Tests/test_file_wmf.py::test_load", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[1]", "Tests/test_image_rotate.py::test_fastpath_translate", "Tests/test_file_dds.py::test_dx10_bc4[Tests/images/bc4_unorm.dds]", "Tests/test_file_imt.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/not_enough_data.jp2]", "Tests/test_image_reduce.py::test_mode_RGB[6]", "Tests/test_imagemorph.py::test_roundtrip_mrl", "Tests/test_imagedraw.py::test_arc_no_loops[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGB_target.png]", "Tests/test_imageops.py::test_palette[PA]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/pil123p.png-None]", "Tests/test_image_filter.py::test_sanity[I-UnsharpMask]", "Tests/test_imagemath_lambda_eval.py::test_logical_not_equal", "Tests/test_file_xbm.py::test_open_filename_with_underscore", "Tests/test_features.py::test_check_warns_on_nonexistent", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_8.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb16-231.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_rgb.png]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[1-bounding_circle1-0-ValueError-n_sides should be an int > 2]", "Tests/test_deprecate.py::test_action[Upgrade to new thing.]", "Tests/test_image.py::TestImage::test_zero_frombytes[size1]", "Tests/test_file_im.py::test_roundtrip[RGB]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[4]", "Tests/test_image.py::TestImage::test_radial_gradient_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_layer_count.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_various_sizes.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[L]", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/bc1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24prof.bmp]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_mode[L-L-3-3]", "Tests/test_file_mpo.py::test_eoferror", "Tests/test_file_jpeg.py::TestFileJpeg::test_quality", "Tests/test_image_crop.py::test_crop[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mt.png]", "Tests/test_image.py::TestImage::test_no_new_file_on_error", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1.png]", "Tests/test_imagestat.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ttb.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[RGBX]", "Tests/test_box_blur.py::test_radius_0_02", "Tests/test_file_ppm.py::test_sanity", "Tests/test_image_reduce.py::test_mode_RGBa[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bad_palette_file.gpl]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_no_prefix.jpg]", "Tests/test_lib_pack.py::TestLibUnpack::test_1", "Tests/test_file_gif.py::test_bbox_alpha", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[acTL]", "Tests/test_image_transform.py::TestImageTransform::test_extent", "Tests/test_image_getbbox.py::test_bbox", "Tests/test_file_tga.py::test_sanity[P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_bl_raw.tga]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P2 3 1 4 0 2 4-L-pixels0]", "Tests/test_image_split.py::test_split_merge[RGBA]", "Tests/test_imagechops.py::test_darker_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill2.png]", "Tests/test_imagedraw2.py::test_arc[0.5-180.4-bbox1]", "Tests/test_image_transpose.py::test_rotate_270[I;16L]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-PA]", "Tests/test_image_filter.py::test_consistency_3x3[L]", "Tests/test_image_copy.py::test_copy[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_8.webp]", "Tests/test_lib_pack.py::TestLibUnpack::test_CMYK16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_mm.png]", "Tests/test_file_eps.py::test_timeout[Tests/images/timeout-d675703545fee17acab56e5fec644c19979175de.eps]", "Tests/test_image_split.py::test_split_merge[YCbCr]", "Tests/test_file_pixar.py::test_sanity", "Tests/test_file_imt.py::test_invalid_file[\\n-]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5s.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_ycbcr_jpeg_1x1_sampling.tif]", "Tests/test_image_transpose.py::test_rotate_270[L]", "Tests/test_file_container.py::test_read_n0[False]", "Tests/test_file_gif.py::test_optimize_correctness[256-511-256]", "Tests/test_file_tiff.py::TestFileTiff::test_saving_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000002]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox3]", "Tests/test_file_ico.py::test_only_save_relevant_sizes", "Tests/test_file_psd.py::test_unclosed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ms.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression.png]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_args[RGB-3-table_size2]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65536]", "Tests/test_imagedraw2.py::test_line[points2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_6.webp]", "Tests/test_image_reduce.py::test_mode_I[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_frame_size.mpo]", "Tests/test_file_container.py::test_seekable", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/notes]", "Tests/test_file_dds.py::test_save[RGB-Tests/images/hopper.png]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-1.5-5.5]", "Tests/test_file_jpeg.py::TestFileJpeg::test_qtables", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/different_durations.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow.icns]", "Tests/test_image_filter.py::test_sanity_error[RGB]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/zero_bb.png-None]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[L]", "Tests/test_image.py::TestImage::test_constants", "Tests/test_file_icns.py::test_getimage", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit.ppm]", "Tests/test_image_transpose.py::test_rotate_270[I;16]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy0-30.5-given]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-3]", "Tests/test_imagepath.py::test_map[coords1-expected1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ma.png]", "Tests/test_lib_pack.py::TestLibPack::test_RGBA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_background_text.png]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/itxt_chunks.png-None]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_region.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/expected_to_read.jp2]", "Tests/test_image_transform.py::TestImageTransform::test_unknown_resampling_filter[unknown]", "Tests/test_image_entropy.py::test_entropy", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_16bit_RGBa.tiff]", "Tests/test_file_mpo.py::test_closed_file", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-L]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-1.1-6.9]", "Tests/test_image_putpalette.py::test_imagepalette", "Tests/test_file_pdf.py::test_save[RGB]", "Tests/test_image_rotate.py::test_rotate_no_fill", "Tests/test_file_mpo.py::test_mp_offset", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-9139147ce93e20eb14088fe238e541443ffd64b3.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-abcf1c97b8fe42a6c68f1fb0b978530c98d57ced.sgi]", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat_zero_chunk.png]", "Tests/test_imagedraw.py::test_triangle_right_width[fill0-width]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_edge.png]", "Tests/test_file_msp.py::test_open_windows_v1", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16N]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[RGB]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-74d2a78403a5a59db1fb0a2b8735ac068a75f6e3.tif]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_resize[LA]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right_width_no_fill.png]", "Tests/test_image_reduce.py::test_mode_RGBA[3]", "Tests/test_image_filter.py::test_sanity[RGB-EMBOSS]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb24.jpg]", "Tests/test_file_gif.py::test_dispose_none", "Tests/test_imagedraw2.py::test_polygon[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_8.tga]", "Tests/test_imagedraw.py::test_default_font_size", "Tests/test_file_gif.py::test_dispose_none_load_end", "Tests/test_image_getcolors.py::test_pack", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_right.png]", "Tests/test_image_reduce.py::test_mode_RGBA[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_high.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[0-None]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply15]", "Tests/test_image_filter.py::test_sanity[CMYK-EDGE_ENHANCE]", "Tests/test_file_blp.py::test_load_blp1", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat.png]", "Tests/test_map.py::test_tobytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overflow.fli]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/linear_gradient.png]", "Tests/test_image_crop.py::test_wide_crop", "Tests/test_image.py::TestImage::test_one_item_tuple", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_width_fill.png]", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_typeless.dds-Tests/images/bc5_unorm.dds]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.tif-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_invalid.png]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[L]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bw_gradient.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.mic]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/balloon_eciRGBv2_aware.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/notes]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox3]", "Tests/test_image_histogram.py::test_histogram", "Tests/test_image.py::TestImage::test_radial_gradient[F]", "Tests/test_imagedraw.py::test_ellipse_symmetric", "Tests/test_imagepalette.py::test_rawmode_valueerrors", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_bad_mpo_header.jpg]", "Tests/test_file_tiff.py::TestFileTiff::test_timeout", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox1]", "Tests/test_file_png.py::TestFilePng::test_trns_rgb", "Tests/test_image_resample.py::TestCoreResampleBox::test_passthrough", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[RGBA]", "Tests/test_image_convert.py::test_l_macro_rounding[L]", "Tests/test_image_mode.py::test_properties[P-P-L-1-expected_band_names2]", "Tests/test_main.py::test_main[args1-True]", "Tests/test_imagedraw2.py::test_ellipse[bbox2]", "Tests/test_file_cur.py::test_invalid_file", "Tests/test_image_rotate.py::test_alpha_rotate_with_fill", "Tests/test_file_gif.py::test_l_mode_transparency", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor9]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[RGB]", "Tests/test_image_filter.py::test_sanity[I-ModeFilter]", "Tests/test_imagefile.py::TestImageFile::test_parser", "Tests/test_imagemath_unsafe_eval.py::test_logical", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi[Tests/images/hopper.jpg]", "Tests/test_image.py::TestRegistry::test_encode_registry", "Tests/test_imagedraw.py::test_chord_zero_width[bbox1]", "Tests/test_image_putdata.py::test_sanity", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[P]", "Tests/test_imagepath.py::test_path", "Tests/test_image_access.py::TestImageGetPixel::test_basic[F]", "Tests/test_imagefontpil.py::test_unicode[font1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_multiple_frame_loop.tiff]", "Tests/test_file_dcx.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_gps_typeerror.jpg]", "Tests/test_file_fli.py::test_tell", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.webp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/clipboard.dib]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_compat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_typeless.dds]", "Tests/test_image_thumbnail.py::test_reducing_gap_for_DCT_scaling", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[None-1.5]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_with_normals_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_lt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_after_rgb.gif]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_hdf5stub.py::test_invalid_file", "Tests/test_image_rotate.py::test_fastpath_center", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/colr_bungee.png]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply20]", "Tests/test_file_mpo.py::test_frame_size", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox2]", "Tests/test_image_reduce.py::test_mode_La[6]", "Tests/test_file_spider.py::test_tempfile", "Tests/test_image_filter.py::test_sanity[RGB-UnsharpMask]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r11.fli]", "Tests/test_image_reduce.py::test_mode_RGBA[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_wmf_ref_144.png]", "Tests/test_image_filter.py::test_rankfilter[I-expected3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ra.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w125.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_save_setting_missing_resolution", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65519]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w124.bmp]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_vertical[0]", "Tests/test_imagedraw2.py::test_rectangle[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnyn.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chromacheck-sbix_mask.png]", "Tests/test_file_im.py::test_sanity", "Tests/test_imagefontpil.py::test_default_font[font1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[1]", "Tests/test_image_reduce.py::test_mode_La[factor9]", "Tests/test_image_filter.py::test_sanity[L-EMBOSS]", "Tests/test_image_putdata.py::test_mode_i[I;16]", "Tests/test_imageenhance.py::test_crash", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-db8bfa78b19721225425530c5946217720d7df4e.sgi]", "Tests/test_image_point.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r04.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal4rletrns.bmp]", "Tests/test_imagedraw.py::test_pieslice_width[bbox3]", "Tests/test_image_getpalette.py::test_palette_rawmode", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox0]", "Tests/test_image.py::TestImage::test_image_modes_success[RGB]", "Tests/test_file_tar.py::test_unclosed_file", "Tests/test_file_mpo.py::test_app[Tests/images/frozenpond.mpo]", "Tests/test_image_reduce.py::test_mode_RGB[factor17]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif]", "Tests/test_image_reduce.py::test_mode_L[factor15]", "Tests/test_image_point.py::test_16bit_lut", "Tests/test_imagemorph.py::test_erosion4", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox0]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;24]", "Tests/test_imagedraw.py::test_continuous_horizontal_edges_polygon", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_1bit_plain.pbm-Tests/images/hopper_1bit.pbm]", "Tests/test_image_quantize.py::test_palette[2-color2]", "Tests/test_image_rotate.py::test_mode[I]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-060745d3f534ad6e4128c51d336ea5489182c69d.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/different_transparency.gif]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox3]", "Tests/test_core_resources.py::TestCoreMemory::test_set_blocks_max", "Tests/test_image_quantize.py::test_quantize_no_dither", "Tests/test_file_eps.py::test_binary", "Tests/test_imageops.py::test_exif_transpose", "Tests/test_file_gbr.py::test_multiple_load_operations", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rectangle_surrounding_text.png]", "Tests/test_imagedraw.py::test_ellipse[bbox0-L]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[RGBA]", "Tests/test_image_filter.py::test_sanity[RGB-BLUR]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower.jpg]", "Tests/test_file_png.py::TestFilePng::test_interlace", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_tl_rle.tga]", "Tests/test_file_png.py::TestFilePng::test_specify_bits[False]", "Tests/test_image_transform.py::TestImageTransform::test_alpha_premult_resize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_center.png]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r01.fli]", "Tests/test_image_filter.py::test_sanity[RGB-MaxFilter]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox2]", "Tests/test_imagepalette.py::test_invalid_palette", "Tests/test_file_bmp.py::test_dib_header_size[40-g/pal1.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_palette[PA]", "Tests/test_image.py::TestImage::test_invalid_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123rgba.png]", "Tests/test_box_blur.py::test_three_passes", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_not_needed_for_second_frame.gif]", "Tests/test_image_filter.py::test_consistency_5x5[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_unorm.png]", "Tests/test_file_ico.py::test_save_append_images", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8v4.bmp]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[P]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_8u", "Tests/test_file_pcx.py::test_odd[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_x_odd.png]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.iccprofile_binary.tif]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/zero_bb_scale2.png-None]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[RGB-band_numbers3-color must be int, or tuple of one, three or four elements]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;16]", "Tests/test_file_container.py::test_readable[True]", "Tests/test_file_psd.py::test_negative_top_left_layer", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy0-x]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_mono.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_not_negative.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8rletrns.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8offs.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_raw.tif]", "Tests/test_imagemath_unsafe_eval.py::test_logical_le", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_None.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_mt.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[RGB]", "Tests/test_imageops.py::test_autocontrast_preserve_gradient", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_tiff", "Tests/test_imagechops.py::test_soft_light", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_stroke_raqm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrow2.bin]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/second_frame_comment.gif]", "Tests/test_image_transpose.py::test_flip_top_bottom[RGB]", "Tests/test_file_gif.py::test_n_frames[Tests/images/hopper.gif-1]", "Tests/test_file_tiff_metadata.py::test_ifd_unsigned_rational", "Tests/test_imagedraw2.py::test_arc[0-180-bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_3.webp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb32bf.bmp]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor16]", "Tests/test_image.py::TestImage::test_getxmp_padded", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGB]", "Tests/test_image_transform.py::TestImageTransform::test_mesh", "Tests/test_file_mpo.py::test_sanity[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit_plain.ppm]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[box1]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_mode[RGB-RGB-4-3]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba32abf.bmp]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox2]", "Tests/test_imageshow.py::test_show_file[viewer2]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;15]", "Tests/test_file_gif.py::test_retain_comment_in_subsequent_frames", "Tests/test_image.py::TestImage::test_comparison_with_other_type", "Tests/test_font_bdf.py::test_invalid_file", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mm.png]", "Tests/test_file_bufrstub.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil168.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_l.png]", "Tests/test_file_tga.py::test_small_palette", "Tests/test_file_pdf.py::test_pdf_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.bmp]", "Tests/test_image_reduce.py::test_mode_LA[factor16]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-1.5-5.5]", "Tests/test_file_gif.py::test_optimize_correctness[64-511-64]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[La]", "Tests/test_image_reduce.py::test_mode_RGBa[factor6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_x.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5u.dds]", "Tests/test_image_reduce.py::test_args_factor_error[0-ValueError]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[3]", "Tests/test_imagedraw.py::test_ellipse_width[bbox1]", "Tests/test_imageenhance.py::test_sanity", "Tests/test_000_sanity.py::test_sanity", "Tests/test_image.py::TestImage::test_registered_extensions", "Tests/test_imagewin.py::TestImageWin::test_hwnd", "Tests/test_file_tiff_metadata.py::test_too_many_entries", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow2.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_sepia.png]", "Tests/test_file_tiff.py::TestFileTiff::test_sanity", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/p_trns_single.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_right.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_complex_unicode_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_test.jpg]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gimp_gradient_with_name.ggr]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32768-I;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[L]", "Tests/test_file_sgi.py::test_rgb16", "Tests/test_imagefile.py::TestImageFile::test_truncated", "Tests/test_imagepalette.py::test_getcolor", "Tests/test_imagemath_unsafe_eval.py::test_bitwise_xor", "Tests/test_file_dds.py::test_dx10_bc6h[Tests/images/bc6h_sf.dds]", "Tests/test_image_filter.py::test_crash[size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_fill.png]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_width_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_descender.png]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_width.png]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/non_zero_bb.png-None]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I;16N]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-RGB]", "Tests/test_file_tar.py::test_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-64834657ee604b8797bf99eac6a194c124a9a8ba.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/missing_background_first_frame.png]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16L]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords0]", "Tests/test_image.py::TestImage::test_radial_gradient[P]", "Tests/test_image_transpose.py::test_rotate_180[RGB]", "Tests/test_image_reduce.py::test_mode_RGBa[factor9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_ter_en_target.png]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_mode[RGB-L-3-3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pcx_overrun2.bin]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-1.1-6.9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_translucent.png]", "Tests/test_tiff_ifdrational.py::test_ranges", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_eof_before_boundingbox.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-4f085cc12ece8cde18758d42608bed6a2a2cfb1c.tif]", "Tests/test_image.py::TestImage::test_overrun[fli_overrun.bin]", "Tests/test_file_ppm.py::test_plain_ppm_value_negative", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color1-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_padded.jpg]", "Tests/test_file_ico.py::test_load", "Tests/test_file_container.py::test_readlines[False]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[PA]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_overflow", "Tests/test_file_mpo.py::test_exif[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r03.fli]", "Tests/test_image_quantize.py::test_quantize", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox3]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-L]", "Tests/test_file_xbm.py::test_invalid_file", "Tests/test_imagedraw.py::test_big_rectangle", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-0-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.webp]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.png]", "Tests/test_file_pdf.py::test_redos[\\r]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-6646305047838720]", "Tests/test_mode_i16.py::test_basic[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_center.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_fdat_fctl.png]", "Tests/test_image_tobytes.py::test_sanity", "Tests/test_imagedraw.py::test_rectangle_width[bbox3]", "Tests/test_imageenhance.py::test_alpha[Sharpness]", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size0]", "Tests/test_imagedraw.py::test_ellipse[bbox2-L]", "Tests/test_image_filter.py::test_consistency_5x5[I]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_args[RGB-3-table_size3]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_4.tif]", "Tests/test_file_pcx.py::test_break_many_in_loop", "Tests/test_image_resize.py::TestImageResize::test_resize", "Tests/test_image_filter.py::test_sanity[I-SMOOTH]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_rectangle_RGB.png]", "Tests/test_map.py::test_overflow", "Tests/test_file_gif.py::test_strategy", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h_sf.png]", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun2.bin]", "Tests/test_file_im.py::test_n_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGBa.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb24pal.bmp]", "Tests/test_file_container.py::test_iter[False]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_itxt", "Tests/test_file_im.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_grayscale_alpha.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_unexpected.ico]", "Tests/test_image_filter.py::test_sanity[L-MaxFilter]", "Tests/test_image_convert.py::test_16bit", "Tests/test_file_dds.py::test_uncompressed[L-size0-Tests/images/uncompressed_l.dds]", "Tests/test_file_mpo.py::test_exif[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pngtest_bad.png.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_8_raqm.png]", "Tests/test_image.py::TestImage::test_linear_gradient[I]", "Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard", "Tests/test_file_tar.py::test_sanity[jpg-hopper.jpg-JPEG]", "Tests/test_image_split.py::test_split_merge[CMYK]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.0-5.5]", "Tests/test_file_ico.py::test_no_duplicates", "Tests/test_file_pcx.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/a.fli]", "Tests/test_file_jpeg.py::TestFileJpeg::test_truncated_jpeg_should_read_all_the_data", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_noise.tif]", "Tests/test_image_putpalette.py::test_putpalette", "Tests/test_file_ico.py::test_unexpected_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_negative.png]", "Tests/test_file_dds.py::test_sanity_dxt3", "Tests/test_image_draft.py::test_several_drafts", "Tests/test_image_transpose.py::test_transpose[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_chord_L.png]", "Tests/test_image_split.py::test_split_merge[L]", "Tests/test_image_reduce.py::test_unsupported_modes[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line_truncated.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_typeerror.jpg]", "Tests/test_file_msp.py::test_sanity", "Tests/test_image_crop.py::test_crop[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_tags_orientation_exiftool.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.3-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit.pgm]", "Tests/test_file_gif.py::test_eoferror", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_RGBa[factor15]", "Tests/test_imagesequence.py::test_iterator_min_frame", "Tests/test_file_psd.py::test_sanity", "Tests/test_pdfparser.py::test_parsing", "Tests/test_imagedraw.py::test_rounded_rectangle[xy1]", "Tests/test_imagefile.py::TestPyDecoder::test_extents_none", "Tests/test_box_blur.py::test_radius_0_5", "Tests/test_imagedraw.py::test_line_oblique_45", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns-b.png]", "Tests/test_imagepath.py::test_path_constructors[coords2]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.5-3.7]", "Tests/test_file_palm.py::test_oserror[RGB]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[0]", "Tests/test_image_getcolors.py::test_getcolors", "Tests/test_image_frombytes.py::test_sanity[memoryview]", "Tests/test_file_xpm.py::test_invalid_file", "Tests/test_file_mpo.py::test_adopt_jpeg", "Tests/test_file_tiff_metadata.py::test_iccprofile_binary_save_png", "Tests/test_file_container.py::test_readlines[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_jpg.tif]", "Tests/test_file_gif.py::test_seek_rewind", "Tests/test_file_bmp.py::test_rle8", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_large_buffer", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.spider]", "Tests/test_file_png.py::TestFilePng::test_broken", "Tests/test_image_thumbnail.py::test_reducing_gap_values", "Tests/test_file_pdf.py::test_monochrome", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBA]", "Tests/test_image_reduce.py::test_mode_LA[factor6]", "Tests/test_imagepath.py::test_getbbox[0-expected2]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-abcf1c97b8fe42a6c68f1fb0b978530c98d57ced.sgi]", "Tests/test_file_eps.py::test_long_binary_data[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image.py::TestImage::test_linear_gradient[P]", "Tests/test_file_imt.py::test_invalid_file[width 1\\n]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage-lastframe.tif]", "Tests/test_imagedraw2.py::test_pieslice[-92.2-46.2-bbox1]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[65535-I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_0.jpg]", "Tests/test_imagedraw2.py::test_ellipse[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg2.blp]", "Tests/test_file_msp.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/notes]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_lzw.tiff]", "Tests/test_image_reduce.py::test_mode_I[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_extents.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_line.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp_write.ppm]", "Tests/test_imagechops.py::test_multiply_green", "Tests/test_file_gif.py::test_optimize_correctness[64-513-256]", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color0-P]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/test-card.png-None]", "Tests/test_imagecolor.py::test_rounding_errors", "Tests/test_file_tiff.py::TestFileTiff::test_get_photoshop_blocks", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBa]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bad_palette_entry.gpl]", "Tests/test_imagemath_unsafe_eval.py::test_compare", "Tests/test_lib_pack.py::TestLibPack::test_YCbCr", "Tests/test_file_jpeg.py::TestFileJpeg::test_eof", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24largepal.bmp]", "Tests/test_image.py::TestImage::test_fp_name", "Tests/test_file_gif.py::test_optimize_correctness[128-511-128]", "Tests/test_image_mode.py::test_properties[RGBA-RGB-L-4-expected_band_names6]", "Tests/test_file_png.py::TestTruncatedPngPLeaks::test_leak_load", "Tests/test_imagedraw.py::test_polygon_width_I16[points1]", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color0]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_scale2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_2_basic.png]", "Tests/test_imagedraw2.py::test_chord[bbox0]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_lzma.tif]", "Tests/test_imagefile.py::TestImageFile::test_safeblock", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_adobe_deflate.png]", "Tests/test_imagedraw2.py::test_rectangle[bbox3]", "Tests/test_imagedraw.py::test_chord_width[bbox3]", "Tests/test_file_png.py::TestFilePng::test_exif_from_jpg", "Tests/test_file_im.py::test_eoferror", "Tests/test_image_frombytes.py::test_sanity[bytes]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32769-I;16B]", "Tests/test_lib_pack.py::TestLibPack::test_RGBa", "Tests/test_image_filter.py::test_sanity[CMYK-EMBOSS]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_app14.jpg]", "Tests/test_imagedraw2.py::test_arc[0.5-180.4-bbox0]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/zero_bb_scale2.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badbitcount.bmp]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[CMYK]", "Tests/test_file_jpeg.py::TestFileJpeg::test_subsampling", "Tests/test_imagefile.py::TestImageFile::test_truncated_without_errors", "Tests/test_image_putdata.py::test_mode_i[I;16L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[3]", "Tests/test_mode_i16.py::test_convert", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/child_ifd.tiff]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGBA]", "Tests/test_file_gd.py::test_sanity", "Tests/test_file_jpeg.py::TestFileJpeg::test_load_16bit_qtables", "Tests/test_file_gif.py::test_read_multiple_comment_blocks", "Tests/test_image_reduce.py::test_mode_RGBa[6]", "Tests/test_file_palm.py::test_p_mode - Palm P image is wrong", "Tests/test_image.py::TestImage::test_image_modes_success[RGBa]", "Tests/test_font_pcf_charsets.py::test_draw[cp1250]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gfs.t06z.rassda.tm00.bufr_d]", "Tests/test_image_reduce.py::test_unsupported_modes[I;16]", "Tests/test_lib_pack.py::TestLibPack::test_RGBX", "Tests/test_imagemath_lambda_eval.py::test_logical_le", "Tests/test_image_reduce.py::test_mode_LA[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab-green.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_4_basic.png]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit.pgm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_4.jpg]", "Tests/test_file_fli.py::test_timeouts[Tests/images/timeout-bff0a9dc7243a8e6ede2408d2ffa6a9964698b87.fli]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords3]", "Tests/test_lib_pack.py::TestLibPack::test_I", "Tests/test_image_crop.py::test_crop[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_1px_high_translucent.png]", "Tests/test_lib_pack.py::TestLibPack::test_F_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badheadersize.bmp]", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var1]", "Tests/test_file_gif.py::test_optimize_full_l", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1a.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_complex_unicode_text2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ttb_lb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/different_transparency_merged.png]", "Tests/test_image_filter.py::test_sanity[I-MaxFilter]", "Tests/test_file_dcx.py::test_eoferror", "Tests/test_imageshow.py::test_show_file[viewer8]", "Tests/test_file_dds.py::test__accept_false", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[I]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[2]", "Tests/test_file_tiff.py::TestFileTiff::test_rowsperstrip", "Tests/test_image_split.py::test_split_merge[P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.xbm]", "Tests/test_imageops.py::test_contain[new_size0]", "Tests/test_imagedraw.py::test_same_color_outline[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBA]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[1]", "Tests/test_image_rotate.py::test_angle[90]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox0]", "Tests/test_imagedraw.py::test_triangle_right_width[None-width_no_fill]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_2.jpg]", "Tests/test_image_transpose.py::test_flip_left_right[L]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-False-True]", "Tests/test_file_ppm.py::test_plain_ppm_value_too_large", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[RGB]", "Tests/test_image_getim.py::test_sanity", "Tests/test_file_bmp.py::test_dib_header_size[52-q/rgb32h52.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2I.tif]", "Tests/test_mode_i16.py::test_tobytes", "Tests/test_file_palm.py::test_oserror[L]", "Tests/test_features.py::test_supported_modules", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chi.gif]", "Tests/test_image_convert.py::test_opaque", "Tests/test_box_blur.py::test_imageops_box_blur", "Tests/test_file_mpeg.py::test_identify", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow2.icns]", "Tests/test_image_filter.py::test_sanity[CMYK-SHARPEN]", "Tests/test_imageops.py::test_autocontrast_preserve_tone", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_xref_entry.pdf]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nynn.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_ma_center.png]", "Tests/test_imagedraw.py::test_line[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGB.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_right.png]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16]", "Tests/test_image_reduce.py::test_mode_L[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile_none.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil168.png]", "Tests/test_file_spider.py::test_is_spider_image", "Tests/test_image_getextrema.py::test_extrema", "Tests/test_image.py::TestImage::test_effect_spread", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi[Tests/images/pil_sample_cmyk.jpg]", "Tests/test_file_ppm.py::test_header_with_comments", "Tests/test_image_reduce.py::test_mode_L[factor9]", "Tests/test_file_psd.py::test_context_manager", "Tests/test_file_mpo.py::test_save_all", "Tests/test_file_gimpgradient.py::test_linear_pos_le_middle", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_right.png]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gif_header_data.pkl]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-RGB]", "Tests/test_file_tiff.py::TestFileTiff::test_exif", "Tests/test_image.py::TestImage::test_has_transparency_data", "Tests/test_image_resample.py::TestCoreResamplePasses::test_box_vertical", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[L]", "Tests/test_imagedraw.py::test_chord[bbox0-L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_dxt1.png]", "Tests/test_image_rotate.py::test_mode[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb_scale2.png]", "Tests/test_image.py::TestImage::test_exception_inheritance", "Tests/test_imagechops.py::test_subtract_scale_offset", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_256x256.ico]", "Tests/test_file_container.py::test_read_eof[True]", "Tests/test_main.py::test_main[args2-True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiple_exif.jpg]", "Tests/test_image_transpose.py::test_rotate_180[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_raw.tif]", "Tests/test_lib_pack.py::TestLibUnpack::test_I", "Tests/test_image_reduce.py::test_mode_I[factor11]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[L]", "Tests/test_imagedraw.py::test_rectangle_I16[bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_typeerror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_R8G8B8A8_UNORM_SRGB.dds]", "Tests/test_image_reduce.py::test_mode_L[2]", "Tests/test_image_reduce.py::test_mode_RGB[factor11]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-1.1-6.9]", "Tests/test_file_dds.py::test_save[LA-Tests/images/uncompressed_la.png]", "Tests/test_imagemath_unsafe_eval.py::test_prevent_exec[(lambda: (lambda: exec('pass'))())()]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_cmyk_buffer", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgba16.tga]", "Tests/test_image_crop.py::test_crop[P]", "Tests/test_imagedraw2.py::test_chord[bbox2]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_no_icc_profile", "Tests/test_file_dcx.py::test_unclosed_file", "Tests/test_file_pdf.py::test_dpi[params1]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply17]", "Tests/test_imagechops.py::test_hard_light", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_RGB.png]", "Tests/test_imagechops.py::test_add", "Tests/test_file_psd.py::test_layer_crashes[Tests/images/timeout-1ee28a249896e05b83840ae8140622de8e648ba9.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32bf-abgr.bmp]", "Tests/test_file_ico.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.MM.cropped.tif]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r04.fli]", "Tests/test_file_pcx.py::test_1px_width", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0c7e0e8e11ce787078f00b5b0ca409a167f070e0.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/split_fdat.png]", "Tests/test_file_gif.py::test_roundtrip_info_duration", "Tests/test_mode_i16.py::test_basic[I;16B]", "Tests/test_imagedraw.py::test_draw_regular_polygon[3-triangle_width-args3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_jpeg.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/notes]", "Tests/test_file_mpo.py::test_mp_no_data", "Tests/test_file_apng.py::test_apng_syntax_errors", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[RGB]", "Tests/test_image_reduce.py::test_mode_LA_opaque[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.fits]", "Tests/test_image_convert.py::test_trns_p", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/baddens1.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_RGB.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[6]", "Tests/test_image.py::TestImage::test_storage_neg", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox0]", "Tests/test_imagedraw2.py::test_chord[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynyy.png]", "Tests/test_file_fli.py::test_palette_chunk_second", "Tests/test_image_reduce.py::test_mode_LA[4]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cbdt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1bg.bmp]", "Tests/test_file_mcidas.py::test_valid_file", "Tests/test_file_sgi.py::test_write16", "Tests/test_image_filter.py::test_sanity_error[I]", "Tests/test_image.py::TestRegistry::test_encode_registry_fail", "Tests/test_file_pdf.py::test_save_all", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yynn.png]", "Tests/test_file_psd.py::test_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w101px.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder_chunk.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4u.dds]", "Tests/test_image_putpalette.py::test_undefined_palette_index", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnyy.png]", "Tests/test_image_thumbnail.py::test_DCT_scaling_edges", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_draw_regular_polygon[8-regular_octagon-args1]", "Tests/test_file_xvthumb.py::test_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_high.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_wmf_ref.png]", "Tests/test_imageshow.py::test_viewer_show[-1]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_wrong_args", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns_ycbc.jp2]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.tif-None]", "Tests/test_file_spider.py::test_unclosed_file", "Tests/test_format_hsv.py::test_hsv_to_rgb", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/itxt_chunks.png-None]", "Tests/test_file_wmf.py::test_register_handler", "Tests/test_imagemath_unsafe_eval.py::test_logical_not_equal", "Tests/test_file_ico.py::test_save_to_bytes_bmp[P]", "Tests/test_file_msp.py::test_cannot_save_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns_ycbc.j2k]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile_big.jpg]", "Tests/test_imagecolor.py::test_colormap", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_regular_octagon.png]", "Tests/test_file_png.py::TestFilePng::test_trns_p", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-1.5-5.5]", "Tests/test_file_ppm.py::test_pnm", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[La]", "Tests/test_image_getdata.py::test_mode", "Tests/test_imagepath.py::test_path_constructors[coords10]", "Tests/test_imagechops.py::test_blend", "Tests/test_imagedraw.py::test_ellipse[bbox1-RGB]", "Tests/test_imagemath_unsafe_eval.py::test_logical_ne", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_mask.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r01.fli]", "Tests/test_image_putpalette.py::test_rgba_palette[RGBA-palette0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2R.tif]", "Tests/test_image_reduce.py::test_mode_F[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb.png]", "Tests/test_image_convert.py::test_trns_RGB", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_mode[RGBA-RGBA-4-3]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/deerstalker.cur]", "Tests/test_file_mpo.py::test_mp_attribute[Tests/images/frozenpond.mpo]", "Tests/test_deprecate.py::test_replacement_and_action", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_none.png]", "Tests/test_imagedraw.py::test_chord[bbox3-RGB]", "Tests/test_decompression_bomb.py::TestDecompressionCrop::test_enlarge_crop", "Tests/test_image_resample.py::TestCoreResampleCoefficients::test_non_zero_coefficients", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width.png]", "Tests/test_image_transpose.py::test_flip_left_right[I;16B]", "Tests/test_image.py::TestImage::test_exit_fp", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/odd_stride.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_rb.png]", "Tests/test_file_fli.py::test_seek_after_close", "Tests/test_imageops.py::test_contain_round", "Tests/test_color_lut.py::TestTransformColorLut3D::test_3_to_3_channels", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[None-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing.emf]", "Tests/test_file_bmp.py::test_rgba_bitfields", "Tests/test_imagedraw.py::test_point[points2]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox2]", "Tests/test_imagepath.py::test_map[0-expected0]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[L]", "Tests/test_image_reduce.py::test_mode_RGB[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_float_coord_1_alt.png]", "Tests/test_image_filter.py::test_sanity[CMYK-MinFilter]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_tl_rle.tga]", "Tests/test_file_gimpgradient.py::test_linear_pos_le_small_middle", "Tests/test_imagedraw.py::test_arc_no_loops[bbox0]", "Tests/test_file_qoi.py::test_invalid_file", "Tests/test_image_reduce.py::test_mode_L[factor7]", "Tests/test_image_mode.py::test_properties[CMYK-RGB-L-4-expected_band_names8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_3.jpg]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[5]", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[True]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox2]", "Tests/test_file_png.py::TestFilePng::test_save_stdout[True]", "Tests/test_image_transpose.py::test_tranverse[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rotate_45_with_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_shape_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrow.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_final.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_1.jpg]", "Tests/test_file_gimppalette.py::test_sanity", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-RGBA]", "Tests/test_imagedraw.py::test_arc_no_loops[bbox1]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[F]", "Tests/test_image_transpose.py::test_flip_top_bottom[L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;24]", "Tests/test_image.py::TestImage::test_linear_gradient_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[5]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[L]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-754d9c7ec485ffb76a90eeaab191ef69a2a3a3cd.sgi]", "Tests/test_font_leaks.py::TestDefaultFontLeak::test_leak", "Tests/test_file_apng.py::test_apng_num_plays", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_slope1px_w2px.png]", "Tests/test_image_reduce.py::test_mode_F[3]", "Tests/test_imagemath_lambda_eval.py::test_logical_gt", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgba32.png]", "Tests/test_image_split.py::test_split_merge[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.bdf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_over_near_transparent.png]", "Tests/test_image_filter.py::test_sanity[L-UnsharpMask]", "Tests/test_imagedraw.py::test_chord[bbox0-RGB]", "Tests/test_imagecolor.py::test_color_too_long", "Tests/test_image.py::TestImage::test_image_modes_success[I]", "Tests/test_imagedraw.py::test_pieslice_no_spikes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32bf-rgba.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_transparent.png]", "Tests/test_font_pcf.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/readme.txt]", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size1]", "Tests/test_file_tga.py::test_save_id_section", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_binary_pgm.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/caption_6_33_22.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_stroke_basic.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tRNS_null_1x1.png]", "Tests/test_file_gif.py::test_bbox", "Tests/test_file_apng.py::test_apng_blend_transparency", "Tests/test_file_fits.py::test_truncated_fits", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/default_font.png]", "Tests/test_image_quantize.py::test_palette[0-color0]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[180-3]", "Tests/test_imagedraw.py::test_arc_width[bbox2]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif", "Tests/test_file_png.py::TestFilePng::test_textual_chunks_after_idat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_zero_numer.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_with_background.gif]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[65535-I;16B]", "Tests/test_imagepalette.py::test_2bit_palette", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-1]", "Tests/test_file_gif.py::test_dispose2_background_frame", "Tests/test_image_resize.py::TestImagingCoreResize::test_cross_platform", "Tests/test_file_png.py::TestFilePng::test_save_icc_profile", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_gps", "Tests/test_imagedraw.py::test_triangle_right", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_dispose.gif]", "Tests/test_imagepath.py::test_transform_with_wrap", "Tests/test_image_reduce.py::test_mode_La[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/pal8badindex.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_dict", "Tests/test_image_thumbnail.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper16.rgb]", "Tests/test_image_filter.py::test_rankfilter_properties", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_top_left_layer.psd]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-None]", "Tests/test_file_eps.py::test_binary_header_only", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r07.fli]", "Tests/test_image_reduce.py::test_mode_La[4]", "Tests/test_file_ppm.py::test_16bit_pgm", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.0-5.5]", "Tests/test_image_reduce.py::test_args_factor[size1-expected1]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius3]", "Tests/test_imagemorph.py::test_lut[dilation4]", "Tests/test_file_png.py::TestFilePng::test_verify_struct_error", "Tests/test_image_transpose.py::test_tranverse[RGB]", "Tests/test_image_reduce.py::test_mode_La[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc7-argb-8bpp_MipMaps-1.dds]", "Tests/test_lib_pack.py::TestLibUnpack::test_I16", "Tests/test_file_ppm.py::test_pfm_big_endian", "Tests/test_image_reduce.py::test_mode_F[factor18]", "Tests/test_image_reduce.py::test_mode_La[factor16]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply22]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_polygon_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny.png]", "Tests/test_file_gbr.py::test_gbr_file", "Tests/test_imagedraw.py::test_chord_too_fat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_1_basic.png]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_bad_mpo_header", "Tests/test_image_reduce.py::test_mode_RGBa[factor12]", "Tests/test_file_ppm.py::test_plain_invalid_data[P1\\n128 128\\n1009]", "Tests/test_imagedraw.py::test_line[points0]", "Tests/test_image_rotate.py::test_center", "Tests/test_util.py::test_deferred_error", "Tests/test_file_ppm.py::test_truncated_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_ifd_offset_exif", "Tests/test_file_png.py::TestFilePng::test_load_transparent_rgb", "Tests/test_imagemath_unsafe_eval.py::test_prevent_exec[exec('pass')]", "Tests/test_file_png.py::TestFilePng::test_load_verify", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-L]", "Tests/test_image_filter.py::test_sanity[RGB-DETAIL]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBa]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_values", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_I.tiff]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-0]", "Tests/test_imagemorph.py::test_edge", "Tests/test_file_fits.py::test_gzip1", "Tests/test_file_gif.py::test_no_transparency_in_second_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_big_rectangle.png]", "Tests/test_pdfparser.py::test_text_encode_decode", "Tests/test_image.py::TestImage::test_getbands", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_blend.png]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGBA]", "Tests/test_image_transpose.py::test_transpose[RGB]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBX]", "Tests/test_file_gif.py::test_palette_save_duplicate_entries", "Tests/test_file_ico.py::test_mask", "Tests/test_imagemorph.py::test_lut[corner]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns-0.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_6194.j2k]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[La]", "Tests/test_lib_pack.py::TestLibPack::test_HSV", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right_width.png]", "Tests/test_file_tiff_metadata.py::test_write_metadata", "Tests/test_file_pcx.py::test_break_many_at_end", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_BC7_UNORM_SRGB.dds]", "Tests/test_image.py::TestImage::test_effect_spread_zero", "Tests/test_mode_i16.py::test_basic[L]", "Tests/test_imagedraw2.py::test_polygon[points1]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/non_zero_bb.png-None]", "Tests/test_features.py::test_pilinfo[True]", "Tests/test_image_filter.py::test_crash[size0]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_transform[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_tl_rle.tga]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 -inf \\x00\\x00\\x00\\x00]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_center.png]", "Tests/test_imagepath.py::test_path_constructors[coords7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badwidth.bmp]", "Tests/test_font_pcf.py::test_high_characters", "Tests/test_file_tga.py::test_missing_palette", "Tests/test_imagedraw.py::test_arc_width_fill[bbox2]", "Tests/test_imageshow.py::test_viewer", "Tests/test_file_tiff_metadata.py::test_empty_values", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/00r1_graya_la.jp2]", "Tests/test_file_apng.py::test_apng_save_disposal_previous", "Tests/test_file_png.py::TestFilePng::test_save_p_single_transparency", "Tests/test_image_reduce.py::test_mode_La[factor18]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_16bit.png]", "Tests/test_image_reduce.py::test_mode_RGBa[factor11]", "Tests/test_imagedraw.py::test_sanity", "Tests/test_imagemath_lambda_eval.py::test_logical_lt", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy3-y]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.msp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_chord_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb.gif]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply16]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.3-3.7]", "Tests/test_image_convert.py::test_p2pa_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_left.png]", "Tests/test_file_gif.py::test_previous_frame_loaded", "Tests/test_imagedraw.py::test_mode_mismatch", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.r.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply17]", "Tests/test_image_resize.py::TestImagingCoreResize::test_convolution_modes", "Tests/test_image_load.py::test_close", "Tests/test_tiff_ifdrational.py::test_sanity", "Tests/test_file_apng.py::test_apng_save_alpha", "Tests/test_imagedraw.py::test_pieslice_width[bbox1]", "Tests/test_tiff_ifdrational.py::test_ifd_rational_save[False]", "Tests/test_lib_image.py::test_setmode", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[L]", "Tests/test_lib_pack.py::TestLibUnpack::test_LA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0e16d3bfb83be87356d026d66919deaefca44dac.tif]", "Tests/test_imagepath.py::test_getbbox_no_args", "Tests/test_image_filter.py::test_consistency_3x3[I]", "Tests/test_pdfparser.py::test_pdf_repr", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-ole-file.doc]", "Tests/test_file_dds.py::test_unsupported_bitcount", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBA]", "Tests/test_file_fli.py::test_crash[Tests/images/crash-5762152299364352.fli]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_bytes[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.pil]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-d2c93af851d3ab9a19e34503626368b2ecde9c03.j2k]", "Tests/test_file_spider.py::test_closed_file", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-None]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment[]", "Tests/test_file_gimpgradient.py::test_load_via_imagepalette", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox0]", "Tests/test_imagemath_unsafe_eval.py::test_eval_deprecated", "Tests/test_imageops.py::test_contain[new_size1]", "Tests/test_file_hdf5stub.py::test_handler", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynny.png]", "Tests/test_file_fli.py::test_prefix_chunk", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[RGBA]", "Tests/test_imagemath_lambda_eval.py::test_compare", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_center.png]", "Tests/test_imageops_usm.py::test_usm_formats", "Tests/test_file_png.py::TestFilePng::test_getchunks", "Tests/test_imagefontpil.py::test_decompression_bomb", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[YCbCr]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox3]", "Tests/test_image_transpose.py::test_tranverse[I;16]", "Tests/test_image.py::TestImage::test__new", "Tests/test_image_rotate.py::test_angle[270]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[YCbCr]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16-565.png]", "Tests/test_imagedraw.py::test_arc_width[bbox3]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_identities", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[RGB]", "Tests/test_imageenhance.py::test_alpha[Brightness]", "Tests/test_file_eps.py::test_bounding_box_in_trailer", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/reproducing]", "Tests/test_image_filter.py::test_sanity[L-FIND_EDGES]", "Tests/test_image_transpose.py::test_roundtrip[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unknown_compression_method.png]", "Tests/test_imagedraw.py::test_polygon_kite[kite_points0-RGB]", "Tests/test_image_reduce.py::test_args_box_error[size3-ValueError]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[RGBA]", "Tests/test_image_reduce.py::test_mode_La[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiny.png]", "Tests/test_image_reduce.py::test_mode_F[5]", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_fallback_tiff", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_lzw.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_unknown_pixel_mode.tif]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor12]", "Tests/test_file_png.py::TestFilePng::test_verify_ignores_crc_error", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illu10_no_preview.eps]", "Tests/test_image_filter.py::test_sanity[L-SMOOTH]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/sgi_overrun_expandrowF04.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/app13-multiple.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_axes.png]", "Tests/test_imagedraw.py::test_chord[bbox2-L]", "Tests/test_file_dds.py::test__accept_true", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_number_of_loops.gif]", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/bmp/q/pal8rletrns.bmp-3670]", "Tests/test_image_reduce.py::test_mode_I[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_y_offset.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chromacheck-sbix.png]", "Tests/test_features.py::test_check_modules[webp]", "Tests/test_imagemath_lambda_eval.py::test_binary_mod", "Tests/test_imagecolor.py::test_color_hsv", "Tests/test_file_eps.py::test_1_mode", "Tests/test_image.py::TestImage::test_getchannel_wrong_params", "Tests/test_file_jpeg.py::TestFileJpeg::test_multiple_exif", "Tests/test_image_filter.py::test_sanity[CMYK-MedianFilter]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_2_raqm.png]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16N]", "Tests/test_image_access.py::TestImagePutPixel::test_sanity", "Tests/test_image_reduce.py::test_mode_F[6]", "Tests/test_imageops.py::test_pad_round", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 inf \\x00\\x00\\x00\\x00]", "Tests/test_file_tiff_metadata.py::test_iccprofile_save_png", "Tests/test_file_spider.py::test_sanity", "Tests/test_core_resources.py::TestEnvVars::test_units", "Tests/test_file_pcx.py::test_break_padding", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color1-P]", "Tests/test_image_split.py::test_split_merge[1]", "Tests/test_file_pcx.py::test_invalid_file", "Tests/test_imagedraw.py::test_circle[xy1-L]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGB", "Tests/test_image_filter.py::test_sanity[I-EMBOSS]", "Tests/test_file_mpo.py::test_save[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r03.fli]", "Tests/test_image.py::TestImage::test_set_mode", "Tests/test_imageops.py::test_palette[P]", "Tests/test_image_reduce.py::test_mode_RGBa[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_repeat_chunk.png]", "Tests/test_file_wal.py::test_open", "Tests/test_file_gimpgradient.py::test_load_1_3_via_imagepalette", "Tests/test_imagepath.py::test_getbbox[coords0-expected0]", "Tests/test_file_png.py::TestFilePng::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/non_zero_bb.png-None]", "Tests/test_file_pdf.py::test_save[L]", "Tests/test_file_tiff.py::TestFileTiff::test__delitem__", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[box2-10]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_dpi", "Tests/test_lib_pack.py::TestLibUnpack::test_HSV", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_tuple_from_exif", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pal8_offset.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float", "Tests/test_file_tiff.py::TestFileTiff::test_save_unsupported_mode", "Tests/test_imagepalette.py::test_make_linear_lut_not_yet_implemented", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16.png]", "Tests/test_image.py::TestImage::test_fli_overrun2", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc7-argb-8bpp_MipMaps-1.png]", "Tests/test_file_gif.py::test_dispose2_background", "Tests/test_image.py::TestImage::test_check_size", "Tests/test_image_reduce.py::test_mode_F[factor8]", "Tests/test_file_tga.py::test_palette_depth_16", "Tests/test_imagemorph.py::test_set_lut", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[L]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1p1.png]", "Tests/test_imagedraw.py::test_rectangle_width[bbox0]", "Tests/test_image_filter.py::test_rankfilter[1-expected0]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[box1-1.5]", "Tests/test_image_reduce.py::test_mode_L[factor12]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/9bit.j2k]", "Tests/test_imagedraw.py::test_point_I16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pcx_overrun.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb_extents.gif]", "Tests/test_image.py::TestImage::test_image_modes_success[YCbCr]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc", "Tests/test_image_filter.py::test_sanity[L-MedianFilter]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox3]", "Tests/test_image_reduce.py::test_mode_LA[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r02.fli]", "Tests/test_imagedraw.py::test_same_color_outline[bbox1]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-None]", "Tests/test_file_mpo.py::test_seek[Tests/images/sugarshack.mpo]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bw_gradient.imt]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_2.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_mask.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.MM.deflate.tif]", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_kerning_features.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken_data_stream.png]", "Tests/test_file_tiff_metadata.py::test_ifd_signed_long", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[None-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p.png]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I]", "Tests/test_image_transform.py::TestImageTransform::test_missing_method_data", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[RGB]", "Tests/test_imagedraw.py::test_rectangle[bbox3]", "Tests/test_imageops_usm.py::test_blur_accuracy", "Tests/test_imagedraw.py::test_line_joint[xy2]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[BGR;15]", "Tests/test_file_gif.py::test_comment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32fakealpha.bmp]", "Tests/test_imageops.py::test_expand_palette[10]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[RGB]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_st.png]", "Tests/test_imagedraw.py::test_floodfill_border[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_no_loops.png]", "Tests/test_file_im.py::test_roundtrip[P]", "Tests/test_imagedraw.py::test_ellipse_various_sizes", "Tests/test_image_rotate.py::test_angle[180]", "Tests/test_file_gif.py::test_transparent_dispose[1-expected_colors1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal1p1.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_gray_4bpp.tif]", "Tests/test_file_ico.py::test_save_to_bytes_bmp[RGBA]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/non_zero_bb.png-None]", "Tests/test_file_jpeg.py::TestFileJpeg::test_mp", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[RGB]", "Tests/test_image_reduce.py::test_mode_RGB[factor14]", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_r", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_RGB.png]", "Tests/test_file_apng.py::test_apng_save_blend", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.iccprofile.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_1.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad_exif.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_merged.psd]", "Tests/test_imagedraw2.py::test_polygon[points2]", "Tests/test_file_png.py::TestFilePng::test_scary", "Tests/test_imagedraw2.py::test_arc[0-180-bbox1]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hdf5.h5]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-1]", "Tests/test_image_transpose.py::test_roundtrip[RGB]", "Tests/test_file_pcd.py::test_load_raw", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I]", "Tests/test_lib_pack.py::TestLibUnpack::test_F_float", "Tests/test_imagedraw.py::test_ellipse_width[bbox3]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy2-85-height]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_idat_after_image_end.png]", "Tests/test_image_reduce.py::test_mode_RGB[factor10]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.tif-None]", "Tests/test_imagedraw.py::test_rectangle[bbox1]", "Tests/test_file_tiff_metadata.py::test_no_duplicate_50741_tag", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/create_eps.gnuplot]", "Tests/test_imagemath_unsafe_eval.py::test_options_deprecated", "Tests/test_imagedraw.py::test_line_joint[xy0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-f46f5b2f43c370fe65706c11449f567ecc345e74.tif]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_text", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_g4_500.tif]", "Tests/test_file_apng.py::test_apng_basic", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-465703f71a0f0094873a3e0e82c9f798161171b8.sgi]", "Tests/test_image_convert.py::test_rgba_p", "Tests/test_image_mode.py::test_properties[YCbCr-RGB-L-3-expected_band_names9]", "Tests/test_format_lab.py::test_red", "Tests/test_file_png.py::TestFilePng::test_repr_png_error_returns_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp_padded", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[RGB]", "Tests/test_image_reduce.py::test_mode_LA[factor8]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox2]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[L]", "Tests/test_image_transpose.py::test_rotate_90[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyyy.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_16bit_RGBa.tiff]", "Tests/test_file_container.py::test_iter[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r01.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper-XYZ.png]", "Tests/test_imagedraw2.py::test_line[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_unorm.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow3.icns]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[4-expected_vertices1]", "Tests/test_image_putdata.py::test_long_integers", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.3-3.7]", "Tests/test_file_jpeg.py::TestFileJpeg::test_large_icc_meta", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-1.5-5.5]", "Tests/test_file_mpo.py::test_save[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ifd_tag_type.tiff]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-True-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_pieslice_L.png]", "Tests/test_file_wmf.py::test_load_set_dpi", "Tests/test_format_hsv.py::test_sanity", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGB]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/junk_jpeg_header.jpg]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[box2-1]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox2]", "Tests/test_image_filter.py::test_sanity[L-SHARPEN]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_wedge.png]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overrun2.bin]", "Tests/test_image_reduce.py::test_mode_RGBA[factor15]", "Tests/test_file_tiff_metadata.py::test_iptc", "Tests/test_file_tiff.py::TestFileTiff::test_seek_eof", "Tests/test_imagepath.py::test_path_constructors[coords3]", "Tests/test_file_tga.py::test_save_mapdepth", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_dpi_rounding", "Tests/test_imagemath_lambda_eval.py::test_logical_equal", "Tests/test_file_png.py::TestFilePng::test_save_stdout[False]", "Tests/test_file_spider.py::test_save", "Tests/test_image.py::TestImage::test_overrun[ossfuzz-4836216264589312.pcx]", "Tests/test_image.py::TestImage::test_image_modes_fail[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz.png]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBa]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iptc_roundUp.jpg]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/p_trns_single.png-None]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/itxt_chunks.png-None]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[5-expected_vertices2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif]", "Tests/test_image_reduce.py::test_mode_RGB[factor18]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-50-0-TypeError-bounding_circle should be a sequence]", "Tests/test_imagedraw.py::test_arc[0-180-bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_low_quality_baseline_qtables", "Tests/test_image_filter.py::test_sanity_error[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none.gif]", "Tests/test_image.py::TestImage::test_image_modes_success[CMYK]", "Tests/test_lib_pack.py::TestLibUnpack::test_CMYK", "Tests/test_imagepalette.py::test_rawmode_getdata", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGBa]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[La]", "Tests/test_file_jpeg.py::TestFileJpeg::test_sanity", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[2]", "Tests/test_imagesequence.py::test_multipage_tiff[False]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif", "Tests/test_file_pdf.py::test_resolution", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/discontiguous_corners_polygon.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns-0.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-multi.tiff]", "Tests/test_image_crop.py::test_negative_crop[box0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/clipboard_target.png]", "Tests/test_imagemath_unsafe_eval.py::test_bitwise_leftshift", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox0]", "Tests/test_image.py::TestImage::test_image_modes_success[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/high_ascii_chars.png]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-c1b2595b8b0b92cc5f38b6635e98e3a119ade807.sgi]", "Tests/test_file_gif.py::test_palette_save_L", "Tests/test_file_gif.py::test_full_palette_second_frame", "Tests/test_imagemath_lambda_eval.py::test_abs", "Tests/test_image.py::TestImage::test_tempfile", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-754d9c7ec485ffb76a90eeaab191ef69a2a3a3cd.sgi]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_4_to_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_arabictext_features.png]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/non_zero_bb.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/reproducing]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_region.png]", "Tests/test_image.py::TestImage::test_no_resource_warning_on_save", "Tests/test_image_filter.py::test_sanity[RGB-SMOOTH]", "Tests/test_image_reduce.py::test_args_box_error[size1-ValueError]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/7x13.png]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment_valid_imagedata_comment[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ttb_stroke.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line.tga]", "Tests/test_file_sgi.py::test_rle16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overrun.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r06.fli]", "Tests/test_file_fli.py::test_closed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_non_whole_angle.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/num_plays.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2IR.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_cmyk_16l_jpeg.tif]", "Tests/test_image_reduce.py::test_mode_La[factor10]", "Tests/test_file_tga.py::test_sanity[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_language.png]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[RGBA]", "Tests/test_file_gd.py::test_invalid_file", "Tests/test_imagedraw.py::test_pieslice_wide", "Tests/test_file_ppm.py::test_plain_data_with_comment[P2\\n3 1\\n4-0 2 4-1]", "Tests/test_imagedraw.py::test_square", "Tests/test_image_reduce.py::test_mode_RGB[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_five_bands.fpx]", "Tests/test_file_tga.py::test_sanity[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga_id_field.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_Nastalifont_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.rgb]", "Tests/test_image_reduce.py::test_mode_F[factor9]", "Tests/test_image_reduce.py::test_mode_RGB[2]", "Tests/test_image_thumbnail.py::test_load_first_unless_jpeg", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[PA]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette_alpha.png]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points2]", "Tests/test_file_xpm.py::test_load_read", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[box1-4]", "Tests/test_imagedraw.py::test_chord_width[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/oom-8ed3316a4109213ca96fb8a256a0bfefdece1461.icns]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_draw.ico]", "Tests/test_image_reduce.py::test_mode_La[factor17]", "Tests/test_imagefile.py::TestImageFile::test_ico", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dummy.container]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_unorm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/black_and_white.ico]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_2.webp]", "Tests/test_image_reduce.py::test_mode_F[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette.dds]", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/hopper_rle8.bmp-1078]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette_1bit_alpha.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken_exif_dpi.jpg]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I]", "Tests/test_image.py::TestImage::test_image_modes_success[LA]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;15]", "Tests/test_file_jpeg.py::TestFileJpeg::test_jpeg_magic_number", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-fillorder-test.png]", "Tests/test_file_spider.py::test_n_frames", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_gps_typeerror", "Tests/test_file_tar.py::test_sanity[zlib-hopper.png-PNG]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-3]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-None]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGBa_target.png]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-2020-10-test.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_repr_jpeg", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/bmp/g/pal8rle.bmp-1064]", "Tests/test_file_fits.py::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-PA]", "Tests/test_image_reduce.py::test_mode_RGBA[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_wal.png]", "Tests/test_image_resample.py::TestCoreResampleBox::test_subsample", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ppm]", "Tests/test_file_gif.py::test_comment_over_255", "Tests/test_file_tiff.py::TestFileTiff::test_seek_after_close", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_4_channels", "Tests/test_imagedraw.py::test_arc_width[bbox1]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/background_outside_palette.gif]", "Tests/test_lib_pack.py::TestLibPack::test_1", "Tests/test_file_gif.py::test_dispose2_previous_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_3.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply22]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r04.fli]", "Tests/test_image_filter.py::test_sanity[I-MedianFilter]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[LA-band_numbers1-color must be int, or tuple of one or two elements]", "Tests/test_imagepalette.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_zero_denom.png]", "Tests/test_imagepath.py::test_path_constructors[coords5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_wide_line_larger_than_int.png]", "Tests/test_imagedraw.py::test_draw_regular_polygon[4-square_rotate_45-args2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_resized.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.sgi]", "Tests/test_image_reduce.py::test_mode_RGBa[factor7]", "Tests/test_file_iptc.py::test_getiptcinfo_jpg_none", "Tests/test_file_mpo.py::test_ignore_frame_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-ccca68ff40171fdae983d924e127a721cab2bd50.j2k]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil136.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_height.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_1bit.pbm]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox2]", "Tests/test_imagedraw.py::test_chord_width[bbox0]", "Tests/test_image_reduce.py::test_args_factor_error[size2-ValueError]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000000]", "Tests/test_image_reduce.py::test_mode_RGBA[1]", "Tests/test_imagemorph.py::test_pattern_syntax_error", "Tests/test_file_wal.py::test_load", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[RGBX]", "Tests/test_file_pdf.py::test_redos[\\n]", "Tests/test_file_dds.py::test_save[RGBA-Tests/images/pil123rgba.png]", "Tests/test_core_resources.py::TestCoreMemory::test_get_block_size", "Tests/test_image_thumbnail.py::test_division_by_zero", "Tests/test_font_pcf.py::test_textsize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/radial_gradients.png]", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_3_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage-mmap.tiff]", "Tests/test_imagemath_lambda_eval.py::test_bitwise_leftshift", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[RGB]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illuCS6_preview.eps]", "Tests/test_file_png.py::TestFilePng::test_specify_bits[True]", "Tests/test_image_filter.py::test_sanity[CMYK-MaxFilter]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.dcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_translucent_outline.png]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16L]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/pil123p.png-None]", "Tests/test_image_filter.py::test_sanity[L-MinFilter]", "Tests/test_image_filter.py::test_sanity[I-GaussianBlur]", "Tests/test_deprecate.py::test_version[12-Old thing is deprecated and will be removed in Pillow 12 \\\\(2025-10-15\\\\)\\\\. Use new thing instead\\\\.]", "Tests/test_image_reduce.py::test_mode_RGBA[factor6]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mb.png]", "Tests/test_file_gif.py::test_roundtrip2", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox3]", "Tests/test_core_resources.py::TestCoreMemory::test_set_blocks_max_stats", "Tests/test_imagemath_lambda_eval.py::test_logical_eq", "Tests/test_imagemath_lambda_eval.py::test_one_image_larger", "Tests/test_main.py::test_main[args0-False]", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-dedc7a4ebd856d79b4359bbcc79e8ef231ce38f6.psd-OSError]", "Tests/test_file_container.py::test_write[False]", "Tests/test_file_png.py::TestFilePng::test_read_private_chunks", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/04r00.fli]", "Tests/test_file_im.py::test_small_palette", "Tests/test_image_reduce.py::test_mode_LA[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/edge.lut]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32bf-xbgr.bmp]", "Tests/test_image.py::TestImage::test_bad_mode", "Tests/test_imagemath_unsafe_eval.py::test_abs", "Tests/test_file_dds.py::test_sanity_ati1_bc4u[Tests/images/ati1.dds]", "Tests/test_file_apng.py::test_apng_save_size", "Tests/test_file_tiff.py::TestFileTiff::test_seek_too_large", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[8-0-1]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit_qtables.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w3px.png]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[box2-0.5]", "Tests/test_image_reduce.py::test_mode_LA[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_L.png]", "Tests/test_image_transform.py::TestImageTransform::test_info", "Tests/test_image_rotate.py::test_center_14", "Tests/test_image_draft.py::test_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_unorm.dds]", "Tests/test_image_transpose.py::test_tranverse[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_short_max.png]", "Tests/test_imagedraw2.py::test_rectangle[bbox1]", "Tests/test_file_iptc.py::test_dump", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_rs.png]", "Tests/test_file_gif.py::test_missing_background", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev_first_frame_seeked.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16-565.bmp]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/1_trns.png]", "Tests/test_file_dds.py::test_dx10_bc6h[Tests/images/bc6h.dds]", "Tests/test_features.py::test_unsupported_module", "Tests/test_imageops.py::test_colorize_2color", "Tests/test_image_transpose.py::test_flip_left_right[I;16L]", "Tests/test_file_gif.py::test_invalid_file", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;16]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[box1-1]", "Tests/test_color_lut.py::TestColorLut3DFilter::test_repr", "Tests/test_image_filter.py::test_consistency_3x3[CMYK]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/non_zero_bb.png-None]", "Tests/test_image_reduce.py::test_args_box[size0-expected0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bgr15.png]", "Tests/test_file_spider.py::test_load_image_series", "Tests/test_image_reduce.py::test_mode_I[factor9]", "Tests/test_image_transpose.py::test_rotate_90[I;16L]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_3.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/02r00.fli]", "Tests/test_file_sgi.py::test_invalid_file", "Tests/test_imageshow.py::test_show_file[viewer1]", "Tests/test_image_filter.py::test_kernel_not_enough_coefficients", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/single_frame.png]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/a_fli.png]", "Tests/test_image_reduce.py::test_mode_F[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/standard_embedded.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy4-y_odd]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[2]", "Tests/test_image_access.py::TestImageGetPixel::test_deprecated[BGR;24]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[RGBA]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[3-expected_vertices0]", "Tests/test_image_filter.py::test_modefilter[1-expected0]", "Tests/test_font_pcf_charsets.py::test_textsize[iso8859-1]", "Tests/test_file_eps.py::test_invalid_file", "Tests/test_file_iptc.py::test_open", "Tests/test_image_rotate.py::test_mode[1]", "Tests/test_file_ppm.py::test_magic", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_kite_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unicode_extended.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/01r_00.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/bkgd.png]", "Tests/test_imagemath_unsafe_eval.py::test_prevent_double_underscores", "Tests/test_deprecate.py::test_no_replacement_or_action", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_pieslice_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/single_frame_default.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[L]", "Tests/test_file_ppm.py::test_not_enough_image_data", "Tests/test_imagepath.py::test_invalid_path_constructors[coords0]", "Tests/test_file_jpeg.py::TestFileJpeg::test_optimize_large_buffer", "Tests/test_image_reduce.py::test_mode_F[factor6]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply22]", "Tests/test_imagedraw.py::test_wide_line_larger_than_int", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[None-bounding_circle0-0-TypeError-n_sides should be an int]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[LA]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_transform[RGBA]", "Tests/test_image_reduce.py::test_mode_LA[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/compression.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_bl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-060745d3f534ad6e4128c51d336ea5489182c69d.blp]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16B]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-PA]", "Tests/test_image_reduce.py::test_mode_I[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_gap.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline.png]", "Tests/test_file_eps.py::test_readline[\\r\\n-]", "Tests/test_image_reduce.py::test_mode_LA[1]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w125.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/photoshop-200dpi.jpg]", "Tests/test_imagemorph.py::test_mirroring", "Tests/test_image_reduce.py::test_mode_RGBA[factor11]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-f46f5b2f43c370fe65706c11449f567ecc345e74.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r02.fli]", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/1.eps]", "Tests/test_image_putpalette.py::test_putpalette_with_alpha_values", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[1500]", "Tests/test_file_imt.py::test_invalid_file[\\n]", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[L]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[L]", "Tests/test_file_ico.py::test_incorrect_size", "Tests/test_imagepath.py::test_invalid_path_constructors[coords3]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[LAB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_imagemagick_orientation.png]", "Tests/test_file_gif.py::test_background", "Tests/test_file_gribstub.py::test_load", "Tests/test_imagepath.py::test_path_constructors[coords4]", "Tests/test_file_tga.py::test_save_wrong_mode", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-False-True]", "Tests/test_image_reduce.py::test_mode_F[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_crash.bin]", "Tests/test_image_reduce.py::test_mode_L[factor16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_la.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_oblique_45_w3px_b.png]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[I]", "Tests/test_image_transpose.py::test_tranverse[L]", "Tests/test_image_putpalette.py::test_rgba_palette[RGBAX-palette1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_tiff_with_dpi", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-L]", "Tests/test_file_png.py::TestFilePng::test_trns_null", "Tests/test_file_gif.py::test_dispose_background_transparency", "Tests/test_image_reduce.py::test_mode_RGBA[factor14]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_no_data.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no-dpi-in-exif.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fujifilm.mpo]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P2 3 1 257 0 128 257-I-pixels1]", "Tests/test_image_filter.py::test_sanity[I-MinFilter]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0da013a13571cc8eb457a39fee8db18f8a3c7127.tif]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox1]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0e16d3bfb83be87356d026d66919deaefca44dac.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.fli]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[LA]", "Tests/test_file_pcx.py::test_odd[1]", "Tests/test_imagechops.py::test_multiply_white", "Tests/test_imagemath_unsafe_eval.py::test_logical_ge", "Tests/test_image_resample.py::TestCoreResamplePasses::test_box_horizontal", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.im]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_no_warning_no_limit", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/8bit.s.tif]", "Tests/test_image_resample.py::TestCoreResamplePasses::test_horizontal", "Tests/test_image_access.py::TestImageGetPixel::test_basic[YCbCr]", "Tests/test_file_ico.py::test_getpixel", "Tests/test_image_crop.py::test_crop[I]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy2-x_odd]", "Tests/test_image.py::TestImage::test_open_verbose_failure", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_default_font_size.png]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16]", "Tests/test_features.py::test_check_codecs[libtiff]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_bl_raw.tga]", "Tests/test_image_filter.py::test_sanity[CMYK-SMOOTH]", "Tests/test_file_ppm.py::test_pfm", "Tests/test_image_reduce.py::test_mode_F[4]", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-1-3]", "Tests/test_imagepath.py::test_invalid_path_constructors[coords2]", "Tests/test_file_ppm.py::test_plain_ppm_token_too_long[P3\\n128 128\\n255\\n012345678910]", "Tests/test_imagechops.py::test_subtract_modulo_no_clip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ma.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[P]", "Tests/test_file_ppm.py::test_save_stdout[False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_la.png]", "Tests/test_image_getdata.py::test_sanity", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/itxt_chunks.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/anim_frame1.webp]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_file_jpeg.py::TestFileJpeg::test_deprecation", "Tests/test_file_ico.py::test_black_and_white", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[6-expected_vertices3]", "Tests/test_features.py::test_check_modules[pil]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-0.6-0-9.1]", "Tests/test_file_dds.py::test_sanity_ati2_bc5u[Tests/images/bc5u.dds]", "Tests/test_image_reduce.py::test_mode_RGBA[4]", "Tests/test_file_container.py::test_sanity", "Tests/test_image_reduce.py::test_args_box[size1-expected1]", "Tests/test_deprecate.py::test_unknown_version", "Tests/test_imagedraw.py::test_polygon_translucent", "Tests/test_file_dds.py::test_uncompressed[RGB-size3-Tests/images/bgr15.dds]", "Tests/test_imagechops.py::test_offset", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000003]", "Tests/test_file_dds.py::test_dx10_bc4[Tests/images/bc4_typeless.dds]", "Tests/test_file_gif.py::test_palette_handling", "Tests/test_image_copy.py::test_copy[P]", "Tests/test_file_gif.py::test_rgba_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_bl_raw.tga]", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_4.webp]", "Tests/test_file_apng.py::test_apng_save_disposal", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply15]", "Tests/test_binary.py::test_standard", "Tests/test_imagemath_lambda_eval.py::test_logical_ne", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/combined_larger_than_size.psd]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[P]", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw_with_overviews", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_single_16bit_qtable", "Tests/test_image_filter.py::test_rankfilter[L-expected1]", "Tests/test_imagestat.py::test_constant", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_y.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.0-5.5]", "Tests/test_image_convert.py::test_matrix_xyz[L]", "Tests/test_box_blur.py::test_radius_bigger_then_width", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0c7e0e8e11ce787078f00b5b0ca409a167f070e0.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_rollback", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_shape_RGB.png]", "Tests/test_image_transform.py::TestImageTransform::test_palette", "Tests/test_image_convert.py::test_trns_p_transparency[RGBA]", "Tests/test_imagedraw.py::test_floodfill[bbox1]", "Tests/test_image_mode.py::test_properties[RGBX-RGB-L-4-expected_band_names7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/split_fdat_zero_chunk.png]", "Tests/test_file_bmp.py::test_dib_header_size[12-g/pal8os2.bmp]", "Tests/test_imagedraw2.py::test_pieslice[-92-46-bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_RGBA.png]", "Tests/test_image_reduce.py::test_mode_I[factor17]", "Tests/test_file_bmp.py::test_dib_header_size[56-q/rgba32h56.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.qoi]", "Tests/test_file_ppm.py::test_plain_truncated_data[P1\\n128 128\\n]", "Tests/test_imagechops.py::test_subtract_clip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pcd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_rt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_ligature_features.png]", "Tests/test_image_load.py::test_contextmanager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/00r0_gray_l.jp2]", "Tests/test_imagemath_unsafe_eval.py::test_binary_mod", "Tests/test_file_iptc.py::test_getiptcinfo_jpg_found", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns.png]", "Tests/test_image_reduce.py::test_mode_RGBA[factor9]", "Tests/test_core_resources.py::TestCoreMemory::test_get_alignment", "Tests/test_image_transpose.py::test_flip_left_right[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil184.pcx]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[1]", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage-lastframe.tif-1]", "Tests/test_image_resize.py::TestReducingGapResize::test_box_filter[box0-5.5]", "Tests/test_image_putalpha.py::test_promote", "Tests/test_imagedraw.py::test_polygon_kite[kite_points1-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w3px.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyyy.png]", "Tests/test_image_resize.py::TestReducingGapResize::test_box_filter[box1-9.5]", "Tests/test_image_convert.py::test_unsupported_conversion", "Tests/test_imagemorph.py::test_str_to_img", "Tests/test_util.py::test_is_path[filename.ext]", "Tests/test_file_pdf.py::test_unsupported_mode", "Tests/test_file_tiff.py::TestFileTiff::test_seek", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[1]", "Tests/test_features.py::test_pilinfo[False]", "Tests/test_image_access.py::TestImageGetPixel::test_deprecated[BGR;15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_ycbcr_jpeg_2x2_sampling.tif]", "Tests/test_image.py::TestImage::test_image_modes_success[L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16L]", "Tests/test_imageops.py::test_cover[hopper.png-expected_size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/app13.jpg]", "Tests/test_image_convert.py::test_trns_p_transparency[PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_multi_actl.png]", "Tests/test_image_mode.py::test_properties[L-L-L-1-expected_band_names1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[YCbCr]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_single_frame_loop.tiff]", "Tests/test_image_transpose.py::test_transpose[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/effect_spread.png]", "Tests/test_imagemath_unsafe_eval.py::test_logical_gt", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb32.bmp]", "Tests/test_file_bmp.py::test_dib_header_size[108-g/pal8v4.bmp]", "Tests/test_file_xbm.py::test_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width.png]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dilation8.lut]", "Tests/test_image_reduce.py::test_mode_L[6]", "Tests/test_file_eps.py::test_missing_boundingbox_comment[]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_16bit_RGB.tiff]", "Tests/test_file_tiff.py::TestFileTiff::test_getxmp", "Tests/test_imagedraw.py::test_arc[0-180-bbox3]", "Tests/test_image.py::TestImage::test_zero_tobytes[size2]", "Tests/test_imageshow.py::test_show_file[viewer3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/python.ico]", "Tests/test_image_reduce.py::test_mode_LA_opaque[3]", "Tests/test_file_gif.py::test_n_frames[Tests/images/iss634.gif-42]", "Tests/test_imagedraw.py::test_polygon_width_I16[points2]", "Tests/test_file_fli.py::test_context_manager", "Tests/test_image.py::TestImage::test_image_modes_fail[very very long]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.3-3.7]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[HSV]", "Tests/test_file_bmp.py::test_save_float_dpi", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_1bit_plain.pbm]", "Tests/test_file_tiff.py::TestFileTiff::test_save_rgba", "Tests/test_imagedraw.py::test_floodfill_not_negative", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[PA]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy6-both]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w2px_inverted.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_rtl.png]", "Tests/test_imagefile.py::TestPyEncoder::test_setimage", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tv.rgb]", "Tests/test_file_bufrstub.py::test_handler", "Tests/test_file_apng.py::test_apng_save_duration_loop", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_l.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w101px.png]", "Tests/test_file_png.py::TestFilePng::test_bad_itxt", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_near_transparent.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/m13.fits]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_naxis_zero.fits]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16B]", "Tests/test_file_fits.py::test_comment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_7.webp]", "Tests/test_file_mpeg.py::test_invalid_file", "Tests/test_imagedraw2.py::test_line[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgba.psd]", "Tests/test_image_reduce.py::test_mode_L[factor18]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[270-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon.png]", "Tests/test_file_tiff.py::TestFileTiff::test_modify_exif", "Tests/test_image_access.py::TestImageGetPixel::test_basic[PA]", "Tests/test_image_filter.py::test_sanity[I-FIND_EDGES]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[3]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-L]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[262147]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_lzw.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_given.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[I]", "Tests/test_color_lut.py::TestColorLut3DFilter::test_convert_table", "Tests/test_imagefile.py::TestImageFile::test_no_format", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-0]", "Tests/test_file_spider.py::test_context_manager", "Tests/test_color_lut.py::TestColorLut3DFilter::test_wrong_args", "Tests/test_file_tiff.py::TestFileTiff::test___str__", "Tests/test_file_iptc.py::test_i", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor18]", "Tests/test_file_tga.py::test_sanity[RGB]", "Tests/test_file_dds.py::test_not_implemented[Tests/images/unimplemented_pfflags.dds]", "Tests/test_file_dds.py::test_save_unsupported_mode", "Tests/test_file_psd.py::test_rgba", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_copy_alpha_channel", "Tests/test_file_sun.py::test_im1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pxr]", "Tests/test_image_transpose.py::test_rotate_90[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_line_joint_curve.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ltr.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_sm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_width.png]", "Tests/test_file_gif.py::test_optimize_correctness[128-513-256]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pfm]", "Tests/test_file_eps.py::test_ascii_comment_too_long[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/p_trns_single.png-None]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGB]", "Tests/test_file_msp.py::test_bad_checksum", "Tests/test_features.py::test_check_codecs[zlib]", "Tests/test_image_putalpha.py::test_interface", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_both.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-True-False]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[YCbCr]", "Tests/test_file_bmp.py::test_small_palette", "Tests/test_file_dds.py::test_palette", "Tests/test_imagemath_lambda_eval.py::test_options_deprecated", "Tests/test_imagefile.py::TestImageFile::test_oserror", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_vertical[3]", "Tests/test_image_reduce.py::test_args_factor_error[2.0-TypeError]", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_tga.py::test_save_orientation", "Tests/test_imagedraw.py::test_polygon_1px_high_translucent", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-74d2a78403a5a59db1fb0a2b8735ac068a75f6e3.tif]", "Tests/test_image_reduce.py::test_mode_L[factor8]", "Tests/test_image_reduce.py::test_mode_L[factor10]", "Tests/test_imagedraw2.py::test_line[points3]", "Tests/test_imagemorph.py::test_lut[dilation8]", "Tests/test_imagedraw.py::test_floodfill[bbox2]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_4_to_3_channels", "Tests/test_file_cur.py::test_sanity", "Tests/test_imageops.py::test_scale", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_emf_ref.png]", "Tests/test_imagedraw.py::test_polygon_width_I16[points0]", "Tests/test_file_dcx.py::test_n_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tv16.sgi]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-d6ec061c4afdef39d3edf6da8927240bb07fe9b7.blp]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[RGBX]", "Tests/test_file_icns.py::test_sanity", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[180-3]", "Tests/test_image.py::TestImage::test_effect_noise", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample_2.tiff]", "Tests/test_file_tga.py::test_sanity[RGBA]", "Tests/test_file_tiff.py::TestFileTiff::test_set_legacy_api", "Tests/test_imagemath_unsafe_eval.py::test_ops", "Tests/test_file_eps.py::test_invalid_boundingbox_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_cmyk_jpeg.tif]", "Tests/test_decompression_bomb.py::TestDecompressionCrop::test_crop_decompression_checks", "Tests/test_file_blp.py::test_load_blp2_raw", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-64834657ee604b8797bf99eac6a194c124a9a8ba.sgi]", "Tests/test_imagedraw.py::test_rectangle[bbox2]", "Tests/test_image_rotate.py::test_zero[90]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r02.fli]", "Tests/test_file_png.py::TestFilePng::test_load_transparent_p", "Tests/test_file_sun.py::test_sanity", "Tests/test_imageshow.py::test_show_without_viewers", "Tests/test_imagedraw.py::test_shape1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_g4.tif]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-8073b430977660cdd48d96f6406ddfd4114e69c7.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/reproducing]", "Tests/test_imageops_usm.py::test_filter_api", "Tests/test_image_reduce.py::test_mode_L[factor17]", "Tests/test_image_transpose.py::test_rotate_180[I;16L]", "Tests/test_file_pcx.py::test_break_one_in_loop", "Tests/test_imagedraw2.py::test_pieslice[-92.2-46.2-bbox2]", "Tests/test_image_rotate.py::test_mode[P]", "Tests/test_image_resample.py::TestCoreResampleCoefficients::test_reduce", "Tests/test_imageenhance.py::test_alpha[Contrast]", "Tests/test_file_ico.py::test_save_to_bytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_woff2.png]", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_palette", "Tests/test_imageops.py::test_cover[colr_bungee.png-expected_size0]", "Tests/test_file_icns.py::test_not_an_icns_file", "Tests/test_image_transform.py::TestImageTransform::test_unknown_resampling_filter[4]", "Tests/test_imagepalette.py::test_reload", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/colr_bungee_mask.png]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_resize[RGBA]", "Tests/test_lib_pack.py::TestLibUnpack::test_P", "Tests/test_image_filter.py::test_sanity[L-CONTOUR]", "Tests/test_file_psd.py::test_seek_eoferror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_fctl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid-exif-without-x-resolution.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1wb.bmp]", "Tests/test_file_jpeg.py::TestFileJpeg::test_rgb", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_adobe_deflate.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/mmap_error.bmp]", "Tests/test_image_crop.py::test_crop[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/shortfile.bmp]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_long_name.im]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor15]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply17]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/initial.fli]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor9]", "Tests/test_image.py::TestImage::test_stringio", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[I;16]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P3 3 1 17 0 1 2 8 9 10 15 16 17-RGB-pixels2]", "Tests/test_image_filter.py::test_sanity[RGB-MinFilter]", "Tests/test_file_dds.py::test_short_file", "Tests/test_file_ico.py::test_save_to_bytes_bmp[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-338516dbd2f0e83caddb8ce256c22db3bd6dc40f.tif]", "Tests/test_file_tiff_metadata.py::test_tag_group_data", "Tests/test_image_getbbox.py::test_sanity", "Tests/test_font_pcf_charsets.py::test_draw[iso8859-2]", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-ef9112a065e7183fa7faa2e18929b03e44ee16bf.blp]", "Tests/test_image_filter.py::test_sanity[RGB-ModeFilter]", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_8bit_plain.ppm-Tests/images/hopper_8bit.ppm]", "Tests/test_file_bmp.py::test_dpi", "Tests/test_image_filter.py::test_consistency_3x3[RGB]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_dxt1.ftc]", "Tests/test_file_gif.py::test_no_change", "Tests/test_file_png.py::TestFilePng::test_exif_argument", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ossfuzz-5730089102868480.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bw_500.png]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[0]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/test-card.png-None]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-bba4f2e026b5786529370e5dfe9a11b1bf991f07.blp]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.0-5.5]", "Tests/test_file_gif.py::test_removed_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illu10_preview.eps]", "Tests/test_file_apng.py::test_apng_chunk_order", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-b82e64d4f3f76d7465b6af535283029eda211259.sgi]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_multiple_16bit_qtables", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor12]", "Tests/test_file_container.py::test_readline[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/l_trns.png]", "Tests/test_image_reduce.py::test_mode_RGBA[factor16]", "Tests/test_font_pcf_charsets.py::test_textsize[iso8859-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_out_of_order.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_fdat.png]", "Tests/test_file_container.py::test_read_n[False]", "Tests/test_image_reduce.py::test_mode_LA[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4R.tif]", "Tests/test_imagemath_unsafe_eval.py::test_one_image_larger", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-1]", "Tests/test_file_gribstub.py::test_handler", "Tests/test_image_reduce.py::test_mode_L[factor13]", "Tests/test_image_reduce.py::test_mode_F[factor12]", "Tests/test_image_filter.py::test_modefilter[P-expected2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd_transparency.gif]", "Tests/test_image_transform.py::TestImageTransform::test_fill[RGB-expected_pixel0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_center.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[RGBX]", "Tests/test_file_iptc.py::test_getiptcinfo_tiff_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_repr_jpeg_error_returns_none", "Tests/test_imagefile.py::TestPyEncoder::test_zero_height", "Tests/test_imagedraw.py::test_floodfill_border[bbox1]", "Tests/test_imagedraw2.py::test_arc[0-180-bbox0]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 0.0 \\x00\\x00\\x00\\x00]", "Tests/test_image_crop.py::test_crop_zero", "Tests/test_file_qoi.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_2.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_no_duplicate_0x1001_tag", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor6]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[3]", "Tests/test_imagedraw.py::test_pieslice_width[bbox0]", "Tests/test_image.py::TestImage::test_ne", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badfilesize.bmp]", "Tests/test_file_ico.py::test_draw_reloaded", "Tests/test_imagedraw2.py::test_ellipse[bbox3]", "Tests/test_imagechops.py::test_difference_pixel", "Tests/test_file_tiff_metadata.py::test_change_stripbytecounts_tag_type", "Tests/test_image_transpose.py::test_rotate_90[RGB]", "Tests/test_imagemath_lambda_eval.py::test_convert", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_kite_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_8_basic.png]", "Tests/test_file_tiff.py::TestFileTiff::test_multipage", "Tests/test_file_gif.py::test_sanity", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-4]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-0.6-0-9.1]", "Tests/test_imagedraw2.py::test_polygon[points3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/default_font_freetype.png]", "Tests/test_image_filter.py::test_sanity[RGB-GaussianBlur]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_image_filter.py::test_rankfilter[RGB-expected2]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment_valid_imagedata_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[La]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-1152ec2d1a1a71395b6f2ce6721c38924d025bf3.tif]", "Tests/test_file_png.py::TestFilePng::test_plte_length", "Tests/test_image_convert.py::test_l_macro_rounding[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_7.tif]", "Tests/test_file_bmp.py::test_offset", "Tests/test_file_pdf.py::test_multiframe_normal_save", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-c8efc3fded6426986ba867a399791bae544f59bc.psd-OSError]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox3]", "Tests/test_image_reduce.py::test_args_factor[3-expected0]", "Tests/test_file_bmp.py::test_sanity", "Tests/test_imagemath_lambda_eval.py::test_sanity", "Tests/test_image_reduce.py::test_args_box_error[size4-ValueError]", "Tests/test_image.py::TestImage::test_exif_jpeg", "Tests/test_file_png.py::TestFilePng::test_roundtrip_icc_profile", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_box_filter_correct_range", "Tests/test_image_reduce.py::test_mode_RGBA[2]", "Tests/test_file_tga.py::test_palette_depth_8", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_before_region.png]", "Tests/test_file_icns.py::test_save", "Tests/test_image_reduce.py::test_args_box_error[size6-ValueError]", "Tests/test_file_tiff.py::TestFileTiff::test_4bit", "Tests/test_image.py::TestImage::test_image_modes_success[HSV]", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_exclusive", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/child_ifd_jpeg.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_emptyline.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-6b7f2244da6d0ae297ee0754a424213444e92778.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-d6ec061c4afdef39d3edf6da8927240bb07fe9b7.blp]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/p_trns_single.png-None]", "Tests/test_image_reduce.py::test_args_factor[size2-expected2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-0]", "Tests/test_file_bmp.py::test_dib_header_size[64-q/pal8os2v2.bmp]", "Tests/test_image_filter.py::test_sanity[CMYK-ModeFilter]", "Tests/test_file_pdf.py::test_save[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illuCS6_no_preview.eps]", "Tests/test_imagedraw.py::test_draw_regular_polygon[4-square-args0]", "Tests/test_imagefile.py::TestImageFile::test_broken_datastream_without_errors", "Tests/test_image_reduce.py::test_mode_RGBA[5]", "Tests/test_file_tga.py::test_id_field_rle", "Tests/test_imagewin.py::TestImageWin::test_sanity", "Tests/test_file_gimpgradient.py::test_linear_pos_gt_small_middle", "Tests/test_image_filter.py::test_consistency_5x5[RGB]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_horizontal[3]", "Tests/test_file_dds.py::test_uncompressed[RGB-size2-Tests/images/hopper.dds]", "Tests/test_imageops.py::test_autocontrast_mask_toy_input", "Tests/test_image_filter.py::test_sanity[RGB-FIND_EDGES]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[BGR;16]", "Tests/test_imagedraw.py::test_floodfill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iptc.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_bl_rle.tga]", "Tests/test_image_reduce.py::test_mode_RGBa[factor13]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration0]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/zero_bb.png-None]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16B]", "Tests/test_file_tga.py::test_rgba_16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_bl_raw.tga]", "Tests/test_locale.py::test_sanity", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-L]", "Tests/test_image_resample.py::TestCoreResampleBox::test_no_passthrough", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w2px_normal.png]", "Tests/test_features.py::test_check_modules[tkinter]", "Tests/test_lib_pack.py::TestLibPack::test_L", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[La]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r05.fli]", "Tests/test_image.py::TestImage::test_zero_frombytes[size0]", "Tests/test_font_pcf_charsets.py::test_textsize[cp1250]", "Tests/test_imagedraw.py::test_arc_high", "Tests/test_file_dds.py::test_not_implemented[Tests/images/unimplemented_dxgi_format.dds]", "Tests/test_image_rotate.py::test_resample", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/corner.lut]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[RGB]", "Tests/test_imagedraw.py::test_same_color_outline[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_right.png]", "Tests/test_file_bufrstub.py::test_save", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_chunks", "Tests/test_image_reduce.py::test_mode_F[factor13]", "Tests/test_imagefile.py::TestImageFile::test_raise_typeerror", "Tests/test_image.py::TestImage::test_width_height", "Tests/test_file_dds.py::test_dxt5_colorblock_alpha_issue_4142", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_square.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rdf.tif]", "Tests/test_box_blur.py::test_radius_0", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-5]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-RGB]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd.gif-RGB]", "Tests/test_image_filter.py::test_sanity[CMYK-BLUR]", "Tests/test_image_rotate.py::test_rotate_with_fill", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-L]", "Tests/test_image.py::TestImage::test_image_modes_fail[bad]", "Tests/test_imagefile.py::TestImageFile::test_raise_oserror", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[RGBa]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-31c8f86233ea728339c6e586be7af661a09b5b98.blp]", "Tests/test_imagedraw.py::test_transform", "Tests/test_file_dcx.py::test_context_manager", "Tests/test_pdfparser.py::test_duplicate_xref_entry", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32769-I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_gps.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la.png]", "Tests/test_file_tiff.py::TestFileTiff::test_roundtrip_tiff_uint16", "Tests/test_file_png.py::TestFilePng::test_unknown_compression_method", "Tests/test_image.py::TestImage::test_image_modes_success[PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc1.dds]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[4]", "Tests/test_file_png.py::TestFilePng::test_padded_idat", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz_axes.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123p.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample_3.tiff]", "Tests/test_image_reduce.py::test_mode_La[factor12]", "Tests/test_image_reduce.py::test_mode_RGB[factor12]", "Tests/test_image_reduce.py::test_mode_L[4]", "Tests/test_image_reduce.py::test_mode_I[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/copyleft.tiff]", "Tests/test_file_mpo.py::test_mp_attribute[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/fakealpha.png]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[RGBa]", "Tests/test_file_mcidas.py::test_invalid_file", "Tests/test_file_gif.py::test_optimize_correctness[4-513-256]", "Tests/test_image_reduce.py::test_mode_RGB[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_grayscale.png]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[L-band_numbers0-color must be int or single-element tuple]", "Tests/test_image_filter.py::test_sanity[L-EDGE_ENHANCE_MORE]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_overflow", "Tests/test_file_png.py::TestFilePng::test_tell", "Tests/test_file_container.py::test_readline[False]", "Tests/test_imagedraw.py::test_arc[0-180-bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba32h56.bmp]", "Tests/test_image_mode.py::test_properties[RGB-RGB-L-3-expected_band_names5]", "Tests/test_file_eps.py::test_readline[\\n\\r-]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[F]", "Tests/test_font_bdf.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_lb.png]", "Tests/test_image_filter.py::test_sanity[RGB-EDGE_ENHANCE]", "Tests/test_file_mpo.py::test_mp[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_uncompressed.ftu]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal4.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-dedc7a4ebd856d79b4359bbcc79e8ef231ce38f6.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_oblique_45_w3px_a.png]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_modify_after_resizing", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color1]", "Tests/test_file_spider.py::test_odd_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unbound_variable.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8-0.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_reload_exif_after_seek", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[F]", "Tests/test_imagefontpil.py::test_without_freetype", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/12bit.cropped.tif]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_args[RGB-3-table_size4]", "Tests/test_file_im.py::test_number", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2v2.bmp]", "Tests/test_image_filter.py::test_crash[size1]", "Tests/test_lib_pack.py::TestLibPack::test_LA", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[P]", "Tests/test_file_mpo.py::test_n_frames", "Tests/test_file_fits.py::test_open", "Tests/test_file_tiff.py::TestFileTiff::test_with_underscores", "Tests/test_lib_pack.py::TestLibPack::test_I16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uint16_1_4660.tif]", "Tests/test_file_gif.py::test_optimize_if_palette_can_be_reduced_by_half", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_int_from_exif", "Tests/test_file_container.py::test_read_n[True]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply18]", "Tests/test_image.py::TestImage::test_zero_tobytes[size1]", "Tests/test_imagemath_unsafe_eval.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.dds]", "Tests/test_imagedraw.py::test_polygon[points0]", "Tests/test_image.py::TestImage::test_radial_gradient[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8_row_overflow.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd_rgba.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ttb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/bmpsuite.html]", "Tests/test_image_filter.py::test_sanity[CMYK-FIND_EDGES]", "Tests/test_file_gif.py::test_append_different_size_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_trns_single.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/10ct_32bit_128.tiff]", "Tests/test_image_convert.py::test_p_la", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ra.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P3 3 1 257 0 1 2 128 129 130 256 257 257-RGB-pixels3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_bl_raw.tga]", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp", "Tests/test_lib_pack.py::TestLibUnpack::test_F_int", "Tests/test_imagefile.py::TestPyDecoder::test_negsize", "Tests/test_file_jpeg.py::TestFileJpeg::test_empty_exif_gps", "Tests/test_color_lut.py::TestTransformColorLut3D::test_with_normals_3_channels", "Tests/test_image.py::TestImage::test_image_modes_success[P]", "Tests/test_image_putdata.py::test_mode_with_L_with_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/12in16bit.tif]", "Tests/test_image_reduce.py::test_mode_RGBA[factor7]", "Tests/test_file_pixar.py::test_invalid_file", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[HSV]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle.png]", "Tests/test_image_reduce.py::test_mode_RGBa[1]", "Tests/test_image.py::TestImage::test_effect_mandelbrot_bad_arguments", "Tests/test_imagedraw.py::test_ellipse_width[bbox2]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply18]", "Tests/test_file_gimpgradient.py::test_sphere_increasing", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_image.png]", "Tests/test_file_ftex.py::test_load_dxt1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r05.fli]", "Tests/test_image_transpose.py::test_roundtrip[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pport_g4.tif]", "Tests/test_file_gif.py::test_l_mode_after_rgb", "Tests/test_file_gribstub.py::test_save", "Tests/test_image.py::TestImage::test_alpha_composite", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-L]", "Tests/test_file_png.py::TestFilePng::test_bad_text", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/zero_bb.png-None]", "Tests/test_file_fits.py::test_naxis_zero", "Tests/test_file_bmp.py::test_save_too_large", "Tests/test_deprecate.py::test_action[Upgrade to new thing]", "Tests/test_image_load.py::test_sanity", "Tests/test_imagedraw2.py::test_pieslice[-92-46-bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ultrahdr.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_float_coord.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment_after_last_frame.gif]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-True-True]", "Tests/test_file_mpo.py::test_context_manager", "Tests/test_file_tiff.py::TestFileTiff::test_exif_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnny.png]", "Tests/test_imagemorph.py::test_unknown_pattern", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-338516dbd2f0e83caddb8ce256c22db3bd6dc40f.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-86214e58da443d2b80820cff9677a38a33dcbbca.tif]", "Tests/test_imageshow.py::test_register", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox0]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bgr15.dds]", "Tests/test_file_mpo.py::test_image_grab[Tests/images/frozenpond.mpo]", "Tests/test_file_tiff_metadata.py::test_undefined_zero", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-2]", "Tests/test_image_transpose.py::test_roundtrip[L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns-b.png]", "Tests/test_image.py::TestImage::test_exif_hide_offsets", "Tests/test_image_paste.py::TestImagingPaste::test_different_sizes", "Tests/test_file_tiff.py::TestFileTiff::test_invalid_file", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower_thumbnail.png]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGB]", "Tests/test_image_filter.py::test_rankfilter[F-expected4]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-True-True]", "Tests/test_file_gif.py::test_optimize_correctness[4-511-4]", "Tests/test_lib_pack.py::TestLibPack::test_La", "Tests/test_imagefile.py::TestPyEncoder::test_extents_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_truncated", "Tests/test_imagedraw.py::test_chord_zero_width[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_emboss.bmp]", "Tests/test_file_wmf.py::test_load_float_dpi", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[0-None]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius1]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor10]", "Tests/test_imagedraw.py::test_circle[xy0-RGB]", "Tests/test_file_tiff.py::TestFileTiff::test_load_double", "Tests/test_file_tga.py::test_horizontal_orientations", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_zero_width.png]", "Tests/test_image.py::TestImage::test_dump", "Tests/test_image_convert.py::test_matrix_identity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb.png]", "Tests/test_imagedraw.py::test_line_joint[xy1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8.bmp]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_start.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_6.jpg]", "Tests/test_core_resources.py::TestCoreMemory::test_get_blocks_max", "Tests/test_image_split.py::test_split_merge[I]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_xbm.py::test_save_wrong_mode", "Tests/test_file_eps.py::test_ascii_comment_too_long[]", "Tests/test_image_convert.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000001]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[PA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_zero_division", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_trailer.eps]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I;16]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-LA]", "Tests/test_imagemorph.py::test_dialation8", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb.eps]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox0]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_32i", "Tests/test_imagedraw2.py::test_pieslice[-92-46-bbox2]", "Tests/test_imagechops.py::test_duplicate", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/i_trns.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor17]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle6-0-ValueError-bounding_circle radius should be > 0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_first.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5s.dds]", "Tests/test_file_pdf.py::test_pdf_append", "Tests/test_file_gif.py::test_first_frame_transparency", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_mode[RGB-HSV-3-3]", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var2]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-0.6-0-9.1]", "Tests/test_image_resample.py::TestCoreResamplePasses::test_both", "Tests/test_file_gif.py::test_roundtrip_save_all", "Tests/test_image_convert.py::test_16bit_workaround", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r07.fli]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[L]", "Tests/test_imageshow.py::test_show_file[viewer7]", "Tests/test_imagedraw.py::test_circle[xy1-RGB]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_center.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-1185209cf7655b5aed8ae5e77784dfdd18ab59e9.tif]", "Tests/test_imagedraw.py::test_wide_line_dot", "Tests/test_file_psd.py::test_layer_skip", "Tests/test_file_tiff.py::TestFileTiff::test_strip_raw", "Tests/test_image_filter.py::test_sanity[I-SHARPEN]", "Tests/test_image_mode.py::test_properties[1-L-L-1-expected_band_names0]", "Tests/test_file_psd.py::test_seek_tell", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox2]", "Tests/test_image_reduce.py::test_mode_F[factor16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/missing_background.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1a.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/morph_a.png]", "Tests/test_imagechops.py::test_add_modulo_no_clip", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_undefined[1]", "Tests/test_image_reduce.py::test_mode_LA_opaque[2]", "Tests/test_font_pcf.py::test_draw", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[La]", "Tests/test_file_tiff_metadata.py::test_exif_div_zero", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_cmyk_jpeg.tif]", "Tests/test_file_gif.py::test_remapped_transparency", "Tests/test_image_rotate.py::test_mode[F]", "Tests/test_imagemath_lambda_eval.py::test_bitwise_or", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test.gpl]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/baddens2.bmp]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply19]", "Tests/test_file_gif.py::test_empty_string_comment", "Tests/test_file_png.py::TestFilePng::test_chunk_order", "Tests/test_imagedraw.py::test_line_horizontal", "Tests/test_image_convert.py::test_trns_p_transparency[LA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_junk_jpeg_header", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_2278.tif]", "Tests/test_image_transform.py::TestImageTransform::test_quad", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24png.bmp]", "Tests/test_image_reduce.py::test_mode_LA[factor9]", "Tests/test_core_resources.py::test_reset_stats", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8.png]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_ascii[test-test]", "Tests/test_image_getextrema.py::test_true_16", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[La]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-LA]", "Tests/test_image_reduce.py::test_mode_La[factor14]", "Tests/test_image_reduce.py::test_mode_L[factor14]", "Tests/test_file_im.py::test_context_manager", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/anim_frame2.webp]", "Tests/test_imagechops.py::test_add_scale_offset", "Tests/test_image.py::TestImage::test_expand_xy", "Tests/test_file_gif.py::test_zero_comment_subblocks", "Tests/test_imagedraw.py::test_rectangle_I16[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_cmyk.eps]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_gap.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-200dpcm.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_uncompressed.png]", "Tests/test_fontfile.py::test_save", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_width.gif]", "Tests/test_file_ppm.py::test_plain_data_with_comment[P1\\n2 2-1010-1000000]", "Tests/test_imageshow.py::test_show_file[viewer5]", "Tests/test_file_container.py::test_seek_mode[2-100]", "Tests/test_image_reduce.py::test_mode_RGBa[2]", "Tests/test_imagedraw.py::test_rectangle[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_imagemagick.png]", "Tests/test_file_gif.py::test_append_images", "Tests/test_image_reduce.py::test_mode_RGBA[factor8]", "Tests/test_file_apng.py::test_apng_delay", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw", "Tests/test_image_reduce.py::test_mode_RGB[5]", "Tests/test_imagemath_lambda_eval.py::test_ops", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-c1b2595b8b0b92cc5f38b6635e98e3a119ade807.sgi]", "Tests/test_file_png.py::TestFilePng::test_load_float_dpi", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/continuous_horizontal_edges_polygon.png]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-86214e58da443d2b80820cff9677a38a33dcbbca.tif]", "Tests/test_image_convert.py::test_default", "Tests/test_imagedraw.py::test_polygon_kite[kite_points1-L]", "Tests/test_image_convert.py::test_gif_with_rgba_palette_to_p", "Tests/test_file_tiff.py::TestFileTiff::test_palette[P]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-4f085cc12ece8cde18758d42608bed6a2a2cfb1c.tif]", "Tests/test_image_reduce.py::test_mode_RGBa[3]", "Tests/test_imagefile.py::TestPyDecoder::test_decode", "Tests/test_imagepath.py::test_path_constructors[coords6]", "Tests/test_imagemath_unsafe_eval.py::test_logical_equal", "Tests/test_image_crop.py::test_crop_float", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/notes]", "Tests/test_file_mpo.py::test_seek_after_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gbr.gbr]", "Tests/test_file_blp.py::test_load_blp2_dxt1a", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal2.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_reorder.png]", "Tests/test_image_filter.py::test_sanity[L-DETAIL]", "Tests/test_file_iptc.py::test_getiptcinfo_fotostation", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb.png]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords1]", "Tests/test_file_ppm.py::test_mimetypes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron.png]", "Tests/test_file_wmf.py::test_save[.emf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width_fill.png]", "Tests/test_image_transpose.py::test_roundtrip[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-598843abc37fc080ec36a2699ebbd44f795d3a6f.psd]", "Tests/test_lib_pack.py::TestLibPack::test_RGB", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[RGB]", "Tests/test_file_eps.py::test_readline[\\r\\n-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-0.6-0-9.1]", "Tests/test_imagedraw2.py::test_ellipse[bbox1]", "Tests/test_image.py::TestImage::test_open_formats", "Tests/test_file_im.py::test_roundtrip[PA]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-1.1-6.9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_none_region.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_zero_width.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-True-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid_header_length.jp2]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_too_fat.png]", "Tests/test_image_transpose.py::test_rotate_90[I;16]", "Tests/test_image_transform.py::TestImageTransform::test_fill[LA-expected_pixel2]", "Tests/test_features.py::test_libjpeg_turbo_version", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cmx3g8_wv_1998.260_0745_mcidas.tiff]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[1]", "Tests/test_file_fli.py::test_sanity", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_args", "Tests/test_imagedraw.py::test_polygon[points2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32h52.bmp]", "Tests/test_file_ppm.py::test_plain_invalid_data[P3\\n128 128\\n255\\n100A]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox1]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply17]", "Tests/test_format_hsv.py::test_convert", "Tests/test_image_filter.py::test_sanity_error[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unimplemented_dxgi_format.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny_axes.png]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/pil123p.png-None]", "Tests/test_image_quantize.py::test_colors", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_repeat.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_text.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-1.1-6.9]", "Tests/test_file_fli.py::test_timeouts[Tests/images/timeout-9139147ce93e20eb14088fe238e541443ffd64b3.fli]", "Tests/test_file_ppm.py::test_plain_ppm_token_too_long[P3\\n128 128\\n255\\n012345678910 0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-8073b430977660cdd48d96f6406ddfd4114e69c7.blp]", "Tests/test_image_rotate.py::test_zero[45]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r04.fli]", "Tests/test_image_reduce.py::test_mode_LA[factor10]", "Tests/test_file_psd.py::test_eoferror", "Tests/test_file_fli.py::test_unclosed_file", "Tests/test_file_tiff.py::TestFileTiff::test_multipage_last_frame", "Tests/test_imagedraw.py::test_ellipse_width_large", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox2]", "Tests/test_file_dcx.py::test_closed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_6.tif]", "Tests/test_imagechops.py::test_screen", "Tests/test_image.py::TestImage::test_alpha_inplace", "Tests/test_file_jpeg.py::TestFileJpeg::test_ff00_jpeg_header", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.0-5.5]", "Tests/test_imagedraw2.py::test_pieslice[-92.2-46.2-bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/balloon.jpf]", "Tests/test_image_quantize.py::test_palette[2-color3]", "Tests/test_file_gimpgradient.py::test_sphere_decreasing", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/square.png]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords2]", "Tests/test_file_eps.py::test_invalid_data_after_eof", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyyn.png]", "Tests/test_image_convert.py::test_l_macro_rounding[I]", "Tests/test_image_reduce.py::test_mode_RGBa[4]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor17]", "Tests/test_file_jpeg.py::TestFileJpeg::test_photoshop", "Tests/test_imagepath.py::test_getbbox[coords1-expected1]", "Tests/test_imagedraw.py::test_rectangle_width[bbox2]", "Tests/test_file_ico.py::test_save_to_bytes_bmp[L]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/test-card.png-None]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[2-72.8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card-lossless.jp2]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[La]", "Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_dirty_pixels_rgba", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/WAlaska.wind.7days.grb]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_size.ppm]", "Tests/test_file_sgi.py::test_rgb", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ttb_lt.png]", "Tests/test_file_ftex.py::test_load_raw", "Tests/test_file_ppm.py::test_non_integer_token", "Tests/test_file_gif.py::test_background_outside_palettte", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-5]", "Tests/test_file_tga.py::test_save_rle", "Tests/test_image_reduce.py::test_args_box_error[size5-ValueError]", "Tests/test_image_convert.py::test_matrix_xyz[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_p_mode.png]", "Tests/test_file_hdf5stub.py::test_load", "Tests/test_font_pcf.py::test_invalid_file", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_s", "Tests/test_file_tiff.py::TestFileTiff::test_frame_order", "Tests/test_image.py::TestImage::test_empty_image[size1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_low.png]", "Tests/test_file_eps.py::test_long_binary_data[]", "Tests/test_image_getprojection.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.webp]", "Tests/test_imagedraw.py::test_arc_width[bbox0]", "Tests/test_image.py::TestImage::test_remap_palette_transparency", "Tests/test_image_split.py::test_split_merge[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-72dpi-int.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sunraster.im1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/erosion4.lut]", "Tests/test_file_jpeg.py::TestFileJpeg::test_app", "Tests/test_image_copy.py::test_copy[1]", "Tests/test_features.py::test_check_codecs[jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badrle.bmp]", "Tests/test_image_reduce.py::test_mode_RGB[factor9]", "Tests/test_file_eps.py::test_read_binary_preview", "Tests/test_image_resample.py::TestCoreResamplePasses::test_vertical", "Tests/test_lib_pack.py::TestLibUnpack::test_La", "Tests/test_file_tiff.py::TestFileTiff::test_8bit_s", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-ef9112a065e7183fa7faa2e18929b03e44ee16bf.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_rgb.jpg]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply20]", "Tests/test_file_icns.py::test_sizes", "Tests/test_image.py::TestImage::test_exif_ifd", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bigtiff.tif]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16B]", "Tests/test_image_rotate.py::test_zero[270]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment.jp2]", "Tests/test_file_im.py::test_save_unsupported_mode", "Tests/test_image_filter.py::test_sanity[CMYK-UnsharpMask]", "Tests/test_imagepalette.py::test_getdata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8oversizepal.bmp]", "Tests/test_file_gif.py::test_dispose2_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16-231.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2sp.bmp]", "Tests/test_image_filter.py::test_builtinfilter_p", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp.tif]", "Tests/test_image_transform.py::TestImageTransform::test_sanity", "Tests/test_image_quantize.py::test_small_palette", "Tests/test_image_filter.py::test_rankfilter_error[MinFilter]", "Tests/test_file_psd.py::test_open_after_exclusive_load", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati2.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line.png]", "Tests/test_imagemath_unsafe_eval.py::test_bitwise_rightshift", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_cmyk.jpg]", "Tests/test_imagedraw2.py::test_arc[0.5-180.4-bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_tl_raw.tga]", "Tests/test_file_gif.py::test_optimize_correctness[255-511-255]", "Tests/test_box_blur.py::test_radius_0_1", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle5-0-ValueError-bounding_circle centre should contain 2D coordinates (e.g. (x, y))]", "Tests/test_image_reduce.py::test_mode_I[factor16]", "Tests/test_file_ppm.py::test_invalid_maxval[65536]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration2]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8topdown.bmp]", "Tests/test_file_sgi.py::test_rgba", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;24]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_bytes[value1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_overflow_rows_per_strip.tif]", "Tests/test_file_png.py::TestFilePng::test_unicode_text", "Tests/test_image_access.py::TestImageGetPixel::test_deprecated[BGR;16]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/erosion8.lut]", "Tests/test_file_dds.py::test_dx10_bc7", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[RGB]", "Tests/test_file_bmp.py::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.tif-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb24.bmp]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_channels_order", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[False]", "Tests/test_image_reduce.py::test_args_box_error[stri-TypeError]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply15]", "Tests/test_image_crop.py::test_negative_crop[box2]", "Tests/test_file_gif.py::test_lzw_bits", "Tests/test_core_resources.py::TestCoreMemory::test_set_alignment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-60d8b7c8469d59fc9ffff6b3a3dc0faeae6ea8ee.blp]", "Tests/test_file_webp.py::TestUnsupportedWebp::test_unsupported", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_2.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_16bit_RGB.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_5.jpg]", "Tests/test_image.py::TestImage::test_image_modes_success[La]", "Tests/test_file_psd.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.gif]", "Tests/test_psdraw.py::test_draw_postscript", "Tests/test_file_jpeg.py::TestFileJpeg::test_MAXBLOCK_scaling", "Tests/test_file_pdf.py::test_p_alpha", "Tests/test_image_convert.py::test_trns_l", "Tests/test_lib_pack.py::TestLibPack::test_P", "Tests/test_bmp_reference.py::test_questionable", "Tests/test_imagedraw.py::test_chord[bbox1-RGB]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-False-True]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy2]", "Tests/test_file_gimpgradient.py::test_sine", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_same.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P5 3 1 4 \\x00\\x02\\x04-L-pixels4]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/zero_bb.png-None]", "Tests/test_file_gif.py::test_seek", "Tests/test_file_icns.py::test_save_append_images", "Tests/test_file_jpeg.py::TestFileJpeg::test_comment_write", "Tests/test_file_tga.py::test_cross_scan_line", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb.eps]", "Tests/test_imagedraw.py::test_ellipse[bbox0-RGB]", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_int", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_emboss_more.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-fillorder-test.tif]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[LAB]", "Tests/test_file_png.py::TestFilePng::test_save_rgb_single_transparency", "Tests/test_imagedraw.py::test_line[points2]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_reduce.py::test_mode_RGBa[factor17]", "Tests/test_imagepath.py::test_getbbox[1-expected3]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[HSV]", "Tests/test_file_mpo.py::test_unclosed_file", "Tests/test_lib_pack.py::TestLibUnpack::test_PA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r01.fli]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;24]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply19]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[0]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[box2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-d675703545fee17acab56e5fec644c19979175de.eps]", "Tests/test_file_tiff.py::TestFileTiff::test_discard_icc_profile", "Tests/test_imagechops.py::test_darker_pixel", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_triangle_width.png]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox3]", "Tests/test_image.py::TestImage::test_load_on_nonexclusive_multiframe", "Tests/test_imagedraw.py::test_polygon_kite[kite_points0-L]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun.bin]", "Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_dirty_pixels_la", "Tests/test_imagefile.py::TestPyDecoder::test_oversize", "Tests/test_file_jpeg.py::TestFileJpeg::test_get_child_images", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-2-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_tl_raw.tga]", "Tests/test_imagepalette.py::test_make_gamma_lut", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ossfuzz-4836216264589312.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_typeless.dds]", "Tests/test_file_bmp.py::test_save_to_bytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/05r00.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_after_SOF", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_solid.png]", "Tests/test_imagedraw.py::test_chord[bbox3-L]", "Tests/test_lib_pack.py::TestLibUnpack::test_value_error", "Tests/test_file_gif.py::test_getdata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blend_transparency.png]", "Tests/test_file_dds.py::test_uncompressed[RGBA-size4-Tests/images/uncompressed_rgb.dds]", "Tests/test_file_tiff.py::TestFileTiff::test_bad_exif", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[RGBX]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox3]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P6 3 1 17 \\x00\\x01\\x02\\x08\\t\\n\\x0f\\x10\\x11-RGB-pixels6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-colorblock-alpha-issue-4142.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgba16-4444.png]", "Tests/test_image.py::TestImage::test_empty_xmp", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badbitssize.bmp]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/test-card.png-None]", "Tests/test_file_dds.py::test_uncompressed[LA-size1-Tests/images/uncompressed_la.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_left.png]", "Tests/test_file_gif.py::test_transparent_optimize", "Tests/test_imagemath_lambda_eval.py::test_logical_ge", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox2]", "Tests/test_imagefile.py::TestImageFile::test_truncated_with_errors", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-None]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox3]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65520]", "Tests/test_image_resample.py::TestCoreResampleBox::test_tiles", "Tests/test_image_quantize.py::test_transparent_colors_equal", "Tests/test_imagedraw.py::test_polygon2", "Tests/test_file_eps.py::test_open_eps[Tests/images/illuCS6_no_preview.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.gd]", "Tests/test_core_resources.py::test_get_stats", "Tests/test_file_eps.py::test_missing_version_comment[]", "Tests/test_imageshow.py::test_viewer_show[0]", "Tests/test_lib_pack.py::TestLibPack::test_LAB", "Tests/test_file_dds.py::test_dx10_bc7_unorm_srgb", "Tests/test_file_apng.py::test_apng_mode", "Tests/test_color_lut.py::TestTransformColorLut3D::test_3_to_4_channels", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-1.1-6.9]", "Tests/test_lib_pack.py::TestLibUnpack::test_L", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-63b1dffefc8c075ddc606c0a2f5fdc15ece78863.tif]", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color2]", "Tests/test_image_access.py::TestImageGetPixel::test_list", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad.p7]", "Tests/test_box_blur.py::test_radius_1_5", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/padded_idat.png]", "Tests/test_imagedraw.py::test_floodfill_border[bbox2]", "Tests/test_image_copy.py::test_copy_zero", "Tests/test_file_jpeg.py::TestFileJpeg::test_adobe_transform", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/l2rgb_read.bmp]", "Tests/test_file_tga.py::test_save", "Tests/test_image.py::TestImage::test_register_open_duplicates", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_binary.pgm]", "Tests/test_file_gd.py::test_bad_mode", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit_plain.pgm]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_string", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy1-90-width]", "Tests/test_file_eps.py::test_missing_version_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[RGBA]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_args[CMYK-4-3]", "Tests/test_imagedraw2.py::test_pieslice[-92.2-46.2-bbox3]", "Tests/test_file_tiff.py::TestFileTiff::test_12bit_rawmode", "Tests/test_image_reduce.py::test_mode_I[2]", "Tests/test_image_load.py::test_contextmanager_non_exclusive_fp", "Tests/test_file_tiff_metadata.py::test_rt_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-2020-10-test.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/argb-32bpp_MipMaps-1.png]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_identities_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette.png]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor6]", "Tests/test_imagefontpil.py::test_oom", "Tests/test_image_reduce.py::test_mode_F[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l.png]", "Tests/test_imageops.py::test_fit_same_ratio", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_cursors.cur]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unimplemented_pfflags.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_4_raqm.png]", "Tests/test_image_reduce.py::test_mode_I[5]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_start.png]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox1]", "Tests/test_file_apng.py::test_apng_dispose", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw2_text.png]", "Tests/test_file_gribstub.py::test_open", "Tests/test_imageops.py::test_contain[new_size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/06r00.fli]", "Tests/test_image_filter.py::test_sanity[RGB-SHARPEN]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_target_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz_name.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp_no_prefix", "Tests/test_image_reduce.py::test_mode_La[3]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/itxt_chunks.png-None]", "Tests/test_imagedraw.py::test_chord_width[bbox2]", "Tests/test_imagechops.py::test_sanity", "Tests/test_imagedraw.py::test_circle[xy0-L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-1152ec2d1a1a71395b6f2ce6721c38924d025bf3.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24jpeg.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8os2.bmp]", "Tests/test_file_spider.py::test_nonstack_file", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_snorm.dds-Tests/images/bc5s.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/orientation_rectangle.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card-lossy-tiled.jp2]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;15]", "Tests/test_file_pcx.py::test_pil184", "Tests/test_file_jpeg.py::TestFileJpeg::test_no_dpi_in_exif", "Tests/test_image_getbands.py::test_getbands", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox0]", "Tests/test_file_psd.py::test_no_icc_profile", "Tests/test_imagecolor.py::test_functions", "Tests/test_image_reduce.py::test_mode_LA[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_rows_per_strip.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_center.png]", "Tests/test_file_im.py::test_closed_file", "Tests/test_imageops.py::test_autocontrast_unsupported_mode", "Tests/test_file_tiff.py::TestFileTiff::test_gray_semibyte_per_pixel", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.Lab.tif]", "Tests/test_imagefile.py::TestPyEncoder::test_encode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_translucent.png]", "Tests/test_file_pcx.py::test_odd[P]", "Tests/test_image_rotate.py::test_alpha_rotate_no_fill", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_snorm.dds]", "Tests/test_file_gif.py::test_saving_rgba", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_background_text_L.png]", "Tests/test_imagechops.py::test_difference", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.gif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_invalid_exif", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[CMYK]", "Tests/test_image_transform.py::TestImageTransform::test_fill[RGBA-expected_pixel1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_multiline.png]", "Tests/test_core_resources.py::TestCoreMemory::test_set_block_size_stats", "Tests/test_format_hsv.py::test_wedge", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor13]", "Tests/test_image_resize.py::TestImagingCoreResize::test_unknown_filter", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_zero_comment_subblocks.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-7d4c83eb92150fb8f1653a697703ae06ae7c4998.j2k]", "Tests/test_file_ppm.py::test_neg_ppm", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_be.pfm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r04.fli]", "Tests/test_font_pcf_charsets.py::test_sanity[cp1250]", "Tests/test_image_mode.py::test_properties[I-L-I-1-expected_band_names3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_mt.png]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply19]", "Tests/test_file_blp.py::test_save", "Tests/test_imagedraw.py::test_chord_width_fill[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid.spider]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox0]", "Tests/test_imageshow.py::test_show_file[viewer0]", "Tests/test_image_filter.py::test_sanity[RGB-EDGE_ENHANCE_MORE]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-P]", "Tests/test_file_png.py::TestFilePng::test_discard_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/reallybig.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[3-184.912]", "Tests/test_image_putalpha.py::test_readonly", "Tests/test_imagedraw2.py::test_sanity", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[4]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 NaN \\x00\\x00\\x00\\x00]", "Tests/test_imageops.py::test_autocontrast_cutoff", "Tests/test_file_jpeg.py::TestFileJpeg::test_quality_keep", "Tests/test_file_png.py::TestFilePng::test_roundtrip_private_chunk", "Tests/test_image.py::TestImage::test_register_extensions", "Tests/test_image.py::TestImage::test_radial_gradient[I]", "Tests/test_imagedraw2.py::test_ellipse_edge", "Tests/test_file_blp.py::test_load_blp2_dxt1", "Tests/test_image_mode.py::test_properties[F-L-F-1-expected_band_names4]", "Tests/test_file_sgi.py::test_rle", "Tests/test_image_transpose.py::test_rotate_180[I;16]", "Tests/test_image_reduce.py::test_mode_RGB[4]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply16]", "Tests/test_imagechops.py::test_add_clip", "Tests/test_imagechops.py::test_multiply_black", "Tests/test_imagedraw.py::test_rectangle_I16[bbox0]", "Tests/test_file_xbm.py::test_hotspot", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_0.jpg]", "Tests/test_imagemath_unsafe_eval.py::test_logical_lt", "Tests/test_file_spider.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unknown_mode.j2k]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle4-0-ValueError-bounding_circle should only contain numeric data]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-dpi-zerodivision.jpg]", "Tests/test_image_reduce.py::test_mode_F[factor10]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.tar]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 -0.0 \\x00\\x00\\x00\\x00]", "Tests/test_imagedraw.py::test_ellipse_width[bbox0]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;16]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-RGBA]", "Tests/test_image.py::TestImage::test_exif_png", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/photoshop-200dpi-broken.jpg]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[RGBX]", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5s.dds-Tests/images/bc5s.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba32.bmp]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rotate_45_no_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba16-4444.bmp]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[La]", "Tests/test_file_container.py::test_file[False]", "Tests/test_image_transform.py::TestImageTransform::test_blank_fill", "Tests/test_file_jpeg.py::TestFileJpeg::test_invalid_exif_x_resolution", "Tests/test_file_dds.py::test_dx10_r8g8b8a8", "Tests/test_image_filter.py::test_consistency_5x5[LA]", "Tests/test_file_gimppalette.py::test_get_palette", "Tests/test_file_gif.py::test_dispose2_diff", "Tests/test_file_gif.py::test_roundtrip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_gray.jpg]", "Tests/test_imagedraw.py::test_arc[0-180-bbox2]", "Tests/test_file_container.py::test_isatty", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun.bin]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply15]"] | [] | ["Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_joined_x_different_corners.png]"] | ["Tests/test_features.py::test_webp_anim - Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>,) w...", "Tests/test_features.py::test_webp_transparency - Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>,) w...", "Tests/test_features.py::test_check - Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>,) w...", "Tests/test_features.py::test_webp_mux - Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>,) w...", "Tests/test_features.py::test_version - Failed: DID NOT WARN. No warnings of type (<class 'DeprecationWarning'>,) w...", "Tests/test_file_palm.py::test_p_mode - Palm P image is wrong", "Tests/test_imagedraw.py::test_rounded_rectangle_joined_x_different_corners - PIL.UnidentifiedImageError: cannot identify image file '/testbed/Tests/imag..."] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.4.0", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.6.1", "distlib==0.3.8", "filelock==3.15.4", "iniconfig==2.0.0", "packaging==24.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.3.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.18.0", "uv==0.2.36", "virtualenv==20.26.3", "wheel==0.44.0"]} | null | ["pytest --tb=no -rA -p no:cacheprovider"] | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-8086 | 920698eea7693012d945300b2b87a16ae8f0706a | diff --git a/docs/reference/ImageFont.rst b/docs/reference/ImageFont.rst
index 6edf4b05c55..edbdd9a32a6 100644
--- a/docs/reference/ImageFont.rst
+++ b/docs/reference/ImageFont.rst
@@ -53,6 +53,7 @@ Functions
.. autofunction:: PIL.ImageFont.load_path
.. autofunction:: PIL.ImageFont.truetype
.. autofunction:: PIL.ImageFont.load_default
+.. autofunction:: PIL.ImageFont.load_default_imagefont
Methods
-------
diff --git a/src/PIL/ImageFont.py b/src/PIL/ImageFont.py
index 95402740273..655d7627e54 100644
--- a/src/PIL/ImageFont.py
+++ b/src/PIL/ImageFont.py
@@ -906,6 +906,142 @@ def load_path(filename: str | bytes) -> ImageFont:
raise OSError(msg)
+def load_default_imagefont() -> ImageFont:
+ f = ImageFont()
+ f._load_pilfont_data(
+ # courB08
+ BytesIO(
+ base64.b64decode(
+ b"""
+UElMZm9udAo7Ozs7OzsxMDsKREFUQQoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAA//8AAQAAAAAAAAABAAEA
+BgAAAAH/+gADAAAAAQAAAAMABgAGAAAAAf/6AAT//QADAAAABgADAAYAAAAA//kABQABAAYAAAAL
+AAgABgAAAAD/+AAFAAEACwAAABAACQAGAAAAAP/5AAUAAAAQAAAAFQAHAAYAAP////oABQAAABUA
+AAAbAAYABgAAAAH/+QAE//wAGwAAAB4AAwAGAAAAAf/5AAQAAQAeAAAAIQAIAAYAAAAB//kABAAB
+ACEAAAAkAAgABgAAAAD/+QAE//0AJAAAACgABAAGAAAAAP/6AAX//wAoAAAALQAFAAYAAAAB//8A
+BAACAC0AAAAwAAMABgAAAAD//AAF//0AMAAAADUAAQAGAAAAAf//AAMAAAA1AAAANwABAAYAAAAB
+//kABQABADcAAAA7AAgABgAAAAD/+QAFAAAAOwAAAEAABwAGAAAAAP/5AAYAAABAAAAARgAHAAYA
+AAAA//kABQAAAEYAAABLAAcABgAAAAD/+QAFAAAASwAAAFAABwAGAAAAAP/5AAYAAABQAAAAVgAH
+AAYAAAAA//kABQAAAFYAAABbAAcABgAAAAD/+QAFAAAAWwAAAGAABwAGAAAAAP/5AAUAAABgAAAA
+ZQAHAAYAAAAA//kABQAAAGUAAABqAAcABgAAAAD/+QAFAAAAagAAAG8ABwAGAAAAAf/8AAMAAABv
+AAAAcQAEAAYAAAAA//wAAwACAHEAAAB0AAYABgAAAAD/+gAE//8AdAAAAHgABQAGAAAAAP/7AAT/
+/gB4AAAAfAADAAYAAAAB//oABf//AHwAAACAAAUABgAAAAD/+gAFAAAAgAAAAIUABgAGAAAAAP/5
+AAYAAQCFAAAAiwAIAAYAAP////oABgAAAIsAAACSAAYABgAA////+gAFAAAAkgAAAJgABgAGAAAA
+AP/6AAUAAACYAAAAnQAGAAYAAP////oABQAAAJ0AAACjAAYABgAA////+gAFAAAAowAAAKkABgAG
+AAD////6AAUAAACpAAAArwAGAAYAAAAA//oABQAAAK8AAAC0AAYABgAA////+gAGAAAAtAAAALsA
+BgAGAAAAAP/6AAQAAAC7AAAAvwAGAAYAAP////oABQAAAL8AAADFAAYABgAA////+gAGAAAAxQAA
+AMwABgAGAAD////6AAUAAADMAAAA0gAGAAYAAP////oABQAAANIAAADYAAYABgAA////+gAGAAAA
+2AAAAN8ABgAGAAAAAP/6AAUAAADfAAAA5AAGAAYAAP////oABQAAAOQAAADqAAYABgAAAAD/+gAF
+AAEA6gAAAO8ABwAGAAD////6AAYAAADvAAAA9gAGAAYAAAAA//oABQAAAPYAAAD7AAYABgAA////
++gAFAAAA+wAAAQEABgAGAAD////6AAYAAAEBAAABCAAGAAYAAP////oABgAAAQgAAAEPAAYABgAA
+////+gAGAAABDwAAARYABgAGAAAAAP/6AAYAAAEWAAABHAAGAAYAAP////oABgAAARwAAAEjAAYA
+BgAAAAD/+gAFAAABIwAAASgABgAGAAAAAf/5AAQAAQEoAAABKwAIAAYAAAAA//kABAABASsAAAEv
+AAgABgAAAAH/+QAEAAEBLwAAATIACAAGAAAAAP/5AAX//AEyAAABNwADAAYAAAAAAAEABgACATcA
+AAE9AAEABgAAAAH/+QAE//wBPQAAAUAAAwAGAAAAAP/7AAYAAAFAAAABRgAFAAYAAP////kABQAA
+AUYAAAFMAAcABgAAAAD/+wAFAAABTAAAAVEABQAGAAAAAP/5AAYAAAFRAAABVwAHAAYAAAAA//sA
+BQAAAVcAAAFcAAUABgAAAAD/+QAFAAABXAAAAWEABwAGAAAAAP/7AAYAAgFhAAABZwAHAAYAAP//
+//kABQAAAWcAAAFtAAcABgAAAAD/+QAGAAABbQAAAXMABwAGAAAAAP/5AAQAAgFzAAABdwAJAAYA
+AP////kABgAAAXcAAAF+AAcABgAAAAD/+QAGAAABfgAAAYQABwAGAAD////7AAUAAAGEAAABigAF
+AAYAAP////sABQAAAYoAAAGQAAUABgAAAAD/+wAFAAABkAAAAZUABQAGAAD////7AAUAAgGVAAAB
+mwAHAAYAAAAA//sABgACAZsAAAGhAAcABgAAAAD/+wAGAAABoQAAAacABQAGAAAAAP/7AAYAAAGn
+AAABrQAFAAYAAAAA//kABgAAAa0AAAGzAAcABgAA////+wAGAAABswAAAboABQAGAAD////7AAUA
+AAG6AAABwAAFAAYAAP////sABgAAAcAAAAHHAAUABgAAAAD/+wAGAAABxwAAAc0ABQAGAAD////7
+AAYAAgHNAAAB1AAHAAYAAAAA//sABQAAAdQAAAHZAAUABgAAAAH/+QAFAAEB2QAAAd0ACAAGAAAA
+Av/6AAMAAQHdAAAB3gAHAAYAAAAA//kABAABAd4AAAHiAAgABgAAAAD/+wAF//0B4gAAAecAAgAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAB
+//sAAwACAecAAAHpAAcABgAAAAD/+QAFAAEB6QAAAe4ACAAGAAAAAP/5AAYAAAHuAAAB9AAHAAYA
+AAAA//oABf//AfQAAAH5AAUABgAAAAD/+QAGAAAB+QAAAf8ABwAGAAAAAv/5AAMAAgH/AAACAAAJ
+AAYAAAAA//kABQABAgAAAAIFAAgABgAAAAH/+gAE//sCBQAAAggAAQAGAAAAAP/5AAYAAAIIAAAC
+DgAHAAYAAAAB//kABf/+Ag4AAAISAAUABgAA////+wAGAAACEgAAAhkABQAGAAAAAP/7AAX//gIZ
+AAACHgADAAYAAAAA//wABf/9Ah4AAAIjAAEABgAAAAD/+QAHAAACIwAAAioABwAGAAAAAP/6AAT/
++wIqAAACLgABAAYAAAAA//kABP/8Ai4AAAIyAAMABgAAAAD/+gAFAAACMgAAAjcABgAGAAAAAf/5
+AAT//QI3AAACOgAEAAYAAAAB//kABP/9AjoAAAI9AAQABgAAAAL/+QAE//sCPQAAAj8AAgAGAAD/
+///7AAYAAgI/AAACRgAHAAYAAAAA//kABgABAkYAAAJMAAgABgAAAAH//AAD//0CTAAAAk4AAQAG
+AAAAAf//AAQAAgJOAAACUQADAAYAAAAB//kABP/9AlEAAAJUAAQABgAAAAH/+QAF//4CVAAAAlgA
+BQAGAAD////7AAYAAAJYAAACXwAFAAYAAP////kABgAAAl8AAAJmAAcABgAA////+QAGAAACZgAA
+Am0ABwAGAAD////5AAYAAAJtAAACdAAHAAYAAAAA//sABQACAnQAAAJ5AAcABgAA////9wAGAAAC
+eQAAAoAACQAGAAD////3AAYAAAKAAAAChwAJAAYAAP////cABgAAAocAAAKOAAkABgAA////9wAG
+AAACjgAAApUACQAGAAD////4AAYAAAKVAAACnAAIAAYAAP////cABgAAApwAAAKjAAkABgAA////
++gAGAAACowAAAqoABgAGAAAAAP/6AAUAAgKqAAACrwAIAAYAAP////cABQAAAq8AAAK1AAkABgAA
+////9wAFAAACtQAAArsACQAGAAD////3AAUAAAK7AAACwQAJAAYAAP////gABQAAAsEAAALHAAgA
+BgAAAAD/9wAEAAACxwAAAssACQAGAAAAAP/3AAQAAALLAAACzwAJAAYAAAAA//cABAAAAs8AAALT
+AAkABgAAAAD/+AAEAAAC0wAAAtcACAAGAAD////6AAUAAALXAAAC3QAGAAYAAP////cABgAAAt0A
+AALkAAkABgAAAAD/9wAFAAAC5AAAAukACQAGAAAAAP/3AAUAAALpAAAC7gAJAAYAAAAA//cABQAA
+Au4AAALzAAkABgAAAAD/9wAFAAAC8wAAAvgACQAGAAAAAP/4AAUAAAL4AAAC/QAIAAYAAAAA//oA
+Bf//Av0AAAMCAAUABgAA////+gAGAAADAgAAAwkABgAGAAD////3AAYAAAMJAAADEAAJAAYAAP//
+//cABgAAAxAAAAMXAAkABgAA////9wAGAAADFwAAAx4ACQAGAAD////4AAYAAAAAAAoABwASAAYA
+AP////cABgAAAAcACgAOABMABgAA////+gAFAAAADgAKABQAEAAGAAD////6AAYAAAAUAAoAGwAQ
+AAYAAAAA//gABgAAABsACgAhABIABgAAAAD/+AAGAAAAIQAKACcAEgAGAAAAAP/4AAYAAAAnAAoA
+LQASAAYAAAAA//gABgAAAC0ACgAzABIABgAAAAD/+QAGAAAAMwAKADkAEQAGAAAAAP/3AAYAAAA5
+AAoAPwATAAYAAP////sABQAAAD8ACgBFAA8ABgAAAAD/+wAFAAIARQAKAEoAEQAGAAAAAP/4AAUA
+AABKAAoATwASAAYAAAAA//gABQAAAE8ACgBUABIABgAAAAD/+AAFAAAAVAAKAFkAEgAGAAAAAP/5
+AAUAAABZAAoAXgARAAYAAAAA//gABgAAAF4ACgBkABIABgAAAAD/+AAGAAAAZAAKAGoAEgAGAAAA
+AP/4AAYAAABqAAoAcAASAAYAAAAA//kABgAAAHAACgB2ABEABgAAAAD/+AAFAAAAdgAKAHsAEgAG
+AAD////4AAYAAAB7AAoAggASAAYAAAAA//gABQAAAIIACgCHABIABgAAAAD/+AAFAAAAhwAKAIwA
+EgAGAAAAAP/4AAUAAACMAAoAkQASAAYAAAAA//gABQAAAJEACgCWABIABgAAAAD/+QAFAAAAlgAK
+AJsAEQAGAAAAAP/6AAX//wCbAAoAoAAPAAYAAAAA//oABQABAKAACgClABEABgAA////+AAGAAAA
+pQAKAKwAEgAGAAD////4AAYAAACsAAoAswASAAYAAP////gABgAAALMACgC6ABIABgAA////+QAG
+AAAAugAKAMEAEQAGAAD////4AAYAAgDBAAoAyAAUAAYAAP////kABQACAMgACgDOABMABgAA////
++QAGAAIAzgAKANUAEw==
+"""
+ )
+ ),
+ Image.open(
+ BytesIO(
+ base64.b64decode(
+ b"""
+iVBORw0KGgoAAAANSUhEUgAAAx4AAAAUAQAAAAArMtZoAAAEwElEQVR4nABlAJr/AHVE4czCI/4u
+Mc4b7vuds/xzjz5/3/7u/n9vMe7vnfH/9++vPn/xyf5zhxzjt8GHw8+2d83u8x27199/nxuQ6Od9
+M43/5z2I+9n9ZtmDBwMQECDRQw/eQIQohJXxpBCNVE6QCCAAAAD//wBlAJr/AgALyj1t/wINwq0g
+LeNZUworuN1cjTPIzrTX6ofHWeo3v336qPzfEwRmBnHTtf95/fglZK5N0PDgfRTslpGBvz7LFc4F
+IUXBWQGjQ5MGCx34EDFPwXiY4YbYxavpnhHFrk14CDAAAAD//wBlAJr/AgKqRooH2gAgPeggvUAA
+Bu2WfgPoAwzRAABAAAAAAACQgLz/3Uv4Gv+gX7BJgDeeGP6AAAD1NMDzKHD7ANWr3loYbxsAD791
+NAADfcoIDyP44K/jv4Y63/Z+t98Ovt+ub4T48LAAAAD//wBlAJr/AuplMlADJAAAAGuAphWpqhMx
+in0A/fRvAYBABPgBwBUgABBQ/sYAyv9g0bCHgOLoGAAAAAAAREAAwI7nr0ArYpow7aX8//9LaP/9
+SjdavWA8ePHeBIKB//81/83ndznOaXx379wAAAD//wBlAJr/AqDxW+D3AABAAbUh/QMnbQag/gAY
+AYDAAACgtgD/gOqAAAB5IA/8AAAk+n9w0AAA8AAAmFRJuPo27ciC0cD5oeW4E7KA/wD3ECMAn2tt
+y8PgwH8AfAxFzC0JzeAMtratAsC/ffwAAAD//wBlAJr/BGKAyCAA4AAAAvgeYTAwHd1kmQF5chkG
+ABoMIHcL5xVpTfQbUqzlAAAErwAQBgAAEOClA5D9il08AEh/tUzdCBsXkbgACED+woQg8Si9VeqY
+lODCn7lmF6NhnAEYgAAA/NMIAAAAAAD//2JgjLZgVGBg5Pv/Tvpc8hwGBjYGJADjHDrAwPzAjv/H
+/Wf3PzCwtzcwHmBgYGcwbZz8wHaCAQMDOwMDQ8MCBgYOC3W7mp+f0w+wHOYxO3OG+e376hsMZjk3
+AAAAAP//YmCMY2A4wMAIN5e5gQETPD6AZisDAwMDgzSDAAPjByiHcQMDAwMDg1nOze1lByRu5/47
+c4859311AYNZzg0AAAAA//9iYGDBYihOIIMuwIjGL39/fwffA8b//xv/P2BPtzzHwCBjUQAAAAD/
+/yLFBrIBAAAA//9i1HhcwdhizX7u8NZNzyLbvT97bfrMf/QHI8evOwcSqGUJAAAA//9iYBB81iSw
+pEE170Qrg5MIYydHqwdDQRMrAwcVrQAAAAD//2J4x7j9AAMDn8Q/BgYLBoaiAwwMjPdvMDBYM1Tv
+oJodAAAAAP//Yqo/83+dxePWlxl3npsel9lvLfPcqlE9725C+acfVLMEAAAA//9i+s9gwCoaaGMR
+evta/58PTEWzr21hufPjA8N+qlnBwAAAAAD//2JiWLci5v1+HmFXDqcnULE/MxgYGBj+f6CaJQAA
+AAD//2Ji2FrkY3iYpYC5qDeGgeEMAwPDvwQBBoYvcTwOVLMEAAAA//9isDBgkP///0EOg9z35v//
+Gc/eeW7BwPj5+QGZhANUswMAAAD//2JgqGBgYGBgqEMXlvhMPUsAAAAA//8iYDd1AAAAAP//AwDR
+w7IkEbzhVQAAAABJRU5ErkJggg==
+"""
+ )
+ )
+ ),
+ )
+ return f
+
+
def load_default(size: float | None = None) -> FreeTypeFont | ImageFont:
"""If FreeType support is available, load a version of Aileron Regular,
https://dotcolon.net/font/aileron, with a more limited character set.
@@ -920,9 +1056,8 @@ def load_default(size: float | None = None) -> FreeTypeFont | ImageFont:
:return: A font object.
"""
- f: FreeTypeFont | ImageFont
if isinstance(core, ModuleType) or size is not None:
- f = truetype(
+ return truetype(
BytesIO(
base64.b64decode(
b"""
@@ -1152,137 +1287,4 @@ def load_default(size: float | None = None) -> FreeTypeFont | ImageFont:
10 if size is None else size,
layout_engine=Layout.BASIC,
)
- else:
- f = ImageFont()
- f._load_pilfont_data(
- # courB08
- BytesIO(
- base64.b64decode(
- b"""
-UElMZm9udAo7Ozs7OzsxMDsKREFUQQoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAA//8AAQAAAAAAAAABAAEA
-BgAAAAH/+gADAAAAAQAAAAMABgAGAAAAAf/6AAT//QADAAAABgADAAYAAAAA//kABQABAAYAAAAL
-AAgABgAAAAD/+AAFAAEACwAAABAACQAGAAAAAP/5AAUAAAAQAAAAFQAHAAYAAP////oABQAAABUA
-AAAbAAYABgAAAAH/+QAE//wAGwAAAB4AAwAGAAAAAf/5AAQAAQAeAAAAIQAIAAYAAAAB//kABAAB
-ACEAAAAkAAgABgAAAAD/+QAE//0AJAAAACgABAAGAAAAAP/6AAX//wAoAAAALQAFAAYAAAAB//8A
-BAACAC0AAAAwAAMABgAAAAD//AAF//0AMAAAADUAAQAGAAAAAf//AAMAAAA1AAAANwABAAYAAAAB
-//kABQABADcAAAA7AAgABgAAAAD/+QAFAAAAOwAAAEAABwAGAAAAAP/5AAYAAABAAAAARgAHAAYA
-AAAA//kABQAAAEYAAABLAAcABgAAAAD/+QAFAAAASwAAAFAABwAGAAAAAP/5AAYAAABQAAAAVgAH
-AAYAAAAA//kABQAAAFYAAABbAAcABgAAAAD/+QAFAAAAWwAAAGAABwAGAAAAAP/5AAUAAABgAAAA
-ZQAHAAYAAAAA//kABQAAAGUAAABqAAcABgAAAAD/+QAFAAAAagAAAG8ABwAGAAAAAf/8AAMAAABv
-AAAAcQAEAAYAAAAA//wAAwACAHEAAAB0AAYABgAAAAD/+gAE//8AdAAAAHgABQAGAAAAAP/7AAT/
-/gB4AAAAfAADAAYAAAAB//oABf//AHwAAACAAAUABgAAAAD/+gAFAAAAgAAAAIUABgAGAAAAAP/5
-AAYAAQCFAAAAiwAIAAYAAP////oABgAAAIsAAACSAAYABgAA////+gAFAAAAkgAAAJgABgAGAAAA
-AP/6AAUAAACYAAAAnQAGAAYAAP////oABQAAAJ0AAACjAAYABgAA////+gAFAAAAowAAAKkABgAG
-AAD////6AAUAAACpAAAArwAGAAYAAAAA//oABQAAAK8AAAC0AAYABgAA////+gAGAAAAtAAAALsA
-BgAGAAAAAP/6AAQAAAC7AAAAvwAGAAYAAP////oABQAAAL8AAADFAAYABgAA////+gAGAAAAxQAA
-AMwABgAGAAD////6AAUAAADMAAAA0gAGAAYAAP////oABQAAANIAAADYAAYABgAA////+gAGAAAA
-2AAAAN8ABgAGAAAAAP/6AAUAAADfAAAA5AAGAAYAAP////oABQAAAOQAAADqAAYABgAAAAD/+gAF
-AAEA6gAAAO8ABwAGAAD////6AAYAAADvAAAA9gAGAAYAAAAA//oABQAAAPYAAAD7AAYABgAA////
-+gAFAAAA+wAAAQEABgAGAAD////6AAYAAAEBAAABCAAGAAYAAP////oABgAAAQgAAAEPAAYABgAA
-////+gAGAAABDwAAARYABgAGAAAAAP/6AAYAAAEWAAABHAAGAAYAAP////oABgAAARwAAAEjAAYA
-BgAAAAD/+gAFAAABIwAAASgABgAGAAAAAf/5AAQAAQEoAAABKwAIAAYAAAAA//kABAABASsAAAEv
-AAgABgAAAAH/+QAEAAEBLwAAATIACAAGAAAAAP/5AAX//AEyAAABNwADAAYAAAAAAAEABgACATcA
-AAE9AAEABgAAAAH/+QAE//wBPQAAAUAAAwAGAAAAAP/7AAYAAAFAAAABRgAFAAYAAP////kABQAA
-AUYAAAFMAAcABgAAAAD/+wAFAAABTAAAAVEABQAGAAAAAP/5AAYAAAFRAAABVwAHAAYAAAAA//sA
-BQAAAVcAAAFcAAUABgAAAAD/+QAFAAABXAAAAWEABwAGAAAAAP/7AAYAAgFhAAABZwAHAAYAAP//
-//kABQAAAWcAAAFtAAcABgAAAAD/+QAGAAABbQAAAXMABwAGAAAAAP/5AAQAAgFzAAABdwAJAAYA
-AP////kABgAAAXcAAAF+AAcABgAAAAD/+QAGAAABfgAAAYQABwAGAAD////7AAUAAAGEAAABigAF
-AAYAAP////sABQAAAYoAAAGQAAUABgAAAAD/+wAFAAABkAAAAZUABQAGAAD////7AAUAAgGVAAAB
-mwAHAAYAAAAA//sABgACAZsAAAGhAAcABgAAAAD/+wAGAAABoQAAAacABQAGAAAAAP/7AAYAAAGn
-AAABrQAFAAYAAAAA//kABgAAAa0AAAGzAAcABgAA////+wAGAAABswAAAboABQAGAAD////7AAUA
-AAG6AAABwAAFAAYAAP////sABgAAAcAAAAHHAAUABgAAAAD/+wAGAAABxwAAAc0ABQAGAAD////7
-AAYAAgHNAAAB1AAHAAYAAAAA//sABQAAAdQAAAHZAAUABgAAAAH/+QAFAAEB2QAAAd0ACAAGAAAA
-Av/6AAMAAQHdAAAB3gAHAAYAAAAA//kABAABAd4AAAHiAAgABgAAAAD/+wAF//0B4gAAAecAAgAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAB
-//sAAwACAecAAAHpAAcABgAAAAD/+QAFAAEB6QAAAe4ACAAGAAAAAP/5AAYAAAHuAAAB9AAHAAYA
-AAAA//oABf//AfQAAAH5AAUABgAAAAD/+QAGAAAB+QAAAf8ABwAGAAAAAv/5AAMAAgH/AAACAAAJ
-AAYAAAAA//kABQABAgAAAAIFAAgABgAAAAH/+gAE//sCBQAAAggAAQAGAAAAAP/5AAYAAAIIAAAC
-DgAHAAYAAAAB//kABf/+Ag4AAAISAAUABgAA////+wAGAAACEgAAAhkABQAGAAAAAP/7AAX//gIZ
-AAACHgADAAYAAAAA//wABf/9Ah4AAAIjAAEABgAAAAD/+QAHAAACIwAAAioABwAGAAAAAP/6AAT/
-+wIqAAACLgABAAYAAAAA//kABP/8Ai4AAAIyAAMABgAAAAD/+gAFAAACMgAAAjcABgAGAAAAAf/5
-AAT//QI3AAACOgAEAAYAAAAB//kABP/9AjoAAAI9AAQABgAAAAL/+QAE//sCPQAAAj8AAgAGAAD/
-///7AAYAAgI/AAACRgAHAAYAAAAA//kABgABAkYAAAJMAAgABgAAAAH//AAD//0CTAAAAk4AAQAG
-AAAAAf//AAQAAgJOAAACUQADAAYAAAAB//kABP/9AlEAAAJUAAQABgAAAAH/+QAF//4CVAAAAlgA
-BQAGAAD////7AAYAAAJYAAACXwAFAAYAAP////kABgAAAl8AAAJmAAcABgAA////+QAGAAACZgAA
-Am0ABwAGAAD////5AAYAAAJtAAACdAAHAAYAAAAA//sABQACAnQAAAJ5AAcABgAA////9wAGAAAC
-eQAAAoAACQAGAAD////3AAYAAAKAAAAChwAJAAYAAP////cABgAAAocAAAKOAAkABgAA////9wAG
-AAACjgAAApUACQAGAAD////4AAYAAAKVAAACnAAIAAYAAP////cABgAAApwAAAKjAAkABgAA////
-+gAGAAACowAAAqoABgAGAAAAAP/6AAUAAgKqAAACrwAIAAYAAP////cABQAAAq8AAAK1AAkABgAA
-////9wAFAAACtQAAArsACQAGAAD////3AAUAAAK7AAACwQAJAAYAAP////gABQAAAsEAAALHAAgA
-BgAAAAD/9wAEAAACxwAAAssACQAGAAAAAP/3AAQAAALLAAACzwAJAAYAAAAA//cABAAAAs8AAALT
-AAkABgAAAAD/+AAEAAAC0wAAAtcACAAGAAD////6AAUAAALXAAAC3QAGAAYAAP////cABgAAAt0A
-AALkAAkABgAAAAD/9wAFAAAC5AAAAukACQAGAAAAAP/3AAUAAALpAAAC7gAJAAYAAAAA//cABQAA
-Au4AAALzAAkABgAAAAD/9wAFAAAC8wAAAvgACQAGAAAAAP/4AAUAAAL4AAAC/QAIAAYAAAAA//oA
-Bf//Av0AAAMCAAUABgAA////+gAGAAADAgAAAwkABgAGAAD////3AAYAAAMJAAADEAAJAAYAAP//
-//cABgAAAxAAAAMXAAkABgAA////9wAGAAADFwAAAx4ACQAGAAD////4AAYAAAAAAAoABwASAAYA
-AP////cABgAAAAcACgAOABMABgAA////+gAFAAAADgAKABQAEAAGAAD////6AAYAAAAUAAoAGwAQ
-AAYAAAAA//gABgAAABsACgAhABIABgAAAAD/+AAGAAAAIQAKACcAEgAGAAAAAP/4AAYAAAAnAAoA
-LQASAAYAAAAA//gABgAAAC0ACgAzABIABgAAAAD/+QAGAAAAMwAKADkAEQAGAAAAAP/3AAYAAAA5
-AAoAPwATAAYAAP////sABQAAAD8ACgBFAA8ABgAAAAD/+wAFAAIARQAKAEoAEQAGAAAAAP/4AAUA
-AABKAAoATwASAAYAAAAA//gABQAAAE8ACgBUABIABgAAAAD/+AAFAAAAVAAKAFkAEgAGAAAAAP/5
-AAUAAABZAAoAXgARAAYAAAAA//gABgAAAF4ACgBkABIABgAAAAD/+AAGAAAAZAAKAGoAEgAGAAAA
-AP/4AAYAAABqAAoAcAASAAYAAAAA//kABgAAAHAACgB2ABEABgAAAAD/+AAFAAAAdgAKAHsAEgAG
-AAD////4AAYAAAB7AAoAggASAAYAAAAA//gABQAAAIIACgCHABIABgAAAAD/+AAFAAAAhwAKAIwA
-EgAGAAAAAP/4AAUAAACMAAoAkQASAAYAAAAA//gABQAAAJEACgCWABIABgAAAAD/+QAFAAAAlgAK
-AJsAEQAGAAAAAP/6AAX//wCbAAoAoAAPAAYAAAAA//oABQABAKAACgClABEABgAA////+AAGAAAA
-pQAKAKwAEgAGAAD////4AAYAAACsAAoAswASAAYAAP////gABgAAALMACgC6ABIABgAA////+QAG
-AAAAugAKAMEAEQAGAAD////4AAYAAgDBAAoAyAAUAAYAAP////kABQACAMgACgDOABMABgAA////
-+QAGAAIAzgAKANUAEw==
-"""
- )
- ),
- Image.open(
- BytesIO(
- base64.b64decode(
- b"""
-iVBORw0KGgoAAAANSUhEUgAAAx4AAAAUAQAAAAArMtZoAAAEwElEQVR4nABlAJr/AHVE4czCI/4u
-Mc4b7vuds/xzjz5/3/7u/n9vMe7vnfH/9++vPn/xyf5zhxzjt8GHw8+2d83u8x27199/nxuQ6Od9
-M43/5z2I+9n9ZtmDBwMQECDRQw/eQIQohJXxpBCNVE6QCCAAAAD//wBlAJr/AgALyj1t/wINwq0g
-LeNZUworuN1cjTPIzrTX6ofHWeo3v336qPzfEwRmBnHTtf95/fglZK5N0PDgfRTslpGBvz7LFc4F
-IUXBWQGjQ5MGCx34EDFPwXiY4YbYxavpnhHFrk14CDAAAAD//wBlAJr/AgKqRooH2gAgPeggvUAA
-Bu2WfgPoAwzRAABAAAAAAACQgLz/3Uv4Gv+gX7BJgDeeGP6AAAD1NMDzKHD7ANWr3loYbxsAD791
-NAADfcoIDyP44K/jv4Y63/Z+t98Ovt+ub4T48LAAAAD//wBlAJr/AuplMlADJAAAAGuAphWpqhMx
-in0A/fRvAYBABPgBwBUgABBQ/sYAyv9g0bCHgOLoGAAAAAAAREAAwI7nr0ArYpow7aX8//9LaP/9
-SjdavWA8ePHeBIKB//81/83ndznOaXx379wAAAD//wBlAJr/AqDxW+D3AABAAbUh/QMnbQag/gAY
-AYDAAACgtgD/gOqAAAB5IA/8AAAk+n9w0AAA8AAAmFRJuPo27ciC0cD5oeW4E7KA/wD3ECMAn2tt
-y8PgwH8AfAxFzC0JzeAMtratAsC/ffwAAAD//wBlAJr/BGKAyCAA4AAAAvgeYTAwHd1kmQF5chkG
-ABoMIHcL5xVpTfQbUqzlAAAErwAQBgAAEOClA5D9il08AEh/tUzdCBsXkbgACED+woQg8Si9VeqY
-lODCn7lmF6NhnAEYgAAA/NMIAAAAAAD//2JgjLZgVGBg5Pv/Tvpc8hwGBjYGJADjHDrAwPzAjv/H
-/Wf3PzCwtzcwHmBgYGcwbZz8wHaCAQMDOwMDQ8MCBgYOC3W7mp+f0w+wHOYxO3OG+e376hsMZjk3
-AAAAAP//YmCMY2A4wMAIN5e5gQETPD6AZisDAwMDgzSDAAPjByiHcQMDAwMDg1nOze1lByRu5/47
-c4859311AYNZzg0AAAAA//9iYGDBYihOIIMuwIjGL39/fwffA8b//xv/P2BPtzzHwCBjUQAAAAD/
-/yLFBrIBAAAA//9i1HhcwdhizX7u8NZNzyLbvT97bfrMf/QHI8evOwcSqGUJAAAA//9iYBB81iSw
-pEE170Qrg5MIYydHqwdDQRMrAwcVrQAAAAD//2J4x7j9AAMDn8Q/BgYLBoaiAwwMjPdvMDBYM1Tv
-oJodAAAAAP//Yqo/83+dxePWlxl3npsel9lvLfPcqlE9725C+acfVLMEAAAA//9i+s9gwCoaaGMR
-evta/58PTEWzr21hufPjA8N+qlnBwAAAAAD//2JiWLci5v1+HmFXDqcnULE/MxgYGBj+f6CaJQAA
-AAD//2Ji2FrkY3iYpYC5qDeGgeEMAwPDvwQBBoYvcTwOVLMEAAAA//9isDBgkP///0EOg9z35v//
-Gc/eeW7BwPj5+QGZhANUswMAAAD//2JgqGBgYGBgqEMXlvhMPUsAAAAA//8iYDd1AAAAAP//AwDR
-w7IkEbzhVQAAAABJRU5ErkJggg==
-"""
- )
- )
- ),
- )
- return f
+ return load_default_imagefont()
| diff --git a/Tests/test_imagefontpil.py b/Tests/test_imagefontpil.py
index c4a39d1faf2..695aecbded2 100644
--- a/Tests/test_imagefontpil.py
+++ b/Tests/test_imagefontpil.py
@@ -9,51 +9,57 @@
from .helper import assert_image_equal_tofile
-original_core = ImageFont.core
-
-
-def setup_module() -> None:
- if features.check_module("freetype2"):
- ImageFont.core = _util.DeferredError(ImportError("Disabled for testing"))
-
-
-def teardown_module() -> None:
- ImageFont.core = original_core
+fonts = [ImageFont.load_default_imagefont()]
+if not features.check_module("freetype2"):
+ default_font = ImageFont.load_default()
+ if isinstance(default_font, ImageFont.ImageFont):
+ fonts.append(default_font)
-def test_default_font() -> None:
[email protected]("font", fonts)
+def test_default_font(font: ImageFont.ImageFont) -> None:
# Arrange
txt = 'This is a "better than nothing" default font.'
im = Image.new(mode="RGB", size=(300, 100))
draw = ImageDraw.Draw(im)
# Act
- default_font = ImageFont.load_default()
- draw.text((10, 10), txt, font=default_font)
+ draw.text((10, 10), txt, font=font)
# Assert
assert_image_equal_tofile(im, "Tests/images/default_font.png")
-def test_size_without_freetype() -> None:
- with pytest.raises(ImportError):
- ImageFont.load_default(size=14)
+def test_without_freetype() -> None:
+ original_core = ImageFont.core
+ if features.check_module("freetype2"):
+ ImageFont.core = _util.DeferredError(ImportError("Disabled for testing"))
+ try:
+ with pytest.raises(ImportError):
+ ImageFont.truetype("Tests/fonts/FreeMono.ttf")
+
+ assert isinstance(ImageFont.load_default(), ImageFont.ImageFont)
+
+ with pytest.raises(ImportError):
+ ImageFont.load_default(size=14)
+ finally:
+ ImageFont.core = original_core
-def test_unicode() -> None:
[email protected]("font", fonts)
+def test_unicode(font: ImageFont.ImageFont) -> None:
# should not segfault, should return UnicodeDecodeError
# issue #2826
- font = ImageFont.load_default()
with pytest.raises(UnicodeEncodeError):
font.getbbox("’")
-def test_textbbox() -> None:
[email protected]("font", fonts)
+def test_textbbox(font: ImageFont.ImageFont) -> None:
im = Image.new("RGB", (200, 200))
d = ImageDraw.Draw(im)
- default_font = ImageFont.load_default()
- assert d.textlength("test", font=default_font) == 24
- assert d.textbbox((0, 0), "test", font=default_font) == (0, 0, 24, 11)
+ assert d.textlength("test", font=font) == 24
+ assert d.textbbox((0, 0), "test", font=font) == (0, 0, 24, 11)
def test_decompression_bomb() -> None:
@@ -76,8 +82,3 @@ def test_oom() -> None:
font = ImageFont.ImageFont()
font._load_pilfont_data(fp, Image.new("L", (1, 1)))
font.getmask("A" * 1_000_000)
-
-
-def test_freetypefont_without_freetype() -> None:
- with pytest.raises(ImportError):
- ImageFont.truetype("Tests/fonts/FreeMono.ttf")
| New (since 10.1.0) font display is worse than "better than nothing font" for small sizes
I'm using a small (128x32) [OLED display](https://www.adafruit.com/product/3527), which is setup as 4 lines of text on a Raspberry Pi 5 running Ubuntu Server 24.04 LTS.
### What did you do?
Upgraded my version of pillow (to any version from 10.1.0 or later)
### What did you expect to happen?
My display to be readable.
### What actually happened?
Some text is unreadable. In particular, the 6's look almost the same as 8's
### What are your OS, Python and Pillow versions?
* OS: Ubuntu 22.04 and 24.04
* Python: 3.9.19, 3.10.12, 3.12.3
* Pillow: 10.3.0
```text
Pillow 10.3.0
Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0]
--------------------------------------------------------------------
Python executable is /home/dhylands/adafruit-oled-ssd1306/.direnv/python-3.12.3/bin/python3
Environment Python files loaded from /home/dhylands/adafruit-oled-ssd1306/.direnv/python-3.12.3
System Python files loaded from /usr
--------------------------------------------------------------------
Python Pillow modules loaded from /home/dhylands/adafruit-oled-ssd1306/.direnv/python-3.12.3/lib/python3.12/site-packages/PIL
Binary Pillow modules loaded from /home/dhylands/adafruit-oled-ssd1306/.direnv/python-3.12.3/lib/python3.12/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 10.3.0
*** TKINTER support not installed
--- FREETYPE2 support ok, loaded 2.13.2
--- LITTLECMS2 support ok, loaded 2.16
--- WEBP support ok, loaded 1.3.2
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for libjpeg-turbo 3.0.2
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.3
--- LIBTIFF support ok, loaded 4.6.0
--- RAQM (Bidirectional Text) support ok, loaded 0.10.1, fribidi 1.0.13, harfbuzz 8.4.0
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------
```
<!--
Please include **code** that reproduces the issue and whenever possible, an **image** that demonstrates the issue. Please upload images to GitHub, not to third-party file hosting sites. If necessary, add the image to a zip or tar archive.
The best reproductions are self-contained scripts with minimal dependencies. If you are using a framework such as Plone, Django, or Buildout, try to replicate the issue just using Pillow.
-->
```python
from PIL import Image, ImageFont, ImageDraw
font = ImageFont.load_default(size=10)
line1 = "IP: 192.168.1.4"
line2 = "CPU load: 0.15"
line3 = "Mem: 341/7942 MB 4.29%"
line4 = "Disk: 2/58 GB 5%"
top = -2
image = Image.new("1", (128, 32))
draw = ImageDraw.Draw(image)
draw.rectangle((0, 0, 128, 32), outline=0, fill=0)
draw.text((0, top + 0), line1, font=font, fill=255)
draw.text((0, top + 8), line2, font=font, fill=255)
draw.text((0, top + 16), line3, font=font, fill=255)
draw.text((0, top + 25), line4, font=font, fill=255)
image.save("display.png")
```
Image from version 10.0.1 using `ImageFont.load_default()`

Image from version 10.3.0 using `ImageFont.load_default()` (same results seen using 10.1.0 or later)

Image from 10.3.0 using `ImageFont.load_default(size=8)`

Image from 10.3.0 using `ImageFont.load_default(size=9)`

Image from 10.3.0 using `ImageFont.load_default(size=10)`

| If our default font isn't suitable for your purposes, would the easiest solution not be to simply find another font to use? Or are you requesting that provide a way to access to the previous default font?
I guess I'm asking for a way to access the previous default font.
I'm dubious that raterizing a vector font is going to give decent results for characters that are only 8 pixels high, but I'm not a font expert. | 2024-05-27T07:09:52Z | 2024-06-28T06:18:55Z | [] | [] | ["Tests/test_imagefontpil.py::test_textbbox[font1]", "Tests/test_imagefontpil.py::test_default_font[font0]", "Tests/test_imagefontpil.py::test_oom", "Tests/test_imagefontpil.py::test_unicode[font0]", "Tests/test_imagefontpil.py::test_textbbox[font0]", "Tests/test_imagefontpil.py::test_without_freetype", "Tests/test_imagefontpil.py::test_default_font[font1]", "Tests/test_imagefontpil.py::test_unicode[font1]", "Tests/test_imagefontpil.py::test_decompression_bomb"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.5.4", "distlib==0.3.8", "filelock==3.15.4", "iniconfig==2.0.0", "packaging==24.1", "pip==24.1.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.2.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.15.1", "uv==0.2.17", "virtualenv==20.26.3", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8063 | d879f397112d1cb50af7d27f16eaf2c7bb221043 | diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst
index 0d9b4d93d77..f25c9cd9d46 100644
--- a/docs/reference/Image.rst
+++ b/docs/reference/Image.rst
@@ -374,6 +374,11 @@ Constants
Set to 89,478,485, approximately 0.25GB for a 24-bit (3 bpp) image.
See :py:meth:`~PIL.Image.open` for more information about how this is used.
+.. data:: WARN_POSSIBLE_FORMATS
+
+ Set to false. If true, when an image cannot be identified, warnings will be raised
+ from formats that attempted to read the data.
+
Transpose methods
^^^^^^^^^^^^^^^^^
diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index 958b95e3b0f..514a543c2d3 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -76,6 +76,8 @@ class DecompressionBombError(Exception):
pass
+WARN_POSSIBLE_FORMATS: bool = False
+
# Limit to around a quarter gigabyte for a 24-bit (3 bpp) image
MAX_IMAGE_PIXELS: int | None = int(1024 * 1024 * 1024 // 4 // 3)
@@ -3344,7 +3346,7 @@ def open(
preinit()
- accept_warnings: list[str] = []
+ warning_messages: list[str] = []
def _open_core(
fp: IO[bytes],
@@ -3360,17 +3362,15 @@ def _open_core(
factory, accept = OPEN[i]
result = not accept or accept(prefix)
if isinstance(result, str):
- accept_warnings.append(result)
+ warning_messages.append(result)
elif result:
fp.seek(0)
im = factory(fp, filename)
_decompression_bomb_check(im.size)
return im
- except (SyntaxError, IndexError, TypeError, struct.error):
- # Leave disabled by default, spams the logs with image
- # opening failures that are entirely expected.
- # logger.debug("", exc_info=True)
- continue
+ except (SyntaxError, IndexError, TypeError, struct.error) as e:
+ if WARN_POSSIBLE_FORMATS:
+ warning_messages.append(i + " opening failed. " + str(e))
except BaseException:
if exclusive_fp:
fp.close()
@@ -3395,7 +3395,7 @@ def _open_core(
if exclusive_fp:
fp.close()
- for message in accept_warnings:
+ for message in warning_messages:
warnings.warn(message)
msg = "cannot identify image file %r" % (filename if filename else fp)
raise UnidentifiedImageError(msg)
| diff --git a/Tests/test_image.py b/Tests/test_image.py
index 742d0dfe406..a03e5eced07 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -116,6 +116,15 @@ def test_open_formats(self) -> None:
assert im.mode == "RGB"
assert im.size == (128, 128)
+ def test_open_verbose_failure(self, monkeypatch: pytest.MonkeyPatch) -> None:
+ monkeypatch.setattr(Image, "WARN_POSSIBLE_FORMATS", True)
+
+ im = io.BytesIO(b"")
+ with pytest.warns(UserWarning):
+ with pytest.raises(UnidentifiedImageError):
+ with Image.open(im):
+ pass
+
def test_width_height(self) -> None:
im = Image.new("RGB", (1, 2))
assert im.width == 1
| cannot identify image file (PNG file from scanner)
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/questions/tagged/python-imaging-library
Do not ask a question in both places.
If you think you have found a bug or have an unexplained exception
then file a bug report here.
2. Bug report: include a self-contained, copy-pastable example that
generates the issue if possible. Be concise with code posted.
Guidelines on how to provide a good bug report:
* https://stackoverflow.com/help/mcve
Bug reports which follow these guidelines are easier to diagnose,
and are often handled much more quickly.
3. Feature request: do a quick search of existing issues
to make sure this has not been asked before.
We know asking good questions takes effort, and we appreciate your time.
Thank you.
-->
### What did you do?
`img = Image.open(path) # I open a file in a script`
### What did you expect to happen?
script open file with script will continue execution
### What actually happened?
an error occurs:
```
File "/usr/local/lib/python3.9/dist-packages/PIL/Image.py", line 3339, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file '/var/www/python_for_site/bug.png'
```
### What are your OS, Python and Pillow versions?
* OS: Debian 11
* Python: Python 3.9.2
* Pillow: 10.3.0
```text
Please paste here the output of running:
> python3 -m PIL.report
--------------------------------------------------------------------
Pillow 10.3.0
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
--------------------------------------------------------------------
Python executable is /usr/bin/python3
System Python files loaded from /usr
--------------------------------------------------------------------
Python Pillow modules loaded from /usr/local/lib/python3.9/dist-packages/PIL
Binary Pillow modules loaded from /usr/local/lib/python3.9/dist-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 10.3.0
*** TKINTER support not installed
--- FREETYPE2 support ok, loaded 2.13.2
--- LITTLECMS2 support ok, loaded 2.16
--- WEBP support ok, loaded 1.3.2
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for libjpeg-turbo 3.0.2
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.2
--- ZLIB (PNG/ZIP) support ok, loaded 1.2.11
--- LIBTIFF support ok, loaded 4.6.0
--- RAQM (Bidirectional Text) support ok, loaded 0.10.1, fribidi 1.0.8, harfbuzz 8.4.0
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------
```
My Code:
```python
from PIL import Image
image_path = "bug.png"
image = Image.open(image_path)
width, height = image.size
print("width:", width, "px")
print("height:", height, "px")
```
I worked a lot with files, but I can’t open this file even though it’s normal. I can’t open a single file that I scan on a scanner in PNG format.
[cannot_identify_image_file.zip](https://github.com/python-pillow/Pillow/files/15040644/cannot_identify_image_file.zip)
| If I run [pngcheck](http://www.libpng.org/pub/png/apps/pngcheck.html) over your image, I get
> CRC error in chunk pHYs (computed eee74573, expected c76fa864)
To skip the check in Pillow, use
```python
from PIL import Image, ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
image_path = "bug.png"
image = Image.open(image_path)
```
Same issue with `convert`, although macOS Preview opens it.
```
% convert bug.png bug.png
convert: pHYs: CRC error `bug.png' @ warning/png.c/MagickPNGWarningHandler/1526.
```
Actually, `convert` fixes it:
```
% convert bug.png bug.png
convert: pHYs: CRC error `bug.png' @ warning/png.c/MagickPNGWarningHandler/1526.
% pngcheck bug.png
OK: bug.png (579x864, 24-bit RGB, non-interlaced, 57.7%).
% convert bug.png bug.png
%
```
`ImageFile.LOAD_TRUNCATED_IMAGES = True`
This code helps solve the issue, but it's crucial to ensure there won't be any issues when processing the image further. Could this code affect the functionality, potentially causing problems down the line?
Apart from skipping some checks with PNGs, the other behaviour of `LOAD_TRUNCATED_IMAGES` is to try and load images that end prematurely.
The internal Pillow data will not be in a corrupted state, no, all operations on the loaded image will be as valid as they ever were. This is just ignoring the fact that the pixels being read from the image are perhaps not what they are supposed to be.
Okay, thanks for the help. The problem in the scanner that cannot correctly calculate the control amount for the file. You can make changes to the code so that there is no error and the message was shown - the file is damaged and has not the right CRC? If there is a message about the CRC problem, and not the error will be better and more understandable then.
You're requesting that we only raise a warning in this situation?
If the image is corrupted or ends prematurely, I think we both agree that users should know there is something wrong. Whether the user would want to continue using a flawed image anyway is [a matter of personal preference](https://github.com/python-pillow/Pillow/pull/1428#issue-106627384), and so there is a setting for it. I'd like there to be a stronger argument before changing Pillow's default setting.
The meaning behind `UnidentifiedImageError` is documented, specifically mentioning this PNG behaviour - https://pillow.readthedocs.io/en/stable/PIL.html#PIL.UnidentifiedImageError
As some background, the error behaviour has been here since the fork from PIL. It was only #1991 that allowed `LOAD_TRUNCATED_IMAGES` to workaround it.
You might be interested to know that
```python
from PIL import PngImagePlugin
PngImagePlugin.PngImageFile("bug.png")
```
will show you the SyntaxError directly.
```pytb
Traceback (most recent call last):
File "demo.py", line 6, in <module>
PngImagePlugin.PngImageFile("bug.png")
File "PIL/ImageFile.py", line 137, in __init__
self._open()
File "PIL/PngImagePlugin.py", line 733, in _open
self.png.crc(cid, s)
File "PIL/PngImagePlugin.py", line 209, in crc
raise SyntaxError(msg)
SyntaxError: broken PNG file (bad header checksum in b'pHYs')
```
Agree this is an error and we're not going to change to warning. Also super-interesting that the `PngImagePlugin` raises `SyntaxError` and reveals the bad checksum. The only change I'd consider making here is to add an option similar to `LOAD_TRUNCATED_IMAGES` to enable more verbose output from Pillow when the image plugin [fails to return an open image to `ImagePlugin._open`](https://github.com/python-pillow/Pillow/issues/1888#issue-153265584). Not sure what that would look like or if there are any existing verbose options in Pillow, but something like `--show-me-what-really-happened`.
Okay, let it show an error, but not just “**_cannot identify image file_**”. Let there be a more detailed and understandable error, just change only the text of the error message to: “**_cannot identify image file, the file is damaged, the file has an incorrect CRC signature_**”
That's not as easy as it sounds.
By default, Pillow [checks your image](https://github.com/python-pillow/Pillow/blob/eee633cb217b201cf143d0b813e31c6ae9b08284/src/PIL/Image.py#L3322-L3340) against multiple formats. Some formats can be easily rejected because your image data does not start with the [required identifier](https://en.wikipedia.org/wiki/Magic_number_(programming)#In_files), but not all.
So if I adjust Pillow to print out the errors raised by any formats against your image
```diff
diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index c65cf3850..ab41f525f 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -3333,10 +3333,11 @@ def open(
im = factory(fp, filename)
_decompression_bomb_check(im.size)
return im
- except (SyntaxError, IndexError, TypeError, struct.error):
+ except (SyntaxError, IndexError, TypeError, struct.error) as e:
# Leave disabled by default, spams the logs with image
# opening failures that are entirely expected.
# logger.debug("", exc_info=True)
+ print(i+": "+str(e))
continue
except BaseException:
if exclusive_fp:
```
I get
```
PNG: broken PNG file (bad header checksum in b'pHYs')
IM: Syntax error in IM header: �PNG
IMT: not identified by this driver
IPTC: invalid IPTC/NAA file
MPEG: not an MPEG file
PCD: not a PCD file
SPIDER: not a valid Spider file
TGA: not a TGA file
```
I imagine you don't want to see all of that.
> I imagine you don't want to see all of that.
This is how it became clearer, let there be more messages to understand where the error is and how to fix it.
Those messages would show even if the image opened successfully, because all of the other attempted formats would print their failures.
> I imagine you don't want to see all of that.
I think I'd like to be able to say `Image.verbose = True` and see all that, but I expect that also may not be as easy as it sounds to implement.
It looks like warnings are added to a list that gets shown at the end if the image can't be opened. Exception messages could probably be treated similarly.
I've created https://github.com/python-pillow/Pillow/pull/8033 to allow `Image.open("bug.png", warn_possible_formats=True)` to show the various exceptions as warnings, but only if the image is not able to be opened successfully. See what you think.
I'm not sure about the scalability of adding Boolean flags here and there.
How about adding it to a logger?
I feel the concern about scalability, but as for a logger, as @nulano [pointed out](https://github.com/python-pillow/Pillow/pull/8033#discussion_r1584243182), this is something that previously existed, but was removed in #1423.
https://github.com/python-pillow/Pillow/blob/ddbf08fa78a1aeac83c8295b071f15c722615326/src/PIL/Image.py#L3343-L3347
I am cautious about making decisions and then undoing them. @wiredfool, as the author of #1423, do you have any thoughts on this?
This is a "nice to have" so I wouldn't add anything for logging or to increase verbose output unless "no other way forward". In this case, it's unfortunate to not get the appropriate information right away, but certainly not critical for us to fix it.
While I'm not sure we should do either of these, I have thought of two options:
* Add a global setting (similar to MAX_IMAGE_PIXELS) - I agree that a new function parameter for debugging is not very scalable, but a global setting (perhaps even reused from other functions) would not complicate the interface too much.
* Append all detected issues to the raised UnidentifiedImageError, e.g.:
```
File "/usr/local/lib/python3.9/dist-packages/PIL/Image.py", line 3339, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file '/var/www/python_for_site/bug.png'
The following warnings were raised while attempting to open the file:
PNG: broken PNG file (bad header checksum in b'pHYs')
IM: Syntax error in IM header: �PNG
IMT: not identified by this driver
IPTC: invalid IPTC/NAA file
MPEG: not an MPEG file
PCD: not a PCD file
SPIDER: not a valid Spider file
TGA: not a TGA file
```
> * Add a global setting (similar to MAX_IMAGE_PIXELS) - I agree that a new function parameter for debugging is not very scalable, but a global setting (perhaps even reused from other functions) would not complicate the interface too much.
Right, global setting is what I suggested [here](https://github.com/python-pillow/Pillow/issues/7993#issuecomment-2067655321) too.
> Append all detected issues to the raised UnidentifiedImageError
If you append based on the global setting, probably OK. If not, probably not.
| 2024-05-16T07:51:54Z | 2024-06-28T06:18:10Z | ["Tests/test_image.py::TestImage::test_dump", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16B]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16N]", "Tests/test_image.py::TestImage::test_storage_neg", "Tests/test_image.py::TestImage::test_exif_jpeg", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[LAB]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[LA]", "Tests/test_image.py::TestImage::test_radial_gradient[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[HSV]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[CMYK]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[LAB]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBA]", "Tests/test_image.py::TestImage::test_radial_gradient[P]", "Tests/test_image.py::TestImage::test_effect_spread_zero", "Tests/test_image.py::TestImage::test_no_new_file_on_error", "Tests/test_image.py::TestImage::test_image_modes_success[RGB]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16]", "Tests/test_image.py::TestImage::test_getbands", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow2.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGB]", "Tests/test_image.py::TestImage::test_getbbox", "Tests/test_image.py::TestImage::test_image_modes_success[I;16]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;24]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBa]", "Tests/test_image.py::TestImage::test_image_modes_success[F]", "Tests/test_image.py::TestImage::test_readonly_save", "Tests/test_image.py::TestImage::test_remap_palette_transparency", "Tests/test_image.py::TestImage::test_exif_ifd1", "Tests/test_image.py::TestImage::test_image_modes_fail[very very long]", "Tests/test_image.py::TestImage::test_register_open_duplicates", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;15]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBA]", "Tests/test_image.py::TestImage::test_getchannel_wrong_params", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16]", "Tests/test_image.py::TestImage::test_registered_extensions", "Tests/test_image.py::TestRegistry::test_encode_registry", "Tests/test_image.py::TestImage::test_register_extensions", "Tests/test_image.py::TestImage::test_linear_gradient[P]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;15]", "Tests/test_image.py::TestImage::test_width_height", "Tests/test_image.py::TestImage::test_fp_name", "Tests/test_image.py::TestImage::test_radial_gradient[L]", "Tests/test_image.py::TestImage::test_overrun[fli_overrun.bin]", "Tests/test_image.py::TestImage::test_image_modes_success[LAB]", "Tests/test_image.py::TestImage::test_comparison_with_other_type", "Tests/test_image.py::TestImage::test_alpha_composite", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16N]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[PA]", "Tests/test_image.py::TestImage::test_image_modes_success[L]", "Tests/test_image.py::TestImage::test_exit_fp", "Tests/test_image.py::TestImage::test_image_modes_success[I;16B]", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun2.bin]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;24]", "Tests/test_image.py::TestImage::test_ne", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[LA]", "Tests/test_image.py::TestImage::test_zero_tobytes[size1]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16L]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[P]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGB]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-#DDEEFF]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[1]", "Tests/test_image.py::TestImage::test_zero_tobytes[size2]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBA]", "Tests/test_image.py::TestImage::test_expand_x", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16B]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16B]", "Tests/test_image.py::TestImage::test_effect_spread", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGBA-color2]", "Tests/test_image.py::TestImage::test_effect_noise", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[F]", "Tests/test_image.py::TestImage::test_linear_gradient_wrong_mode", "Tests/test_image.py::TestImage::test_open_formats", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[1]", "Tests/test_image.py::TestImage::test_constants", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[La]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I;16N]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;24]", "Tests/test_image.py::TestImage::test_image_modes_success[PA]", "Tests/test_image.py::TestImage::test_zero_frombytes[size0]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[F]", "Tests/test_image.py::TestImage::test_linear_gradient[F]", "Tests/test_image.py::TestImage::test_expand_xy", "Tests/test_image.py::TestImage::test_registered_extensions_uninitialized", "Tests/test_image.py::TestImage::test_empty_exif", "Tests/test_image.py::TestImage::test_image_modes_success[YCbCr]", "Tests/test_image.py::TestImage::test_image_modes_success[La]", "Tests/test_image.py::TestImage::test_tempfile", "Tests/test_image.py::TestImage::test_load_on_nonexclusive_multiframe", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[La]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[CMYK]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[L]", "Tests/test_image.py::TestImage::test_close_graceful", "Tests/test_image.py::TestImage::test_image_modes_success[I;16N]", "Tests/test_image.py::TestImage::test_exif_load_from_fp", "Tests/test_image.py::TestImage::test_overrun[01r_00.pcx]", "Tests/test_image.py::TestImage::test_radial_gradient[F]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun.bin]", "Tests/test_image.py::TestImage::test_one_item_tuple", "Tests/test_image.py::TestImage::test_exif_png", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow.bin]", "Tests/test_image.py::TestImage::test_zero_frombytes[size1]", "Tests/test_image.py::TestImage::test_image_modes_success[CMYK]", "Tests/test_image.py::TestImage::test_exception_inheritance", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBA]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBa]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[I]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;15]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[F]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBX]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[P]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[PA]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;24]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-color1]", "Tests/test_image.py::TestImage::test_unknown_extension", "Tests/test_image.py::TestImage::test_exif_hide_offsets", "Tests/test_image.py::TestImage::test_getchannel", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[HSV]", "Tests/test_image.py::TestImage::test_internals", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[YCbCr]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[CMYK]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[YCbCr]", "Tests/test_image.py::TestImage::test_overrun[ossfuzz-4836216264589312.pcx]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I;16L]", "Tests/test_image.py::TestImage::test_zero_tobytes[size0]", "Tests/test_image.py::TestImage::test_image_modes_success[I]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[PA]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[RGBa]", "Tests/test_image.py::TestImage::test_effect_mandelbrot_bad_arguments", "Tests/test_image.py::TestImage::test_zero_frombytes[size2]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGB]", "Tests/test_image.py::TestImage::test_image_modes_fail[]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[I]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[HSV]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[BGR;16]", "Tests/test_image.py::TestImage::test_effect_mandelbrot", "Tests/test_image.py::TestImage::test_set_mode", "Tests/test_image.py::TestImage::test_stringio", "Tests/test_image.py::TestRegistry::test_encode_registry_fail", "Tests/test_image.py::TestImage::test_invalid_image", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[L]", "Tests/test_image.py::TestImage::test_image_modes_success[HSV]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[P]", "Tests/test_image.py::TestImage::test_empty_image[size1]", "Tests/test_image.py::TestImage::test_sanity", "Tests/test_image.py::TestImage::test_fli_overrun2", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[La]", "Tests/test_image.py::TestImage::test_apply_transparency", "Tests/test_image.py::TestImage::test_check_size", "Tests/test_image.py::TestImage::test__new", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[BGR;16]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBX]", "Tests/test_image.py::TestImage::test_repr_pretty", "Tests/test_image.py::TestImage::test_image_modes_success[LA]", "Tests/test_image.py::TestImage::test_linear_gradient[I]", "Tests/test_image.py::TestImage::test_has_transparency_data", "Tests/test_image.py::TestImage::test_image_modes_fail[bad]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[LA]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[L]", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[I;16]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[LAB]", "Tests/test_image.py::TestImage::test_no_resource_warning_on_save", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_constructor[RGBX]", "Tests/test_image.py::TestImage::test_exif_interop", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[RGBa]", "Tests/test_image.py::TestImage::test_bad_mode", "Tests/test_image.py::TestImage::test_remap_palette", "Tests/test_image.py::TestImage::test_image_modes_success[RGBX]", "Tests/test_image.py::TestImageBytes::test_getdata_putdata[1]", "Tests/test_image.py::TestImage::test_image_modes_success[P]", "Tests/test_image.py::TestImage::test_image_modes_success[1]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16L]", "Tests/test_image.py::TestImage::test_exif_ifd", "Tests/test_image.py::TestImage::test_radial_gradient_wrong_mode", "Tests/test_image.py::TestImage::test_alpha_inplace", "Tests/test_image.py::TestImageBytes::test_roundtrip_bytes_method[YCbCr]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;15]"] | [] | ["Tests/test_image.py::TestImage::test_open_verbose_failure"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.5.4", "distlib==0.3.8", "filelock==3.15.4", "iniconfig==2.0.0", "packaging==24.1", "pip==24.1.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.2.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.15.1", "uv==0.2.17", "virtualenv==20.26.3", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8104 | 48a921b31f4d1b84ed9b93d3ba2a8061366e8229 | diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py
index d723c199283..d2834929b8f 100644
--- a/src/PIL/PngImagePlugin.py
+++ b/src/PIL/PngImagePlugin.py
@@ -1115,7 +1115,7 @@ def write(self, data: bytes) -> None:
def _write_multiple_frames(im, fp, chunk, mode, rawmode, default_image, append_images):
- duration = im.encoderinfo.get("duration", im.info.get("duration", 0))
+ duration = im.encoderinfo.get("duration")
loop = im.encoderinfo.get("loop", im.info.get("loop", 0))
disposal = im.encoderinfo.get("disposal", im.info.get("disposal", Disposal.OP_NONE))
blend = im.encoderinfo.get("blend", im.info.get("blend", Blend.OP_SOURCE))
@@ -1136,6 +1136,8 @@ def _write_multiple_frames(im, fp, chunk, mode, rawmode, default_image, append_i
encoderinfo = im.encoderinfo.copy()
if isinstance(duration, (list, tuple)):
encoderinfo["duration"] = duration[frame_count]
+ elif duration is None and "duration" in im_frame.info:
+ encoderinfo["duration"] = im_frame.info["duration"]
if isinstance(disposal, (list, tuple)):
encoderinfo["disposal"] = disposal[frame_count]
if isinstance(blend, (list, tuple)):
@@ -1170,15 +1172,12 @@ def _write_multiple_frames(im, fp, chunk, mode, rawmode, default_image, append_i
not bbox
and prev_disposal == encoderinfo.get("disposal")
and prev_blend == encoderinfo.get("blend")
+ and "duration" in encoderinfo
):
- previous["encoderinfo"]["duration"] += encoderinfo.get(
- "duration", duration
- )
+ previous["encoderinfo"]["duration"] += encoderinfo["duration"]
continue
else:
bbox = None
- if "duration" not in encoderinfo:
- encoderinfo["duration"] = duration
im_frames.append({"im": im_frame, "bbox": bbox, "encoderinfo": encoderinfo})
if len(im_frames) == 1 and not default_image:
@@ -1208,7 +1207,7 @@ def _write_multiple_frames(im, fp, chunk, mode, rawmode, default_image, append_i
im_frame = im_frame.crop(bbox)
size = im_frame.size
encoderinfo = frame_data["encoderinfo"]
- frame_duration = int(round(encoderinfo["duration"]))
+ frame_duration = int(round(encoderinfo.get("duration", 0)))
frame_disposal = encoderinfo.get("disposal", disposal)
frame_blend = encoderinfo.get("blend", blend)
# frame control
| diff --git a/Tests/test_file_apng.py b/Tests/test_file_apng.py
index 1b393a3ff5d..e95850212a5 100644
--- a/Tests/test_file_apng.py
+++ b/Tests/test_file_apng.py
@@ -706,10 +706,21 @@ def test_different_modes_in_later_frames(
assert reloaded.mode == mode
-def test_apng_repeated_seeks_give_correct_info() -> None:
+def test_different_durations(tmp_path: Path) -> None:
+ test_file = str(tmp_path / "temp.png")
+
with Image.open("Tests/images/apng/different_durations.png") as im:
- for i in range(3):
+ for _ in range(3):
im.seek(0)
assert im.info["duration"] == 4000
+
im.seek(1)
assert im.info["duration"] == 1000
+
+ im.save(test_file, save_all=True)
+
+ with Image.open(test_file) as reloaded:
+ assert reloaded.info["duration"] == 4000
+
+ reloaded.seek(1)
+ assert reloaded.info["duration"] == 1000
| Saving to apng has wrong durations
Using https://github.com/python-pillow/Pillow/blob/main/Tests/images/apng/different_durations.png
```python
from PIL import Image, ImageSequence
ddp = Image.open('different_durations.png')
print([frame.info.get('duration') for frame in ImageSequence.Iterator(ddp)]) # [4000.0, 1000.0]
ddp.save('different_durations.gif',save_all=True)
ddg = Image.open('different_durations.gif')
print([frame.info.get('duration') for frame in ImageSequence.Iterator(ddg)]) # [4000, 1000]
ddg.save('same_durations.png',save_all=True)
sdp = Image.open('same_durations.png')
print([frame.info.get('duration') for frame in ImageSequence.Iterator(sdp)]) # [1000.0, 1000.0]
```
Also, ImageMagick (version 7.1.1-33) says the duration of the second frame is actually 990, not 1000.
```sh
> magick identify -format %T\n apng:different_durations.png
400
99
```
I'm not sure what's going on there though, because the duration parsing isn't complicated.
https://github.com/python-pillow/Pillow/blob/219add02393d6e63276286908ecd9014271c941c/src/PIL/PngImagePlugin.py#L669-L672
| 2024-06-04T08:58:00Z | 2024-06-25T18:58:32Z | ["Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGBA]", "Tests/test_file_apng.py::test_apng_num_plays", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGB]", "Tests/test_file_apng.py::test_apng_chunk_errors", "Tests/test_file_apng.py::test_apng_save", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat.png]", "Tests/test_file_apng.py::test_apng_blend_transparency", "Tests/test_file_apng.py::test_apng_basic", "Tests/test_file_apng.py::test_apng_save_disposal_previous", "Tests/test_file_apng.py::test_apng_save_split_fdat", "Tests/test_file_apng.py::test_apng_mode", "Tests/test_file_apng.py::test_apng_dispose_op_previous_frame", "Tests/test_file_apng.py::test_apng_save_duration_loop", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat_chunk.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder_chunk.png]", "Tests/test_file_apng.py::test_apng_save_size", "Tests/test_file_apng.py::test_apng_blend", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_gap.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder.png]", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat_zero_chunk.png]", "Tests/test_file_apng.py::test_seek_after_close", "Tests/test_file_apng.py::test_apng_delay", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-P]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-RGBA]", "Tests/test_file_apng.py::test_apng_dispose", "Tests/test_file_apng.py::test_apng_syntax_errors", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_fdat_fctl.png]", "Tests/test_file_apng.py::test_apng_chunk_order", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-P]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGB]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-RGB]", "Tests/test_file_apng.py::test_apng_dispose_op_background_p_mode", "Tests/test_file_apng.py::test_apng_save_alpha", "Tests/test_file_apng.py::test_apng_save_blend", "Tests/test_file_apng.py::test_apng_save_disposal", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_start.png]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-P]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-RGB]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGBA]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-RGBA]", "Tests/test_file_apng.py::test_apng_dispose_region"] | [] | ["Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-P]", "Tests/test_file_apng.py::test_different_durations"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.5.4", "distlib==0.3.8", "filelock==3.15.4", "iniconfig==2.0.0", "packaging==24.1", "pip==24.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.2.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.15.1", "uv==0.2.15", "virtualenv==20.26.3", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-8087 | bbe1effd63149eb3d43d59efb5fe2659f93700d0 | diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py
index 0d5751962c0..6b6c01d1b8e 100644
--- a/src/PIL/PngImagePlugin.py
+++ b/src/PIL/PngImagePlugin.py
@@ -1104,7 +1104,7 @@ def write(self, data: bytes) -> None:
self.seq_num += 1
-def _write_multiple_frames(im, fp, chunk, rawmode, default_image, append_images):
+def _write_multiple_frames(im, fp, chunk, mode, rawmode, default_image, append_images):
duration = im.encoderinfo.get("duration", im.info.get("duration", 0))
loop = im.encoderinfo.get("loop", im.info.get("loop", 0))
disposal = im.encoderinfo.get("disposal", im.info.get("disposal", Disposal.OP_NONE))
@@ -1119,10 +1119,10 @@ def _write_multiple_frames(im, fp, chunk, rawmode, default_image, append_images)
frame_count = 0
for im_seq in chain:
for im_frame in ImageSequence.Iterator(im_seq):
- if im_frame.mode == rawmode:
+ if im_frame.mode == mode:
im_frame = im_frame.copy()
else:
- im_frame = im_frame.convert(rawmode)
+ im_frame = im_frame.convert(mode)
encoderinfo = im.encoderinfo.copy()
if isinstance(duration, (list, tuple)):
encoderinfo["duration"] = duration[frame_count]
@@ -1184,8 +1184,8 @@ def _write_multiple_frames(im, fp, chunk, rawmode, default_image, append_images)
# default image IDAT (if it exists)
if default_image:
- if im.mode != rawmode:
- im = im.convert(rawmode)
+ if im.mode != mode:
+ im = im.convert(mode)
ImageFile._save(im, _idat(fp, chunk), [("zip", (0, 0) + im.size, 0, rawmode)])
seq_num = 0
@@ -1262,6 +1262,7 @@ def _save(im, fp, filename, chunk=putchunk, save_all=False):
size = im.size
mode = im.mode
+ outmode = mode
if mode == "P":
#
# attempt to minimize storage requirements for palette images
@@ -1282,7 +1283,7 @@ def _save(im, fp, filename, chunk=putchunk, save_all=False):
bits = 2
else:
bits = 4
- mode = f"{mode};{bits}"
+ outmode += f";{bits}"
# encoder options
im.encoderconfig = (
@@ -1294,7 +1295,7 @@ def _save(im, fp, filename, chunk=putchunk, save_all=False):
# get the corresponding PNG mode
try:
- rawmode, bit_depth, color_type = _OUTMODES[mode]
+ rawmode, bit_depth, color_type = _OUTMODES[outmode]
except KeyError as e:
msg = f"cannot write mode {mode} as PNG"
raise OSError(msg) from e
@@ -1415,7 +1416,7 @@ def _save(im, fp, filename, chunk=putchunk, save_all=False):
if save_all:
im = _write_multiple_frames(
- im, fp, chunk, rawmode, default_image, append_images
+ im, fp, chunk, mode, rawmode, default_image, append_images
)
if im:
ImageFile._save(im, _idat(fp, chunk), [("zip", (0, 0) + im.size, 0, rawmode)])
| diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py
index 19462dcb5a4..55db5ef852f 100644
--- a/Tests/test_file_png.py
+++ b/Tests/test_file_png.py
@@ -655,11 +655,12 @@ def test_truncated_chunks(self, cid: bytes) -> None:
png.call(cid, 0, 0)
ImageFile.LOAD_TRUNCATED_IMAGES = False
- def test_specify_bits(self, tmp_path: Path) -> None:
+ @pytest.mark.parametrize("save_all", (True, False))
+ def test_specify_bits(self, save_all: bool, tmp_path: Path) -> None:
im = hopper("P")
out = str(tmp_path / "temp.png")
- im.save(out, bits=4)
+ im.save(out, bits=4, save_all=save_all)
with Image.open(out) as reloaded:
assert len(reloaded.png.im_palette[1]) == 48
| Saving all frames of a paletted PNG with few colors can fail
```python
>>> image.save('copy.png',save_all=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\...\.venv\Lib\site-packages\PIL\Image.py", line 2459, in save
save_handler(self, fp, filename)
File "C:\...\.venv\Lib\site-packages\PIL\PngImagePlugin.py", line 1230, in _save_all
_save(im, fp, filename, save_all=True)
File "C:\...\.venv\Lib\site-packages\PIL\PngImagePlugin.py", line 1408, in _save
im = _write_multiple_frames(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\...\.venv\Lib\site-packages\PIL\PngImagePlugin.py", line 1117, in _write_multiple_frames
im_frame = im_frame.convert(rawmode)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\...\.venv\Lib\site-packages\PIL\Image.py", line 1087, in convert
im = self.im.convert(mode, dither)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: conversion not supported
```
The image isn't mine to share, but it's a `P` mode image with only 9 colors. This causes it to hit this bit of code:
https://github.com/python-pillow/Pillow/blob/8b14ed741a1c757734c65535ca1db4ab4162c843/src/PIL/PngImagePlugin.py#L1265-L1285
Which changes `mode` to `P;4`. Then when getting the output rawmode:
https://github.com/python-pillow/Pillow/blob/8b14ed741a1c757734c65535ca1db4ab4162c843/src/PIL/PngImagePlugin.py#L1297
https://github.com/python-pillow/Pillow/blob/8b14ed741a1c757734c65535ca1db4ab4162c843/src/PIL/PngImagePlugin.py#L1052-L1069
It gets a rawmode of `P;4`. This would all be fine, except I passed `True` for the `save_all` parameter, which causes a branch here:
https://github.com/python-pillow/Pillow/blob/8b14ed741a1c757734c65535ca1db4ab4162c843/src/PIL/PngImagePlugin.py#L1415-L1420
Inside `_write_multiple_frames` is this bit of code:
https://github.com/python-pillow/Pillow/blob/8b14ed741a1c757734c65535ca1db4ab4162c843/src/PIL/PngImagePlugin.py#L1122-L1125
Now since the actual image mode is `P`, but the requested rawmode is `P;4`, it tries to convert from `P` to `P;4`, which fails, because `Image.convert()` takes modes, not rawmodes, and `P;4` is not a valid mode.
This method also attempts to convert to a rawmode a bit further on as well:
https://github.com/python-pillow/Pillow/blob/8b14ed741a1c757734c65535ca1db4ab4162c843/src/PIL/PngImagePlugin.py#L1186-L1188
A basic search of the rest of Pillow's code only shows one other instance of ".convert(rawmode)" (in `WebPImagePlugin`), but it's okay in that case because the rawmode is set on the prior line to be either "RGB" or "RGBA".
| I've created #8087 | 2024-05-27T07:37:44Z | 2024-06-25T12:21:44Z | ["Tests/test_file_png.py::TestFilePng::test_verify_not_ignores_crc_error_in_required_chunk", "Tests/test_file_png.py::TestFilePng::test_seek", "Tests/test_file_png.py::TestFilePng::test_save_p_single_transparency", "Tests/test_file_png.py::TestFilePng::test_exif_argument", "Tests/test_file_png.py::TestFilePng::test_roundtrip_no_icc_profile", "Tests/test_file_png.py::TestFilePng::test_trns_null", "Tests/test_file_png.py::TestFilePng::test_repr_png", "Tests/test_file_png.py::TestFilePng::test_broken", "Tests/test_file_png.py::TestFilePng::test_specify_bits[False]", "Tests/test_file_png.py::TestFilePng::test_read_private_chunks", "Tests/test_file_png.py::TestFilePng::test_verify_struct_error", "Tests/test_file_png.py::TestFilePng::test_roundtrip_dpi", "Tests/test_file_png.py::TestFilePng::test_trns_rgb", "Tests/test_file_png.py::TestFilePng::test_truncated_end_chunk", "Tests/test_file_png.py::TestFilePng::test_textual_chunks_after_idat", "Tests/test_file_png.py::TestFilePng::test_save_stdout[True]", "Tests/test_file_png.py::TestFilePng::test_padded_idat", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[acTL]", "Tests/test_file_png.py::TestFilePng::test_getxmp", "Tests/test_file_png.py::TestFilePng::test_getchunks", "Tests/test_file_png.py::TestFilePng::test_sanity", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_palette", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[sRGB]", "Tests/test_file_png.py::TestFilePng::test_bad_ztxt", "Tests/test_file_png.py::TestFilePng::test_trns_p", "Tests/test_file_png.py::TestFilePng::test_load_transparent_rgb", "Tests/test_file_png.py::TestFilePng::test_tell", "Tests/test_file_png.py::TestFilePng::test_nonunicode_text", "Tests/test_file_png.py::TestFilePng::test_roundtrip_text", "Tests/test_file_png.py::TestFilePng::test_exif", "Tests/test_file_png.py::TestFilePng::test_roundtrip_icc_profile", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fcTL]", "Tests/test_file_png.py::TestFilePng::test_bad_itxt", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[pHYs]", "Tests/test_file_png.py::TestFilePng::test_interlace", "Tests/test_file_png.py::TestFilePng::test_save_rgb_single_transparency", "Tests/test_file_png.py::TestFilePng::test_load_verify", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[IHDR]", "Tests/test_file_png.py::TestFilePng::test_load_transparent_p", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_black", "Tests/test_file_png.py::TestFilePng::test_save_icc_profile", "Tests/test_file_png.py::TestFilePng::test_chunk_order", "Tests/test_file_png.py::TestFilePng::test_plte_length", "Tests/test_file_png.py::TestFilePng::test_verify_ignores_crc_error", "Tests/test_file_png.py::TestFilePng::test_discard_icc_profile", "Tests/test_file_png.py::TestFilePng::test_repr_png_error_returns_none", "Tests/test_file_png.py::TestFilePng::test_roundtrip_itxt", "Tests/test_file_png.py::TestFilePng::test_unicode_text", "Tests/test_file_png.py::TestFilePng::test_exif_from_jpg", "Tests/test_file_png.py::TestFilePng::test_invalid_file", "Tests/test_file_png.py::TestFilePng::test_unknown_compression_method", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fdAT]", "Tests/test_file_png.py::TestFilePng::test_bad_text", "Tests/test_file_png.py::TestFilePng::test_save_grayscale_transparency", "Tests/test_file_png.py::TestFilePng::test_scary", "Tests/test_file_png.py::TestFilePng::test_roundtrip_private_chunk", "Tests/test_file_png.py::TestFilePng::test_exif_save", "Tests/test_file_png.py::TestFilePng::test_load_float_dpi", "Tests/test_file_png.py::TestFilePng::test_save_stdout[False]"] | [] | ["Tests/test_file_png.py::TestFilePng::test_specify_bits[True]", "Tests/test_file_png.py::TestTruncatedPngPLeaks::test_leak_load"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.5.4", "distlib==0.3.8", "filelock==3.15.4", "iniconfig==2.0.0", "packaging==24.1", "pip==24.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.2.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.15.1", "uv==0.2.15", "virtualenv==20.26.3", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7948 | f8ec9f7974361c835405daf8a7c5acdf1ff98a8c | diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py
index 8bfcd29075e..c3683efb35e 100644
--- a/src/PIL/TiffImagePlugin.py
+++ b/src/PIL/TiffImagePlugin.py
@@ -1653,6 +1653,16 @@ def _save(im, fp, filename):
except Exception:
pass # might not be an IFD. Might not have populated type
+ legacy_ifd = {}
+ if hasattr(im, "tag"):
+ legacy_ifd = im.tag.to_v2()
+
+ supplied_tags = {**legacy_ifd, **getattr(im, "tag_v2", {})}
+ if SAMPLEFORMAT in supplied_tags:
+ # SAMPLEFORMAT is determined by the image format and should not be copied
+ # from legacy_ifd.
+ del supplied_tags[SAMPLEFORMAT]
+
# additions written by Greg Couch, [email protected]
# inspired by image-sig posting from Kevin Cazabon, [email protected]
if hasattr(im, "tag_v2"):
@@ -1666,8 +1676,14 @@ def _save(im, fp, filename):
XMP,
):
if key in im.tag_v2:
- ifd[key] = im.tag_v2[key]
- ifd.tagtype[key] = im.tag_v2.tagtype[key]
+ if key == IPTC_NAA_CHUNK and im.tag_v2.tagtype[key] not in (
+ TiffTags.BYTE,
+ TiffTags.UNDEFINED,
+ ):
+ del supplied_tags[key]
+ else:
+ ifd[key] = im.tag_v2[key]
+ ifd.tagtype[key] = im.tag_v2.tagtype[key]
# preserve ICC profile (should also work when saving other formats
# which support profiles as TIFF) -- 2008-06-06 Florian Hoech
@@ -1807,16 +1823,6 @@ def _save(im, fp, filename):
# Merge the ones that we have with (optional) more bits from
# the original file, e.g x,y resolution so that we can
# save(load('')) == original file.
- legacy_ifd = {}
- if hasattr(im, "tag"):
- legacy_ifd = im.tag.to_v2()
-
- # SAMPLEFORMAT is determined by the image format and should not be copied
- # from legacy_ifd.
- supplied_tags = {**getattr(im, "tag_v2", {}), **legacy_ifd}
- if SAMPLEFORMAT in supplied_tags:
- del supplied_tags[SAMPLEFORMAT]
-
for tag, value in itertools.chain(ifd.items(), supplied_tags.items()):
# Libtiff can only process certain core items without adding
# them to the custom dictionary.
| diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py
index 8821fb46a84..0bc1e2d0e6b 100644
--- a/Tests/test_file_tiff.py
+++ b/Tests/test_file_tiff.py
@@ -621,6 +621,19 @@ def test_roundtrip_tiff_uint16(self, tmp_path: Path) -> None:
assert_image_equal_tofile(im, tmpfile)
+ def test_iptc(self, tmp_path: Path) -> None:
+ # Do not preserve IPTC_NAA_CHUNK by default if type is LONG
+ outfile = str(tmp_path / "temp.tif")
+ im = hopper()
+ ifd = TiffImagePlugin.ImageFileDirectory_v2()
+ ifd[33723] = 1
+ ifd.tagtype[33723] = 4
+ im.tag_v2 = ifd
+ im.save(outfile)
+
+ with Image.open(outfile) as im:
+ assert 33723 not in im.tag_v2
+
def test_rowsperstrip(self, tmp_path: Path) -> None:
outfile = str(tmp_path / "temp.tif")
im = hopper()
| Saving tiff triggers segfault
### What did you do?
I used the following simple script:
```python
from PIL import Image
img = Image.open("Image00386.tiff")
img.save("toto2.tiff", compression="tiff_deflate")
```
on the file contained in this zip:
https://eroux.fr/Image00386.zip
(too big to upload on the issue, sorry for that)
### What did you expect to happen?
I expected no crash
### What actually happened?
```sh
$ ../pvenv/bin/python3 convert-tiff.py
/home/admin/pvenv/lib/python3.11/site-packages/PIL/TiffImagePlugin.py:652: UserWarning: Metadata Warning, tag 33723 had too many entries: 9, expected 1
warnings.warn(
Segmentation fault
```
### What are your OS, Python and Pillow versions?
* OS: Debian 12
* Python: 3.11.2
* Pillow: 10.2.0
```text
--------------------------------------------------------------------
Pillow 10.2.0
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
--------------------------------------------------------------------
Python modules loaded from /home/admin/pvenv/lib/python3.11/site-packages/PIL
Binary modules loaded from /home/admin/pvenv/lib/python3.11/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 10.2.0
*** TKINTER support not installed
--- FREETYPE2 support ok, loaded 2.13.2
--- LITTLECMS2 support ok, loaded 2.16
--- WEBP support ok, loaded 1.3.2
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for libjpeg-turbo 3.0.1
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.0
--- ZLIB (PNG/ZIP) support ok, loaded 1.2.13
--- LIBTIFF support ok, loaded 4.6.0
--- RAQM (Bidirectional Text) support ok, loaded 0.10.1, fribidi 1.0.8, harfbuzz 8.3.0
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------
BLP
Extensions: .blp
Features: open, save, encode
--------------------------------------------------------------------
BMP image/bmp
Extensions: .bmp
Features: open, save
--------------------------------------------------------------------
BUFR
Extensions: .bufr
Features: open, save
--------------------------------------------------------------------
CUR
Extensions: .cur
Features: open
--------------------------------------------------------------------
DCX
Extensions: .dcx
Features: open
--------------------------------------------------------------------
DDS
Extensions: .dds
Features: open, save
--------------------------------------------------------------------
DIB image/bmp
Extensions: .dib
Features: open, save
--------------------------------------------------------------------
EPS application/postscript
Extensions: .eps, .ps
Features: open, save
--------------------------------------------------------------------
FITS
Extensions: .fit, .fits
Features: open
--------------------------------------------------------------------
FLI
Extensions: .flc, .fli
Features: open
--------------------------------------------------------------------
FTEX
Extensions: .ftc, .ftu
Features: open
--------------------------------------------------------------------
GBR
Extensions: .gbr
Features: open
--------------------------------------------------------------------
GIF image/gif
Extensions: .gif
Features: open, save, save_all
--------------------------------------------------------------------
GRIB
Extensions: .grib
Features: open, save
--------------------------------------------------------------------
HDF5
Extensions: .h5, .hdf
Features: open, save
--------------------------------------------------------------------
ICNS image/icns
Extensions: .icns
Features: open, save
--------------------------------------------------------------------
ICO image/x-icon
Extensions: .ico
Features: open, save
--------------------------------------------------------------------
IM
Extensions: .im
Features: open, save
--------------------------------------------------------------------
IMT
Features: open
--------------------------------------------------------------------
IPTC
Extensions: .iim
Features: open
--------------------------------------------------------------------
JPEG image/jpeg
Extensions: .jfif, .jpe, .jpeg, .jpg
Features: open, save
--------------------------------------------------------------------
JPEG2000 image/jp2
Extensions: .j2c, .j2k, .jp2, .jpc, .jpf, .jpx
Features: open, save
--------------------------------------------------------------------
MCIDAS
Features: open
--------------------------------------------------------------------
MPEG video/mpeg
Extensions: .mpeg, .mpg
Features: open
--------------------------------------------------------------------
MSP
Extensions: .msp
Features: open, save, decode
--------------------------------------------------------------------
PCD
Extensions: .pcd
Features: open
--------------------------------------------------------------------
PCX image/x-pcx
Extensions: .pcx
Features: open, save
--------------------------------------------------------------------
PIXAR
Extensions: .pxr
Features: open
--------------------------------------------------------------------
PNG image/png
Extensions: .apng, .png
Features: open, save, save_all
--------------------------------------------------------------------
PPM image/x-portable-anymap
Extensions: .pbm, .pgm, .pnm, .ppm
Features: open, save
--------------------------------------------------------------------
PSD image/vnd.adobe.photoshop
Extensions: .psd
Features: open
--------------------------------------------------------------------
QOI
Extensions: .qoi
Features: open
--------------------------------------------------------------------
SGI image/sgi
Extensions: .bw, .rgb, .rgba, .sgi
Features: open, save
--------------------------------------------------------------------
SPIDER
Features: open, save
--------------------------------------------------------------------
SUN
Extensions: .ras
Features: open
--------------------------------------------------------------------
TGA image/x-tga
Extensions: .icb, .tga, .vda, .vst
Features: open, save
--------------------------------------------------------------------
TIFF image/tiff
Extensions: .tif, .tiff
Features: open, save, save_all
--------------------------------------------------------------------
WEBP image/webp
Extensions: .webp
Features: open, save, save_all
--------------------------------------------------------------------
WMF
Extensions: .emf, .wmf
Features: open, save
--------------------------------------------------------------------
XBM image/xbm
Extensions: .xbm
Features: open, save
--------------------------------------------------------------------
XPM image/xpm
Extensions: .xpm
Features: open
--------------------------------------------------------------------
XVTHUMB
Features: open
--------------------------------------------------------------------
```
Note that there is no segfault and a good output with the following setting:
```text
--------------------------------------------------------------------
Pillow 9.5.0
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0]
--------------------------------------------------------------------
Python modules loaded from /home/eroux/.local/lib/python3.7/site-packages/PIL
Binary modules loaded from /home/eroux/.local/lib/python3.7/site-packages/PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 9.5.0
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.13.0
--- LITTLECMS2 support ok, loaded 2.15
--- WEBP support ok, loaded 1.3.0
--- WEBP Transparency support ok
--- WEBPMUX support ok
--- WEBP Animation support ok
--- JPEG support ok, compiled for libjpeg-turbo 2.1.5.1
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.0
--- ZLIB (PNG/ZIP) support ok, loaded 1.2.11
--- LIBTIFF support ok, loaded 4.5.0
--- RAQM (Bidirectional Text) support ok, loaded 0.10.0, fribidi 1.0.5, harfbuzz 7.1.0
*** LIBIMAGEQUANT (Quantization method) support not installed
--- XCB (X protocol) support ok
--------------------------------------------------------------------
BLP
Extensions: .blp
Features: open, save, encode
--------------------------------------------------------------------
BMP image/bmp
Extensions: .bmp
Features: open, save
--------------------------------------------------------------------
BUFR
Extensions: .bufr
Features: open, save
--------------------------------------------------------------------
CUR
Extensions: .cur
Features: open
--------------------------------------------------------------------
DCX
Extensions: .dcx
Features: open
--------------------------------------------------------------------
DDS
Extensions: .dds
Features: open, save
--------------------------------------------------------------------
DIB image/bmp
Extensions: .dib
Features: open, save
--------------------------------------------------------------------
EPS application/postscript
Extensions: .eps, .ps
Features: open, save
--------------------------------------------------------------------
FITS
Extensions: .fit, .fits
Features: open, save
--------------------------------------------------------------------
FLI
Extensions: .flc, .fli
Features: open
--------------------------------------------------------------------
FPX
Extensions: .fpx
Features: open
--------------------------------------------------------------------
FTEX
Extensions: .ftc, .ftu
Features: open
--------------------------------------------------------------------
GBR
Extensions: .gbr
Features: open
--------------------------------------------------------------------
GIF image/gif
Extensions: .gif
Features: open, save, save_all
--------------------------------------------------------------------
GRIB
Extensions: .grib
Features: open, save
--------------------------------------------------------------------
HDF5
Extensions: .h5, .hdf
Features: open, save
--------------------------------------------------------------------
ICNS image/icns
Extensions: .icns
Features: open, save
--------------------------------------------------------------------
ICO image/x-icon
Extensions: .ico
Features: open, save
--------------------------------------------------------------------
IM
Extensions: .im
Features: open, save
--------------------------------------------------------------------
IMT
Features: open
--------------------------------------------------------------------
IPTC
Extensions: .iim
Features: open
--------------------------------------------------------------------
JPEG image/jpeg
Extensions: .jfif, .jpe, .jpeg, .jpg
Features: open, save
--------------------------------------------------------------------
JPEG2000 image/jp2
Extensions: .j2c, .j2k, .jp2, .jpc, .jpf, .jpx
Features: open, save
--------------------------------------------------------------------
MCIDAS
Features: open
--------------------------------------------------------------------
MIC
Extensions: .mic
Features: open
--------------------------------------------------------------------
MPEG video/mpeg
Extensions: .mpeg, .mpg
Features: open
--------------------------------------------------------------------
MSP
Extensions: .msp
Features: open, save, decode
--------------------------------------------------------------------
PCD
Extensions: .pcd
Features: open
--------------------------------------------------------------------
PCX image/x-pcx
Extensions: .pcx
Features: open, save
--------------------------------------------------------------------
PIXAR
Extensions: .pxr
Features: open
--------------------------------------------------------------------
PNG image/png
Extensions: .apng, .png
Features: open, save, save_all
--------------------------------------------------------------------
PPM image/x-portable-anymap
Extensions: .pbm, .pgm, .pnm, .ppm
Features: open, save
--------------------------------------------------------------------
PSD image/vnd.adobe.photoshop
Extensions: .psd
Features: open
--------------------------------------------------------------------
QOI
Extensions: .qoi
Features: open
--------------------------------------------------------------------
SGI image/sgi
Extensions: .bw, .rgb, .rgba, .sgi
Features: open, save
--------------------------------------------------------------------
SPIDER
Features: open, save
--------------------------------------------------------------------
SUN
Extensions: .ras
Features: open
--------------------------------------------------------------------
TGA image/x-tga
Extensions: .icb, .tga, .vda, .vst
Features: open, save
--------------------------------------------------------------------
TIFF image/tiff
Extensions: .tif, .tiff
Features: open, save, save_all
--------------------------------------------------------------------
WEBP image/webp
Extensions: .webp
Features: open, save, save_all
--------------------------------------------------------------------
WMF
Extensions: .emf, .wmf
Features: open, save
--------------------------------------------------------------------
XBM image/xbm
Extensions: .xbm
Features: open, save
--------------------------------------------------------------------
XPM image/xpm
Extensions: .xpm
Features: open
--------------------------------------------------------------------
XVTHUMB
Features: open
--------------------------------------------------------------------
```
| The problem is tag 33723. It is specified as LONG in the image, when it should be BYTE or UNDEFINED according to https://www.awaresystems.be/imaging/tiff/tifftags/iptc.html
If I adjust Pillow to not preserve LONG tag 33723 by default, then it starts raising a `RuntimeError` instead.
Is it just the segfault you are concerned about, or do you think the image should save without any error?
Thanks! Ideally it should save without error (it does with the older setting)
What do you mean by 'older setting'?
Oh, you mean Pillow 9.5.0.
yes, Pillow 9.5.0 / libtiff 4.5.0 | 2024-04-06T08:30:14Z | 2024-06-25T11:26:53Z | ["Tests/test_file_tiff.py::TestFileTiff::test_getxmp", "Tests/test_file_tiff.py::TestFileTiff::test_dict", "Tests/test_file_tiff.py::TestFileTiff::test_tiled_planar_raw", "Tests/test_file_tiff.py::TestFileTiff::test_save_rgba", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[True]", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_chunks", "Tests/test_file_tiff.py::TestFileTiff::test_oom[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw", "Tests/test_file_tiff.py::TestFileTiff::test_mac_tiff", "Tests/test_file_tiff.py::TestFileTiff::test_eoferror", "Tests/test_file_tiff.py::TestFileTiff::test_saving_icc_profile", "Tests/test_file_tiff.py::TestFileTiff::test_palette[P]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[3-184.912]", "Tests/test_file_tiff.py::TestFileTiff::test_unclosed_file", "Tests/test_file_tiff.py::TestFileTiff::test_context_manager", "Tests/test_file_tiff.py::TestFileTiff::test_gray_semibyte_per_pixel", "Tests/test_file_tiff.py::TestFileTiff::test_exif_frames", "Tests/test_file_tiff.py::TestFileTiff::test_load_float", "Tests/test_file_tiff.py::TestFileTiff::test_save_bmp_compression", "Tests/test_file_tiff.py::TestFileTiff::test_timeout", "Tests/test_file_tiff.py::TestFileTiff::test_unknown_pixel_mode", "Tests/test_file_tiff.py::TestFileTiff::test_big_endian", "Tests/test_file_tiff.py::TestFileTiff::test_8bit_s", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[1]", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_r", "Tests/test_file_tiff.py::TestFileTiff::test_save_setting_missing_resolution", "Tests/test_file_tiff.py::TestFileTiff::test_int_resolution", "Tests/test_file_tiff.py::TestFileTiff::test_closed_file", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_save_all", "Tests/test_file_tiff.py::TestFileTiff::test_with_underscores", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw_with_overviews", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_s", "Tests/test_file_tiff.py::TestFileTiff::test_32bit_float", "Tests/test_file_tiff.py::TestFileTiff::test_load_string", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[None-72.8]", "Tests/test_file_tiff.py::TestFileTiff::test_save_unsupported_mode", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_tiff", "Tests/test_file_tiff.py::TestFileTiff::test_set_legacy_api", "Tests/test_file_tiff.py::TestFileTiff::test_invalid_file", "Tests/test_file_tiff.py::TestFileTiff::test_reload_exif_after_seek", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[L]", "Tests/test_file_tiff.py::TestFileTiff::test_little_endian", "Tests/test_file_tiff.py::TestFileTiff::test_exif", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage-lastframe.tif-1]", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_float", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_nonexclusive", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_fallback_tiff", "Tests/test_file_tiff.py::TestFileTiff::test_multipage", "Tests/test_file_tiff.py::TestFileTiff::test_bigtiff", "Tests/test_file_tiff.py::TestFileTiff::test_seek", "Tests/test_file_tiff.py::TestFileTiff::test_discard_icc_profile", "Tests/test_file_tiff.py::TestFileTiff::test_load_double", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_exclusive", "Tests/test_file_tiff.py::TestFileTiff::test_planar_configuration_save", "Tests/test_file_tiff.py::TestFileTiff::test_palette[PA]", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[False]", "Tests/test_file_tiff.py::TestFileTiff::test_strip_raw", "Tests/test_file_tiff.py::TestFileTiff::test_seek_after_close", "Tests/test_file_tiff.py::TestFileTiff::test_4bit", "Tests/test_file_tiff.py::TestFileTiff::test_get_photoshop_blocks", "Tests/test_file_tiff.py::TestFileTiff::test_modify_exif", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[2-72.8]", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_int", "Tests/test_file_tiff.py::TestFileTiff::test_frame_order", "Tests/test_file_tiff.py::TestFileTiff::test_12bit_rawmode", "Tests/test_file_tiff.py::TestFileTiff::test_rowsperstrip", "Tests/test_file_tiff.py::TestFileTiff::test_ifd_tag_type", "Tests/test_file_tiff.py::TestFileTiff::test_multipage_last_frame", "Tests/test_file_tiff.py::TestFileTiff::test_seek_eof", "Tests/test_file_tiff.py::TestFileTiff::test_bad_exif", "Tests/test_file_tiff.py::TestFileTiff::test_sanity", "Tests/test_file_tiff.py::TestFileTiff::test_roundtrip_tiff_uint16", "Tests/test_file_tiff.py::TestFileTiff::test_save_float_dpi", "Tests/test_file_tiff.py::TestFileTiff::test__delitem__", "Tests/test_file_tiff.py::TestFileTiff::test_save_icc_profile", "Tests/test_file_tiff.py::TestFileTiff::test___str__", "Tests/test_file_tiff.py::TestFileTiff::test_seek_too_large", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage.tiff-3]"] | [] | ["Tests/test_file_tiff.py::TestFileTiff::test_iptc"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.5.4", "distlib==0.3.8", "filelock==3.15.4", "iniconfig==2.0.0", "packaging==24.1", "pip==24.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.7.1", "pytest==8.2.2", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.15.1", "uv==0.2.15", "virtualenv==20.26.3", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-8085 | 8b14ed741a1c757734c65535ca1db4ab4162c843 | diff --git a/docs/reference/ImageDraw.rst b/docs/reference/ImageDraw.rst
index 4ccfacae75e..1404869ca6c 100644
--- a/docs/reference/ImageDraw.rst
+++ b/docs/reference/ImageDraw.rst
@@ -227,6 +227,18 @@ Methods
.. versionadded:: 5.3.0
+.. py:method:: ImageDraw.circle(xy, radius, fill=None, outline=None, width=1)
+
+ Draws a circle with a given radius centering on a point.
+
+ .. versionadded:: 10.4.0
+
+ :param xy: The point for the center of the circle, e.g. ``(x, y)``.
+ :param radius: Radius of the circle.
+ :param outline: Color to use for the outline.
+ :param fill: Color to use for the fill.
+ :param width: The line width, in pixels.
+
.. py:method:: ImageDraw.ellipse(xy, fill=None, outline=None, width=1)
Draws an ellipse inside the given bounding box.
diff --git a/docs/releasenotes/10.4.0.rst b/docs/releasenotes/10.4.0.rst
index 41f33102fdd..e0d695a8bba 100644
--- a/docs/releasenotes/10.4.0.rst
+++ b/docs/releasenotes/10.4.0.rst
@@ -45,6 +45,13 @@ TODO
API Additions
=============
+ImageDraw.circle
+^^^^^^^^^^^^^^^^
+
+Added :py:meth:`~PIL.ImageDraw.ImageDraw.circle`. It provides the same functionality as
+:py:meth:`~PIL.ImageDraw.ImageDraw.ellipse`, but instead of taking a bounding box, it
+takes a center point and radius.
+
TODO
^^^^
diff --git a/src/PIL/ImageDraw.py b/src/PIL/ImageDraw.py
index 42f2ee8c799..17c17643066 100644
--- a/src/PIL/ImageDraw.py
+++ b/src/PIL/ImageDraw.py
@@ -181,6 +181,13 @@ def ellipse(self, xy: Coords, fill=None, outline=None, width=1) -> None:
if ink is not None and ink != fill and width != 0:
self.draw.draw_ellipse(xy, ink, 0, width)
+ def circle(
+ self, xy: Sequence[float], radius: float, fill=None, outline=None, width=1
+ ) -> None:
+ """Draw a circle given center coordinates and a radius."""
+ ellipse_xy = (xy[0] - radius, xy[1] - radius, xy[0] + radius, xy[1] + radius)
+ self.ellipse(ellipse_xy, fill, outline, width)
+
def line(self, xy: Coords, fill=None, width=0, joint=None) -> None:
"""Draw a line, or a connected sequence of line segments."""
ink = self._getink(fill)[0]
| diff --git a/Tests/test_imagedraw.py b/Tests/test_imagedraw.py
index 0a699e2ab6a..69d09e03d86 100644
--- a/Tests/test_imagedraw.py
+++ b/Tests/test_imagedraw.py
@@ -2,6 +2,7 @@
import contextlib
import os.path
+from typing import Sequence
import pytest
@@ -265,6 +266,21 @@ def test_chord_too_fat() -> None:
assert_image_equal_tofile(im, "Tests/images/imagedraw_chord_too_fat.png")
[email protected]("mode", ("RGB", "L"))
[email protected]("xy", ((W / 2, H / 2), [W / 2, H / 2]))
+def test_circle(mode: str, xy: Sequence[float]) -> None:
+ # Arrange
+ im = Image.new(mode, (W, H))
+ draw = ImageDraw.Draw(im)
+ expected = f"Tests/images/imagedraw_ellipse_{mode}.png"
+
+ # Act
+ draw.circle(xy, 25, fill="green", outline="blue")
+
+ # Assert
+ assert_image_similar_tofile(im, expected, 1)
+
+
@pytest.mark.parametrize("mode", ("RGB", "L"))
@pytest.mark.parametrize("bbox", BBOX)
def test_ellipse(mode: str, bbox: Coords) -> None:
| Missing ImageDraw.Draw.circle function
### What did you do?
I find it frustrating that Pillow's ImageDraw does still not have a function to draw a circle. Every time I come around to do it, I find that I must use ImageDraw.Draw.ellipse instead, which costs time. It must be even more frustrating for beginners who don't know more complex shapes like ellipses.
### What did you expect to happen?
An ImageDraw.Draw.circle to be available
### What actually happened?
It does not exist
### What are your OS, Python and Pillow versions?
* OS: Every
* Python: Every
* Pillow: Every
| Sounds like a useful shortcut, would you like to propose a PR? | 2024-05-26T22:24:32Z | 2024-05-28T09:35:31Z | ["Tests/test_imagedraw.py::test_polygon[points3]", "Tests/test_imagedraw.py::test_arc[0-180-bbox1]", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox2]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox3]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox1]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy2-85-height]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox1]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox3]", "Tests/test_imagedraw.py::test_chord[bbox1-RGB]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox1]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox0]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox1]", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox1]", "Tests/test_imagedraw.py::test_chord[bbox3-RGB]", "Tests/test_imagedraw.py::test_same_color_outline[bbox2]", "Tests/test_imagedraw.py::test_chord_width[bbox1]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-True-True]", "Tests/test_imagedraw.py::test_arc[0-180-bbox3]", "Tests/test_imagedraw.py::test_ellipse[bbox1-L]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox3]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox3]", "Tests/test_imagedraw.py::test_same_color_outline[bbox0]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox0]", "Tests/test_imagedraw.py::test_chord[bbox2-L]", "Tests/test_imagedraw.py::test_default_font_size", "Tests/test_imagedraw.py::test_chord_width[bbox0]", "Tests/test_imagedraw.py::test_chord_width[bbox2]", "Tests/test_imagedraw.py::test_polygon2", "Tests/test_imagedraw.py::test_chord_zero_width[bbox2]", "Tests/test_imagedraw.py::test_point[points1]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox2]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-False-True]", "Tests/test_imagedraw.py::test_chord[bbox1-L]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle7-0-ValueError-rotation should be an int or float]", "Tests/test_imagedraw.py::test_wide_line_dot", "Tests/test_imagedraw.py::test_polygon[points1]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox1]", "Tests/test_imagedraw.py::test_arc_width[bbox3]", "Tests/test_imagedraw.py::test_ellipse[bbox3-RGB]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-False-True]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle4-0-ValueError-bounding_circle should only contain numeric data]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy5-y_odd]", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox0]", "Tests/test_imagedraw.py::test_floodfill[bbox2]", "Tests/test_imagedraw.py::test_wide_line_larger_than_int", "Tests/test_imagedraw.py::test_ellipse[bbox0-RGB]", "Tests/test_imagedraw.py::test_rectangle_width[bbox0]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox0]", "Tests/test_imagedraw.py::test_polygon_kite[kite_points0-L]", "Tests/test_imagedraw.py::test_textsize_empty_string", "Tests/test_imagedraw.py::test_incorrectly_ordered_coordinates[xy1]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox1]", "Tests/test_imagedraw.py::test_arc_no_loops[bbox1]", "Tests/test_imagedraw.py::test_rectangle_width[bbox1]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy0]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox2]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox2]", "Tests/test_imagedraw.py::test_ellipse_width[bbox3]", "Tests/test_imagedraw.py::test_same_color_outline[bbox3]", "Tests/test_imagedraw.py::test_chord[bbox3-L]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox2]", "Tests/test_imagedraw.py::test_ellipse[bbox1-RGB]", "Tests/test_imagedraw.py::test_big_rectangle", "Tests/test_imagedraw.py::test_polygon_translucent", "Tests/test_imagedraw.py::test_floodfill[bbox3]", "Tests/test_imagedraw.py::test_continuous_horizontal_edges_polygon", "Tests/test_imagedraw.py::test_rectangle_I16[bbox3]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy6-both]", "Tests/test_imagedraw.py::test_triangle_right_width[None-width_no_fill]", "Tests/test_imagedraw.py::test_chord[bbox0-L]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox3]", "Tests/test_imagedraw.py::test_polygon_1px_high", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox3]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox3]", "Tests/test_imagedraw.py::test_floodfill_border[bbox2]", "Tests/test_imagedraw.py::test_pieslice_width[bbox1]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[6-expected_vertices3]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox1]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-False-True]", "Tests/test_imagedraw.py::test_bitmap", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox2]", "Tests/test_imagedraw.py::test_ellipse_width[bbox0]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox3]", "Tests/test_imagedraw.py::test_arc_no_loops[bbox0]", "Tests/test_imagedraw.py::test_rectangle_I16[bbox1]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[5-expected_vertices2]", "Tests/test_imagedraw.py::test_draw_regular_polygon[4-square_rotate_45-args2]", "Tests/test_imagedraw.py::test_chord[bbox2-RGB]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy0-30.5-given]", "Tests/test_imagedraw.py::test_chord_too_fat", "Tests/test_imagedraw.py::test_rectangle[bbox2]", "Tests/test_imagedraw.py::test_ellipse[bbox3-L]", "Tests/test_imagedraw.py::test_ellipse_various_sizes_filled", "Tests/test_imagedraw.py::test_polygon[points2]", "Tests/test_imagedraw.py::test_line_joint[xy0]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox3]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[None-bounding_circle0-0-TypeError-n_sides should be an int]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox0]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox2]", "Tests/test_imagedraw.py::test_transform", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-True-False]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-True-True]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox0]", "Tests/test_imagedraw.py::test_ellipse_width[bbox1]", "Tests/test_imagedraw.py::test_arc_high", "Tests/test_imagedraw.py::test_line[points0]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox1]", "Tests/test_imagedraw.py::test_pieslice_width[bbox2]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-True-True]", "Tests/test_imagedraw.py::test_ellipse_symmetric", "Tests/test_imagedraw.py::test_ellipse[bbox0-L]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox1]", "Tests/test_imagedraw.py::test_same_color_outline[bbox1]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox2]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox0]", "Tests/test_imagedraw.py::test_arc[0-180-bbox2]", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox3]", "Tests/test_imagedraw.py::test_incorrectly_ordered_coordinates[xy0]", "Tests/test_imagedraw.py::test_triangle_right_width[fill0-width]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox3]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-True-True]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy2-x_odd]", "Tests/test_imagedraw.py::test_mode_mismatch", "Tests/test_imagedraw.py::test_arc_width_fill[bbox0]", "Tests/test_imagedraw.py::test_polygon_kite[kite_points1-L]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[3-expected_vertices0]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox2]", "Tests/test_imagedraw.py::test_line[points2]", "Tests/test_imagedraw.py::test_point[points3]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox1]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox2]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy3-y]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox1]", "Tests/test_imagedraw.py::test_polygon[points0]", "Tests/test_imagedraw.py::test_pieslice_wide", "Tests/test_imagedraw.py::test_floodfill_border[bbox0]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-False-False]", "Tests/test_imagedraw.py::test_rectangle[bbox0]", "Tests/test_imagedraw.py::test_ellipse[bbox2-L]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox1]", "Tests/test_imagedraw.py::test_pieslice_width[bbox3]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox3]", "Tests/test_imagedraw.py::test_floodfill_border[bbox3]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy1-90-width]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox2]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy1]", "Tests/test_imagedraw.py::test_arc_no_loops[bbox3]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox2]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox2]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox3]", "Tests/test_imagedraw.py::test_line_joint[xy1]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox1]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-False-True]", "Tests/test_imagedraw.py::test_draw_regular_polygon[3-triangle_width-args3]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox3]", "Tests/test_imagedraw.py::test_floodfill_not_negative", "Tests/test_imagedraw.py::test_line_vertical", "Tests/test_imagedraw.py::test_arc_width[bbox2]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle6-0-ValueError-bounding_circle radius should be > 0]", "Tests/test_imagedraw.py::test_ellipse_width_large", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-True-False]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle3-0-ValueError-bounding_circle should contain 2D coordinates and a radius (e.g. (x, y, r) or ((x, y), r) )]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox0]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox1]", "Tests/test_imagedraw.py::test_draw_regular_polygon[8-regular_octagon-args1]", "Tests/test_imagedraw.py::test_rectangle_I16[bbox0]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox0]", "Tests/test_imagedraw.py::test_triangle_right", "Tests/test_imagedraw.py::test_rectangle_I16[bbox2]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox2]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox0]", "Tests/test_imagedraw.py::test_ellipse_width[bbox2]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox2]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox3]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox3]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[4-expected_vertices1]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox0]", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox0]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy2]", "Tests/test_imagedraw.py::test_ellipse_various_sizes", "Tests/test_imagedraw.py::test_point[points2]", "Tests/test_imagedraw.py::test_polygon_kite[kite_points0-RGB]", "Tests/test_imagedraw.py::test_rectangle_width[bbox3]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox0]", "Tests/test_imagedraw.py::test_ellipse_edge", "Tests/test_imagedraw.py::test_draw_regular_polygon[4-square-args0]", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox0]", "Tests/test_imagedraw.py::test_pieslice_no_spikes", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox0]", "Tests/test_imagedraw.py::test_line_joint[xy2]", "Tests/test_imagedraw.py::test_arc_no_loops[bbox2]", "Tests/test_imagedraw.py::test_floodfill[bbox1]", "Tests/test_imagedraw.py::test_line_horizontal", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox0]", "Tests/test_imagedraw.py::test_floodfill_border[bbox1]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox0]", "Tests/test_imagedraw.py::test_point_I16", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-50-0-TypeError-bounding_circle should be a sequence]", "Tests/test_imagedraw.py::test_rectangle[bbox1]", "Tests/test_imagedraw.py::test_line[points3]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox3]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy0-x]", "Tests/test_imagedraw.py::test_shape1", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-False-False]", "Tests/test_imagedraw.py::test_chord_width[bbox3]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-True-False]", "Tests/test_imagedraw.py::test_valueerror", "Tests/test_imagedraw.py::test_polygon_1px_high_translucent", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox1]", "Tests/test_imagedraw.py::test_shape2", "Tests/test_imagedraw.py::test_pieslice_width[bbox0]", "Tests/test_imagedraw.py::test_rectangle[bbox3]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[1-bounding_circle1-0-ValueError-n_sides should be an int > 2]", "Tests/test_imagedraw.py::test_discontiguous_corners_polygon", "Tests/test_imagedraw.py::test_rectangle_width[bbox2]", "Tests/test_imagedraw.py::test_ellipse[bbox2-RGB]", "Tests/test_imagedraw.py::test_line[points1]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox2]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy1-x_odd]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-True-False]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox2]", "Tests/test_imagedraw.py::test_line_oblique_45", "Tests/test_imagedraw.py::test_arc[0-180-bbox0]", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox2]", "Tests/test_imagedraw.py::test_arc_width[bbox0]", "Tests/test_imagedraw.py::test_point[points0]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle5-0-ValueError-bounding_circle centre should contain 2D coordinates (e.g. (x, y))]", "Tests/test_imagedraw.py::test_square", "Tests/test_imagedraw.py::test_floodfill[bbox0]", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox3]", "Tests/test_imagedraw.py::test_sanity", "Tests/test_imagedraw.py::test_polygon_kite[kite_points1-RGB]", "Tests/test_imagedraw.py::test_arc_width[bbox1]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy4-y_odd]", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox1]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox0]", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox1]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox1]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-False-False]", "Tests/test_imagedraw.py::test_chord[bbox0-RGB]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-False-False]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox3]"] | [] | ["Tests/test_imagedraw.py::test_circle[xy0-RGB]", "Tests/test_imagedraw.py::test_circle[xy0-L]", "Tests/test_imagedraw.py::test_circle[xy1-RGB]", "Tests/test_imagedraw.py::test_circle[xy1-L]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.5.3", "distlib==0.3.8", "filelock==3.14.0", "iniconfig==2.0.0", "packaging==24.0", "pip==24.0", "platformdirs==4.2.2", "pluggy==1.5.0", "pyproject-api==1.6.1", "pytest==8.2.1", "pytest-cov==5.0.0", "setuptools==75.1.0", "tox==4.15.0", "uv==0.2.5", "virtualenv==20.26.2", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7900 | 19cd94bdb3699abe11d5e437406daa66f7f5cc17 | diff --git a/Tests/images/9bit.j2k b/Tests/images/9bit.j2k
new file mode 100644
index 00000000000..174f565fc64
Binary files /dev/null and b/Tests/images/9bit.j2k differ
diff --git a/src/PIL/Jpeg2KImagePlugin.py b/src/PIL/Jpeg2KImagePlugin.py
index 27f8fbbd0b5..be000c351b6 100644
--- a/src/PIL/Jpeg2KImagePlugin.py
+++ b/src/PIL/Jpeg2KImagePlugin.py
@@ -106,15 +106,11 @@ def _parse_codestream(fp):
lsiz, rsiz, xsiz, ysiz, xosiz, yosiz, _, _, _, _, csiz = struct.unpack_from(
">HHIIIIIIIIH", siz
)
- ssiz = [None] * csiz
- xrsiz = [None] * csiz
- yrsiz = [None] * csiz
- for i in range(csiz):
- ssiz[i], xrsiz[i], yrsiz[i] = struct.unpack_from(">BBB", siz, 36 + 3 * i)
size = (xsiz - xosiz, ysiz - yosiz)
if csiz == 1:
- if (yrsiz[0] & 0x7F) > 8:
+ ssiz = struct.unpack_from(">B", siz, 38)
+ if (ssiz[0] & 0x7F) + 1 > 8:
mode = "I;16"
else:
mode = "L"
| diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py
index bd114aa1181..81f75cc72cf 100644
--- a/Tests/test_file_jpeg2k.py
+++ b/Tests/test_file_jpeg2k.py
@@ -446,3 +446,9 @@ def test_plt_marker() -> None:
hdr = out.read(2)
length = _binary.i16be(hdr)
out.seek(length - 2, os.SEEK_CUR)
+
+
+def test_9bit():
+ with Image.open("Tests/images/9bit.j2k") as im:
+ assert im.mode == "I;16"
+ assert im.size == (128, 128)
| JPEG2000: 9-bit images use L mode instead of I;16
### What did you do?
9-bit precision JPEG 2000 codestream with a .txt extension: [9bit.txt](https://github.com/python-pillow/Pillow/files/14734392/9bit.txt) (rename to 9bit.j2k)
```python
with Image.open("9bit.j2k") as im:
assert im.mode == "I;16"
assert im.size == (128, 128)
```
### What did you expect to happen?
No exceptions
### What actually happened?
`AssertionError: assert 'L' == 'I;16'`
### What are your OS, Python and Pillow versions?
* OS: Ubuntu 22.04
* Python: 3.12
* Pillow: Current `main` 19cd94bdb3699abe11d5e437406daa66f7f5cc17
| 2024-03-24T04:47:02Z | 2024-03-25T10:03:22Z | ["Tests/test_pickle.py::test_pickle_image[1-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_F[factor17]", "Tests/test_image_filter.py::test_sanity[L-ModeFilter]", "Tests/test_imageops.py::test_colorize_3color_offset", "Tests/test_image.py::TestImage::test_repr_pretty", "Tests/test_imagedraw.py::test_shape2", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_zero_default.png]", "Tests/test_image_transpose.py::test_rotate_180[I;16B]", "Tests/test_image_getpalette.py::test_palette", "Tests/test_image_convert.py::test_rgba", "Tests/test_file_png.py::TestFilePng::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r06.fli]", "Tests/test_image_quantize.py::test_quantize_dither_diff", "Tests/test_file_gbr.py::test_load", "Tests/test_font_pcf_charsets.py::test_sanity[iso8859-1]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[RGBA]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[LA]", "Tests/test_image_transform.py::TestImageTransform::test_alpha_premult_transform", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_st.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive", "Tests/test_file_icns.py::test_older_icon", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply19]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-1185209cf7655b5aed8ae5e77784dfdd18ab59e9.tif]", "Tests/test_file_gbr.py::test_invalid_file", "Tests/test_imagedraw.py::test_textsize_empty_string", "Tests/test_imagedraw.py::test_discontiguous_corners_polygon", "Tests/test_file_dds.py::test_sanity_ati2_bc5u[Tests/images/ati2.dds]", "Tests/test_bmp_reference.py::test_bad", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-50-50-0]", "Tests/test_image_reduce.py::test_mode_RGBa[factor10]", "Tests/test_file_gif.py::test_dispose_previous", "Tests/test_imagechops.py::test_constant", "Tests/test_file_tiff.py::TestFileTiff::test_context_manager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_frame.png]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_ascii[1-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad_checksum.msp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/empty_gps_ifd.jpg]", "Tests/test_image.py::TestImage::test_registered_extensions_uninitialized", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/effect_mandelbrot.png]", "Tests/test_imagedraw.py::test_ellipse_various_sizes_filled", "Tests/test_image.py::TestImage::test_overrun[01r_00.pcx]", "Tests/test_file_tiff.py::TestFileTiff::test_load_string", "Tests/test_image_reduce.py::test_mode_I[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_one_band.png]", "Tests/test_imagesequence.py::test_tiff", "Tests/test_imagepalette.py::test_getcolor_rgba_color_rgb_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/raw_negative_stride.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[La]", "Tests/test_image.py::TestImage::test_exif_interop", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_la.png]", "Tests/test_image_reduce.py::test_mode_RGBa[5]", "Tests/test_image_filter.py::test_sanity[CMYK-CONTOUR]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb24.png]", "Tests/test_file_gif.py::test_roundtrip_save_all_1", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati1.dds]", "Tests/test_image_reduce.py::test_mode_I[factor12]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ls.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_x_resolution", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGBA]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32767-I;16]", "Tests/test_file_ppm.py::test_invalid_maxval[0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.bw]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_horizontal[0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/itxt_chunks.png]", "Tests/test_file_mpo.py::test_seek[Tests/images/frozenpond.mpo]", "Tests/test_imageops.py::test_sanity", "Tests/test_imagedraw.py::test_arc_no_loops[bbox2]", "Tests/test_image_putpalette.py::test_empty_palette", "Tests/test_imagestat.py::test_hopper", "Tests/test_file_png.py::TestFilePng::test_save_grayscale_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_ellipse_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_actl_after_idat.png]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy0]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/pil123p.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1.png]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox3]", "Tests/test_image_reduce.py::test_mode_RGBa[factor16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.s.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r09.fli]", "Tests/test_deprecate.py::test_old_version[Old thing-False-Old thing is deprecated and should be removed\\\\.]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16-565pal.bmp]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy5-y_odd]", "Tests/test_image_convert.py::test_matrix_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/200x32_p_bl_raw_origin.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_2.jpg]", "Tests/test_imagedraw.py::test_polygon_1px_high", "Tests/test_file_palm.py::test_monochrome", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[RGB]", "Tests/test_file_tga.py::test_id_field", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unsupported_bitcount.dds]", "Tests/test_image_filter.py::test_consistency_5x5[L]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox0]", "Tests/test_file_gif.py::test_palette_save_P", "Tests/test_image_filter.py::test_sanity[CMYK-SMOOTH_MORE]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/first_frame_transparency.gif]", "Tests/test_file_ico.py::test_invalid_file", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_ycbcr_jpeg_1x1_sampling.tif]", "Tests/test_imageops.py::test_cover[imagedraw_stroke_multiline.png-expected_size1]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[RGBX]", "Tests/test_imagemath.py::test_logical_not_equal", "Tests/test_file_gif.py::test_unclosed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_raw.tif]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif_extents", "Tests/test_file_gif.py::test_version", "Tests/test_file_gif.py::test_webp_background", "Tests/test_file_pdf.py::test_pdf_append_to_bytesio", "Tests/test_imagepalette.py::test_file", "Tests/test_imagemorph.py::test_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_width.png]", "Tests/test_file_apng.py::test_apng_save", "Tests/test_image_reduce.py::test_mode_LA[factor17]", "Tests/test_image_reduce.py::test_mode_I[factor6]", "Tests/test_image_reduce.py::test_mode_I[factor10]", "Tests/test_file_mpo.py::test_mp[Tests/images/frozenpond.mpo]", "Tests/test_file_tiff_metadata.py::test_empty_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_zero_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_ifd_offset.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/num_plays_1.png]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_warning", "Tests/test_core_resources.py::TestCoreMemory::test_large_images", "Tests/test_file_apng.py::test_apng_dispose_region", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/zero_bb.png-None]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynyn.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P6 3 1 257 \\x00\\x00\\x00\\x01\\x00\\x02\\x00\\x80\\x00\\x81\\x00\\x82\\x01\\x00\\x01\\x01\\xff\\xff-RGB-pixels7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/2422.flc]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor18]", "Tests/test_imagedraw.py::test_ellipse[bbox3-L]", "Tests/test_imageshow.py::test_sanity", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat_chunk.png]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-color1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_fdat_fctl.png]", "Tests/test_imageops.py::test_expand_palette[border1]", "Tests/test_box_blur.py::test_radius_0_05", "Tests/test_image.py::TestImage::test_image_modes_success[LAB]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;24]", "Tests/test_imagechops.py::test_add_modulo", "Tests/test_file_spider.py::test_load_image_series_no_input", "Tests/test_imagepalette.py::test_getcolor_not_special[255-palette1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[L]", "Tests/test_features.py::test_unsupported_codec", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[90-2]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGBX]", "Tests/test_deprecate.py::test_plural", "Tests/test_file_gif.py::test_optimize", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[1]", "Tests/test_file_tiff.py::TestFileTiff::test_save_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_width_fill.png]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/test-card.png-None]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[1]", "Tests/test_imagemath.py::test_logical_ge", "Tests/test_image_reduce.py::test_mode_RGBA[factor17]", "Tests/test_util.py::test_is_directory", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage.tiff-3]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle_bottom_right.tga]", "Tests/test_imagedraw.py::test_incorrectly_ordered_coordinates[xy0]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[270-4]", "Tests/test_file_tiff.py::TestFileTiff::test_big_endian", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_7.jpg]", "Tests/test_image_quantize.py::test_quantize_no_dither2", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply20]", "Tests/test_image_load.py::test_close_after_load", "Tests/test_imagefile.py::TestImageFile::test_broken_datastream_with_errors", "Tests/test_image_reduce.py::test_mode_I[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/custom_gimp_palette.gpl]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBa", "Tests/test_image_putdata.py::test_mode_i[I;16B]", "Tests/test_image_reduce.py::test_mode_I[factor18]", "Tests/test_image_reduce.py::test_mode_RGB[factor8]", "Tests/test_image.py::TestImage::test_expand_x", "Tests/test_imagesequence.py::test_all_frames", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-True-True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit_plain.pgm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage.eps]", "Tests/test_image_filter.py::test_sanity[CMYK-EDGE_ENHANCE_MORE]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif_zero_width", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_reorder_chunk.png]", "Tests/test_file_ppm.py::test_plain_truncated_data[P3\\n128 128\\n255\\n]", "Tests/test_image_filter.py::test_modefilter[L-expected1]", "Tests/test_file_bmp.py::test_load_dib", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24lprof.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ignore_frame_size.mpo]", "Tests/test_imagechops.py::test_subtract", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8nonsquare.bmp]", "Tests/test_imagesequence.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.pbm]", "Tests/test_image_putdata.py::test_mode_i[I]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/radial_gradient.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_shape1.png]", "Tests/test_file_eps.py::test_missing_boundingbox_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_file_sgi.py::test_unsupported_mode", "Tests/test_imagechops.py::test_subtract_modulo", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_end_le_start.png]", "Tests/test_image_putdata.py::test_mode_F", "Tests/test_file_png.py::TestFilePng::test_verify_not_ignores_crc_error_in_required_chunk", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_text.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[RGBA]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor14]", "Tests/test_image_filter.py::test_sanity[I-BLUR]", "Tests/test_image_reduce.py::test_mode_LA[factor12]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pnm]", "Tests/test_imagemorph.py::test_erosion8", "Tests/test_file_png.py::TestFilePng::test_bad_ztxt", "Tests/test_image_access.py::TestImageGetPixel::test_basic[L]", "Tests/test_file_dcx.py::test_seek_too_far", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.tif-None]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[RGBA]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[None-72.8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_rgb.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_raw.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[90-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/fctl_actl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_la.dds]", "Tests/test_format_lab.py::test_green", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[0]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBX", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny_name.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower2.jpg]", "Tests/test_file_gif.py::test_number_of_loops", "Tests/test_util.py::test_is_not_path", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_undefined[value1]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynnn.png]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_args", "Tests/test_file_jpeg.py::TestFileJpeg::test_photoshop_malformed_and_multiple", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/test-card.png-None]", "Tests/test_image_transpose.py::test_rotate_270[RGB]", "Tests/test_file_icns.py::test_load", "Tests/test_file_ppm.py::test_16bit_pgm_write", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gbr.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w126.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_end_chunk.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil136.tiff]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_invalid_size", "Tests/test_image.py::TestImage::test_zero_tobytes[size0]", "Tests/test_imagedraw.py::test_bitmap", "Tests/test_file_eps.py::test_readline[\\r-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_reduce.py::test_mode_LA[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badplanes.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrowF04.bin]", "Tests/test_file_gif.py::test_dispose_previous_first_frame", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fdAT]", "Tests/test_lib_pack.py::TestLibPack::test_PA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnnn.png]", "Tests/test_file_tiff.py::TestFileTiff::test_ifd_tag_type", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_right.png]", "Tests/test_imagemorph.py::test_lut[erosion4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_8.tif]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32767-I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd.gif]", "Tests/test_image.py::TestImage::test_close_graceful", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w2px_normal.png]", "Tests/test_file_tiff.py::TestFileTiff::test_32bit_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badpalettesize.bmp]", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_black", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_rectangle_L.png]", "Tests/test_imagedraw.py::test_same_color_outline[bbox0]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/reproducing]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.j2k]", "Tests/test_image.py::TestImage::test_linear_gradient[F]", "Tests/test_imageops.py::test_pad", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r02.fli]", "Tests/test_file_fli.py::test_seek", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/reproducing]", "Tests/test_imagemorph.py::test_no_operator_loaded", "Tests/test_image.py::TestImage::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_palette_chunk_second.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_square_rotate_45.png]", "Tests/test_imagedraw.py::test_floodfill[bbox3]", "Tests/test_file_bufrstub.py::test_load", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-31c8f86233ea728339c6e586be7af661a09b5b98.blp]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor8]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none_load_end_second.png]", "Tests/test_image_filter.py::test_rankfilter_error[MedianFilter]", "Tests/test_file_gif.py::test_palette_not_needed_for_second_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16.bmp]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w124.png]", "Tests/test_imagedraw.py::test_point[points3]", "Tests/test_imagemorph.py::test_negate", "Tests/test_mode_i16.py::test_basic[I;16L]", "Tests/test_file_gif.py::test_palette_save_all_P", "Tests/test_imagefile.py::TestPyEncoder::test_negsize", "Tests/test_file_gif.py::test_rgb_transparency", "Tests/test_file_ppm.py::test_16bit_plain_pgm", "Tests/test_image_point.py::test_f_lut", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[RGBA]", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_8bit_plain.pgm-Tests/images/hopper_8bit.pgm]", "Tests/test_image_reduce.py::test_mode_I[6]", "Tests/test_core_resources.py::TestCoreMemory::test_set_block_size", "Tests/test_imagedraw.py::test_chord[bbox1-L]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-#DDEEFF]", "Tests/test_image_filter.py::test_sanity[RGB-CONTOUR]", "Tests/test_image_transpose.py::test_flip_left_right[I;16]", "Tests/test_imagefile.py::TestPyDecoder::test_setimage", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[0]", "Tests/test_file_png.py::TestFilePng::test_nonunicode_text", "Tests/test_image_reduce.py::test_mode_LA[factor13]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_with_transparency.gif]", "Tests/test_image_reduce.py::test_mode_LA[factor14]", "Tests/test_image.py::TestImage::test_effect_mandelbrot", "Tests/test_imagedraw.py::test_valueerror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower.webp]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[P]", "Tests/test_lib_pack.py::TestLibUnpack::test_BGR", "Tests/test_file_container.py::test_seek_mode[1-66]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_raw_with_overviews.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_from_dpcm_exif", "Tests/test_image_access.py::TestImagePutPixel::test_sanity_negative_index", "Tests/test_imagechops.py::test_overlay", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_bl_rle.tga]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_mode", "Tests/test_file_pdf.py::test_pdf_append_fails_on_nonexistent_file", "Tests/test_imagepath.py::test_path_constructors[coords0]", "Tests/test_image_reduce.py::test_mode_La[factor11]", "Tests/test_image_copy.py::test_copy[L]", "Tests/test_file_tiff.py::TestFileTiff::test_little_endian", "Tests/test_lib_pack.py::TestLibUnpack::test_LAB", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-4fb027452e6988530aa5dabee76eecacb3b79f8a.j2k]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[pHYs]", "Tests/test_file_spider.py::test_tell", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_underscore.xbm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-db8bfa78b19721225425530c5946217720d7df4e.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1bg.png]", "Tests/test_image_putdata.py::test_pypy_performance", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-1ee28a249896e05b83840ae8140622de8e648ba9.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[L]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle3-0-ValueError-bounding_circle should contain 2D coordinates and a radius (e.g. (x, y, r) or ((x, y), r) )]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_zero.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice.png]", "Tests/test_file_eps.py::test_readline[\\r-]", "Tests/test_file_png.py::TestFilePng::test_exif", "Tests/test_file_png.py::TestFilePng::test_getxmp", "Tests/test_file_apng.py::test_apng_save_split_fdat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_point.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32-111110.bmp]", "Tests/test_file_mpo.py::test_image_grab[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_polygon[points3]", "Tests/test_file_apng.py::test_apng_dispose_op_background_p_mode", "Tests/test_deprecate.py::test_version[None-Old thing is deprecated and will be removed in a future version\\\\. Use new thing instead\\\\.]", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox1]", "Tests/test_imagedraw.py::test_ellipse[bbox1-L]", "Tests/test_image_rotate.py::test_center_0", "Tests/test_file_png.py::TestFilePng::test_truncated_end_chunk", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ttb.png]", "Tests/test_file_gif.py::test_multiple_duration", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_bmp", "Tests/test_image_reduce.py::test_mode_L[factor11]", "Tests/test_file_tiff.py::TestFileTiff::test_unclosed_file", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[RGBA]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox2]", "Tests/test_file_psd.py::test_closed_file", "Tests/test_file_bmp.py::test_save_dib", "Tests/test_bmp_reference.py::test_good", "Tests/test_image_reduce.py::test_mode_I[4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8v5.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiple_comments.gif]", "Tests/test_box_blur.py::test_extreme_large_radius", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[L]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal4rle.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment_after_only_frame.gif]", "Tests/test_file_sgi.py::test_l", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_exif_dpi.jpg]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox3]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox0]", "Tests/test_file_bmp.py::test_fallback_if_mmap_errors", "Tests/test_file_gif.py::test_context_manager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.gif]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBA", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-False-False]", "Tests/test_file_tiff.py::TestFileTiff::test_tiled_planar_raw", "Tests/test_imagesequence.py::test_iterator", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.apng]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor11]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-False-True]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-b82e64d4f3f76d7465b6af535283029eda211259.sgi]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-1.5-5.5]", "Tests/test_image_filter.py::test_sanity[I-CONTOUR]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2v2-16.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width_large.png]", "Tests/test_lib_pack.py::TestLibPack::test_CMYK", "Tests/test_image_split.py::test_split", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/bc1_typeless.dds]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.tif-None]", "Tests/test_image_filter.py::test_sanity[L-GaussianBlur]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe.png]", "Tests/test_file_psd.py::test_n_frames", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_16.tga]", "Tests/test_file_tiff.py::TestFileTiff::test_eoferror", "Tests/test_font_pcf_charsets.py::test_sanity[iso8859-2]", "Tests/test_image_reduce.py::test_mode_La[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_wide.png]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/sgi_crash.bin]", "Tests/test_file_tiff.py::TestFileTiff::test_mac_tiff", "Tests/test_imageops.py::test_colorize_2color_offset", "Tests/test_file_tga.py::test_save_l_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.p7]", "Tests/test_file_png.py::TestFilePng::test_seek", "Tests/test_imageops.py::test_autocontrast_mask_real_input", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_no_warning_small_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_optimize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_right.png]", "Tests/test_file_tiff_metadata.py::test_photoshop_info", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle.tga]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-6b7f2244da6d0ae297ee0754a424213444e92778.sgi]", "Tests/test_font_pcf.py::test_less_than_256_characters", "Tests/test_image_putdata.py::test_array_F", "Tests/test_file_iptc.py::test_pad_deprecation", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_raw.tif]", "Tests/test_file_eps.py::test_readline[\\n-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_imagemath.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_16.png]", "Tests/test_psdraw.py::test_stdout[False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123rgba.qoi]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[RGB]", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_apply", "Tests/test_file_ppm.py::test_save_stdout[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_spacing.png]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[BGR;15]", "Tests/test_mode_i16.py::test_basic[I;16]", "Tests/test_file_tiff.py::TestFileTiff::test_bigtiff", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ras]", "Tests/test_imagemorph.py::test_incorrect_mode", "Tests/test_imagepath.py::test_invalid_path_constructors[coords1]", "Tests/test_file_container.py::test_read_eof[False]", "Tests/test_file_png.py::TestFilePng::test_exif_save", "Tests/test_file_tiff_metadata.py::test_empty_subifd", "Tests/test_image.py::TestImage::test_exif_ifd1", "Tests/test_imagesequence.py::test_consecutive", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ls.png]", "Tests/test_image_reduce.py::test_mode_F[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev_first_frame.gif]", "Tests/test_file_apng.py::test_apng_blend", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyny.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyyn.png]", "Tests/test_image_point.py::test_f_mode", "Tests/test_imagemorph.py::test_add_patterns", "Tests/test_image_copy.py::test_copy[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_shape2.png]", "Tests/test_box_blur.py::test_two_passes", "Tests/test_file_gif.py::test_extents", "Tests/test_file_gif.py::test_loop_none", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply18]", "Tests/test_image_reduce.py::test_mode_La[5]", "Tests/test_imagepath.py::test_path_constructors[coords8]", "Tests/test_image_copy.py::test_copy[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1.bmp]", "Tests/test_file_fli.py::test_invalid_file", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-RGBA]", "Tests/test_file_wmf.py::test_save[.wmf]", "Tests/test_image_filter.py::test_sanity[CMYK-GaussianBlur]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_slope1px_w2px.png]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-PA]", "Tests/test_image_filter.py::test_rankfilter_error[MaxFilter]", "Tests/test_file_pdf.py::test_save[P]", "Tests/test_file_fli.py::test_eoferror", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGBA-color2]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[L]", "Tests/test_file_bufrstub.py::test_open", "Tests/test_imagemorph.py::test_corner", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8nonsquare-e.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_1px_high.png]", "Tests/test_file_eps.py::test_readline[\\n-]", "Tests/test_file_gif.py::test_roundtrip_info_duration_combined", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-ifd-offset.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp_bits.ppm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_over.png]", "Tests/test_file_xvthumb.py::test_unexpected_eof", "Tests/test_image_access.py::TestImageGetPixel::test_basic[CMYK]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_equality", "Tests/test_file_sgi.py::test_write", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4IR.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/README.txt]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_wide_line_dot.png]", "Tests/test_imagecolor.py::test_hash", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-63b1dffefc8c075ddc606c0a2f5fdc15ece78863.tif]", "Tests/test_file_hdf5stub.py::test_save", "Tests/test_image_quantize.py::test_sanity", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply20]", "Tests/test_image_putdata.py::test_not_flattened", "Tests/test_file_gimpgradient.py::test_curved", "Tests/test_imageops.py::test_1pxfit", "Tests/test_image_reduce.py::test_mode_LA_opaque[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/five_channels.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_actl.png]", "Tests/test_imagemorph.py::test_load_invalid_mrl", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_lt.png]", "Tests/test_image_reduce.py::test_mode_L[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ld.png]", "Tests/test_lib_pack.py::TestLibUnpack::test_YCbCr", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_BC7_UNORM_SRGB.png]", "Tests/test_image_transpose.py::test_transpose[I;16B]", "Tests/test_file_tiff.py::TestFileTiff::test_planar_configuration_save", "Tests/test_file_eps.py::test_eof_before_bounding_box", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-50-50-0]", "Tests/test_imagechops.py::test_lighter_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-465703f71a0f0094873a3e0e82c9f798161171b8.sgi]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8_grayscale.bmp]", "Tests/test_imageops_usm.py::test_blur_formats", "Tests/test_font_pcf_charsets.py::test_draw[iso8859-1]", "Tests/test_imagepath.py::test_overflow_segfault", "Tests/test_file_ico.py::test_different_bit_depths", "Tests/test_file_tiff_metadata.py::test_read_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/argb-32bpp_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/libtiff_segfault.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_repeat_fctl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_2811.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-c8efc3fded6426986ba867a399791bae544f59bc.psd]", "Tests/test_file_gif.py::test_save_dispose", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-None]", "Tests/test_file_dcx.py::test_tell", "Tests/test_image_filter.py::test_sanity[RGB-SMOOTH_MORE]", "Tests/test_image_filter.py::test_sanity[I-EDGE_ENHANCE_MORE]", "Tests/test_imagedraw.py::test_rectangle_I16[bbox2]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illu10_no_preview.eps]", "Tests/test_image_reduce.py::test_mode_RGB[3]", "Tests/test_imagepath.py::test_invalid_path_constructors[coords4]", "Tests/test_image_rotate.py::test_zero[180]", "Tests/test_imagedraw.py::test_point[points0]", "Tests/test_image.py::TestImage::test_getbbox", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_nonexclusive", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns.png]", "Tests/test_features.py::test_check_modules[freetype2]", "Tests/test_imagedraw2.py::test_rectangle[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBX]", "Tests/test_format_lab.py::test_white", "Tests/test_file_wmf.py::test_load_raw", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle_top_right.tga]", "Tests/test_imagegrab.py::TestImageGrab::test_grab_no_xcb", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower2.webp]", "Tests/test_image_convert.py::test_8bit", "Tests/test_image_convert.py::test_p2pa_alpha", "Tests/test_image_mode.py::test_sanity", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_wrong_channels_count", "Tests/test_imagepath.py::test_path_constructors[coords1]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[4]", "Tests/test_image_thumbnail.py::test_aspect", "Tests/test_image_quantize.py::test_rgba_quantize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_1.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing.wmf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_final.png]", "Tests/test_imagechops.py::test_invert", "Tests/test_imageops.py::test_pil163", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[BGR;15-band_numbers2-color must be int, or tuple of one or three elements]", "Tests/test_file_fli.py::test_n_frames", "Tests/test_file_apng.py::test_apng_dispose_op_previous_frame", "Tests/test_file_tiff_metadata.py::test_iccprofile", "Tests/test_file_pdf.py::test_pdf_info", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc-after-SOF.jpg]", "Tests/test_deprecate.py::test_old_version[Old things-True-Old things are deprecated and should be removed\\\\.]", "Tests/test_imagedraw.py::test_ellipse[bbox2-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_pieslice.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_different.png]", "Tests/test_image.py::TestImage::test_apply_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_dpi.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4I.tif]", "Tests/test_pickle.py::test_pickle_la_mode_with_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0da013a13571cc8eb457a39fee8db18f8a3c7127.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_truncated_jpeg_throws_oserror", "Tests/test_imagedraw.py::test_polygon[points1]", "Tests/test_image_thumbnail.py::test_no_resize", "Tests/test_imagedraw.py::test_chord_width_fill[bbox0]", "Tests/test_file_gif.py::test_palette_434", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dilation4.lut]", "Tests/test_imageops.py::test_exif_transpose_in_place", "Tests/test_imagedraw.py::test_floodfill_border[bbox3]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[LA]", "Tests/test_image_reduce.py::test_mode_RGBa[factor8]", "Tests/test_file_gribstub.py::test_invalid_file", "Tests/test_file_tiff.py::TestFileTiff::test_closed_file", "Tests/test_file_gif.py::test_duration", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_tags_orientation.png]", "Tests/test_file_spider.py::test_nonstack_dos", "Tests/test_image.py::TestImage::test_remap_palette", "Tests/test_imagechops.py::test_logical", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[I;16]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox0]", "Tests/test_image_quantize.py::test_quantize_kmeans[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sunraster.im1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_one_band.fpx]", "Tests/test_file_tiff_metadata.py::test_iccprofile_binary", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[IHDR]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor16]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_32f", "Tests/test_file_ico.py::test_save_to_bytes_bmp[RGB]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd_rgba.gif-RGBA]", "Tests/test_file_pcx.py::test_break_one_at_end", "Tests/test_image_tobitmap.py::test_sanity", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/p_trns_single.png-None]", "Tests/test_file_gif.py::test_identical_frames", "Tests/test_image_convert.py::test_matrix_illegal_conversion", "Tests/test_file_apng.py::test_seek_after_close", "Tests/test_file_pcx.py::test_odd[L]", "Tests/test_file_pdf.py::test_dpi[params0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_R8G8B8A8_UNORM_SRGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/png_decompression_dos.png]", "Tests/test_image_crop.py::test_negative_crop[box1]", "Tests/test_image_reduce.py::test_mode_La[1]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[sRGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc1_typeless.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r10.fli]", "Tests/test_imagedraw.py::test_point[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1.blp]", "Tests/test_image_reduce.py::test_mode_L[5]", "Tests/test_file_im.py::test_unclosed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_5.webp]", "Tests/test_core_resources.py::TestCoreMemory::test_clear_cache_stats", "Tests/test_file_hdf5stub.py::test_open", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox1]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration1]", "Tests/test_imagefile.py::TestImageFile::test_negative_stride", "Tests/test_image_reduce.py::test_mode_RGBA[factor10]", "Tests/test_image_filter.py::test_sanity[I-SMOOTH_MORE]", "Tests/test_file_dds.py::test_dx10_r8g8b8a8_unorm_srgb", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_raw.blp]", "Tests/test_features.py::test_check_codecs[jpg_2000]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.0-5.5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-bff0a9dc7243a8e6ede2408d2ffa6a9964698b87.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_bl_rle.tga]", "Tests/test_file_tiff.py::TestFileTiff::test_unknown_pixel_mode", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.3-3.7]", "Tests/test_file_container.py::test_read_n0[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_md_center.png]", "Tests/test_file_icns.py::test_save_fp", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32768-I;16B]", "Tests/test_image.py::TestImage::test_readonly_save", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/zero_bb_scale2.png-None]", "Tests/test_file_gif.py::test_optimize_correctness[129-511-129]", "Tests/test_image_rotate.py::test_translate", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_save_all", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h_sf.dds]", "Tests/test_imagewin.py::TestImageWin::test_hdc", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab-red.tif]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-True-True]", "Tests/test_imagefile.py::TestPyEncoder::test_oversize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/total-pages-zero.tif]", "Tests/test_file_xbm.py::test_pil151", "Tests/test_box_blur.py::test_color_modes", "Tests/test_imagedraw.py::test_line[points3]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[RGB]", "Tests/test_image_quantize.py::test_octree_quantize", "Tests/test_imagedraw.py::test_chord[bbox2-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_45.png]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc.png]", "Tests/test_imageenhance.py::test_alpha[Color]", "Tests/test_file_gif.py::test_dispose_background", "Tests/test_image.py::TestImage::test_zero_frombytes[size2]", "Tests/test_file_tiff.py::TestFileTiff::test_save_bmp_compression", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius2]", "Tests/test_image_reduce.py::test_mode_RGB[factor6]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_eps.py::test_image_mode_not_supported", "Tests/test_file_tiff.py::TestFileTiff::test_save_float_dpi", "Tests/test_image_filter.py::test_consistency_3x3[LA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[4]", "Tests/test_image_filter.py::test_sanity[I-DETAIL]", "Tests/test_image.py::TestImage::test_getchannel", "Tests/test_file_jpeg.py::TestFileJpeg::test_cmyk", "Tests/test_file_gif.py::test_palette_save_ImagePalette", "Tests/test_file_im.py::test_name_limit", "Tests/test_file_ppm.py::test_header_token_too_long", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.dds]", "Tests/test_image_transpose.py::test_transpose[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_rt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb.ico]", "Tests/test_file_tar.py::test_contextmanager", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65537]", "Tests/test_imagedraw.py::test_ellipse[bbox3-RGB]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[2]", "Tests/test_util.py::test_is_path[test_path1]", "Tests/test_file_tiff.py::TestFileTiff::test_oom[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_ico", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w126.bmp]", "Tests/test_file_ppm.py::test_plain_data_with_comment[P3\\n2 2\\n255-0 0 0 001 1 1 2 2 2 255 255 255-1000000]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[RGB]", "Tests/test_image_crop.py::test_crop_crash", "Tests/test_image_split.py::test_split_open", "Tests/test_imagepalette.py::test_make_linear_lut", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.wal]", "Tests/test_file_spider.py::test_is_int_not_a_number", "Tests/test_image_quantize.py::test_quantize_kmeans[0]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fcTL]", "Tests/test_file_jpeg.py::TestFileJpeg::test_separate_tables", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.3-3.7]", "Tests/test_file_dds.py::test_invalid_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[3-0-5]", "Tests/test_image_rotate.py::test_angle[0]", "Tests/test_file_psd.py::test_combined_larger_than_size", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points3]", "Tests/test_file_ico.py::test_save_256x256", "Tests/test_imagesequence.py::test_palette_mmap", "Tests/test_image_reduce.py::test_mode_LA_opaque[4]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[RGBX]", "Tests/test_file_gif.py::test_n_frames[Tests/images/comment_after_last_frame.gif-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid-exif.jpg]", "Tests/test_binary.py::test_little_endian", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_ellipse_RGB.png]", "Tests/test_imagedraw.py::test_incorrectly_ordered_coordinates[xy1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_frame.gif]", "Tests/test_image_quantize.py::test_palette[1-color1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8rle.bmp]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor10]", "Tests/test_file_eps.py::test_readline[\\n\\r-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/itxt_chunks.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cbdt_mask.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_x_max_and_y_offset.png]", "Tests/test_image_filter.py::test_modefilter[RGB-expected3]", "Tests/test_file_container.py::test_seek_mode[0-33]", "Tests/test_file_gimpgradient.py::test_linear_pos_gt_middle", "Tests/test_image_filter.py::test_sanity[L-EDGE_ENHANCE]", "Tests/test_imagedraw.py::test_rectangle_width[bbox1]", "Tests/test_image_reduce.py::test_mode_RGBA[factor12]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P5 3 1 257 \\x00\\x00\\x00\\x80\\x01\\x01-I-pixels5]", "Tests/test_file_ftex.py::test_invalid_file", "Tests/test_image_reduce.py::test_mode_La[factor6]", "Tests/test_file_gif.py::test_headers_saving_for_animated_gifs", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.xpm]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply22]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_height.j2k]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8nonsquare-v.png]", "Tests/test_file_dds.py::test_save[L-Tests/images/linear_gradient.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_large_buffer_highest_quality", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_unorm.dds-Tests/images/bc5_unorm.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_md.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[3]", "Tests/test_image_filter.py::test_sanity[CMYK-DETAIL]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_various_sizes_filled.png]", "Tests/test_image_filter.py::test_sanity[L-BLUR]", "Tests/test_file_dcx.py::test_sanity", "Tests/test_image_reduce.py::test_mode_LA_opaque[1]", "Tests/test_imagedraw.py::test_line_vertical", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev.gif]", "Tests/test_file_pcx.py::test_odd_read", "Tests/test_imagepalette.py::test_getcolor_not_special[0-palette0]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[RGBA]", "Tests/test_imagepath.py::test_path_constructors[\\x00\\x00\\x00\\x00\\x00\\x00\\x80?]", "Tests/test_file_dds.py::test_sanity_ati1_bc4u[Tests/images/bc4u.dds]", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[1-0-15]", "Tests/test_image_rotate.py::test_mode[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r01.fli]", "Tests/test_file_bmp.py::test_rle4", "Tests/test_file_gif.py::test_closed_file", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[1]", "Tests/test_image_reduce.py::test_mode_L[factor6]", "Tests/test_image_reduce.py::test_args_box_error[size2-ValueError]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_target.png]", "Tests/test_pdfparser.py::test_indirect_refs", "Tests/test_box_blur.py::test_radius_1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/color_snakes.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_y_odd.png]", "Tests/test_file_gif.py::test_seek_info", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_5.tif]", "Tests/test_imagedraw.py::test_ellipse_edge", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/la.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illuCS6_preview.eps]", "Tests/test_binary.py::test_big_endian", "Tests/test_imagedraw.py::test_pieslice_width[bbox2]", "Tests/test_imagedraw2.py::test_big_rectangle", "Tests/test_file_bmp.py::test_save_bmp_with_dpi", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test.colors.gif]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-0.6-0-9.1]", "Tests/test_file_xvthumb.py::test_invalid_file", "Tests/test_file_png.py::TestFilePng::test_repr_png", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r05.fli]", "Tests/test_file_mpo.py::test_reload_exif_after_seek", "Tests/test_file_dds.py::test_sanity_dxt5", "Tests/test_image_thumbnail.py::test_float", "Tests/test_imagepath.py::test_transform", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r02.fli]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-1.5-5.5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_name.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r08.fli]", "Tests/test_file_jpeg.py::TestFileJpeg::test_smooth", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background.png]", "Tests/test_image_filter.py::test_sanity[L-SMOOTH_MORE]", "Tests/test_util.py::test_is_path[test_path2]", "Tests/test_file_iptc.py::test_getiptcinfo_zero_padding", "Tests/test_file_tiff_metadata.py::test_ifd_signed_rational", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[L]", "Tests/test_file_fli.py::test_seek_tell", "Tests/test_file_pcx.py::test_break_in_count_overflow", "Tests/test_image_filter.py::test_sanity[I-EDGE_ENHANCE]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/zero_bb.png-None]", "Tests/test_image_reduce.py::test_unsupported_modes[P]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-0.6-0-9.1]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-50-50-0]", "Tests/test_file_tiff.py::TestFileTiff::test_int_resolution", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy1-x_odd]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.5-3.7]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[BGR;15]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illu10_preview.eps]", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color0-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_tl_raw.tga]", "Tests/test_file_ico.py::test_palette", "Tests/test_file_pcx.py::test_large_count", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none_load_end.gif]", "Tests/test_image_putdata.py::test_array_B", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/jpeg_ff00_header.jpg]", "Tests/test_imagemorph.py::test_lut[edge]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/ossfuzz-5730089102868480.sgi]", "Tests/test_file_mpo.py::test_parallax", "Tests/test_imageops_usm.py::test_usm_accuracy", "Tests/test_file_apng.py::test_apng_chunk_errors", "Tests/test_imagechops.py::test_lighter_pixel", "Tests/test_image_reduce.py::test_mode_La[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w2px_inverted.png]", "Tests/test_image_rotate.py::test_zero[0]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox3]", "Tests/test_file_gif.py::test_seek_after_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyny.png]", "Tests/test_imagemath.py::test_logical_ne", "Tests/test_file_jpeg.py::TestFileJpeg::test_large_exif", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/copyleft.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati1.png]", "Tests/test_imagemorph.py::test_lut[erosion8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cmx3g8_wv_1998.260_0745_mcidas.ara]", "Tests/test_file_mpo.py::test_sanity[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/rletopdown.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_polygon_L.png]", "Tests/test_image.py::TestImage::test_exif_load_from_fp", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[BGR;15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_ter_pl_target.png]", "Tests/test_file_mpo.py::test_app[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/binary_preview_map.eps]", "Tests/test_image.py::TestImage::test_empty_exif", "Tests/test_image_reduce.py::test_mode_RGB[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_round.png]", "Tests/test_file_gif.py::test_save_I", "Tests/test_image.py::TestImage::test_unknown_extension", "Tests/test_box_blur.py::test_radius_bigger_then_half", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/p_trns_single.png-None]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle7-0-ValueError-rotation should be an int or float]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/03r00.fli]", "Tests/test_psdraw.py::test_stdout[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-bba4f2e026b5786529370e5dfe9a11b1bf991f07.blp]", "Tests/test_file_xpm.py::test_sanity", "Tests/test_image_filter.py::test_sanity[RGB-MedianFilter]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-True-False]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-60d8b7c8469d59fc9ffff6b3a3dc0faeae6ea8ee.blp]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[L]", "Tests/test_features.py::test_check_modules[littlecms2]", "Tests/test_tiff_ifdrational.py::test_nonetype", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_zero_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_1_raqm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-5762152299364352.fli]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_bitmap.png]", "Tests/test_file_im.py::test_tell", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage_transparency.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.deflate.tif]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-2]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gimp_gradient.ggr]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ls.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-0.1-0-3.7]", "Tests/test_image.py::TestImage::test_internals", "Tests/test_image_transpose.py::test_rotate_270[I;16B]", "Tests/test_image_draft.py::test_mode", "Tests/test_file_dds.py::test_short_header", "Tests/test_image_reduce.py::test_mode_RGB[factor16]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox3]", "Tests/test_file_wmf.py::test_load", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[1]", "Tests/test_image_rotate.py::test_fastpath_translate", "Tests/test_file_dds.py::test_dx10_bc4[Tests/images/bc4_unorm.dds]", "Tests/test_file_imt.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/not_enough_data.jp2]", "Tests/test_image_reduce.py::test_mode_RGB[6]", "Tests/test_imagemorph.py::test_roundtrip_mrl", "Tests/test_imagedraw.py::test_arc_no_loops[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGB_target.png]", "Tests/test_imageops.py::test_palette[PA]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/pil123p.png-None]", "Tests/test_image_filter.py::test_sanity[I-UnsharpMask]", "Tests/test_file_xbm.py::test_open_filename_with_underscore", "Tests/test_features.py::test_check_warns_on_nonexistent", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_8.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb16-231.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_rgb.png]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[1-bounding_circle1-0-ValueError-n_sides should be an int > 2]", "Tests/test_deprecate.py::test_action[Upgrade to new thing.]", "Tests/test_image.py::TestImage::test_zero_frombytes[size1]", "Tests/test_file_im.py::test_roundtrip[RGB]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[4]", "Tests/test_image.py::TestImage::test_radial_gradient_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_layer_count.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_various_sizes.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[L]", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/bc1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24prof.bmp]", "Tests/test_file_mpo.py::test_eoferror", "Tests/test_file_jpeg.py::TestFileJpeg::test_quality", "Tests/test_image_crop.py::test_crop[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mt.png]", "Tests/test_image.py::TestImage::test_no_new_file_on_error", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1.png]", "Tests/test_imagestat.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ttb.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[RGBX]", "Tests/test_box_blur.py::test_radius_0_02", "Tests/test_file_ppm.py::test_sanity", "Tests/test_image_reduce.py::test_mode_RGBa[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bad_palette_file.gpl]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_no_prefix.jpg]", "Tests/test_lib_pack.py::TestLibUnpack::test_1", "Tests/test_file_gif.py::test_bbox_alpha", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[acTL]", "Tests/test_image_transform.py::TestImageTransform::test_extent", "Tests/test_image_getbbox.py::test_bbox", "Tests/test_imagefontpil.py::test_unicode", "Tests/test_file_tga.py::test_sanity[P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_bl_raw.tga]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P2 3 1 4 0 2 4-L-pixels0]", "Tests/test_image_split.py::test_split_merge[RGBA]", "Tests/test_imagechops.py::test_darker_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill2.png]", "Tests/test_image_transpose.py::test_rotate_270[I;16L]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-PA]", "Tests/test_image_filter.py::test_consistency_3x3[L]", "Tests/test_image_copy.py::test_copy[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_8.webp]", "Tests/test_lib_pack.py::TestLibUnpack::test_CMYK16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_mm.png]", "Tests/test_file_eps.py::test_timeout[Tests/images/timeout-d675703545fee17acab56e5fec644c19979175de.eps]", "Tests/test_image_split.py::test_split_merge[YCbCr]", "Tests/test_file_pixar.py::test_sanity", "Tests/test_file_imt.py::test_invalid_file[\\n-]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5s.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_ycbcr_jpeg_1x1_sampling.tif]", "Tests/test_image_transpose.py::test_rotate_270[L]", "Tests/test_file_container.py::test_read_n0[False]", "Tests/test_file_gif.py::test_optimize_correctness[256-511-256]", "Tests/test_file_tiff.py::TestFileTiff::test_saving_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000002]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox3]", "Tests/test_file_ico.py::test_only_save_relevant_sizes", "Tests/test_file_psd.py::test_unclosed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ms.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65536]", "Tests/test_imagedraw2.py::test_line[points2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_6.webp]", "Tests/test_image_reduce.py::test_mode_I[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_frame_size.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/notes]", "Tests/test_file_dds.py::test_save[RGB-Tests/images/hopper.png]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-1.5-5.5]", "Tests/test_file_jpeg.py::TestFileJpeg::test_qtables", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/different_durations.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow.icns]", "Tests/test_image_filter.py::test_sanity_error[RGB]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/zero_bb.png-None]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[L]", "Tests/test_image.py::TestImage::test_constants", "Tests/test_file_icns.py::test_getimage", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit.ppm]", "Tests/test_image_transpose.py::test_rotate_270[I;16]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy0-30.5-given]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-3]", "Tests/test_imagepath.py::test_map[coords1-expected1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ma.png]", "Tests/test_lib_pack.py::TestLibPack::test_RGBA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_background_text.png]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/itxt_chunks.png-None]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_region.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/expected_to_read.jp2]", "Tests/test_image_transform.py::TestImageTransform::test_unknown_resampling_filter[unknown]", "Tests/test_image_entropy.py::test_entropy", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_16bit_RGBa.tiff]", "Tests/test_file_mpo.py::test_closed_file", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-L]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-1.1-6.9]", "Tests/test_image_putpalette.py::test_imagepalette", "Tests/test_file_pdf.py::test_save[RGB]", "Tests/test_image_rotate.py::test_rotate_no_fill", "Tests/test_file_mpo.py::test_mp_offset", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-9139147ce93e20eb14088fe238e541443ffd64b3.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-abcf1c97b8fe42a6c68f1fb0b978530c98d57ced.sgi]", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat_zero_chunk.png]", "Tests/test_imagedraw.py::test_triangle_right_width[fill0-width]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_edge.png]", "Tests/test_file_msp.py::test_open_windows_v1", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[RGB]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-74d2a78403a5a59db1fb0a2b8735ac068a75f6e3.tif]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_resize[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right_width_no_fill.png]", "Tests/test_image_reduce.py::test_mode_RGBA[3]", "Tests/test_image_filter.py::test_sanity[RGB-EMBOSS]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb24.jpg]", "Tests/test_file_gif.py::test_dispose_none", "Tests/test_imagedraw2.py::test_polygon[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_8.tga]", "Tests/test_imagedraw.py::test_default_font_size", "Tests/test_file_gif.py::test_dispose_none_load_end", "Tests/test_image_getcolors.py::test_pack", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_right.png]", "Tests/test_image_reduce.py::test_mode_RGBA[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_high.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[0-None]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply15]", "Tests/test_image_filter.py::test_sanity[CMYK-EDGE_ENHANCE]", "Tests/test_file_blp.py::test_load_blp1", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat.png]", "Tests/test_map.py::test_tobytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overflow.fli]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/linear_gradient.png]", "Tests/test_image_crop.py::test_wide_crop", "Tests/test_image.py::TestImage::test_one_item_tuple", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_width_fill.png]", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_typeless.dds-Tests/images/bc5_unorm.dds]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.tif-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_invalid.png]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bw_gradient.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.mic]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/balloon_eciRGBv2_aware.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/notes]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox3]", "Tests/test_image_histogram.py::test_histogram", "Tests/test_image.py::TestImage::test_radial_gradient[F]", "Tests/test_imagedraw.py::test_ellipse_symmetric", "Tests/test_imagepalette.py::test_rawmode_valueerrors", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_bad_mpo_header.jpg]", "Tests/test_file_tiff.py::TestFileTiff::test_timeout", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox1]", "Tests/test_file_png.py::TestFilePng::test_trns_rgb", "Tests/test_image_resample.py::TestCoreResampleBox::test_passthrough", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[RGBA]", "Tests/test_image_convert.py::test_l_macro_rounding[L]", "Tests/test_image_mode.py::test_properties[P-P-L-1-expected_band_names2]", "Tests/test_imagedraw2.py::test_ellipse[bbox2]", "Tests/test_file_cur.py::test_invalid_file", "Tests/test_image_rotate.py::test_alpha_rotate_with_fill", "Tests/test_file_gif.py::test_l_mode_transparency", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor9]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[RGB]", "Tests/test_image_filter.py::test_sanity[I-ModeFilter]", "Tests/test_imagefile.py::TestImageFile::test_parser", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi[Tests/images/hopper.jpg]", "Tests/test_image.py::TestRegistry::test_encode_registry", "Tests/test_imagedraw.py::test_chord_zero_width[bbox1]", "Tests/test_image_putdata.py::test_sanity", "Tests/test_imagepath.py::test_path", "Tests/test_image_access.py::TestImageGetPixel::test_basic[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.webp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_multiple_frame_loop.tiff]", "Tests/test_file_dcx.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_gps_typeerror.jpg]", "Tests/test_file_fli.py::test_tell", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/clipboard.dib]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_compat", "Tests/test_imagefontpil.py::test_textbbox", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_typeless.dds]", "Tests/test_image_thumbnail.py::test_reducing_gap_for_DCT_scaling", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[None-1.5]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_with_normals_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_lt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_after_rgb.gif]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_imagemath.py::test_logical_lt", "Tests/test_file_hdf5stub.py::test_invalid_file", "Tests/test_image_rotate.py::test_fastpath_center", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/colr_bungee.png]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply20]", "Tests/test_file_mpo.py::test_frame_size", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox2]", "Tests/test_image_reduce.py::test_mode_La[6]", "Tests/test_file_spider.py::test_tempfile", "Tests/test_image_filter.py::test_sanity[RGB-UnsharpMask]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r11.fli]", "Tests/test_image_reduce.py::test_mode_RGBA[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_wmf_ref_144.png]", "Tests/test_image_filter.py::test_rankfilter[I-expected3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ra.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w125.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_save_setting_missing_resolution", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65519]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w124.bmp]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_vertical[0]", "Tests/test_imagedraw2.py::test_rectangle[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnyn.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chromacheck-sbix_mask.png]", "Tests/test_file_im.py::test_sanity", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[1]", "Tests/test_image_reduce.py::test_mode_La[factor9]", "Tests/test_image_filter.py::test_sanity[L-EMBOSS]", "Tests/test_image_putdata.py::test_mode_i[I;16]", "Tests/test_imageenhance.py::test_crash", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-db8bfa78b19721225425530c5946217720d7df4e.sgi]", "Tests/test_file_apng.py::test_apng_repeated_seeks_give_correct_info", "Tests/test_image_point.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r04.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal4rletrns.bmp]", "Tests/test_imagedraw.py::test_pieslice_width[bbox3]", "Tests/test_image_getpalette.py::test_palette_rawmode", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox0]", "Tests/test_image.py::TestImage::test_image_modes_success[RGB]", "Tests/test_file_tar.py::test_unclosed_file", "Tests/test_file_mpo.py::test_app[Tests/images/frozenpond.mpo]", "Tests/test_image_reduce.py::test_mode_RGB[factor17]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif]", "Tests/test_image_reduce.py::test_mode_L[factor15]", "Tests/test_image_point.py::test_16bit_lut", "Tests/test_imagemorph.py::test_erosion4", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox0]", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_1bit_plain.pbm-Tests/images/hopper_1bit.pbm]", "Tests/test_imagedraw.py::test_continuous_horizontal_edges_polygon", "Tests/test_image_quantize.py::test_palette[2-color2]", "Tests/test_image_rotate.py::test_mode[I]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-060745d3f534ad6e4128c51d336ea5489182c69d.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/different_transparency.gif]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox3]", "Tests/test_core_resources.py::TestCoreMemory::test_set_blocks_max", "Tests/test_image_quantize.py::test_quantize_no_dither", "Tests/test_file_eps.py::test_binary", "Tests/test_imageops.py::test_exif_transpose", "Tests/test_file_gbr.py::test_multiple_load_operations", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rectangle_surrounding_text.png]", "Tests/test_imagedraw.py::test_ellipse[bbox0-L]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[RGBA]", "Tests/test_image_filter.py::test_sanity[RGB-BLUR]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower.jpg]", "Tests/test_file_png.py::TestFilePng::test_interlace", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_tl_rle.tga]", "Tests/test_image_transform.py::TestImageTransform::test_alpha_premult_resize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_center.png]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r01.fli]", "Tests/test_image_filter.py::test_sanity[RGB-MaxFilter]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox2]", "Tests/test_imagepalette.py::test_invalid_palette", "Tests/test_file_tiff.py::TestFileTiff::test_palette[PA]", "Tests/test_image.py::TestImage::test_invalid_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123rgba.png]", "Tests/test_box_blur.py::test_three_passes", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_not_needed_for_second_frame.gif]", "Tests/test_image_filter.py::test_consistency_5x5[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_unorm.png]", "Tests/test_file_ico.py::test_save_append_images", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8v4.bmp]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[P]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_8u", "Tests/test_file_pcx.py::test_odd[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_x_odd.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.iccprofile_binary.tif]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/zero_bb_scale2.png-None]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[RGB-band_numbers3-color must be int, or tuple of one, three or four elements]", "Tests/test_file_psd.py::test_negative_top_left_layer", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy0-x]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_mono.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_not_negative.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8rletrns.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8offs.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_raw.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_None.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_mt.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[RGB]", "Tests/test_imageops.py::test_autocontrast_preserve_gradient", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_tiff", "Tests/test_imagechops.py::test_soft_light", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_stroke_raqm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrow2.bin]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/second_frame_comment.gif]", "Tests/test_image_transpose.py::test_flip_top_bottom[RGB]", "Tests/test_file_gif.py::test_n_frames[Tests/images/hopper.gif-1]", "Tests/test_file_tiff_metadata.py::test_ifd_unsigned_rational", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_3.webp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb32bf.bmp]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor16]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGB]", "Tests/test_image_transform.py::TestImageTransform::test_mesh", "Tests/test_file_mpo.py::test_sanity[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit_plain.ppm]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[box1]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba32abf.bmp]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox2]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;15]", "Tests/test_file_gif.py::test_retain_comment_in_subsequent_frames", "Tests/test_image.py::TestImage::test_comparison_with_other_type", "Tests/test_font_bdf.py::test_invalid_file", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mm.png]", "Tests/test_file_bufrstub.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil168.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_l.png]", "Tests/test_file_tga.py::test_small_palette", "Tests/test_file_pdf.py::test_pdf_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.bmp]", "Tests/test_image_reduce.py::test_mode_LA[factor16]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-1.5-5.5]", "Tests/test_file_gif.py::test_optimize_correctness[64-511-64]", "Tests/test_image_reduce.py::test_mode_RGBa[factor6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_x.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5u.dds]", "Tests/test_image_reduce.py::test_args_factor_error[0-ValueError]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[3]", "Tests/test_imagedraw.py::test_ellipse_width[bbox1]", "Tests/test_imageenhance.py::test_sanity", "Tests/test_000_sanity.py::test_sanity", "Tests/test_image.py::TestImage::test_registered_extensions", "Tests/test_imagewin.py::TestImageWin::test_hwnd", "Tests/test_file_tiff_metadata.py::test_too_many_entries", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow2.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_sepia.png]", "Tests/test_file_tiff.py::TestFileTiff::test_sanity", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/p_trns_single.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_right.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_complex_unicode_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_test.jpg]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gimp_gradient_with_name.ggr]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32768-I;16]", "Tests/test_file_sgi.py::test_rgb16", "Tests/test_imagefile.py::TestImageFile::test_truncated", "Tests/test_imagepalette.py::test_getcolor", "Tests/test_file_dds.py::test_dx10_bc6h[Tests/images/bc6h_sf.dds]", "Tests/test_image_filter.py::test_crash[size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_width_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_descender.png]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_width.png]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/non_zero_bb.png-None]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-RGB]", "Tests/test_file_tar.py::test_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-64834657ee604b8797bf99eac6a194c124a9a8ba.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/missing_background_first_frame.png]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16L]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords0]", "Tests/test_imagemath.py::test_one_image_larger", "Tests/test_image.py::TestImage::test_radial_gradient[P]", "Tests/test_image_transpose.py::test_rotate_180[RGB]", "Tests/test_image_reduce.py::test_mode_RGBa[factor9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_ter_en_target.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pcx_overrun2.bin]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-1.1-6.9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_translucent.png]", "Tests/test_tiff_ifdrational.py::test_ranges", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_eof_before_boundingbox.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-4f085cc12ece8cde18758d42608bed6a2a2cfb1c.tif]", "Tests/test_image.py::TestImage::test_overrun[fli_overrun.bin]", "Tests/test_file_ppm.py::test_plain_ppm_value_negative", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color1-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_padded.jpg]", "Tests/test_file_ico.py::test_load", "Tests/test_file_container.py::test_readlines[False]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[BGR;24]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_overflow", "Tests/test_file_mpo.py::test_exif[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r03.fli]", "Tests/test_image_quantize.py::test_quantize", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox3]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-L]", "Tests/test_file_xbm.py::test_invalid_file", "Tests/test_imagedraw.py::test_big_rectangle", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-0-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.webp]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.png]", "Tests/test_file_pdf.py::test_redos[\\r]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-6646305047838720]", "Tests/test_mode_i16.py::test_basic[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_center.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_fdat_fctl.png]", "Tests/test_image_tobytes.py::test_sanity", "Tests/test_imagedraw.py::test_rectangle_width[bbox3]", "Tests/test_imageenhance.py::test_alpha[Sharpness]", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size0]", "Tests/test_imagedraw.py::test_ellipse[bbox2-L]", "Tests/test_image_filter.py::test_consistency_5x5[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_4.tif]", "Tests/test_file_pcx.py::test_break_many_in_loop", "Tests/test_image_resize.py::TestImageResize::test_resize", "Tests/test_image_filter.py::test_sanity[I-SMOOTH]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_rectangle_RGB.png]", "Tests/test_map.py::test_overflow", "Tests/test_file_gif.py::test_strategy", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h_sf.png]", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun2.bin]", "Tests/test_file_im.py::test_n_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGBa.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb24pal.bmp]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_itxt", "Tests/test_file_im.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_grayscale_alpha.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_unexpected.ico]", "Tests/test_image_filter.py::test_sanity[L-MaxFilter]", "Tests/test_image_convert.py::test_16bit", "Tests/test_file_dds.py::test_uncompressed[L-size0-Tests/images/uncompressed_l.dds]", "Tests/test_file_mpo.py::test_exif[Tests/images/frozenpond.mpo]", "Tests/test_imagemath.py::test_convert", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pngtest_bad.png.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_8_raqm.png]", "Tests/test_image.py::TestImage::test_linear_gradient[I]", "Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard", "Tests/test_imagemath.py::test_prevent_exec[(lambda: exec('pass'))()]", "Tests/test_file_tar.py::test_sanity[jpg-hopper.jpg-JPEG]", "Tests/test_image_split.py::test_split_merge[CMYK]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.0-5.5]", "Tests/test_file_ico.py::test_no_duplicates", "Tests/test_file_pcx.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/a.fli]", "Tests/test_file_jpeg.py::TestFileJpeg::test_truncated_jpeg_should_read_all_the_data", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_noise.tif]", "Tests/test_image_putpalette.py::test_putpalette", "Tests/test_file_ico.py::test_unexpected_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_negative.png]", "Tests/test_file_dds.py::test_sanity_dxt3", "Tests/test_image_draft.py::test_several_drafts", "Tests/test_image_transpose.py::test_transpose[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_chord_L.png]", "Tests/test_image_split.py::test_split_merge[L]", "Tests/test_image_reduce.py::test_unsupported_modes[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line_truncated.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_typeerror.jpg]", "Tests/test_file_msp.py::test_sanity", "Tests/test_image_crop.py::test_crop[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_tags_orientation_exiftool.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.3-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit.pgm]", "Tests/test_file_gif.py::test_eoferror", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_RGBa[factor15]", "Tests/test_imagesequence.py::test_iterator_min_frame", "Tests/test_file_psd.py::test_sanity", "Tests/test_pdfparser.py::test_parsing", "Tests/test_imagedraw.py::test_rounded_rectangle[xy1]", "Tests/test_imagefile.py::TestPyDecoder::test_extents_none", "Tests/test_box_blur.py::test_radius_0_5", "Tests/test_imagedraw.py::test_line_oblique_45", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns-b.png]", "Tests/test_imagepath.py::test_path_constructors[coords2]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.5-3.7]", "Tests/test_file_palm.py::test_oserror[RGB]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[0]", "Tests/test_image_getcolors.py::test_getcolors", "Tests/test_image_frombytes.py::test_sanity[memoryview]", "Tests/test_file_xpm.py::test_invalid_file", "Tests/test_file_container.py::test_readlines[True]", "Tests/test_file_tiff_metadata.py::test_iccprofile_binary_save_png", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_jpg.tif]", "Tests/test_file_gif.py::test_seek_rewind", "Tests/test_file_bmp.py::test_rle8", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_large_buffer", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.spider]", "Tests/test_file_png.py::TestFilePng::test_broken", "Tests/test_image_thumbnail.py::test_reducing_gap_values", "Tests/test_imagemath.py::test_binary_mod", "Tests/test_file_pdf.py::test_monochrome", "Tests/test_image_reduce.py::test_mode_LA[factor6]", "Tests/test_imagepath.py::test_getbbox[0-expected2]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-abcf1c97b8fe42a6c68f1fb0b978530c98d57ced.sgi]", "Tests/test_file_eps.py::test_long_binary_data[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image.py::TestImage::test_linear_gradient[P]", "Tests/test_file_imt.py::test_invalid_file[width 1\\n]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage-lastframe.tif]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[65535-I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_0.jpg]", "Tests/test_imagedraw2.py::test_ellipse[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg2.blp]", "Tests/test_file_msp.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/notes]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_lzw.tiff]", "Tests/test_image_reduce.py::test_mode_I[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_extents.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_line.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp_write.ppm]", "Tests/test_imagechops.py::test_multiply_green", "Tests/test_file_gif.py::test_optimize_correctness[64-513-256]", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color0-P]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/test-card.png-None]", "Tests/test_imagecolor.py::test_rounding_errors", "Tests/test_file_tiff.py::TestFileTiff::test_get_photoshop_blocks", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bad_palette_entry.gpl]", "Tests/test_lib_pack.py::TestLibPack::test_YCbCr", "Tests/test_file_jpeg.py::TestFileJpeg::test_eof", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24largepal.bmp]", "Tests/test_image.py::TestImage::test_fp_name", "Tests/test_file_gif.py::test_optimize_correctness[128-511-128]", "Tests/test_image_mode.py::test_properties[RGBA-RGB-L-4-expected_band_names6]", "Tests/test_file_png.py::TestTruncatedPngPLeaks::test_leak_load", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_scale2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_2_basic.png]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_lzma.tif]", "Tests/test_imagefile.py::TestImageFile::test_safeblock", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_adobe_deflate.png]", "Tests/test_imagedraw2.py::test_rectangle[bbox3]", "Tests/test_imagedraw.py::test_chord_width[bbox3]", "Tests/test_file_png.py::TestFilePng::test_exif_from_jpg", "Tests/test_file_im.py::test_eoferror", "Tests/test_image_frombytes.py::test_sanity[bytes]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32769-I;16B]", "Tests/test_lib_pack.py::TestLibPack::test_RGBa", "Tests/test_image_filter.py::test_sanity[CMYK-EMBOSS]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_app14.jpg]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/zero_bb_scale2.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badbitcount.bmp]", "Tests/test_file_jpeg.py::TestFileJpeg::test_subsampling", "Tests/test_imagefile.py::TestImageFile::test_truncated_without_errors", "Tests/test_image_putdata.py::test_mode_i[I;16L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[3]", "Tests/test_mode_i16.py::test_convert", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/child_ifd.tiff]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGBA]", "Tests/test_file_gd.py::test_sanity", "Tests/test_file_jpeg.py::TestFileJpeg::test_load_16bit_qtables", "Tests/test_file_gif.py::test_read_multiple_comment_blocks", "Tests/test_image_reduce.py::test_mode_RGBa[6]", "Tests/test_file_palm.py::test_p_mode - Palm P image is wrong", "Tests/test_image.py::TestImage::test_image_modes_success[RGBa]", "Tests/test_font_pcf_charsets.py::test_draw[cp1250]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gfs.t06z.rassda.tm00.bufr_d]", "Tests/test_image_reduce.py::test_unsupported_modes[I;16]", "Tests/test_lib_pack.py::TestLibPack::test_RGBX", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_4_basic.png]", "Tests/test_image_reduce.py::test_mode_LA[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab-green.tif]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_4.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit.pgm]", "Tests/test_lib_pack.py::TestLibPack::test_F_float", "Tests/test_file_fli.py::test_timeouts[Tests/images/timeout-bff0a9dc7243a8e6ede2408d2ffa6a9964698b87.fli]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords3]", "Tests/test_lib_pack.py::TestLibPack::test_I", "Tests/test_image_crop.py::test_crop[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_1px_high_translucent.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badheadersize.bmp]", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var1]", "Tests/test_file_gif.py::test_optimize_full_l", "Tests/test_features.py::test_version", "Tests/test_main.py::test_main", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1a.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_complex_unicode_text2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ttb_lb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/different_transparency_merged.png]", "Tests/test_image_filter.py::test_sanity[I-MaxFilter]", "Tests/test_file_dcx.py::test_eoferror", "Tests/test_file_dds.py::test__accept_false", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[I]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[2]", "Tests/test_file_tiff.py::TestFileTiff::test_rowsperstrip", "Tests/test_image_split.py::test_split_merge[P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.xbm]", "Tests/test_imageops.py::test_contain[new_size0]", "Tests/test_imagedraw.py::test_same_color_outline[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBA]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[1]", "Tests/test_image_rotate.py::test_angle[90]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox0]", "Tests/test_imagedraw.py::test_triangle_right_width[None-width_no_fill]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_2.jpg]", "Tests/test_image_transpose.py::test_flip_left_right[L]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-False-True]", "Tests/test_file_ppm.py::test_plain_ppm_value_too_large", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[RGB]", "Tests/test_image_getim.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2I.tif]", "Tests/test_mode_i16.py::test_tobytes", "Tests/test_file_palm.py::test_oserror[L]", "Tests/test_features.py::test_supported_modules", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chi.gif]", "Tests/test_image_convert.py::test_opaque", "Tests/test_box_blur.py::test_imageops_box_blur", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow2.icns]", "Tests/test_image_filter.py::test_sanity[CMYK-SHARPEN]", "Tests/test_imageops.py::test_autocontrast_preserve_tone", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_xref_entry.pdf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nynn.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_ma_center.png]", "Tests/test_imagedraw.py::test_line[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGB.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_right.png]", "Tests/test_image_reduce.py::test_mode_L[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile_none.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil168.png]", "Tests/test_file_spider.py::test_is_spider_image", "Tests/test_image_getextrema.py::test_extrema", "Tests/test_image.py::TestImage::test_effect_spread", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi[Tests/images/pil_sample_cmyk.jpg]", "Tests/test_file_ppm.py::test_header_with_comments", "Tests/test_image_reduce.py::test_mode_L[factor9]", "Tests/test_file_psd.py::test_context_manager", "Tests/test_file_mpo.py::test_save_all", "Tests/test_file_gimpgradient.py::test_linear_pos_le_middle", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_right.png]", "Tests/test_file_tiff.py::TestFileTiff::test_exif", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gif_header_data.pkl]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-RGB]", "Tests/test_image.py::TestImage::test_has_transparency_data", "Tests/test_image_resample.py::TestCoreResamplePasses::test_box_vertical", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[L]", "Tests/test_imagedraw.py::test_chord[bbox0-L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_dxt1.png]", "Tests/test_image_rotate.py::test_mode[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb_scale2.png]", "Tests/test_image.py::TestImage::test_exception_inheritance", "Tests/test_imagechops.py::test_subtract_scale_offset", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_256x256.ico]", "Tests/test_file_container.py::test_read_eof[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiple_exif.jpg]", "Tests/test_image_transpose.py::test_rotate_180[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_raw.tif]", "Tests/test_lib_pack.py::TestLibUnpack::test_I", "Tests/test_image_reduce.py::test_mode_I[factor11]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[L]", "Tests/test_imagedraw.py::test_rectangle_I16[bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_typeerror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_R8G8B8A8_UNORM_SRGB.dds]", "Tests/test_image_reduce.py::test_mode_L[2]", "Tests/test_image_reduce.py::test_mode_RGB[factor11]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-1.1-6.9]", "Tests/test_file_dds.py::test_save[LA-Tests/images/uncompressed_la.png]", "Tests/test_image_crop.py::test_crop[P]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_cmyk_buffer", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox0]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_no_icc_profile", "Tests/test_file_dcx.py::test_unclosed_file", "Tests/test_file_pdf.py::test_dpi[params1]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply17]", "Tests/test_imagechops.py::test_hard_light", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_RGB.png]", "Tests/test_imagechops.py::test_add", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32bf-abgr.bmp]", "Tests/test_file_ico.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.MM.cropped.tif]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r04.fli]", "Tests/test_file_pcx.py::test_1px_width", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0c7e0e8e11ce787078f00b5b0ca409a167f070e0.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/split_fdat.png]", "Tests/test_file_gif.py::test_roundtrip_info_duration", "Tests/test_mode_i16.py::test_basic[I;16B]", "Tests/test_imagedraw.py::test_draw_regular_polygon[3-triangle_width-args3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_jpeg.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/notes]", "Tests/test_file_mpo.py::test_mp_no_data", "Tests/test_file_apng.py::test_apng_syntax_errors", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[RGB]", "Tests/test_image_reduce.py::test_mode_LA_opaque[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.fits]", "Tests/test_image_convert.py::test_trns_p", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/baddens1.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_RGB.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[6]", "Tests/test_image.py::TestImage::test_storage_neg", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox0]", "Tests/test_imagemath.py::test_bitwise_xor", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynyy.png]", "Tests/test_file_fli.py::test_palette_chunk_second", "Tests/test_image_reduce.py::test_mode_LA[4]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cbdt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1bg.bmp]", "Tests/test_file_mcidas.py::test_valid_file", "Tests/test_imagemath.py::test_logical_equal", "Tests/test_file_sgi.py::test_write16", "Tests/test_image_filter.py::test_sanity_error[I]", "Tests/test_imagemath.py::test_logical_gt", "Tests/test_image.py::TestRegistry::test_encode_registry_fail", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yynn.png]", "Tests/test_file_psd.py::test_icc_profile", "Tests/test_file_pdf.py::test_save_all", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w101px.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder_chunk.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4u.dds]", "Tests/test_image_putpalette.py::test_undefined_palette_index", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnyy.png]", "Tests/test_image_thumbnail.py::test_DCT_scaling_edges", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_draw_regular_polygon[8-regular_octagon-args1]", "Tests/test_file_xvthumb.py::test_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_high.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_wmf_ref.png]", "Tests/test_imageshow.py::test_viewer_show[-1]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_wrong_args", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns_ycbc.jp2]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.tif-None]", "Tests/test_file_spider.py::test_unclosed_file", "Tests/test_format_hsv.py::test_hsv_to_rgb", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/itxt_chunks.png-None]", "Tests/test_file_wmf.py::test_register_handler", "Tests/test_file_ico.py::test_save_to_bytes_bmp[P]", "Tests/test_file_msp.py::test_cannot_save_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile_big.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns_ycbc.j2k]", "Tests/test_imagecolor.py::test_colormap", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_regular_octagon.png]", "Tests/test_file_png.py::TestFilePng::test_trns_p", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-1.5-5.5]", "Tests/test_file_ppm.py::test_pnm", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[La]", "Tests/test_imagepath.py::test_path_constructors[coords10]", "Tests/test_imagechops.py::test_blend", "Tests/test_imagedraw.py::test_ellipse[bbox1-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_mask.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r01.fli]", "Tests/test_image_putpalette.py::test_rgba_palette[RGBA-palette0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2R.tif]", "Tests/test_image_reduce.py::test_mode_F[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb.png]", "Tests/test_image_convert.py::test_trns_RGB", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/deerstalker.cur]", "Tests/test_file_mpo.py::test_mp_attribute[Tests/images/frozenpond.mpo]", "Tests/test_deprecate.py::test_replacement_and_action", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_none.png]", "Tests/test_imagedraw.py::test_chord[bbox3-RGB]", "Tests/test_decompression_bomb.py::TestDecompressionCrop::test_enlarge_crop", "Tests/test_image_resample.py::TestCoreResampleCoefficients::test_non_zero_coefficients", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width.png]", "Tests/test_image_transpose.py::test_flip_left_right[I;16B]", "Tests/test_image.py::TestImage::test_exit_fp", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/odd_stride.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_rb.png]", "Tests/test_file_fli.py::test_seek_after_close", "Tests/test_imageops.py::test_contain_round", "Tests/test_color_lut.py::TestTransformColorLut3D::test_3_to_3_channels", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[None-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing.emf]", "Tests/test_file_bmp.py::test_rgba_bitfields", "Tests/test_imagedraw.py::test_point[points2]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox2]", "Tests/test_imagepath.py::test_map[0-expected0]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[L]", "Tests/test_image_reduce.py::test_mode_RGB[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_float_coord_1_alt.png]", "Tests/test_image_filter.py::test_sanity[CMYK-MinFilter]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_tl_rle.tga]", "Tests/test_file_gimpgradient.py::test_linear_pos_le_small_middle", "Tests/test_imagedraw.py::test_arc_no_loops[bbox0]", "Tests/test_file_qoi.py::test_invalid_file", "Tests/test_image_reduce.py::test_mode_L[factor7]", "Tests/test_image_mode.py::test_properties[CMYK-RGB-L-4-expected_band_names8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_3.jpg]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[5]", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[True]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox2]", "Tests/test_file_png.py::TestFilePng::test_save_stdout[True]", "Tests/test_image_transpose.py::test_tranverse[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rotate_45_with_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_shape_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrow.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_final.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_1.jpg]", "Tests/test_file_gimppalette.py::test_sanity", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-598843abc37fc080ec36a2699ebbd44f795d3a6f.psd-UnidentifiedImageError]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-RGBA]", "Tests/test_imagedraw.py::test_arc_no_loops[bbox1]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[F]", "Tests/test_image_transpose.py::test_flip_top_bottom[L]", "Tests/test_image.py::TestImage::test_linear_gradient_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[5]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[L]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-754d9c7ec485ffb76a90eeaab191ef69a2a3a3cd.sgi]", "Tests/test_font_leaks.py::TestDefaultFontLeak::test_leak", "Tests/test_file_apng.py::test_apng_num_plays", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_slope1px_w2px.png]", "Tests/test_image_reduce.py::test_mode_F[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgba32.png]", "Tests/test_image_split.py::test_split_merge[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.bdf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_over_near_transparent.png]", "Tests/test_image_filter.py::test_sanity[L-UnsharpMask]", "Tests/test_imagedraw.py::test_chord[bbox0-RGB]", "Tests/test_imagecolor.py::test_color_too_long", "Tests/test_image.py::TestImage::test_image_modes_success[I]", "Tests/test_imagedraw.py::test_pieslice_no_spikes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32bf-rgba.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_transparent.png]", "Tests/test_font_pcf.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/readme.txt]", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size1]", "Tests/test_file_tga.py::test_save_id_section", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_binary_pgm.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/caption_6_33_22.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_stroke_basic.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tRNS_null_1x1.png]", "Tests/test_file_gif.py::test_bbox", "Tests/test_file_apng.py::test_apng_blend_transparency", "Tests/test_file_fits.py::test_truncated_fits", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/default_font.png]", "Tests/test_image_quantize.py::test_palette[0-color0]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[180-3]", "Tests/test_imagedraw.py::test_arc_width[bbox2]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif", "Tests/test_file_png.py::TestFilePng::test_textual_chunks_after_idat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_zero_numer.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_with_background.gif]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[65535-I;16B]", "Tests/test_imagepalette.py::test_2bit_palette", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-1]", "Tests/test_file_gif.py::test_dispose2_background_frame", "Tests/test_image_resize.py::TestImagingCoreResize::test_cross_platform", "Tests/test_file_png.py::TestFilePng::test_save_icc_profile", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_gps", "Tests/test_imagedraw.py::test_triangle_right", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_dispose.gif]", "Tests/test_imagepath.py::test_transform_with_wrap", "Tests/test_image_reduce.py::test_mode_La[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/pal8badindex.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_dict", "Tests/test_image_thumbnail.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper16.rgb]", "Tests/test_image_filter.py::test_rankfilter_properties", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_top_left_layer.psd]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-None]", "Tests/test_file_eps.py::test_binary_header_only", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r07.fli]", "Tests/test_image_reduce.py::test_mode_La[4]", "Tests/test_file_ppm.py::test_16bit_pgm", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.0-5.5]", "Tests/test_image_reduce.py::test_args_factor[size1-expected1]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius3]", "Tests/test_imagemorph.py::test_lut[dilation4]", "Tests/test_file_png.py::TestFilePng::test_verify_struct_error", "Tests/test_image_transpose.py::test_tranverse[RGB]", "Tests/test_image_reduce.py::test_mode_La[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc7-argb-8bpp_MipMaps-1.dds]", "Tests/test_lib_pack.py::TestLibUnpack::test_I16", "Tests/test_file_ppm.py::test_pfm_big_endian", "Tests/test_image_reduce.py::test_mode_F[factor18]", "Tests/test_image_reduce.py::test_mode_La[factor16]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply22]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_polygon_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny.png]", "Tests/test_file_gbr.py::test_gbr_file", "Tests/test_imagedraw.py::test_chord_too_fat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_1_basic.png]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_bad_mpo_header", "Tests/test_image_reduce.py::test_mode_RGBa[factor12]", "Tests/test_file_ppm.py::test_plain_invalid_data[P1\\n128 128\\n1009]", "Tests/test_imagedraw.py::test_line[points0]", "Tests/test_image_rotate.py::test_center", "Tests/test_util.py::test_deferred_error", "Tests/test_file_ppm.py::test_truncated_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_ifd_offset_exif", "Tests/test_file_png.py::TestFilePng::test_load_transparent_rgb", "Tests/test_file_png.py::TestFilePng::test_load_verify", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-L]", "Tests/test_image_filter.py::test_sanity[RGB-DETAIL]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_I.tiff]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_values", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-0]", "Tests/test_imagemorph.py::test_edge", "Tests/test_file_gif.py::test_no_transparency_in_second_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_big_rectangle.png]", "Tests/test_pdfparser.py::test_text_encode_decode", "Tests/test_image.py::TestImage::test_getbands", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_blend.png]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGBA]", "Tests/test_imagemath.py::test_bitwise_leftshift", "Tests/test_image_transpose.py::test_transpose[RGB]", "Tests/test_file_gif.py::test_palette_save_duplicate_entries", "Tests/test_file_ico.py::test_mask", "Tests/test_imagemorph.py::test_lut[corner]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns-0.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_6194.j2k]", "Tests/test_lib_pack.py::TestLibPack::test_HSV", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right_width.png]", "Tests/test_file_tiff_metadata.py::test_write_metadata", "Tests/test_file_pcx.py::test_break_many_at_end", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_BC7_UNORM_SRGB.dds]", "Tests/test_image.py::TestImage::test_effect_spread_zero", "Tests/test_mode_i16.py::test_basic[L]", "Tests/test_imagedraw2.py::test_polygon[points1]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/non_zero_bb.png-None]", "Tests/test_image_filter.py::test_crash[size0]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_transform[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_tl_rle.tga]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 -inf \\x00\\x00\\x00\\x00]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_center.png]", "Tests/test_imagepath.py::test_path_constructors[coords7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badwidth.bmp]", "Tests/test_font_pcf.py::test_high_characters", "Tests/test_file_tga.py::test_missing_palette", "Tests/test_imagedraw.py::test_arc_width_fill[bbox2]", "Tests/test_imageshow.py::test_viewer", "Tests/test_file_tiff_metadata.py::test_empty_values", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/00r1_graya_la.jp2]", "Tests/test_file_apng.py::test_apng_save_disposal_previous", "Tests/test_file_png.py::TestFilePng::test_save_p_single_transparency", "Tests/test_image_reduce.py::test_mode_La[factor18]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_16bit.png]", "Tests/test_image_reduce.py::test_mode_RGBa[factor11]", "Tests/test_imagedraw.py::test_sanity", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy3-y]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.msp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_chord_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb.gif]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply16]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.3-3.7]", "Tests/test_image_convert.py::test_p2pa_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_left.png]", "Tests/test_file_gif.py::test_previous_frame_loaded", "Tests/test_imagedraw.py::test_mode_mismatch", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.r.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply17]", "Tests/test_image_resize.py::TestImagingCoreResize::test_convolution_modes", "Tests/test_image_load.py::test_close", "Tests/test_tiff_ifdrational.py::test_sanity", "Tests/test_file_apng.py::test_apng_save_alpha", "Tests/test_imagedraw.py::test_pieslice_width[bbox1]", "Tests/test_lib_image.py::test_setmode", "Tests/test_imagemath.py::test_prevent_exec[(lambda: (lambda: exec('pass'))())()]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[L]", "Tests/test_lib_pack.py::TestLibUnpack::test_LA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0e16d3bfb83be87356d026d66919deaefca44dac.tif]", "Tests/test_imagepath.py::test_getbbox_no_args", "Tests/test_image_filter.py::test_consistency_3x3[I]", "Tests/test_pdfparser.py::test_pdf_repr", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-ole-file.doc]", "Tests/test_file_dds.py::test_unsupported_bitcount", "Tests/test_file_fli.py::test_crash[Tests/images/crash-5762152299364352.fli]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_bytes[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.pil]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-d2c93af851d3ab9a19e34503626368b2ecde9c03.j2k]", "Tests/test_file_spider.py::test_closed_file", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-None]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment[]", "Tests/test_file_gimpgradient.py::test_load_via_imagepalette", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox0]", "Tests/test_imageops.py::test_contain[new_size1]", "Tests/test_file_hdf5stub.py::test_handler", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynny.png]", "Tests/test_file_fli.py::test_prefix_chunk", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_center.png]", "Tests/test_imageops_usm.py::test_usm_formats", "Tests/test_file_png.py::TestFilePng::test_getchunks", "Tests/test_imagefontpil.py::test_decompression_bomb", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox3]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[YCbCr]", "Tests/test_image_transpose.py::test_tranverse[I;16]", "Tests/test_image.py::TestImage::test__new", "Tests/test_image_rotate.py::test_angle[270]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16-565.png]", "Tests/test_imagedraw.py::test_arc_width[bbox3]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_identities", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[RGB]", "Tests/test_imageenhance.py::test_alpha[Brightness]", "Tests/test_file_eps.py::test_bounding_box_in_trailer", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/reproducing]", "Tests/test_image_filter.py::test_sanity[L-FIND_EDGES]", "Tests/test_image_transpose.py::test_roundtrip[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unknown_compression_method.png]", "Tests/test_imagedraw.py::test_polygon_kite[kite_points0-RGB]", "Tests/test_image_reduce.py::test_args_box_error[size3-ValueError]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[RGBA]", "Tests/test_image_reduce.py::test_mode_La[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiny.png]", "Tests/test_image_reduce.py::test_mode_F[5]", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_fallback_tiff", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_lzw.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_unknown_pixel_mode.tif]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor12]", "Tests/test_file_png.py::TestFilePng::test_verify_ignores_crc_error", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illu10_no_preview.eps]", "Tests/test_image_filter.py::test_sanity[L-SMOOTH]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/sgi_overrun_expandrowF04.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/app13-multiple.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_axes.png]", "Tests/test_imagedraw.py::test_chord[bbox2-L]", "Tests/test_file_dds.py::test__accept_true", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_number_of_loops.gif]", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/bmp/q/pal8rletrns.bmp-3670]", "Tests/test_image_reduce.py::test_mode_I[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_y_offset.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chromacheck-sbix.png]", "Tests/test_features.py::test_check_modules[webp]", "Tests/test_imagecolor.py::test_color_hsv", "Tests/test_file_eps.py::test_1_mode", "Tests/test_image.py::TestImage::test_getchannel_wrong_params", "Tests/test_file_jpeg.py::TestFileJpeg::test_multiple_exif", "Tests/test_image_filter.py::test_sanity[CMYK-MedianFilter]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_2_raqm.png]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16N]", "Tests/test_image_access.py::TestImagePutPixel::test_sanity", "Tests/test_image_reduce.py::test_mode_F[6]", "Tests/test_imageops.py::test_pad_round", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 inf \\x00\\x00\\x00\\x00]", "Tests/test_file_tiff_metadata.py::test_iccprofile_save_png", "Tests/test_file_spider.py::test_sanity", "Tests/test_core_resources.py::TestEnvVars::test_units", "Tests/test_file_pcx.py::test_break_padding", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color1-P]", "Tests/test_image_split.py::test_split_merge[1]", "Tests/test_file_pcx.py::test_invalid_file", "Tests/test_lib_pack.py::TestLibUnpack::test_RGB", "Tests/test_image_filter.py::test_sanity[I-EMBOSS]", "Tests/test_file_mpo.py::test_save[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r03.fli]", "Tests/test_image.py::TestImage::test_set_mode", "Tests/test_imageops.py::test_palette[P]", "Tests/test_image_reduce.py::test_mode_RGBa[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_repeat_chunk.png]", "Tests/test_file_wal.py::test_open", "Tests/test_file_gimpgradient.py::test_load_1_3_via_imagepalette", "Tests/test_imagepath.py::test_getbbox[coords0-expected0]", "Tests/test_file_png.py::TestFilePng::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/non_zero_bb.png-None]", "Tests/test_file_pdf.py::test_save[L]", "Tests/test_file_tiff.py::TestFileTiff::test__delitem__", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[box2-10]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_dpi", "Tests/test_lib_pack.py::TestLibUnpack::test_HSV", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_tuple_from_exif", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pal8_offset.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float", "Tests/test_file_tiff.py::TestFileTiff::test_save_unsupported_mode", "Tests/test_imagepalette.py::test_make_linear_lut_not_yet_implemented", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16.png]", "Tests/test_image.py::TestImage::test_fli_overrun2", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc7-argb-8bpp_MipMaps-1.png]", "Tests/test_file_gif.py::test_dispose2_background", "Tests/test_image.py::TestImage::test_check_size", "Tests/test_image_reduce.py::test_mode_F[factor8]", "Tests/test_file_tga.py::test_palette_depth_16", "Tests/test_imagemorph.py::test_set_lut", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[L]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1p1.png]", "Tests/test_imagedraw.py::test_rectangle_width[bbox0]", "Tests/test_image_filter.py::test_rankfilter[1-expected0]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[box1-1.5]", "Tests/test_image_reduce.py::test_mode_L[factor12]", "Tests/test_imagedraw.py::test_point_I16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pcx_overrun.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb_extents.gif]", "Tests/test_image.py::TestImage::test_image_modes_success[YCbCr]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc", "Tests/test_image_filter.py::test_sanity[L-MedianFilter]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox3]", "Tests/test_image_reduce.py::test_mode_LA[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r02.fli]", "Tests/test_imagedraw.py::test_same_color_outline[bbox1]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-None]", "Tests/test_file_mpo.py::test_seek[Tests/images/sugarshack.mpo]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bw_gradient.imt]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_2.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_mask.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.MM.deflate.tif]", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_kerning_features.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken_data_stream.png]", "Tests/test_file_tiff_metadata.py::test_ifd_signed_long", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[None-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p.png]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I]", "Tests/test_image_transform.py::TestImageTransform::test_missing_method_data", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[RGB]", "Tests/test_imagedraw.py::test_rectangle[bbox3]", "Tests/test_imageops_usm.py::test_blur_accuracy", "Tests/test_imagedraw.py::test_line_joint[xy2]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[BGR;15]", "Tests/test_file_gif.py::test_comment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32fakealpha.bmp]", "Tests/test_imageops.py::test_expand_palette[10]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[RGB]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_st.png]", "Tests/test_imagedraw.py::test_floodfill_border[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_no_loops.png]", "Tests/test_file_im.py::test_roundtrip[P]", "Tests/test_imagedraw.py::test_ellipse_various_sizes", "Tests/test_image_rotate.py::test_angle[180]", "Tests/test_file_gif.py::test_transparent_dispose[1-expected_colors1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal1p1.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_gray_4bpp.tif]", "Tests/test_file_ico.py::test_save_to_bytes_bmp[RGBA]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/non_zero_bb.png-None]", "Tests/test_file_jpeg.py::TestFileJpeg::test_mp", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[RGB]", "Tests/test_image_reduce.py::test_mode_RGB[factor14]", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_r", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_RGB.png]", "Tests/test_file_apng.py::test_apng_save_blend", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.iccprofile.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_1.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad_exif.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_merged.psd]", "Tests/test_imagedraw2.py::test_polygon[points2]", "Tests/test_file_png.py::TestFilePng::test_scary", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hdf5.h5]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-1]", "Tests/test_image_transpose.py::test_roundtrip[RGB]", "Tests/test_file_pcd.py::test_load_raw", "Tests/test_lib_pack.py::TestLibUnpack::test_F_float", "Tests/test_imagedraw.py::test_ellipse_width[bbox3]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy2-85-height]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_idat_after_image_end.png]", "Tests/test_image_reduce.py::test_mode_RGB[factor10]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.tif-None]", "Tests/test_imagemath.py::test_prevent_double_underscores", "Tests/test_imagedraw.py::test_rectangle[bbox1]", "Tests/test_file_tiff_metadata.py::test_no_duplicate_50741_tag", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/create_eps.gnuplot]", "Tests/test_imagedraw.py::test_line_joint[xy0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-f46f5b2f43c370fe65706c11449f567ecc345e74.tif]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_text", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_g4_500.tif]", "Tests/test_file_apng.py::test_apng_basic", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-465703f71a0f0094873a3e0e82c9f798161171b8.sgi]", "Tests/test_image_convert.py::test_rgba_p", "Tests/test_image_mode.py::test_properties[YCbCr-RGB-L-3-expected_band_names9]", "Tests/test_format_lab.py::test_red", "Tests/test_file_png.py::TestFilePng::test_repr_png_error_returns_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp_padded", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[RGB]", "Tests/test_image_reduce.py::test_mode_LA[factor8]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox2]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[L]", "Tests/test_image_transpose.py::test_rotate_90[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyyy.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_16bit_RGBa.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r01.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper-XYZ.png]", "Tests/test_imagedraw2.py::test_line[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_unorm.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow3.icns]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[4-expected_vertices1]", "Tests/test_image_putdata.py::test_long_integers", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.3-3.7]", "Tests/test_file_jpeg.py::TestFileJpeg::test_large_icc_meta", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-1.5-5.5]", "Tests/test_file_mpo.py::test_save[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ifd_tag_type.tiff]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-True-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_pieslice_L.png]", "Tests/test_file_wmf.py::test_load_set_dpi", "Tests/test_format_hsv.py::test_sanity", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/junk_jpeg_header.jpg]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[box2-1]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox2]", "Tests/test_image_filter.py::test_sanity[L-SHARPEN]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_wedge.png]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overrun2.bin]", "Tests/test_image_reduce.py::test_mode_RGBA[factor15]", "Tests/test_file_tiff_metadata.py::test_iptc", "Tests/test_file_tiff.py::TestFileTiff::test_seek_eof", "Tests/test_imagepath.py::test_path_constructors[coords3]", "Tests/test_file_tga.py::test_save_mapdepth", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_dpi_rounding", "Tests/test_file_png.py::TestFilePng::test_save_stdout[False]", "Tests/test_file_spider.py::test_save", "Tests/test_image.py::TestImage::test_overrun[ossfuzz-4836216264589312.pcx]", "Tests/test_image.py::TestImage::test_image_modes_fail[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz.png]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[5-expected_vertices2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iptc_roundUp.jpg]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/p_trns_single.png-None]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/itxt_chunks.png-None]", "Tests/test_image_reduce.py::test_mode_RGB[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-50-0-TypeError-bounding_circle should be a sequence]", "Tests/test_imagedraw.py::test_arc[0-180-bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_low_quality_baseline_qtables", "Tests/test_image_filter.py::test_sanity_error[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none.gif]", "Tests/test_image.py::TestImage::test_image_modes_success[CMYK]", "Tests/test_lib_pack.py::TestLibUnpack::test_CMYK", "Tests/test_imagepalette.py::test_rawmode_getdata", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[La]", "Tests/test_file_jpeg.py::TestFileJpeg::test_sanity", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[2]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif", "Tests/test_file_pdf.py::test_resolution", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/discontiguous_corners_polygon.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns-0.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-multi.tiff]", "Tests/test_image_crop.py::test_negative_crop[box0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/clipboard_target.png]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/high_ascii_chars.png]", "Tests/test_image.py::TestImage::test_image_modes_success[1]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-c1b2595b8b0b92cc5f38b6635e98e3a119ade807.sgi]", "Tests/test_file_gif.py::test_palette_save_L", "Tests/test_file_gif.py::test_full_palette_second_frame", "Tests/test_image.py::TestImage::test_tempfile", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-754d9c7ec485ffb76a90eeaab191ef69a2a3a3cd.sgi]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_4_to_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_arabictext_features.png]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/non_zero_bb.png-None]", "Tests/test_file_png.py::TestFilePng::test_specify_bits", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/reproducing]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_region.png]", "Tests/test_image.py::TestImage::test_no_resource_warning_on_save", "Tests/test_image_filter.py::test_sanity[RGB-SMOOTH]", "Tests/test_image_reduce.py::test_args_box_error[size1-ValueError]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/7x13.png]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment_valid_imagedata_comment[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ttb_stroke.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line.tga]", "Tests/test_file_sgi.py::test_rle16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overrun.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r06.fli]", "Tests/test_file_fli.py::test_closed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_non_whole_angle.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/num_plays.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2IR.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_cmyk_16l_jpeg.tif]", "Tests/test_image_reduce.py::test_mode_La[factor10]", "Tests/test_file_tga.py::test_sanity[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_language.png]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[RGBA]", "Tests/test_file_gd.py::test_invalid_file", "Tests/test_imagedraw.py::test_pieslice_wide", "Tests/test_file_ppm.py::test_plain_data_with_comment[P2\\n3 1\\n4-0 2 4-1]", "Tests/test_imagedraw.py::test_square", "Tests/test_image_reduce.py::test_mode_RGB[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_five_bands.fpx]", "Tests/test_file_tga.py::test_sanity[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga_id_field.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_Nastalifont_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.rgb]", "Tests/test_image_reduce.py::test_mode_F[factor9]", "Tests/test_image_reduce.py::test_mode_RGB[2]", "Tests/test_image_thumbnail.py::test_load_first_unless_jpeg", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette_alpha.png]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points2]", "Tests/test_file_xpm.py::test_load_read", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[box1-4]", "Tests/test_imagedraw.py::test_chord_width[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/oom-8ed3316a4109213ca96fb8a256a0bfefdece1461.icns]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_draw.ico]", "Tests/test_image_reduce.py::test_mode_La[factor17]", "Tests/test_imagefile.py::TestImageFile::test_ico", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dummy.container]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_unorm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/black_and_white.ico]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_2.webp]", "Tests/test_image_reduce.py::test_mode_F[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette.dds]", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/hopper_rle8.bmp-1078]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette_1bit_alpha.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken_exif_dpi.jpg]", "Tests/test_image.py::TestImage::test_image_modes_success[LA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_jpeg_magic_number", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-fillorder-test.png]", "Tests/test_file_spider.py::test_n_frames", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_gps_typeerror", "Tests/test_file_tar.py::test_sanity[zlib-hopper.png-PNG]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-3]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGBa_target.png]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-2020-10-test.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_repr_jpeg", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/bmp/g/pal8rle.bmp-1064]", "Tests/test_file_fits.py::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-PA]", "Tests/test_image_reduce.py::test_mode_RGBA[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_wal.png]", "Tests/test_image_resample.py::TestCoreResampleBox::test_subsample", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ppm]", "Tests/test_file_gif.py::test_comment_over_255", "Tests/test_file_tiff.py::TestFileTiff::test_seek_after_close", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_4_channels", "Tests/test_imagedraw.py::test_arc_width[bbox1]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/background_outside_palette.gif]", "Tests/test_lib_pack.py::TestLibPack::test_1", "Tests/test_file_gif.py::test_dispose2_previous_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_3.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply22]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r04.fli]", "Tests/test_image_filter.py::test_sanity[I-MedianFilter]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[LA-band_numbers1-color must be int, or tuple of one or two elements]", "Tests/test_imagepalette.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_zero_denom.png]", "Tests/test_imagepath.py::test_path_constructors[coords5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_wide_line_larger_than_int.png]", "Tests/test_imagedraw.py::test_draw_regular_polygon[4-square_rotate_45-args2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_resized.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.sgi]", "Tests/test_image_reduce.py::test_mode_RGBa[factor7]", "Tests/test_file_iptc.py::test_getiptcinfo_jpg_none", "Tests/test_file_mpo.py::test_ignore_frame_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-ccca68ff40171fdae983d924e127a721cab2bd50.j2k]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil136.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_height.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_1bit.pbm]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox2]", "Tests/test_imagedraw.py::test_chord_width[bbox0]", "Tests/test_image_reduce.py::test_args_factor_error[size2-ValueError]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000000]", "Tests/test_image_reduce.py::test_mode_RGBA[1]", "Tests/test_imagemorph.py::test_pattern_syntax_error", "Tests/test_file_wal.py::test_load", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[RGBX]", "Tests/test_file_pdf.py::test_redos[\\n]", "Tests/test_file_dds.py::test_save[RGBA-Tests/images/pil123rgba.png]", "Tests/test_core_resources.py::TestCoreMemory::test_get_block_size", "Tests/test_image_thumbnail.py::test_division_by_zero", "Tests/test_font_pcf.py::test_textsize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/radial_gradients.png]", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_3_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage-mmap.tiff]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[RGB]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illuCS6_preview.eps]", "Tests/test_image_filter.py::test_sanity[CMYK-MaxFilter]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.dcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_translucent_outline.png]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16L]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/pil123p.png-None]", "Tests/test_image_filter.py::test_sanity[L-MinFilter]", "Tests/test_image_filter.py::test_sanity[I-GaussianBlur]", "Tests/test_image_reduce.py::test_mode_RGBA[factor6]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mb.png]", "Tests/test_file_gif.py::test_roundtrip2", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox3]", "Tests/test_core_resources.py::TestCoreMemory::test_set_blocks_max_stats", "Tests/test_features.py::test_check", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-dedc7a4ebd856d79b4359bbcc79e8ef231ce38f6.psd-OSError]", "Tests/test_file_png.py::TestFilePng::test_read_private_chunks", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/04r00.fli]", "Tests/test_file_im.py::test_small_palette", "Tests/test_image_reduce.py::test_mode_LA[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/edge.lut]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32bf-xbgr.bmp]", "Tests/test_image.py::TestImage::test_bad_mode", "Tests/test_file_dds.py::test_sanity_ati1_bc4u[Tests/images/ati1.dds]", "Tests/test_file_apng.py::test_apng_save_size", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[8-0-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit_qtables.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w3px.png]", "Tests/test_file_eps.py::test_readline_psfile", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[box2-0.5]", "Tests/test_image_reduce.py::test_mode_LA[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_L.png]", "Tests/test_image_transform.py::TestImageTransform::test_info", "Tests/test_image_rotate.py::test_center_14", "Tests/test_image_draft.py::test_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_unorm.dds]", "Tests/test_image_transpose.py::test_tranverse[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_short_max.png]", "Tests/test_imagedraw2.py::test_rectangle[bbox1]", "Tests/test_file_iptc.py::test_dump", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_rs.png]", "Tests/test_file_gif.py::test_missing_background", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev_first_frame_seeked.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16-565.bmp]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/1_trns.png]", "Tests/test_file_dds.py::test_dx10_bc6h[Tests/images/bc6h.dds]", "Tests/test_features.py::test_unsupported_module", "Tests/test_imageops.py::test_colorize_2color", "Tests/test_image_transpose.py::test_flip_left_right[I;16L]", "Tests/test_file_gif.py::test_invalid_file", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[box1-1]", "Tests/test_color_lut.py::TestColorLut3DFilter::test_repr", "Tests/test_image_filter.py::test_consistency_3x3[CMYK]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/non_zero_bb.png-None]", "Tests/test_image_reduce.py::test_args_box[size0-expected0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bgr15.png]", "Tests/test_file_spider.py::test_load_image_series", "Tests/test_image_reduce.py::test_mode_I[factor9]", "Tests/test_imagemath.py::test_prevent_exec[exec('pass')]", "Tests/test_image_transpose.py::test_rotate_90[I;16L]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_3.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/02r00.fli]", "Tests/test_file_sgi.py::test_invalid_file", "Tests/test_image_filter.py::test_kernel_not_enough_coefficients", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/single_frame.png]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/a_fli.png]", "Tests/test_image_reduce.py::test_mode_F[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/standard_embedded.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy4-y_odd]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[2]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[RGBA]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[3-expected_vertices0]", "Tests/test_image_filter.py::test_modefilter[1-expected0]", "Tests/test_font_pcf_charsets.py::test_textsize[iso8859-1]", "Tests/test_file_eps.py::test_invalid_file", "Tests/test_file_iptc.py::test_open", "Tests/test_image_rotate.py::test_mode[1]", "Tests/test_file_ppm.py::test_magic", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_kite_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unicode_extended.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/01r_00.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/bkgd.png]", "Tests/test_deprecate.py::test_no_replacement_or_action", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_pieslice_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/single_frame_default.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[L]", "Tests/test_file_ppm.py::test_not_enough_image_data", "Tests/test_imagepath.py::test_invalid_path_constructors[coords0]", "Tests/test_file_jpeg.py::TestFileJpeg::test_optimize_large_buffer", "Tests/test_image_reduce.py::test_mode_F[factor6]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply22]", "Tests/test_imagedraw.py::test_wide_line_larger_than_int", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[None-bounding_circle0-0-TypeError-n_sides should be an int]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[LA]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_transform[RGBA]", "Tests/test_image_reduce.py::test_mode_LA[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/compression.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_bl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-060745d3f534ad6e4128c51d336ea5489182c69d.blp]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-PA]", "Tests/test_image_reduce.py::test_mode_I[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_gap.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline.png]", "Tests/test_file_eps.py::test_readline[\\r\\n-]", "Tests/test_image_reduce.py::test_mode_LA[1]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w125.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/photoshop-200dpi.jpg]", "Tests/test_imagemorph.py::test_mirroring", "Tests/test_image_reduce.py::test_mode_RGBA[factor11]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-f46f5b2f43c370fe65706c11449f567ecc345e74.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r02.fli]", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/1.eps]", "Tests/test_image_putpalette.py::test_putpalette_with_alpha_values", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[1500]", "Tests/test_file_imt.py::test_invalid_file[\\n]", "Tests/test_imagefontpil.py::test_default_font", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[L]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[L]", "Tests/test_file_ico.py::test_incorrect_size", "Tests/test_imagepath.py::test_invalid_path_constructors[coords3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_imagemagick_orientation.png]", "Tests/test_file_gif.py::test_background", "Tests/test_file_gribstub.py::test_load", "Tests/test_imagepath.py::test_path_constructors[coords4]", "Tests/test_file_tga.py::test_save_wrong_mode", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-False-True]", "Tests/test_image_reduce.py::test_mode_F[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_crash.bin]", "Tests/test_image_reduce.py::test_mode_L[factor16]", "Tests/test_imagemath.py::test_prevent_builtins", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_la.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_oblique_45_w3px_b.png]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[I]", "Tests/test_image_transpose.py::test_tranverse[L]", "Tests/test_image_putpalette.py::test_rgba_palette[RGBAX-palette1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_tiff_with_dpi", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-L]", "Tests/test_file_png.py::TestFilePng::test_trns_null", "Tests/test_file_gif.py::test_dispose_background_transparency", "Tests/test_image_reduce.py::test_mode_RGBA[factor14]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_no_data.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no-dpi-in-exif.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fujifilm.mpo]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P2 3 1 257 0 128 257-I-pixels1]", "Tests/test_image_filter.py::test_sanity[I-MinFilter]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0da013a13571cc8eb457a39fee8db18f8a3c7127.tif]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox1]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0e16d3bfb83be87356d026d66919deaefca44dac.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.fli]", "Tests/test_file_pcx.py::test_odd[1]", "Tests/test_imagemath.py::test_compare", "Tests/test_imagechops.py::test_multiply_white", "Tests/test_image_resample.py::TestCoreResamplePasses::test_box_horizontal", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.im]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_no_warning_no_limit", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/8bit.s.tif]", "Tests/test_image_resample.py::TestCoreResamplePasses::test_horizontal", "Tests/test_image_access.py::TestImageGetPixel::test_basic[BGR;16]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[YCbCr]", "Tests/test_file_ico.py::test_getpixel", "Tests/test_image_crop.py::test_crop[I]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy2-x_odd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_default_font_size.png]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16]", "Tests/test_features.py::test_check_codecs[libtiff]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_bl_raw.tga]", "Tests/test_image_filter.py::test_sanity[CMYK-SMOOTH]", "Tests/test_file_ppm.py::test_pfm", "Tests/test_image_reduce.py::test_mode_F[4]", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-1-3]", "Tests/test_imagepath.py::test_invalid_path_constructors[coords2]", "Tests/test_file_ppm.py::test_plain_ppm_token_too_long[P3\\n128 128\\n255\\n012345678910]", "Tests/test_imagechops.py::test_subtract_modulo_no_clip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ma.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[P]", "Tests/test_file_ppm.py::test_save_stdout[False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_la.png]", "Tests/test_image_getdata.py::test_sanity", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/itxt_chunks.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/anim_frame1.webp]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_file_ico.py::test_black_and_white", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[6-expected_vertices3]", "Tests/test_features.py::test_check_modules[pil]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-0.6-0-9.1]", "Tests/test_file_dds.py::test_sanity_ati2_bc5u[Tests/images/bc5u.dds]", "Tests/test_image_reduce.py::test_mode_RGBA[4]", "Tests/test_file_container.py::test_sanity", "Tests/test_image_reduce.py::test_args_box[size1-expected1]", "Tests/test_deprecate.py::test_unknown_version", "Tests/test_imagedraw.py::test_polygon_translucent", "Tests/test_file_dds.py::test_uncompressed[RGB-size3-Tests/images/bgr15.dds]", "Tests/test_imagechops.py::test_offset", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000003]", "Tests/test_file_dds.py::test_dx10_bc4[Tests/images/bc4_typeless.dds]", "Tests/test_file_gif.py::test_palette_handling", "Tests/test_image_copy.py::test_copy[P]", "Tests/test_file_gif.py::test_rgba_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_bl_raw.tga]", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_4.webp]", "Tests/test_file_apng.py::test_apng_save_disposal", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply15]", "Tests/test_binary.py::test_standard", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/combined_larger_than_size.psd]", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw_with_overviews", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_single_16bit_qtable", "Tests/test_image_filter.py::test_rankfilter[L-expected1]", "Tests/test_imagestat.py::test_constant", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_y.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.0-5.5]", "Tests/test_image_convert.py::test_matrix_xyz[L]", "Tests/test_box_blur.py::test_radius_bigger_then_width", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0c7e0e8e11ce787078f00b5b0ca409a167f070e0.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_rollback", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_shape_RGB.png]", "Tests/test_image_transform.py::TestImageTransform::test_palette", "Tests/test_image_convert.py::test_trns_p_transparency[RGBA]", "Tests/test_imagedraw.py::test_floodfill[bbox1]", "Tests/test_image_mode.py::test_properties[RGBX-RGB-L-4-expected_band_names7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/split_fdat_zero_chunk.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_RGBA.png]", "Tests/test_image_reduce.py::test_mode_I[factor17]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.qoi]", "Tests/test_file_ppm.py::test_plain_truncated_data[P1\\n128 128\\n]", "Tests/test_imagechops.py::test_subtract_clip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pcd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_rt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_ligature_features.png]", "Tests/test_image_load.py::test_contextmanager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/00r0_gray_l.jp2]", "Tests/test_file_iptc.py::test_getiptcinfo_jpg_found", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns.png]", "Tests/test_image_reduce.py::test_mode_RGBA[factor9]", "Tests/test_core_resources.py::TestCoreMemory::test_get_alignment", "Tests/test_image_transpose.py::test_flip_left_right[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil184.pcx]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[1]", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage-lastframe.tif-1]", "Tests/test_image_resize.py::TestReducingGapResize::test_box_filter[box0-5.5]", "Tests/test_image_putalpha.py::test_promote", "Tests/test_imagedraw.py::test_polygon_kite[kite_points1-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w3px.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyyy.png]", "Tests/test_image_resize.py::TestReducingGapResize::test_box_filter[box1-9.5]", "Tests/test_image_convert.py::test_unsupported_conversion", "Tests/test_imagemorph.py::test_str_to_img", "Tests/test_util.py::test_is_path[filename.ext]", "Tests/test_file_pdf.py::test_unsupported_mode", "Tests/test_file_tiff.py::TestFileTiff::test_seek", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_ycbcr_jpeg_2x2_sampling.tif]", "Tests/test_image.py::TestImage::test_image_modes_success[L]", "Tests/test_imageops.py::test_cover[hopper.png-expected_size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/app13.jpg]", "Tests/test_image_convert.py::test_trns_p_transparency[PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_multi_actl.png]", "Tests/test_image_mode.py::test_properties[L-L-L-1-expected_band_names1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[YCbCr]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_single_frame_loop.tiff]", "Tests/test_image_transpose.py::test_transpose[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/effect_spread.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb32.bmp]", "Tests/test_file_xbm.py::test_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width.png]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dilation8.lut]", "Tests/test_image_reduce.py::test_mode_L[6]", "Tests/test_file_eps.py::test_missing_boundingbox_comment[]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_16bit_RGB.tiff]", "Tests/test_file_tiff.py::TestFileTiff::test_getxmp", "Tests/test_imagedraw.py::test_arc[0-180-bbox3]", "Tests/test_image.py::TestImage::test_zero_tobytes[size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/python.ico]", "Tests/test_image_reduce.py::test_mode_LA_opaque[3]", "Tests/test_file_gif.py::test_n_frames[Tests/images/iss634.gif-42]", "Tests/test_file_fli.py::test_context_manager", "Tests/test_image.py::TestImage::test_image_modes_fail[very very long]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.3-3.7]", "Tests/test_file_bmp.py::test_save_float_dpi", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_1bit_plain.pbm]", "Tests/test_file_tiff.py::TestFileTiff::test_save_rgba", "Tests/test_imagedraw.py::test_floodfill_not_negative", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[PA]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy6-both]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w2px_inverted.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_rtl.png]", "Tests/test_imagefile.py::TestPyEncoder::test_setimage", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tv.rgb]", "Tests/test_file_bufrstub.py::test_handler", "Tests/test_file_apng.py::test_apng_save_duration_loop", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_l.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w101px.png]", "Tests/test_file_png.py::TestFilePng::test_bad_itxt", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_near_transparent.png]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_naxis_zero.fits]", "Tests/test_file_fits.py::test_comment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_7.webp]", "Tests/test_imagedraw2.py::test_line[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgba.psd]", "Tests/test_image_reduce.py::test_mode_L[factor18]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[270-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_left.png]", "Tests/test_deprecate.py::test_version[11-Old thing is deprecated and will be removed in Pillow 11 \\\\(2024-10-15\\\\)\\\\. Use new thing instead\\\\.]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon.png]", "Tests/test_file_tiff.py::TestFileTiff::test_modify_exif", "Tests/test_image_access.py::TestImageGetPixel::test_basic[PA]", "Tests/test_image_filter.py::test_sanity[I-FIND_EDGES]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[3]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-L]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[262147]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_lzw.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_given.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[I]", "Tests/test_color_lut.py::TestColorLut3DFilter::test_convert_table", "Tests/test_imagefile.py::TestImageFile::test_no_format", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-0]", "Tests/test_file_spider.py::test_context_manager", "Tests/test_color_lut.py::TestColorLut3DFilter::test_wrong_args", "Tests/test_file_tiff.py::TestFileTiff::test___str__", "Tests/test_file_iptc.py::test_i", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor18]", "Tests/test_file_tga.py::test_sanity[RGB]", "Tests/test_file_dds.py::test_not_implemented[Tests/images/unimplemented_pfflags.dds]", "Tests/test_file_dds.py::test_save_unsupported_mode", "Tests/test_file_psd.py::test_rgba", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_copy_alpha_channel", "Tests/test_file_sun.py::test_im1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pxr]", "Tests/test_image_transpose.py::test_rotate_90[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_line_joint_curve.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ltr.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_sm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_width.png]", "Tests/test_file_gif.py::test_optimize_correctness[128-513-256]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pfm]", "Tests/test_file_eps.py::test_ascii_comment_too_long[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/p_trns_single.png-None]", "Tests/test_file_msp.py::test_bad_checksum", "Tests/test_features.py::test_check_codecs[zlib]", "Tests/test_image_putalpha.py::test_interface", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_both.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-True-False]", "Tests/test_file_bmp.py::test_small_palette", "Tests/test_file_dds.py::test_palette", "Tests/test_imagefile.py::TestImageFile::test_oserror", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_vertical[3]", "Tests/test_image_reduce.py::test_args_factor_error[2.0-TypeError]", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_tga.py::test_save_orientation", "Tests/test_imagedraw.py::test_polygon_1px_high_translucent", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-74d2a78403a5a59db1fb0a2b8735ac068a75f6e3.tif]", "Tests/test_image_reduce.py::test_mode_L[factor8]", "Tests/test_image_reduce.py::test_mode_L[factor10]", "Tests/test_imagedraw2.py::test_line[points3]", "Tests/test_imagemorph.py::test_lut[dilation8]", "Tests/test_imagedraw.py::test_floodfill[bbox2]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_4_to_3_channels", "Tests/test_file_cur.py::test_sanity", "Tests/test_imageops.py::test_scale", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_emf_ref.png]", "Tests/test_file_dcx.py::test_n_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tv16.sgi]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-d6ec061c4afdef39d3edf6da8927240bb07fe9b7.blp]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[RGBX]", "Tests/test_file_icns.py::test_sanity", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[180-3]", "Tests/test_image.py::TestImage::test_effect_noise", "Tests/test_imagemath.py::test_bitwise_and", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample_2.tiff]", "Tests/test_file_tga.py::test_sanity[RGBA]", "Tests/test_file_tiff.py::TestFileTiff::test_set_legacy_api", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_cmyk_jpeg.tif]", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-1ee28a249896e05b83840ae8140622de8e648ba9.psd-UnidentifiedImageError]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_decompression_bomb.py::TestDecompressionCrop::test_crop_decompression_checks", "Tests/test_file_blp.py::test_load_blp2_raw", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-64834657ee604b8797bf99eac6a194c124a9a8ba.sgi]", "Tests/test_imagedraw.py::test_rectangle[bbox2]", "Tests/test_image_rotate.py::test_zero[90]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r02.fli]", "Tests/test_file_png.py::TestFilePng::test_load_transparent_p", "Tests/test_file_sun.py::test_sanity", "Tests/test_imageshow.py::test_show_without_viewers", "Tests/test_imagedraw.py::test_shape1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_g4.tif]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-8073b430977660cdd48d96f6406ddfd4114e69c7.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/reproducing]", "Tests/test_imageops_usm.py::test_filter_api", "Tests/test_image_reduce.py::test_mode_L[factor17]", "Tests/test_image_transpose.py::test_rotate_180[I;16L]", "Tests/test_file_pcx.py::test_break_one_in_loop", "Tests/test_image_rotate.py::test_mode[P]", "Tests/test_image_resample.py::TestCoreResampleCoefficients::test_reduce", "Tests/test_imageenhance.py::test_alpha[Contrast]", "Tests/test_file_ico.py::test_save_to_bytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_woff2.png]", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_palette", "Tests/test_imageops.py::test_cover[colr_bungee.png-expected_size0]", "Tests/test_file_icns.py::test_not_an_icns_file", "Tests/test_image_transform.py::TestImageTransform::test_unknown_resampling_filter[4]", "Tests/test_imagepalette.py::test_reload", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/colr_bungee_mask.png]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_resize[RGBA]", "Tests/test_lib_pack.py::TestLibUnpack::test_P", "Tests/test_image_filter.py::test_sanity[L-CONTOUR]", "Tests/test_file_psd.py::test_seek_eoferror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_fctl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid-exif-without-x-resolution.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1wb.bmp]", "Tests/test_file_jpeg.py::TestFileJpeg::test_rgb", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_adobe_deflate.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/mmap_error.bmp]", "Tests/test_image_crop.py::test_crop[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/shortfile.bmp]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_long_name.im]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor15]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply17]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/initial.fli]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor9]", "Tests/test_image.py::TestImage::test_stringio", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[I;16]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P3 3 1 17 0 1 2 8 9 10 15 16 17-RGB-pixels2]", "Tests/test_image_filter.py::test_sanity[RGB-MinFilter]", "Tests/test_file_dds.py::test_short_file", "Tests/test_file_ico.py::test_save_to_bytes_bmp[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-338516dbd2f0e83caddb8ce256c22db3bd6dc40f.tif]", "Tests/test_file_tiff_metadata.py::test_tag_group_data", "Tests/test_image_getbbox.py::test_sanity", "Tests/test_font_pcf_charsets.py::test_draw[iso8859-2]", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-ef9112a065e7183fa7faa2e18929b03e44ee16bf.blp]", "Tests/test_image_filter.py::test_sanity[RGB-ModeFilter]", "Tests/test_imagemath.py::test_ops", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_8bit_plain.ppm-Tests/images/hopper_8bit.ppm]", "Tests/test_file_bmp.py::test_dpi", "Tests/test_image_filter.py::test_consistency_3x3[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_dxt1.ftc]", "Tests/test_file_gif.py::test_no_change", "Tests/test_file_png.py::TestFilePng::test_exif_argument", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ossfuzz-5730089102868480.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bw_500.png]", "Tests/test_imagemath.py::test_bitwise_rightshift", "Tests/test_util.py::test_is_not_directory", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[0]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/test-card.png-None]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-bba4f2e026b5786529370e5dfe9a11b1bf991f07.blp]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.0-5.5]", "Tests/test_file_gif.py::test_removed_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illu10_preview.eps]", "Tests/test_file_apng.py::test_apng_chunk_order", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-b82e64d4f3f76d7465b6af535283029eda211259.sgi]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_multiple_16bit_qtables", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor12]", "Tests/test_file_container.py::test_readline[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/l_trns.png]", "Tests/test_image_reduce.py::test_mode_RGBA[factor16]", "Tests/test_font_pcf_charsets.py::test_textsize[iso8859-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_out_of_order.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_fdat.png]", "Tests/test_file_container.py::test_read_n[False]", "Tests/test_image_reduce.py::test_mode_LA[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4R.tif]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-1]", "Tests/test_file_gribstub.py::test_handler", "Tests/test_image_reduce.py::test_mode_L[factor13]", "Tests/test_image_reduce.py::test_mode_F[factor12]", "Tests/test_image_filter.py::test_modefilter[P-expected2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd_transparency.gif]", "Tests/test_image_transform.py::TestImageTransform::test_fill[RGB-expected_pixel0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_center.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[RGBX]", "Tests/test_file_iptc.py::test_getiptcinfo_tiff_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_repr_jpeg_error_returns_none", "Tests/test_imagefile.py::TestPyEncoder::test_zero_height", "Tests/test_imagedraw.py::test_floodfill_border[bbox1]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 0.0 \\x00\\x00\\x00\\x00]", "Tests/test_image_crop.py::test_crop_zero", "Tests/test_file_qoi.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_2.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_no_duplicate_0x1001_tag", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor6]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[3]", "Tests/test_imagedraw.py::test_pieslice_width[bbox0]", "Tests/test_image.py::TestImage::test_ne", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badfilesize.bmp]", "Tests/test_file_ico.py::test_draw_reloaded", "Tests/test_imagedraw2.py::test_ellipse[bbox3]", "Tests/test_imagechops.py::test_difference_pixel", "Tests/test_file_tiff_metadata.py::test_change_stripbytecounts_tag_type", "Tests/test_image_transpose.py::test_rotate_90[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_kite_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_8_basic.png]", "Tests/test_file_tiff.py::TestFileTiff::test_multipage", "Tests/test_file_gif.py::test_sanity", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-4]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-0.6-0-9.1]", "Tests/test_imagedraw2.py::test_polygon[points3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/default_font_freetype.png]", "Tests/test_image_filter.py::test_sanity[RGB-GaussianBlur]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_image_filter.py::test_rankfilter[RGB-expected2]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment_valid_imagedata_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[La]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-1152ec2d1a1a71395b6f2ce6721c38924d025bf3.tif]", "Tests/test_file_png.py::TestFilePng::test_plte_length", "Tests/test_image_convert.py::test_l_macro_rounding[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_7.tif]", "Tests/test_file_bmp.py::test_offset", "Tests/test_file_pdf.py::test_multiframe_normal_save", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-c8efc3fded6426986ba867a399791bae544f59bc.psd-OSError]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox3]", "Tests/test_image_reduce.py::test_args_factor[3-expected0]", "Tests/test_file_bmp.py::test_sanity", "Tests/test_image_reduce.py::test_args_box_error[size4-ValueError]", "Tests/test_image.py::TestImage::test_exif_jpeg", "Tests/test_file_png.py::TestFilePng::test_roundtrip_icc_profile", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_box_filter_correct_range", "Tests/test_image_reduce.py::test_mode_RGBA[2]", "Tests/test_file_tga.py::test_palette_depth_8", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_before_region.png]", "Tests/test_file_icns.py::test_save", "Tests/test_image_reduce.py::test_args_box_error[size6-ValueError]", "Tests/test_file_tiff.py::TestFileTiff::test_4bit", "Tests/test_image.py::TestImage::test_image_modes_success[HSV]", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_exclusive", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/child_ifd_jpeg.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_emptyline.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-6b7f2244da6d0ae297ee0754a424213444e92778.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-d6ec061c4afdef39d3edf6da8927240bb07fe9b7.blp]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/p_trns_single.png-None]", "Tests/test_image_reduce.py::test_args_factor[size2-expected2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-0]", "Tests/test_image_filter.py::test_sanity[CMYK-ModeFilter]", "Tests/test_file_pdf.py::test_save[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illuCS6_no_preview.eps]", "Tests/test_imagedraw.py::test_draw_regular_polygon[4-square-args0]", "Tests/test_imagefile.py::TestImageFile::test_broken_datastream_without_errors", "Tests/test_image_reduce.py::test_mode_RGBA[5]", "Tests/test_file_tga.py::test_id_field_rle", "Tests/test_imagewin.py::TestImageWin::test_sanity", "Tests/test_file_gimpgradient.py::test_linear_pos_gt_small_middle", "Tests/test_image_filter.py::test_consistency_5x5[RGB]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_horizontal[3]", "Tests/test_file_dds.py::test_uncompressed[RGB-size2-Tests/images/hopper.dds]", "Tests/test_imageops.py::test_autocontrast_mask_toy_input", "Tests/test_image_filter.py::test_sanity[RGB-FIND_EDGES]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[BGR;16]", "Tests/test_imagedraw.py::test_floodfill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iptc.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_bl_rle.tga]", "Tests/test_image_reduce.py::test_mode_RGBa[factor13]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration0]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/zero_bb.png-None]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_bl_raw.tga]", "Tests/test_locale.py::test_sanity", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-L]", "Tests/test_image_resample.py::TestCoreResampleBox::test_no_passthrough", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w2px_normal.png]", "Tests/test_features.py::test_check_modules[tkinter]", "Tests/test_lib_pack.py::TestLibPack::test_L", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[La]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r05.fli]", "Tests/test_image.py::TestImage::test_zero_frombytes[size0]", "Tests/test_font_pcf_charsets.py::test_textsize[cp1250]", "Tests/test_imagedraw.py::test_arc_high", "Tests/test_file_dds.py::test_not_implemented[Tests/images/unimplemented_dxgi_format.dds]", "Tests/test_image_rotate.py::test_resample", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/corner.lut]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[RGB]", "Tests/test_imagedraw.py::test_same_color_outline[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_right.png]", "Tests/test_file_bufrstub.py::test_save", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_chunks", "Tests/test_image_reduce.py::test_mode_F[factor13]", "Tests/test_imagefile.py::TestImageFile::test_raise_typeerror", "Tests/test_image.py::TestImage::test_width_height", "Tests/test_file_dds.py::test_dxt5_colorblock_alpha_issue_4142", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_square.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rdf.tif]", "Tests/test_box_blur.py::test_radius_0", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-5]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-RGB]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd.gif-RGB]", "Tests/test_image_filter.py::test_sanity[CMYK-BLUR]", "Tests/test_image_rotate.py::test_rotate_with_fill", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-L]", "Tests/test_image.py::TestImage::test_image_modes_fail[bad]", "Tests/test_imagefile.py::TestImageFile::test_raise_oserror", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[RGBa]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-31c8f86233ea728339c6e586be7af661a09b5b98.blp]", "Tests/test_imagedraw.py::test_transform", "Tests/test_file_dcx.py::test_context_manager", "Tests/test_pdfparser.py::test_duplicate_xref_entry", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32769-I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_gps.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la.png]", "Tests/test_file_tiff.py::TestFileTiff::test_roundtrip_tiff_uint16", "Tests/test_file_png.py::TestFilePng::test_unknown_compression_method", "Tests/test_imagemath.py::test_bitwise_or", "Tests/test_image.py::TestImage::test_image_modes_success[PA]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc1.dds]", "Tests/test_file_png.py::TestFilePng::test_padded_idat", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz_axes.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123p.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample_3.tiff]", "Tests/test_image_reduce.py::test_mode_La[factor12]", "Tests/test_image_reduce.py::test_mode_RGB[factor12]", "Tests/test_image_reduce.py::test_mode_L[4]", "Tests/test_image_reduce.py::test_mode_I[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/copyleft.tiff]", "Tests/test_file_mpo.py::test_mp_attribute[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/fakealpha.png]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[RGBa]", "Tests/test_file_mcidas.py::test_invalid_file", "Tests/test_file_gif.py::test_optimize_correctness[4-513-256]", "Tests/test_image_reduce.py::test_mode_RGB[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_grayscale.png]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[L-band_numbers0-color must be int or single-element tuple]", "Tests/test_image_filter.py::test_sanity[L-EDGE_ENHANCE_MORE]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_overflow", "Tests/test_file_png.py::TestFilePng::test_tell", "Tests/test_file_container.py::test_readline[False]", "Tests/test_imagedraw.py::test_arc[0-180-bbox0]", "Tests/test_image_mode.py::test_properties[RGB-RGB-L-3-expected_band_names5]", "Tests/test_file_eps.py::test_readline[\\n\\r-]", "Tests/test_font_bdf.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_lb.png]", "Tests/test_image_filter.py::test_sanity[RGB-EDGE_ENHANCE]", "Tests/test_file_mpo.py::test_mp[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_uncompressed.ftu]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal4.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-dedc7a4ebd856d79b4359bbcc79e8ef231ce38f6.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_oblique_45_w3px_a.png]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_modify_after_resizing", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color1]", "Tests/test_file_spider.py::test_odd_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unbound_variable.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8-0.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_reload_exif_after_seek", "Tests/test_imagemath.py::test_bitwise_invert", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/12bit.cropped.tif]", "Tests/test_file_im.py::test_number", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2v2.bmp]", "Tests/test_image_filter.py::test_crash[size1]", "Tests/test_lib_pack.py::TestLibPack::test_LA", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[P]", "Tests/test_file_mpo.py::test_n_frames", "Tests/test_file_fits.py::test_open", "Tests/test_file_tiff.py::TestFileTiff::test_with_underscores", "Tests/test_lib_pack.py::TestLibPack::test_I16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uint16_1_4660.tif]", "Tests/test_file_gif.py::test_optimize_if_palette_can_be_reduced_by_half", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_int_from_exif", "Tests/test_file_container.py::test_read_n[True]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply18]", "Tests/test_image.py::TestImage::test_zero_tobytes[size1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.dds]", "Tests/test_imagedraw.py::test_polygon[points0]", "Tests/test_image.py::TestImage::test_radial_gradient[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8_row_overflow.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd_rgba.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ttb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/bmpsuite.html]", "Tests/test_image_filter.py::test_sanity[CMYK-FIND_EDGES]", "Tests/test_file_gif.py::test_append_different_size_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_trns_single.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/10ct_32bit_128.tiff]", "Tests/test_image_convert.py::test_p_la", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ra.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P3 3 1 257 0 1 2 128 129 130 256 257 257-RGB-pixels3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_bl_raw.tga]", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp", "Tests/test_lib_pack.py::TestLibUnpack::test_F_int", "Tests/test_imagefile.py::TestPyDecoder::test_negsize", "Tests/test_file_jpeg.py::TestFileJpeg::test_empty_exif_gps", "Tests/test_color_lut.py::TestTransformColorLut3D::test_with_normals_3_channels", "Tests/test_image.py::TestImage::test_image_modes_success[P]", "Tests/test_image_putdata.py::test_mode_with_L_with_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/12in16bit.tif]", "Tests/test_image_reduce.py::test_mode_RGBA[factor7]", "Tests/test_file_pixar.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle.png]", "Tests/test_image_reduce.py::test_mode_RGBa[1]", "Tests/test_image.py::TestImage::test_effect_mandelbrot_bad_arguments", "Tests/test_imagemath.py::test_logical", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply18]", "Tests/test_imagedraw.py::test_ellipse_width[bbox2]", "Tests/test_file_gimpgradient.py::test_sphere_increasing", "Tests/test_file_ftex.py::test_load_dxt1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r05.fli]", "Tests/test_image_transpose.py::test_roundtrip[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pport_g4.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_image.png]", "Tests/test_file_gif.py::test_l_mode_after_rgb", "Tests/test_file_gribstub.py::test_save", "Tests/test_image.py::TestImage::test_alpha_composite", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-L]", "Tests/test_file_png.py::TestFilePng::test_bad_text", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/zero_bb.png-None]", "Tests/test_file_fits.py::test_naxis_zero", "Tests/test_file_bmp.py::test_save_too_large", "Tests/test_deprecate.py::test_action[Upgrade to new thing]", "Tests/test_image_load.py::test_sanity", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_float_coord.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment_after_last_frame.gif]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-True-True]", "Tests/test_file_mpo.py::test_context_manager", "Tests/test_file_tiff.py::TestFileTiff::test_exif_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnny.png]", "Tests/test_imagemorph.py::test_unknown_pattern", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-338516dbd2f0e83caddb8ce256c22db3bd6dc40f.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-86214e58da443d2b80820cff9677a38a33dcbbca.tif]", "Tests/test_imageshow.py::test_register", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox0]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bgr15.dds]", "Tests/test_file_mpo.py::test_image_grab[Tests/images/frozenpond.mpo]", "Tests/test_file_tiff_metadata.py::test_undefined_zero", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-2]", "Tests/test_image_transpose.py::test_roundtrip[L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns-b.png]", "Tests/test_image.py::TestImage::test_exif_hide_offsets", "Tests/test_image_paste.py::TestImagingPaste::test_different_sizes", "Tests/test_file_tiff.py::TestFileTiff::test_invalid_file", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower_thumbnail.png]", "Tests/test_image_filter.py::test_rankfilter[F-expected4]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-True-True]", "Tests/test_file_gif.py::test_optimize_correctness[4-511-4]", "Tests/test_lib_pack.py::TestLibPack::test_La", "Tests/test_imagefile.py::TestPyEncoder::test_extents_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_truncated", "Tests/test_imagedraw.py::test_chord_zero_width[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_emboss.bmp]", "Tests/test_file_wmf.py::test_load_float_dpi", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[0-None]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius1]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor10]", "Tests/test_file_tiff.py::TestFileTiff::test_load_double", "Tests/test_file_tga.py::test_horizontal_orientations", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_zero_width.png]", "Tests/test_image.py::TestImage::test_dump", "Tests/test_image_convert.py::test_matrix_identity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb.png]", "Tests/test_imagedraw.py::test_line_joint[xy1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8.bmp]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_start.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_6.jpg]", "Tests/test_core_resources.py::TestCoreMemory::test_get_blocks_max", "Tests/test_image_split.py::test_split_merge[I]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_xbm.py::test_save_wrong_mode", "Tests/test_file_eps.py::test_ascii_comment_too_long[]", "Tests/test_image_convert.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000001]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_zero_division", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_trailer.eps]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I;16]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-LA]", "Tests/test_imagemorph.py::test_dialation8", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb.eps]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox0]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_32i", "Tests/test_imagechops.py::test_duplicate", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/i_trns.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor17]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle6-0-ValueError-bounding_circle radius should be > 0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_first.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5s.dds]", "Tests/test_file_pdf.py::test_pdf_append", "Tests/test_file_gif.py::test_first_frame_transparency", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var2]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-0.6-0-9.1]", "Tests/test_image_resample.py::TestCoreResamplePasses::test_both", "Tests/test_file_gif.py::test_roundtrip_save_all", "Tests/test_image_convert.py::test_16bit_workaround", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r07.fli]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_center.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-1185209cf7655b5aed8ae5e77784dfdd18ab59e9.tif]", "Tests/test_imagedraw.py::test_wide_line_dot", "Tests/test_file_psd.py::test_layer_skip", "Tests/test_file_tiff.py::TestFileTiff::test_strip_raw", "Tests/test_image_filter.py::test_sanity[I-SHARPEN]", "Tests/test_image_mode.py::test_properties[1-L-L-1-expected_band_names0]", "Tests/test_file_psd.py::test_seek_tell", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox2]", "Tests/test_imagemath.py::test_logical_eq", "Tests/test_image_reduce.py::test_mode_F[factor16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1a.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/missing_background.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/morph_a.png]", "Tests/test_imagechops.py::test_add_modulo_no_clip", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_undefined[1]", "Tests/test_image_reduce.py::test_mode_LA_opaque[2]", "Tests/test_font_pcf.py::test_draw", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[La]", "Tests/test_file_tiff_metadata.py::test_exif_div_zero", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_cmyk_jpeg.tif]", "Tests/test_file_gif.py::test_remapped_transparency", "Tests/test_image_rotate.py::test_mode[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test.gpl]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/baddens2.bmp]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply19]", "Tests/test_file_gif.py::test_empty_string_comment", "Tests/test_file_png.py::TestFilePng::test_chunk_order", "Tests/test_imagedraw.py::test_line_horizontal", "Tests/test_image_convert.py::test_trns_p_transparency[LA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_junk_jpeg_header", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_2278.tif]", "Tests/test_image_transform.py::TestImageTransform::test_quad", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24png.bmp]", "Tests/test_image_reduce.py::test_mode_LA[factor9]", "Tests/test_core_resources.py::test_reset_stats", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8.png]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_ascii[test-test]", "Tests/test_image_getextrema.py::test_true_16", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[La]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-LA]", "Tests/test_image_reduce.py::test_mode_La[factor14]", "Tests/test_image_reduce.py::test_mode_L[factor14]", "Tests/test_file_im.py::test_context_manager", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/anim_frame2.webp]", "Tests/test_imagechops.py::test_add_scale_offset", "Tests/test_image.py::TestImage::test_expand_xy", "Tests/test_file_gif.py::test_zero_comment_subblocks", "Tests/test_imagedraw.py::test_rectangle_I16[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_cmyk.eps]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_gap.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-200dpcm.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_uncompressed.png]", "Tests/test_fontfile.py::test_save", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_width.gif]", "Tests/test_file_ppm.py::test_plain_data_with_comment[P1\\n2 2-1010-1000000]", "Tests/test_image_getdata.py::test_roundtrip", "Tests/test_file_container.py::test_seek_mode[2-100]", "Tests/test_image_reduce.py::test_mode_RGBa[2]", "Tests/test_imagedraw.py::test_rectangle[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_imagemagick.png]", "Tests/test_file_gif.py::test_append_images", "Tests/test_image_reduce.py::test_mode_RGBA[factor8]", "Tests/test_file_apng.py::test_apng_delay", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw", "Tests/test_image_reduce.py::test_mode_RGB[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-c1b2595b8b0b92cc5f38b6635e98e3a119ade807.sgi]", "Tests/test_file_png.py::TestFilePng::test_load_float_dpi", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/continuous_horizontal_edges_polygon.png]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-86214e58da443d2b80820cff9677a38a33dcbbca.tif]", "Tests/test_image_convert.py::test_default", "Tests/test_imagedraw.py::test_polygon_kite[kite_points1-L]", "Tests/test_image_convert.py::test_gif_with_rgba_palette_to_p", "Tests/test_file_tiff.py::TestFileTiff::test_palette[P]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-4f085cc12ece8cde18758d42608bed6a2a2cfb1c.tif]", "Tests/test_image_reduce.py::test_mode_RGBa[3]", "Tests/test_imagefile.py::TestPyDecoder::test_decode", "Tests/test_imagepath.py::test_path_constructors[coords6]", "Tests/test_image_crop.py::test_crop_float", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/notes]", "Tests/test_file_mpo.py::test_seek_after_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gbr.gbr]", "Tests/test_file_blp.py::test_load_blp2_dxt1a", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal2.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_reorder.png]", "Tests/test_image_filter.py::test_sanity[L-DETAIL]", "Tests/test_file_iptc.py::test_getiptcinfo_fotostation", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb.png]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords1]", "Tests/test_file_ppm.py::test_mimetypes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron.png]", "Tests/test_file_wmf.py::test_save[.emf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width_fill.png]", "Tests/test_image_transpose.py::test_roundtrip[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-598843abc37fc080ec36a2699ebbd44f795d3a6f.psd]", "Tests/test_lib_pack.py::TestLibPack::test_RGB", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[RGB]", "Tests/test_file_eps.py::test_readline[\\r\\n-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-0.6-0-9.1]", "Tests/test_imagedraw2.py::test_ellipse[bbox1]", "Tests/test_image.py::TestImage::test_open_formats", "Tests/test_file_im.py::test_roundtrip[PA]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-1.1-6.9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_none_region.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_zero_width.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-True-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid_header_length.jp2]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_too_fat.png]", "Tests/test_image_transpose.py::test_rotate_90[I;16]", "Tests/test_image_transform.py::TestImageTransform::test_fill[LA-expected_pixel2]", "Tests/test_features.py::test_libjpeg_turbo_version", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cmx3g8_wv_1998.260_0745_mcidas.tiff]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[1]", "Tests/test_file_fli.py::test_sanity", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_args", "Tests/test_imagedraw.py::test_polygon[points2]", "Tests/test_file_ppm.py::test_plain_invalid_data[P3\\n128 128\\n255\\n100A]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox1]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply17]", "Tests/test_format_hsv.py::test_convert", "Tests/test_image_filter.py::test_sanity_error[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unimplemented_dxgi_format.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny_axes.png]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/pil123p.png-None]", "Tests/test_image_quantize.py::test_colors", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_repeat.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_text.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-1.1-6.9]", "Tests/test_file_fli.py::test_timeouts[Tests/images/timeout-9139147ce93e20eb14088fe238e541443ffd64b3.fli]", "Tests/test_file_ppm.py::test_plain_ppm_token_too_long[P3\\n128 128\\n255\\n012345678910 0]", "Tests/test_imagemath.py::test_logical_le", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-8073b430977660cdd48d96f6406ddfd4114e69c7.blp]", "Tests/test_image_rotate.py::test_zero[45]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r04.fli]", "Tests/test_image_reduce.py::test_mode_LA[factor10]", "Tests/test_file_psd.py::test_eoferror", "Tests/test_file_fli.py::test_unclosed_file", "Tests/test_file_tiff.py::TestFileTiff::test_multipage_last_frame", "Tests/test_imagedraw.py::test_ellipse_width_large", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox2]", "Tests/test_file_dcx.py::test_closed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_6.tif]", "Tests/test_imagechops.py::test_screen", "Tests/test_image.py::TestImage::test_alpha_inplace", "Tests/test_file_jpeg.py::TestFileJpeg::test_ff00_jpeg_header", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.0-5.5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/balloon.jpf]", "Tests/test_image_quantize.py::test_palette[2-color3]", "Tests/test_file_gimpgradient.py::test_sphere_decreasing", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/square.png]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords2]", "Tests/test_file_eps.py::test_invalid_data_after_eof", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyyn.png]", "Tests/test_image_convert.py::test_l_macro_rounding[I]", "Tests/test_image_reduce.py::test_mode_RGBa[4]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor17]", "Tests/test_file_jpeg.py::TestFileJpeg::test_photoshop", "Tests/test_imagepath.py::test_getbbox[coords1-expected1]", "Tests/test_imagedraw.py::test_rectangle_width[bbox2]", "Tests/test_file_ico.py::test_save_to_bytes_bmp[L]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/test-card.png-None]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[2-72.8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card-lossless.jp2]", "Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_dirty_pixels_rgba", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/WAlaska.wind.7days.grb]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_size.ppm]", "Tests/test_file_sgi.py::test_rgb", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ttb_lt.png]", "Tests/test_file_ftex.py::test_load_raw", "Tests/test_file_ppm.py::test_non_integer_token", "Tests/test_file_gif.py::test_background_outside_palettte", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-5]", "Tests/test_file_tga.py::test_save_rle", "Tests/test_image_reduce.py::test_args_box_error[size5-ValueError]", "Tests/test_image_convert.py::test_matrix_xyz[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_p_mode.png]", "Tests/test_file_hdf5stub.py::test_load", "Tests/test_font_pcf.py::test_invalid_file", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_s", "Tests/test_file_tiff.py::TestFileTiff::test_frame_order", "Tests/test_image.py::TestImage::test_empty_image[size1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_low.png]", "Tests/test_file_eps.py::test_long_binary_data[]", "Tests/test_image_getprojection.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.webp]", "Tests/test_imagedraw.py::test_arc_width[bbox0]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_mode", "Tests/test_image.py::TestImage::test_remap_palette_transparency", "Tests/test_image_split.py::test_split_merge[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-72dpi-int.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sunraster.im1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/erosion4.lut]", "Tests/test_file_jpeg.py::TestFileJpeg::test_app", "Tests/test_image_copy.py::test_copy[1]", "Tests/test_features.py::test_check_codecs[jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badrle.bmp]", "Tests/test_image_reduce.py::test_mode_RGB[factor9]", "Tests/test_file_eps.py::test_read_binary_preview", "Tests/test_image_resample.py::TestCoreResamplePasses::test_vertical", "Tests/test_lib_pack.py::TestLibUnpack::test_La", "Tests/test_file_tiff.py::TestFileTiff::test_8bit_s", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-ef9112a065e7183fa7faa2e18929b03e44ee16bf.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_rgb.jpg]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply20]", "Tests/test_file_icns.py::test_sizes", "Tests/test_file_eps.py::test_psfile_deprecation", "Tests/test_image.py::TestImage::test_exif_ifd", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bigtiff.tif]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16B]", "Tests/test_image_rotate.py::test_zero[270]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment.jp2]", "Tests/test_file_im.py::test_save_unsupported_mode", "Tests/test_image_filter.py::test_sanity[CMYK-UnsharpMask]", "Tests/test_imagepalette.py::test_getdata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8oversizepal.bmp]", "Tests/test_file_gif.py::test_dispose2_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16-231.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2sp.bmp]", "Tests/test_image_filter.py::test_builtinfilter_p", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp.tif]", "Tests/test_image_transform.py::TestImageTransform::test_sanity", "Tests/test_image_quantize.py::test_small_palette", "Tests/test_image_filter.py::test_rankfilter_error[MinFilter]", "Tests/test_file_psd.py::test_open_after_exclusive_load", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati2.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_cmyk.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_tl_raw.tga]", "Tests/test_file_gif.py::test_optimize_correctness[255-511-255]", "Tests/test_box_blur.py::test_radius_0_1", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle5-0-ValueError-bounding_circle centre should contain 2D coordinates (e.g. (x, y))]", "Tests/test_image_reduce.py::test_mode_I[factor16]", "Tests/test_file_ppm.py::test_invalid_maxval[65536]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration2]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8topdown.bmp]", "Tests/test_file_sgi.py::test_rgba", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_bytes[value1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_overflow_rows_per_strip.tif]", "Tests/test_file_png.py::TestFilePng::test_unicode_text", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/erosion8.lut]", "Tests/test_file_dds.py::test_dx10_bc7", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[RGB]", "Tests/test_file_bmp.py::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.tif-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb24.bmp]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_channels_order", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[False]", "Tests/test_image_reduce.py::test_args_box_error[stri-TypeError]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply15]", "Tests/test_image_crop.py::test_negative_crop[box2]", "Tests/test_file_gif.py::test_lzw_bits", "Tests/test_core_resources.py::TestCoreMemory::test_set_alignment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-60d8b7c8469d59fc9ffff6b3a3dc0faeae6ea8ee.blp]", "Tests/test_file_webp.py::TestUnsupportedWebp::test_unsupported", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_2.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_16bit_RGB.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_5.jpg]", "Tests/test_image.py::TestImage::test_image_modes_success[La]", "Tests/test_file_psd.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.gif]", "Tests/test_psdraw.py::test_draw_postscript", "Tests/test_file_jpeg.py::TestFileJpeg::test_MAXBLOCK_scaling", "Tests/test_file_pdf.py::test_p_alpha", "Tests/test_image_convert.py::test_trns_l", "Tests/test_lib_pack.py::TestLibPack::test_P", "Tests/test_bmp_reference.py::test_questionable", "Tests/test_imagedraw.py::test_chord[bbox1-RGB]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-False-True]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy2]", "Tests/test_file_gimpgradient.py::test_sine", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_same.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P5 3 1 4 \\x00\\x02\\x04-L-pixels4]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/zero_bb.png-None]", "Tests/test_file_gif.py::test_seek", "Tests/test_file_icns.py::test_save_append_images", "Tests/test_file_jpeg.py::TestFileJpeg::test_comment_write", "Tests/test_file_tga.py::test_cross_scan_line", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb.eps]", "Tests/test_imagedraw.py::test_ellipse[bbox0-RGB]", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_int", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_emboss_more.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-fillorder-test.tif]", "Tests/test_imagefontpil.py::test_size_without_freetype", "Tests/test_file_png.py::TestFilePng::test_save_rgb_single_transparency", "Tests/test_imagedraw.py::test_line[points2]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_reduce.py::test_mode_RGBa[factor17]", "Tests/test_imagepath.py::test_getbbox[1-expected3]", "Tests/test_file_mpo.py::test_unclosed_file", "Tests/test_lib_pack.py::TestLibUnpack::test_PA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r01.fli]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;24]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply19]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[0]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[box2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-d675703545fee17acab56e5fec644c19979175de.eps]", "Tests/test_file_tiff.py::TestFileTiff::test_discard_icc_profile", "Tests/test_imagechops.py::test_darker_pixel", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_triangle_width.png]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox3]", "Tests/test_image.py::TestImage::test_load_on_nonexclusive_multiframe", "Tests/test_imagedraw.py::test_polygon_kite[kite_points0-L]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun.bin]", "Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_dirty_pixels_la", "Tests/test_imagefile.py::TestPyDecoder::test_oversize", "Tests/test_file_jpeg.py::TestFileJpeg::test_get_child_images", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-2-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_tl_raw.tga]", "Tests/test_imagepalette.py::test_make_gamma_lut", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ossfuzz-4836216264589312.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_typeless.dds]", "Tests/test_file_bmp.py::test_save_to_bytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/05r00.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_after_SOF", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_solid.png]", "Tests/test_imagedraw.py::test_chord[bbox3-L]", "Tests/test_lib_pack.py::TestLibUnpack::test_value_error", "Tests/test_file_gif.py::test_getdata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blend_transparency.png]", "Tests/test_file_dds.py::test_uncompressed[RGBA-size4-Tests/images/uncompressed_rgb.dds]", "Tests/test_file_tiff.py::TestFileTiff::test_bad_exif", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[RGBX]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox3]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P6 3 1 17 \\x00\\x01\\x02\\x08\\t\\n\\x0f\\x10\\x11-RGB-pixels6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-colorblock-alpha-issue-4142.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgba16-4444.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badbitssize.bmp]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/test-card.png-None]", "Tests/test_file_dds.py::test_uncompressed[LA-size1-Tests/images/uncompressed_la.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_left.png]", "Tests/test_file_gif.py::test_transparent_optimize", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox2]", "Tests/test_imagefile.py::TestImageFile::test_truncated_with_errors", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-None]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox3]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65520]", "Tests/test_image_resample.py::TestCoreResampleBox::test_tiles", "Tests/test_image_quantize.py::test_transparent_colors_equal", "Tests/test_imagedraw.py::test_polygon2", "Tests/test_file_eps.py::test_open_eps[Tests/images/illuCS6_no_preview.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.gd]", "Tests/test_core_resources.py::test_get_stats", "Tests/test_file_eps.py::test_missing_version_comment[]", "Tests/test_imageshow.py::test_viewer_show[0]", "Tests/test_lib_pack.py::TestLibPack::test_LAB", "Tests/test_file_dds.py::test_dx10_bc7_unorm_srgb", "Tests/test_file_apng.py::test_apng_mode", "Tests/test_color_lut.py::TestTransformColorLut3D::test_3_to_4_channels", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-1.1-6.9]", "Tests/test_lib_pack.py::TestLibUnpack::test_L", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-63b1dffefc8c075ddc606c0a2f5fdc15ece78863.tif]", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color2]", "Tests/test_image_access.py::TestImageGetPixel::test_list", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad.p7]", "Tests/test_box_blur.py::test_radius_1_5", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/padded_idat.png]", "Tests/test_imagedraw.py::test_floodfill_border[bbox2]", "Tests/test_image_copy.py::test_copy_zero", "Tests/test_file_jpeg.py::TestFileJpeg::test_adobe_transform", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/l2rgb_read.bmp]", "Tests/test_file_tga.py::test_save", "Tests/test_image.py::TestImage::test_register_open_duplicates", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_binary.pgm]", "Tests/test_file_gd.py::test_bad_mode", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit_plain.pgm]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_string", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy1-90-width]", "Tests/test_file_eps.py::test_missing_version_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[RGBA]", "Tests/test_file_tiff.py::TestFileTiff::test_12bit_rawmode", "Tests/test_image_reduce.py::test_mode_I[2]", "Tests/test_image_load.py::test_contextmanager_non_exclusive_fp", "Tests/test_file_tiff_metadata.py::test_rt_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-2020-10-test.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/argb-32bpp_MipMaps-1.png]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_identities_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette.png]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor6]", "Tests/test_imagefontpil.py::test_oom", "Tests/test_image_reduce.py::test_mode_F[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l.png]", "Tests/test_imageops.py::test_fit_same_ratio", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_cursors.cur]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unimplemented_pfflags.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_4_raqm.png]", "Tests/test_image_reduce.py::test_mode_I[5]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_start.png]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox1]", "Tests/test_file_apng.py::test_apng_dispose", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw2_text.png]", "Tests/test_file_gribstub.py::test_open", "Tests/test_imageops.py::test_contain[new_size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/06r00.fli]", "Tests/test_image_filter.py::test_sanity[RGB-SHARPEN]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_target_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz_name.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp_no_prefix", "Tests/test_image_reduce.py::test_mode_La[3]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/itxt_chunks.png-None]", "Tests/test_imagedraw.py::test_chord_width[bbox2]", "Tests/test_imagechops.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-1152ec2d1a1a71395b6f2ce6721c38924d025bf3.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24jpeg.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8os2.bmp]", "Tests/test_file_spider.py::test_nonstack_file", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_snorm.dds-Tests/images/bc5s.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/orientation_rectangle.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card-lossy-tiled.jp2]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;15]", "Tests/test_file_pcx.py::test_pil184", "Tests/test_file_jpeg.py::TestFileJpeg::test_no_dpi_in_exif", "Tests/test_image_getbands.py::test_getbands", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox0]", "Tests/test_file_psd.py::test_no_icc_profile", "Tests/test_imagecolor.py::test_functions", "Tests/test_image_reduce.py::test_mode_LA[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_rows_per_strip.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_center.png]", "Tests/test_file_im.py::test_closed_file", "Tests/test_imageops.py::test_autocontrast_unsupported_mode", "Tests/test_file_tiff.py::TestFileTiff::test_gray_semibyte_per_pixel", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.Lab.tif]", "Tests/test_imagefile.py::TestPyEncoder::test_encode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_translucent.png]", "Tests/test_file_pcx.py::test_odd[P]", "Tests/test_image_rotate.py::test_alpha_rotate_no_fill", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_snorm.dds]", "Tests/test_file_gif.py::test_saving_rgba", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_background_text_L.png]", "Tests/test_imagechops.py::test_difference", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.gif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_invalid_exif", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[CMYK]", "Tests/test_image_transform.py::TestImageTransform::test_fill[RGBA-expected_pixel1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_multiline.png]", "Tests/test_core_resources.py::TestCoreMemory::test_set_block_size_stats", "Tests/test_format_hsv.py::test_wedge", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor13]", "Tests/test_image_resize.py::TestImagingCoreResize::test_unknown_filter", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_zero_comment_subblocks.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-7d4c83eb92150fb8f1653a697703ae06ae7c4998.j2k]", "Tests/test_file_ppm.py::test_neg_ppm", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_be.pfm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r04.fli]", "Tests/test_font_pcf_charsets.py::test_sanity[cp1250]", "Tests/test_image_mode.py::test_properties[I-L-I-1-expected_band_names3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_mt.png]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply19]", "Tests/test_file_blp.py::test_save", "Tests/test_imagedraw.py::test_chord_width_fill[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid.spider]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox0]", "Tests/test_image_filter.py::test_sanity[RGB-EDGE_ENHANCE_MORE]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-P]", "Tests/test_file_png.py::TestFilePng::test_discard_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/reallybig.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[3-184.912]", "Tests/test_features.py::test_pilinfo", "Tests/test_image_putalpha.py::test_readonly", "Tests/test_imagedraw2.py::test_sanity", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[4]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 NaN \\x00\\x00\\x00\\x00]", "Tests/test_imageops.py::test_autocontrast_cutoff", "Tests/test_file_jpeg.py::TestFileJpeg::test_quality_keep", "Tests/test_file_png.py::TestFilePng::test_roundtrip_private_chunk", "Tests/test_image.py::TestImage::test_register_extensions", "Tests/test_image.py::TestImage::test_radial_gradient[I]", "Tests/test_imagedraw2.py::test_ellipse_edge", "Tests/test_file_blp.py::test_load_blp2_dxt1", "Tests/test_image_mode.py::test_properties[F-L-F-1-expected_band_names4]", "Tests/test_file_sgi.py::test_rle", "Tests/test_image_transpose.py::test_rotate_180[I;16]", "Tests/test_image_reduce.py::test_mode_RGB[4]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply16]", "Tests/test_imagechops.py::test_add_clip", "Tests/test_imagechops.py::test_multiply_black", "Tests/test_imagedraw.py::test_rectangle_I16[bbox0]", "Tests/test_imagemath.py::test_abs", "Tests/test_file_xbm.py::test_hotspot", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_0.jpg]", "Tests/test_file_spider.py::test_invalid_file", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle4-0-ValueError-bounding_circle should only contain numeric data]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-dpi-zerodivision.jpg]", "Tests/test_image_reduce.py::test_mode_F[factor10]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.tar]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 -0.0 \\x00\\x00\\x00\\x00]", "Tests/test_imagedraw.py::test_ellipse_width[bbox0]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;16]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-RGBA]", "Tests/test_image.py::TestImage::test_exif_png", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/photoshop-200dpi-broken.jpg]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[RGBX]", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5s.dds-Tests/images/bc5s.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba32.bmp]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rotate_45_no_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba16-4444.bmp]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[La]", "Tests/test_image_transform.py::TestImageTransform::test_blank_fill", "Tests/test_file_jpeg.py::TestFileJpeg::test_invalid_exif_x_resolution", "Tests/test_file_dds.py::test_dx10_r8g8b8a8", "Tests/test_image_filter.py::test_consistency_5x5[LA]", "Tests/test_file_gimppalette.py::test_get_palette", "Tests/test_file_gif.py::test_dispose2_diff", "Tests/test_file_gif.py::test_roundtrip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_gray.jpg]", "Tests/test_imagedraw.py::test_arc[0-180-bbox2]", "Tests/test_file_container.py::test_isatty", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun.bin]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply15]"] | [] | ["Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/9bit.j2k]"] | ["Tests/test_tiff_ifdrational.py::test_ifd_rational_save - OSError: encoder libtiff not available", "Tests/test_file_palm.py::test_p_mode - Palm P image is wrong"] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.4.4", "distlib==0.3.8", "filelock==3.13.3", "iniconfig==2.0.0", "packaging==24.0", "pip==24.0", "platformdirs==4.2.0", "pluggy==1.4.0", "pyproject-api==1.6.1", "pytest==8.1.1", "pytest-cov==5.0.0", "tox==4.14.2", "uv==0.1.24", "virtualenv==20.25.1", "wheel==0.44.0"]} | null | ["pytest --tb=no -rA -p no:cacheprovider"] | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-7893 | ca973709a079b5152b9670e5cd684003aa71f913 | diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py
index b59139f5858..bcb3547eb8e 100644
--- a/src/PIL/TiffImagePlugin.py
+++ b/src/PIL/TiffImagePlugin.py
@@ -74,6 +74,7 @@
# Read TIFF files
# a few tag names, just to make the code below a bit more readable
+OSUBFILETYPE = 255
IMAGEWIDTH = 256
IMAGELENGTH = 257
BITSPERSAMPLE = 258
@@ -1784,11 +1785,13 @@ def _save(im, fp, filename):
types = {}
# STRIPOFFSETS and STRIPBYTECOUNTS are added by the library
# based on the data in the strip.
+ # OSUBFILETYPE is deprecated.
# The other tags expect arrays with a certain length (fixed or depending on
# BITSPERSAMPLE, etc), passing arrays with a different length will result in
# segfaults. Block these tags until we add extra validation.
# SUBIFD may also cause a segfault.
blocklist += [
+ OSUBFILETYPE,
REFERENCEBLACKWHITE,
STRIPBYTECOUNTS,
STRIPOFFSETS,
| diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py
index 908464a11b7..14504e58999 100644
--- a/Tests/test_file_libtiff.py
+++ b/Tests/test_file_libtiff.py
@@ -12,7 +12,7 @@
import pytest
from PIL import Image, ImageFilter, ImageOps, TiffImagePlugin, TiffTags, features
-from PIL.TiffImagePlugin import SAMPLEFORMAT, STRIPOFFSETS, SUBIFD
+from PIL.TiffImagePlugin import OSUBFILETYPE, SAMPLEFORMAT, STRIPOFFSETS, SUBIFD
from .helper import (
assert_image_equal,
@@ -325,6 +325,12 @@ def check_tags(
)
TiffImagePlugin.WRITE_LIBTIFF = False
+ def test_osubfiletype(self, tmp_path: Path) -> None:
+ outfile = str(tmp_path / "temp.tif")
+ with Image.open("Tests/images/g4_orientation_6.tif") as im:
+ im.tag_v2[OSUBFILETYPE] = 1
+ im.save(outfile)
+
def test_subifd(self, tmp_path: Path) -> None:
outfile = str(tmp_path / "temp.tif")
with Image.open("Tests/images/g4_orientation_6.tif") as im:
| Saving binary tiff files with `tiff_deflate` compression fails under certain conditions
### What did you do?
I have this file:
[20210415185447038_0158.zip](https://github.com/python-pillow/Pillow/files/14720473/20210415185447038_0158.zip)
(you'll have to unzip it to test, I zipped it so that I could upload it in this issue)
I'm running the following script:
```python
from PIL import Image
img = Image.open("20210415185447038_0158.tiff")
# any of these operations make the final line work
#img = img.convert("L")
#img = img.rotate(180).rotate(180)
# removing the compression argument also makes it work
img.save("test.tiff", compression="tiff_deflate")
```
### What did you expect to happen?
I expected the file to be saved
### What actually happened?
I got
```
$ python3 convert_tiff.py
_TIFFVSetField: toto2.tiff: Ignored tag "OldSubfileType" (not supported by libtiff).
Traceback (most recent call last):
File "/home/admin/tmp/convert_tiff.py", line 8, in <module>
img.save("toto2.tiff", compression="tiff_deflate")
File "/home/admin/.local/lib/python3.9/site-packages/PIL/Image.py", line 2439, in save
save_handler(self, fp, filename)
File "/home/admin/.local/lib/python3.9/site-packages/PIL/TiffImagePlugin.py", line 1838, in _save
e = Image._getencoder(im.mode, "libtiff", a, encoderconfig)
File "/home/admin/.local/lib/python3.9/site-packages/PIL/Image.py", line 420, in _getencoder
return encoder(mode, *args + extra)
RuntimeError: Error setting from dictionary
```
### What are your OS, Python and Pillow versions?
* OS: Debian 5.10
* Python: 3.9.2
* Pillow: 10.2.0
The strange thing is that if I do anything with the image then saving works, or if I save it uncompressed it works too, it only fails when I save the untouched image.
| 2024-03-22T13:02:32Z | 2024-03-22T16:00:04Z | [] | [] | ["Tests/test_pickle.py::test_pickle_image[1-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_F[factor17]", "Tests/test_image_filter.py::test_sanity[L-ModeFilter]", "Tests/test_imageops.py::test_colorize_3color_offset", "Tests/test_image.py::TestImage::test_repr_pretty", "Tests/test_imagedraw.py::test_shape2", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_zero_default.png]", "Tests/test_image_transpose.py::test_rotate_180[I;16B]", "Tests/test_image_getpalette.py::test_palette", "Tests/test_image_convert.py::test_rgba", "Tests/test_file_png.py::TestFilePng::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r06.fli]", "Tests/test_image_quantize.py::test_quantize_dither_diff", "Tests/test_file_gbr.py::test_load", "Tests/test_font_pcf_charsets.py::test_sanity[iso8859-1]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[RGBA]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[LA]", "Tests/test_image_transform.py::TestImageTransform::test_alpha_premult_transform", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_st.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive", "Tests/test_file_icns.py::test_older_icon", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply19]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-1185209cf7655b5aed8ae5e77784dfdd18ab59e9.tif]", "Tests/test_file_gbr.py::test_invalid_file", "Tests/test_imagedraw.py::test_textsize_empty_string", "Tests/test_imagedraw.py::test_discontiguous_corners_polygon", "Tests/test_file_dds.py::test_sanity_ati2_bc5u[Tests/images/ati2.dds]", "Tests/test_bmp_reference.py::test_bad", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-50-50-0]", "Tests/test_image_reduce.py::test_mode_RGBa[factor10]", "Tests/test_file_gif.py::test_dispose_previous", "Tests/test_imagechops.py::test_constant", "Tests/test_file_tiff.py::TestFileTiff::test_context_manager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_frame.png]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_ascii[1-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad_checksum.msp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/empty_gps_ifd.jpg]", "Tests/test_image.py::TestImage::test_registered_extensions_uninitialized", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/effect_mandelbrot.png]", "Tests/test_imagedraw.py::test_ellipse_various_sizes_filled", "Tests/test_image.py::TestImage::test_overrun[01r_00.pcx]", "Tests/test_file_tiff.py::TestFileTiff::test_load_string", "Tests/test_image_reduce.py::test_mode_I[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_one_band.png]", "Tests/test_imagesequence.py::test_tiff", "Tests/test_imagepalette.py::test_getcolor_rgba_color_rgb_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/raw_negative_stride.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[La]", "Tests/test_image.py::TestImage::test_exif_interop", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_la.png]", "Tests/test_image_reduce.py::test_mode_RGBa[5]", "Tests/test_image_filter.py::test_sanity[CMYK-CONTOUR]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb24.png]", "Tests/test_file_gif.py::test_roundtrip_save_all_1", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati1.dds]", "Tests/test_image_reduce.py::test_mode_I[factor12]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ls.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_x_resolution", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGBA]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32767-I;16]", "Tests/test_file_ppm.py::test_invalid_maxval[0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.bw]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_horizontal[0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/itxt_chunks.png]", "Tests/test_file_mpo.py::test_seek[Tests/images/frozenpond.mpo]", "Tests/test_imageops.py::test_sanity", "Tests/test_imagedraw.py::test_arc_no_loops[bbox2]", "Tests/test_image_putpalette.py::test_empty_palette", "Tests/test_imagestat.py::test_hopper", "Tests/test_file_png.py::TestFilePng::test_save_grayscale_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_ellipse_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_actl_after_idat.png]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy0]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/pil123p.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1.png]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox3]", "Tests/test_image_reduce.py::test_mode_RGBa[factor16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.s.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r09.fli]", "Tests/test_deprecate.py::test_old_version[Old thing-False-Old thing is deprecated and should be removed\\\\.]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16-565pal.bmp]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy5-y_odd]", "Tests/test_image_convert.py::test_matrix_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/200x32_p_bl_raw_origin.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_2.jpg]", "Tests/test_imagedraw.py::test_polygon_1px_high", "Tests/test_file_palm.py::test_monochrome", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[RGB]", "Tests/test_file_tga.py::test_id_field", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unsupported_bitcount.dds]", "Tests/test_image_filter.py::test_consistency_5x5[L]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox0]", "Tests/test_file_gif.py::test_palette_save_P", "Tests/test_image_filter.py::test_sanity[CMYK-SMOOTH_MORE]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/first_frame_transparency.gif]", "Tests/test_file_ico.py::test_invalid_file", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_ycbcr_jpeg_1x1_sampling.tif]", "Tests/test_imageops.py::test_cover[imagedraw_stroke_multiline.png-expected_size1]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[RGBX]", "Tests/test_imagemath.py::test_logical_not_equal", "Tests/test_file_gif.py::test_unclosed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_raw.tif]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif_extents", "Tests/test_file_gif.py::test_version", "Tests/test_file_gif.py::test_webp_background", "Tests/test_file_pdf.py::test_pdf_append_to_bytesio", "Tests/test_imagepalette.py::test_file", "Tests/test_imagemorph.py::test_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_width.png]", "Tests/test_file_apng.py::test_apng_save", "Tests/test_image_reduce.py::test_mode_LA[factor17]", "Tests/test_image_reduce.py::test_mode_I[factor6]", "Tests/test_image_reduce.py::test_mode_I[factor10]", "Tests/test_file_mpo.py::test_mp[Tests/images/frozenpond.mpo]", "Tests/test_file_tiff_metadata.py::test_empty_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_zero_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_ifd_offset.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/num_plays_1.png]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_warning", "Tests/test_core_resources.py::TestCoreMemory::test_large_images", "Tests/test_file_apng.py::test_apng_dispose_region", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/zero_bb.png-None]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynyn.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P6 3 1 257 \\x00\\x00\\x00\\x01\\x00\\x02\\x00\\x80\\x00\\x81\\x00\\x82\\x01\\x00\\x01\\x01\\xff\\xff-RGB-pixels7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/2422.flc]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor18]", "Tests/test_imagedraw.py::test_ellipse[bbox3-L]", "Tests/test_imageshow.py::test_sanity", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat_chunk.png]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-color1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_fdat_fctl.png]", "Tests/test_imageops.py::test_expand_palette[border1]", "Tests/test_box_blur.py::test_radius_0_05", "Tests/test_image.py::TestImage::test_image_modes_success[LAB]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;24]", "Tests/test_imagechops.py::test_add_modulo", "Tests/test_file_spider.py::test_load_image_series_no_input", "Tests/test_imagepalette.py::test_getcolor_not_special[255-palette1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[L]", "Tests/test_features.py::test_unsupported_codec", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[90-2]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGBX]", "Tests/test_deprecate.py::test_plural", "Tests/test_file_gif.py::test_optimize", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[1]", "Tests/test_file_tiff.py::TestFileTiff::test_save_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_width_fill.png]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/test-card.png-None]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[1]", "Tests/test_imagemath.py::test_logical_ge", "Tests/test_image_reduce.py::test_mode_RGBA[factor17]", "Tests/test_util.py::test_is_directory", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage.tiff-3]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle_bottom_right.tga]", "Tests/test_imagedraw.py::test_incorrectly_ordered_coordinates[xy0]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[270-4]", "Tests/test_file_tiff.py::TestFileTiff::test_big_endian", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_7.jpg]", "Tests/test_image_quantize.py::test_quantize_no_dither2", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply20]", "Tests/test_image_load.py::test_close_after_load", "Tests/test_imagefile.py::TestImageFile::test_broken_datastream_with_errors", "Tests/test_image_reduce.py::test_mode_I[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/custom_gimp_palette.gpl]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBa", "Tests/test_image_putdata.py::test_mode_i[I;16B]", "Tests/test_image_reduce.py::test_mode_I[factor18]", "Tests/test_image_reduce.py::test_mode_RGB[factor8]", "Tests/test_image.py::TestImage::test_expand_x", "Tests/test_imagesequence.py::test_all_frames", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-True-True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit_plain.pgm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage.eps]", "Tests/test_image_filter.py::test_sanity[CMYK-EDGE_ENHANCE_MORE]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif_zero_width", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_reorder_chunk.png]", "Tests/test_file_ppm.py::test_plain_truncated_data[P3\\n128 128\\n255\\n]", "Tests/test_image_filter.py::test_modefilter[L-expected1]", "Tests/test_file_bmp.py::test_load_dib", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24lprof.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ignore_frame_size.mpo]", "Tests/test_imagechops.py::test_subtract", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8nonsquare.bmp]", "Tests/test_imagesequence.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.pbm]", "Tests/test_image_putdata.py::test_mode_i[I]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/radial_gradient.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_shape1.png]", "Tests/test_file_eps.py::test_missing_boundingbox_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_file_sgi.py::test_unsupported_mode", "Tests/test_imagechops.py::test_subtract_modulo", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_end_le_start.png]", "Tests/test_image_putdata.py::test_mode_F", "Tests/test_file_png.py::TestFilePng::test_verify_not_ignores_crc_error_in_required_chunk", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_text.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[RGBA]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor14]", "Tests/test_image_filter.py::test_sanity[I-BLUR]", "Tests/test_image_reduce.py::test_mode_LA[factor12]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pnm]", "Tests/test_imagemorph.py::test_erosion8", "Tests/test_file_png.py::TestFilePng::test_bad_ztxt", "Tests/test_image_access.py::TestImageGetPixel::test_basic[L]", "Tests/test_file_dcx.py::test_seek_too_far", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.tif-None]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[RGBA]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[None-72.8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_rgb.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_raw.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[90-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/fctl_actl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_la.dds]", "Tests/test_format_lab.py::test_green", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[0]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBX", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny_name.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower2.jpg]", "Tests/test_file_gif.py::test_number_of_loops", "Tests/test_util.py::test_is_not_path", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_undefined[value1]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynnn.png]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_args", "Tests/test_file_jpeg.py::TestFileJpeg::test_photoshop_malformed_and_multiple", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/test-card.png-None]", "Tests/test_image_transpose.py::test_rotate_270[RGB]", "Tests/test_file_icns.py::test_load", "Tests/test_file_ppm.py::test_16bit_pgm_write", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gbr.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w126.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_end_chunk.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil136.tiff]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_invalid_size", "Tests/test_image.py::TestImage::test_zero_tobytes[size0]", "Tests/test_imagedraw.py::test_bitmap", "Tests/test_file_eps.py::test_readline[\\r-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_reduce.py::test_mode_LA[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badplanes.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrowF04.bin]", "Tests/test_file_gif.py::test_dispose_previous_first_frame", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fdAT]", "Tests/test_lib_pack.py::TestLibPack::test_PA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnnn.png]", "Tests/test_file_tiff.py::TestFileTiff::test_ifd_tag_type", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_right.png]", "Tests/test_imagemorph.py::test_lut[erosion4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_8.tif]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32767-I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd.gif]", "Tests/test_image.py::TestImage::test_close_graceful", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w2px_normal.png]", "Tests/test_file_tiff.py::TestFileTiff::test_32bit_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badpalettesize.bmp]", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_black", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_rectangle_L.png]", "Tests/test_imagedraw.py::test_same_color_outline[bbox0]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/reproducing]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.j2k]", "Tests/test_image.py::TestImage::test_linear_gradient[F]", "Tests/test_imageops.py::test_pad", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r02.fli]", "Tests/test_file_fli.py::test_seek", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/reproducing]", "Tests/test_imagemorph.py::test_no_operator_loaded", "Tests/test_image.py::TestImage::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_palette_chunk_second.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_square_rotate_45.png]", "Tests/test_imagedraw.py::test_floodfill[bbox3]", "Tests/test_file_bufrstub.py::test_load", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-31c8f86233ea728339c6e586be7af661a09b5b98.blp]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor8]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none_load_end_second.png]", "Tests/test_image_filter.py::test_rankfilter_error[MedianFilter]", "Tests/test_file_gif.py::test_palette_not_needed_for_second_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16.bmp]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w124.png]", "Tests/test_imagedraw.py::test_point[points3]", "Tests/test_imagemorph.py::test_negate", "Tests/test_mode_i16.py::test_basic[I;16L]", "Tests/test_file_gif.py::test_palette_save_all_P", "Tests/test_imagefile.py::TestPyEncoder::test_negsize", "Tests/test_file_gif.py::test_rgb_transparency", "Tests/test_file_ppm.py::test_16bit_plain_pgm", "Tests/test_image_point.py::test_f_lut", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[RGBA]", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_8bit_plain.pgm-Tests/images/hopper_8bit.pgm]", "Tests/test_image_reduce.py::test_mode_I[6]", "Tests/test_core_resources.py::TestCoreMemory::test_set_block_size", "Tests/test_imagedraw.py::test_chord[bbox1-L]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGB-#DDEEFF]", "Tests/test_image_filter.py::test_sanity[RGB-CONTOUR]", "Tests/test_image_transpose.py::test_flip_left_right[I;16]", "Tests/test_imagefile.py::TestPyDecoder::test_setimage", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[0]", "Tests/test_file_png.py::TestFilePng::test_nonunicode_text", "Tests/test_image_reduce.py::test_mode_LA[factor13]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_with_transparency.gif]", "Tests/test_image_reduce.py::test_mode_LA[factor14]", "Tests/test_image.py::TestImage::test_effect_mandelbrot", "Tests/test_imagedraw.py::test_valueerror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower.webp]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[P]", "Tests/test_lib_pack.py::TestLibUnpack::test_BGR", "Tests/test_file_container.py::test_seek_mode[1-66]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_raw_with_overviews.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_from_dpcm_exif", "Tests/test_image_access.py::TestImagePutPixel::test_sanity_negative_index", "Tests/test_imagechops.py::test_overlay", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_bl_rle.tga]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_mode", "Tests/test_file_pdf.py::test_pdf_append_fails_on_nonexistent_file", "Tests/test_imagepath.py::test_path_constructors[coords0]", "Tests/test_image_reduce.py::test_mode_La[factor11]", "Tests/test_image_copy.py::test_copy[L]", "Tests/test_file_tiff.py::TestFileTiff::test_little_endian", "Tests/test_lib_pack.py::TestLibUnpack::test_LAB", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-4fb027452e6988530aa5dabee76eecacb3b79f8a.j2k]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[pHYs]", "Tests/test_file_spider.py::test_tell", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_underscore.xbm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-db8bfa78b19721225425530c5946217720d7df4e.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1bg.png]", "Tests/test_image_putdata.py::test_pypy_performance", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-1ee28a249896e05b83840ae8140622de8e648ba9.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[L]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle3-0-ValueError-bounding_circle should contain 2D coordinates and a radius (e.g. (x, y, r) or ((x, y), r) )]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_zero.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice.png]", "Tests/test_file_eps.py::test_readline[\\r-]", "Tests/test_file_png.py::TestFilePng::test_exif", "Tests/test_file_png.py::TestFilePng::test_getxmp", "Tests/test_file_apng.py::test_apng_save_split_fdat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_point.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32-111110.bmp]", "Tests/test_file_mpo.py::test_image_grab[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_polygon[points3]", "Tests/test_file_apng.py::test_apng_dispose_op_background_p_mode", "Tests/test_deprecate.py::test_version[None-Old thing is deprecated and will be removed in a future version\\\\. Use new thing instead\\\\.]", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox1]", "Tests/test_imagedraw.py::test_ellipse[bbox1-L]", "Tests/test_image_rotate.py::test_center_0", "Tests/test_file_png.py::TestFilePng::test_truncated_end_chunk", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ttb.png]", "Tests/test_file_gif.py::test_multiple_duration", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_bmp", "Tests/test_image_reduce.py::test_mode_L[factor11]", "Tests/test_file_tiff.py::TestFileTiff::test_unclosed_file", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[RGBA]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox2]", "Tests/test_file_psd.py::test_closed_file", "Tests/test_file_bmp.py::test_save_dib", "Tests/test_bmp_reference.py::test_good", "Tests/test_image_reduce.py::test_mode_I[4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8v5.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiple_comments.gif]", "Tests/test_box_blur.py::test_extreme_large_radius", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[L]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal4rle.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment_after_only_frame.gif]", "Tests/test_file_sgi.py::test_l", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_exif_dpi.jpg]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox3]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox0]", "Tests/test_file_bmp.py::test_fallback_if_mmap_errors", "Tests/test_file_gif.py::test_context_manager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.gif]", "Tests/test_lib_pack.py::TestLibUnpack::test_RGBA", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-False-False]", "Tests/test_file_tiff.py::TestFileTiff::test_tiled_planar_raw", "Tests/test_imagesequence.py::test_iterator", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.apng]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor11]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-False-True]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-b82e64d4f3f76d7465b6af535283029eda211259.sgi]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-1.5-5.5]", "Tests/test_image_filter.py::test_sanity[I-CONTOUR]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2v2-16.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width_large.png]", "Tests/test_lib_pack.py::TestLibPack::test_CMYK", "Tests/test_image_split.py::test_split", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/bc1_typeless.dds]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.tif-None]", "Tests/test_image_filter.py::test_sanity[L-GaussianBlur]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe.png]", "Tests/test_file_psd.py::test_n_frames", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_16.tga]", "Tests/test_file_tiff.py::TestFileTiff::test_eoferror", "Tests/test_font_pcf_charsets.py::test_sanity[iso8859-2]", "Tests/test_image_reduce.py::test_mode_La[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_wide.png]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/sgi_crash.bin]", "Tests/test_file_tiff.py::TestFileTiff::test_mac_tiff", "Tests/test_imageops.py::test_colorize_2color_offset", "Tests/test_file_tga.py::test_save_l_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.p7]", "Tests/test_file_png.py::TestFilePng::test_seek", "Tests/test_imageops.py::test_autocontrast_mask_real_input", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_no_warning_small_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_optimize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_right.png]", "Tests/test_file_tiff_metadata.py::test_photoshop_info", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle.tga]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-6b7f2244da6d0ae297ee0754a424213444e92778.sgi]", "Tests/test_font_pcf.py::test_less_than_256_characters", "Tests/test_image_putdata.py::test_array_F", "Tests/test_file_iptc.py::test_pad_deprecation", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_raw.tif]", "Tests/test_file_eps.py::test_readline[\\n-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_imagemath.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_16.png]", "Tests/test_psdraw.py::test_stdout[False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123rgba.qoi]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[RGB]", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_apply", "Tests/test_file_ppm.py::test_save_stdout[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_spacing.png]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[BGR;15]", "Tests/test_mode_i16.py::test_basic[I;16]", "Tests/test_file_tiff.py::TestFileTiff::test_bigtiff", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ras]", "Tests/test_imagemorph.py::test_incorrect_mode", "Tests/test_imagepath.py::test_invalid_path_constructors[coords1]", "Tests/test_file_container.py::test_read_eof[False]", "Tests/test_file_png.py::TestFilePng::test_exif_save", "Tests/test_file_tiff_metadata.py::test_empty_subifd", "Tests/test_image.py::TestImage::test_exif_ifd1", "Tests/test_imagesequence.py::test_consecutive", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ls.png]", "Tests/test_image_reduce.py::test_mode_F[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev_first_frame.gif]", "Tests/test_file_apng.py::test_apng_blend", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyny.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyyn.png]", "Tests/test_image_point.py::test_f_mode", "Tests/test_imagemorph.py::test_add_patterns", "Tests/test_image_copy.py::test_copy[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_shape2.png]", "Tests/test_box_blur.py::test_two_passes", "Tests/test_file_gif.py::test_extents", "Tests/test_file_gif.py::test_loop_none", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply18]", "Tests/test_image_reduce.py::test_mode_La[5]", "Tests/test_imagepath.py::test_path_constructors[coords8]", "Tests/test_image_copy.py::test_copy[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1.bmp]", "Tests/test_file_fli.py::test_invalid_file", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-RGBA]", "Tests/test_file_wmf.py::test_save[.wmf]", "Tests/test_image_filter.py::test_sanity[CMYK-GaussianBlur]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_slope1px_w2px.png]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-PA]", "Tests/test_image_filter.py::test_rankfilter_error[MaxFilter]", "Tests/test_file_pdf.py::test_save[P]", "Tests/test_file_fli.py::test_eoferror", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba[RGBA-color2]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[L]", "Tests/test_file_bufrstub.py::test_open", "Tests/test_imagemorph.py::test_corner", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8nonsquare-e.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_1px_high.png]", "Tests/test_file_eps.py::test_readline[\\n-]", "Tests/test_file_gif.py::test_roundtrip_info_duration_combined", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-ifd-offset.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp_bits.ppm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_over.png]", "Tests/test_file_xvthumb.py::test_unexpected_eof", "Tests/test_image_access.py::TestImageGetPixel::test_basic[CMYK]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_equality", "Tests/test_file_sgi.py::test_write", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4IR.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/README.txt]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_wide_line_dot.png]", "Tests/test_imagecolor.py::test_hash", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-63b1dffefc8c075ddc606c0a2f5fdc15ece78863.tif]", "Tests/test_file_hdf5stub.py::test_save", "Tests/test_image_quantize.py::test_sanity", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply20]", "Tests/test_image_putdata.py::test_not_flattened", "Tests/test_file_gimpgradient.py::test_curved", "Tests/test_imageops.py::test_1pxfit", "Tests/test_image_reduce.py::test_mode_LA_opaque[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/five_channels.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_actl.png]", "Tests/test_imagemorph.py::test_load_invalid_mrl", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_lt.png]", "Tests/test_image_reduce.py::test_mode_L[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ld.png]", "Tests/test_lib_pack.py::TestLibUnpack::test_YCbCr", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_BC7_UNORM_SRGB.png]", "Tests/test_image_transpose.py::test_transpose[I;16B]", "Tests/test_file_tiff.py::TestFileTiff::test_planar_configuration_save", "Tests/test_file_eps.py::test_eof_before_bounding_box", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-50-50-0]", "Tests/test_imagechops.py::test_lighter_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-465703f71a0f0094873a3e0e82c9f798161171b8.sgi]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8_grayscale.bmp]", "Tests/test_imageops_usm.py::test_blur_formats", "Tests/test_font_pcf_charsets.py::test_draw[iso8859-1]", "Tests/test_imagepath.py::test_overflow_segfault", "Tests/test_file_ico.py::test_different_bit_depths", "Tests/test_file_tiff_metadata.py::test_read_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/argb-32bpp_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/libtiff_segfault.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_repeat_fctl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_2811.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-c8efc3fded6426986ba867a399791bae544f59bc.psd]", "Tests/test_file_gif.py::test_save_dispose", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-None]", "Tests/test_file_dcx.py::test_tell", "Tests/test_image_filter.py::test_sanity[RGB-SMOOTH_MORE]", "Tests/test_image_filter.py::test_sanity[I-EDGE_ENHANCE_MORE]", "Tests/test_imagedraw.py::test_rectangle_I16[bbox2]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illu10_no_preview.eps]", "Tests/test_image_reduce.py::test_mode_RGB[3]", "Tests/test_imagepath.py::test_invalid_path_constructors[coords4]", "Tests/test_image_rotate.py::test_zero[180]", "Tests/test_imagedraw.py::test_point[points0]", "Tests/test_image.py::TestImage::test_getbbox", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_nonexclusive", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns.png]", "Tests/test_features.py::test_check_modules[freetype2]", "Tests/test_imagedraw2.py::test_rectangle[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBX]", "Tests/test_format_lab.py::test_white", "Tests/test_file_wmf.py::test_load_raw", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32rle_top_right.tga]", "Tests/test_imagegrab.py::TestImageGrab::test_grab_no_xcb", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower2.webp]", "Tests/test_image_convert.py::test_8bit", "Tests/test_image_convert.py::test_p2pa_alpha", "Tests/test_image_mode.py::test_sanity", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_wrong_channels_count", "Tests/test_imagepath.py::test_path_constructors[coords1]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[4]", "Tests/test_image_thumbnail.py::test_aspect", "Tests/test_image_quantize.py::test_rgba_quantize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_1.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing.wmf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_final.png]", "Tests/test_imagechops.py::test_invert", "Tests/test_imageops.py::test_pil163", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[BGR;15-band_numbers2-color must be int, or tuple of one or three elements]", "Tests/test_file_fli.py::test_n_frames", "Tests/test_file_apng.py::test_apng_dispose_op_previous_frame", "Tests/test_file_tiff_metadata.py::test_iccprofile", "Tests/test_file_pdf.py::test_pdf_info", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc-after-SOF.jpg]", "Tests/test_deprecate.py::test_old_version[Old things-True-Old things are deprecated and should be removed\\\\.]", "Tests/test_imagedraw.py::test_ellipse[bbox2-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_pieslice.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_different.png]", "Tests/test_image.py::TestImage::test_apply_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_dpi.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4I.tif]", "Tests/test_pickle.py::test_pickle_la_mode_with_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0da013a13571cc8eb457a39fee8db18f8a3c7127.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_truncated_jpeg_throws_oserror", "Tests/test_imagedraw.py::test_polygon[points1]", "Tests/test_image_thumbnail.py::test_no_resize", "Tests/test_imagedraw.py::test_chord_width_fill[bbox0]", "Tests/test_file_gif.py::test_palette_434", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dilation4.lut]", "Tests/test_imageops.py::test_exif_transpose_in_place", "Tests/test_imagedraw.py::test_floodfill_border[bbox3]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[LA]", "Tests/test_image_reduce.py::test_mode_RGBa[factor8]", "Tests/test_file_gribstub.py::test_invalid_file", "Tests/test_file_tiff.py::TestFileTiff::test_closed_file", "Tests/test_file_gif.py::test_duration", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_tags_orientation.png]", "Tests/test_file_spider.py::test_nonstack_dos", "Tests/test_image.py::TestImage::test_remap_palette", "Tests/test_imagechops.py::test_logical", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[I;16]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sunraster.im1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_one_band.fpx]", "Tests/test_file_tiff_metadata.py::test_iccprofile_binary", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[IHDR]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor16]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_32f", "Tests/test_file_ico.py::test_save_to_bytes_bmp[RGB]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd_rgba.gif-RGBA]", "Tests/test_file_pcx.py::test_break_one_at_end", "Tests/test_image_tobitmap.py::test_sanity", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/p_trns_single.png-None]", "Tests/test_file_gif.py::test_identical_frames", "Tests/test_image_convert.py::test_matrix_illegal_conversion", "Tests/test_file_apng.py::test_seek_after_close", "Tests/test_file_pcx.py::test_odd[L]", "Tests/test_file_pdf.py::test_dpi[params0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_R8G8B8A8_UNORM_SRGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/png_decompression_dos.png]", "Tests/test_image_crop.py::test_negative_crop[box1]", "Tests/test_image_reduce.py::test_mode_La[1]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[sRGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc1_typeless.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r10.fli]", "Tests/test_imagedraw.py::test_point[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1.blp]", "Tests/test_image_reduce.py::test_mode_L[5]", "Tests/test_file_im.py::test_unclosed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_5.webp]", "Tests/test_core_resources.py::TestCoreMemory::test_clear_cache_stats", "Tests/test_file_hdf5stub.py::test_open", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox1]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration1]", "Tests/test_imagefile.py::TestImageFile::test_negative_stride", "Tests/test_image_reduce.py::test_mode_RGBA[factor10]", "Tests/test_image_filter.py::test_sanity[I-SMOOTH_MORE]", "Tests/test_file_dds.py::test_dx10_r8g8b8a8_unorm_srgb", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_raw.blp]", "Tests/test_features.py::test_check_codecs[jpg_2000]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.0-5.5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-bff0a9dc7243a8e6ede2408d2ffa6a9964698b87.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_bl_rle.tga]", "Tests/test_file_tiff.py::TestFileTiff::test_unknown_pixel_mode", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.3-3.7]", "Tests/test_file_container.py::test_read_n0[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_md_center.png]", "Tests/test_file_icns.py::test_save_fp", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32768-I;16B]", "Tests/test_image.py::TestImage::test_readonly_save", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/zero_bb_scale2.png-None]", "Tests/test_file_gif.py::test_optimize_correctness[129-511-129]", "Tests/test_image_rotate.py::test_translate", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_save_all", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h_sf.dds]", "Tests/test_imagewin.py::TestImageWin::test_hdc", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab-red.tif]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-True-True]", "Tests/test_imagefile.py::TestPyEncoder::test_oversize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/total-pages-zero.tif]", "Tests/test_file_xbm.py::test_pil151", "Tests/test_box_blur.py::test_color_modes", "Tests/test_imagedraw.py::test_line[points3]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[RGB]", "Tests/test_image_quantize.py::test_octree_quantize", "Tests/test_imagedraw.py::test_chord[bbox2-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_45.png]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc.png]", "Tests/test_imageenhance.py::test_alpha[Color]", "Tests/test_file_gif.py::test_dispose_background", "Tests/test_image.py::TestImage::test_zero_frombytes[size2]", "Tests/test_file_tiff.py::TestFileTiff::test_save_bmp_compression", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius2]", "Tests/test_image_reduce.py::test_mode_RGB[factor6]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_eps.py::test_image_mode_not_supported", "Tests/test_file_tiff.py::TestFileTiff::test_save_float_dpi", "Tests/test_image_filter.py::test_consistency_3x3[LA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[4]", "Tests/test_image_filter.py::test_sanity[I-DETAIL]", "Tests/test_image.py::TestImage::test_getchannel", "Tests/test_file_jpeg.py::TestFileJpeg::test_cmyk", "Tests/test_file_gif.py::test_palette_save_ImagePalette", "Tests/test_file_im.py::test_name_limit", "Tests/test_file_ppm.py::test_header_token_too_long", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.dds]", "Tests/test_image_transpose.py::test_transpose[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_rt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb.ico]", "Tests/test_file_tar.py::test_contextmanager", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65537]", "Tests/test_imagedraw.py::test_ellipse[bbox3-RGB]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[2]", "Tests/test_util.py::test_is_path[test_path1]", "Tests/test_file_tiff.py::TestFileTiff::test_oom[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_ico", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w126.bmp]", "Tests/test_file_ppm.py::test_plain_data_with_comment[P3\\n2 2\\n255-0 0 0 001 1 1 2 2 2 255 255 255-1000000]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[RGB]", "Tests/test_image_crop.py::test_crop_crash", "Tests/test_image_split.py::test_split_open", "Tests/test_imagepalette.py::test_make_linear_lut", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.wal]", "Tests/test_file_spider.py::test_is_int_not_a_number", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fcTL]", "Tests/test_file_jpeg.py::TestFileJpeg::test_separate_tables", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.3-3.7]", "Tests/test_file_dds.py::test_invalid_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[3-0-5]", "Tests/test_image_rotate.py::test_angle[0]", "Tests/test_file_psd.py::test_combined_larger_than_size", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points3]", "Tests/test_file_ico.py::test_save_256x256", "Tests/test_imagesequence.py::test_palette_mmap", "Tests/test_image_reduce.py::test_mode_LA_opaque[4]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[RGBX]", "Tests/test_file_gif.py::test_n_frames[Tests/images/comment_after_last_frame.gif-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid-exif.jpg]", "Tests/test_binary.py::test_little_endian", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_ellipse_RGB.png]", "Tests/test_imagedraw.py::test_incorrectly_ordered_coordinates[xy1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_frame.gif]", "Tests/test_image_quantize.py::test_palette[1-color1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8rle.bmp]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor10]", "Tests/test_file_eps.py::test_readline[\\n\\r-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/itxt_chunks.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cbdt_mask.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_x_max_and_y_offset.png]", "Tests/test_image_filter.py::test_modefilter[RGB-expected3]", "Tests/test_file_container.py::test_seek_mode[0-33]", "Tests/test_file_gimpgradient.py::test_linear_pos_gt_middle", "Tests/test_image_filter.py::test_sanity[L-EDGE_ENHANCE]", "Tests/test_imagedraw.py::test_rectangle_width[bbox1]", "Tests/test_image_reduce.py::test_mode_RGBA[factor12]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P5 3 1 257 \\x00\\x00\\x00\\x80\\x01\\x01-I-pixels5]", "Tests/test_file_ftex.py::test_invalid_file", "Tests/test_image_reduce.py::test_mode_La[factor6]", "Tests/test_file_gif.py::test_headers_saving_for_animated_gifs", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.xpm]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply22]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_height.j2k]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8nonsquare-v.png]", "Tests/test_file_dds.py::test_save[L-Tests/images/linear_gradient.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_large_buffer_highest_quality", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_unorm.dds-Tests/images/bc5_unorm.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_md.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[3]", "Tests/test_image_filter.py::test_sanity[CMYK-DETAIL]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_various_sizes_filled.png]", "Tests/test_image_filter.py::test_sanity[L-BLUR]", "Tests/test_file_dcx.py::test_sanity", "Tests/test_image_reduce.py::test_mode_LA_opaque[1]", "Tests/test_imagedraw.py::test_line_vertical", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev.gif]", "Tests/test_file_pcx.py::test_odd_read", "Tests/test_imagepalette.py::test_getcolor_not_special[0-palette0]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[RGBA]", "Tests/test_imagepath.py::test_path_constructors[\\x00\\x00\\x00\\x00\\x00\\x00\\x80?]", "Tests/test_file_dds.py::test_sanity_ati1_bc4u[Tests/images/bc4u.dds]", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[1-0-15]", "Tests/test_image_rotate.py::test_mode[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r01.fli]", "Tests/test_file_bmp.py::test_rle4", "Tests/test_file_gif.py::test_closed_file", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[1]", "Tests/test_image_reduce.py::test_mode_L[factor6]", "Tests/test_image_reduce.py::test_args_box_error[size2-ValueError]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_target.png]", "Tests/test_pdfparser.py::test_indirect_refs", "Tests/test_box_blur.py::test_radius_1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/color_snakes.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_y_odd.png]", "Tests/test_file_gif.py::test_seek_info", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_5.tif]", "Tests/test_imagedraw.py::test_ellipse_edge", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/la.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illuCS6_preview.eps]", "Tests/test_binary.py::test_big_endian", "Tests/test_imagedraw.py::test_pieslice_width[bbox2]", "Tests/test_imagedraw2.py::test_big_rectangle", "Tests/test_file_bmp.py::test_save_bmp_with_dpi", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test.colors.gif]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-0.6-0-9.1]", "Tests/test_file_xvthumb.py::test_invalid_file", "Tests/test_file_png.py::TestFilePng::test_repr_png", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r05.fli]", "Tests/test_file_mpo.py::test_reload_exif_after_seek", "Tests/test_file_dds.py::test_sanity_dxt5", "Tests/test_image_thumbnail.py::test_float", "Tests/test_imagepath.py::test_transform", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r02.fli]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-1.5-5.5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_name.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r08.fli]", "Tests/test_file_jpeg.py::TestFileJpeg::test_smooth", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background.png]", "Tests/test_image_filter.py::test_sanity[L-SMOOTH_MORE]", "Tests/test_util.py::test_is_path[test_path2]", "Tests/test_file_iptc.py::test_getiptcinfo_zero_padding", "Tests/test_file_tiff_metadata.py::test_ifd_signed_rational", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[L]", "Tests/test_file_fli.py::test_seek_tell", "Tests/test_file_pcx.py::test_break_in_count_overflow", "Tests/test_image_filter.py::test_sanity[I-EDGE_ENHANCE]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/zero_bb.png-None]", "Tests/test_image_reduce.py::test_unsupported_modes[P]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-0.6-0-9.1]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-50-50-0]", "Tests/test_file_tiff.py::TestFileTiff::test_int_resolution", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy1-x_odd]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.5-3.7]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[BGR;15]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illu10_preview.eps]", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color0-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_tl_raw.tga]", "Tests/test_file_ico.py::test_palette", "Tests/test_file_pcx.py::test_large_count", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none_load_end.gif]", "Tests/test_image_putdata.py::test_array_B", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/jpeg_ff00_header.jpg]", "Tests/test_imagemorph.py::test_lut[edge]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/ossfuzz-5730089102868480.sgi]", "Tests/test_file_mpo.py::test_parallax", "Tests/test_imageops_usm.py::test_usm_accuracy", "Tests/test_file_apng.py::test_apng_chunk_errors", "Tests/test_imagechops.py::test_lighter_pixel", "Tests/test_image_reduce.py::test_mode_La[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w2px_inverted.png]", "Tests/test_image_rotate.py::test_zero[0]", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox3]", "Tests/test_file_gif.py::test_seek_after_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyny.png]", "Tests/test_imagemath.py::test_logical_ne", "Tests/test_file_jpeg.py::TestFileJpeg::test_large_exif", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/copyleft.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt3-argb-8bbp-explicitalpha_MipMaps-1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati1.png]", "Tests/test_imagemorph.py::test_lut[erosion8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cmx3g8_wv_1998.260_0745_mcidas.ara]", "Tests/test_file_mpo.py::test_sanity[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/rletopdown.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_polygon_L.png]", "Tests/test_image.py::TestImage::test_exif_load_from_fp", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[BGR;15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_ter_pl_target.png]", "Tests/test_file_mpo.py::test_app[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/binary_preview_map.eps]", "Tests/test_image.py::TestImage::test_empty_exif", "Tests/test_image_reduce.py::test_mode_RGB[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_round.png]", "Tests/test_file_gif.py::test_save_I", "Tests/test_image.py::TestImage::test_unknown_extension", "Tests/test_box_blur.py::test_radius_bigger_then_half", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/p_trns_single.png-None]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle7-0-ValueError-rotation should be an int or float]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/03r00.fli]", "Tests/test_psdraw.py::test_stdout[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-bba4f2e026b5786529370e5dfe9a11b1bf991f07.blp]", "Tests/test_file_xpm.py::test_sanity", "Tests/test_image_filter.py::test_sanity[RGB-MedianFilter]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-True-True-False]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-60d8b7c8469d59fc9ffff6b3a3dc0faeae6ea8ee.blp]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[L]", "Tests/test_features.py::test_check_modules[littlecms2]", "Tests/test_tiff_ifdrational.py::test_nonetype", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_zero_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_1_raqm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-5762152299364352.fli]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_bitmap.png]", "Tests/test_file_im.py::test_tell", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage_transparency.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.deflate.tif]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-2]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gimp_gradient.ggr]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ls.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-0.1-0-3.7]", "Tests/test_image.py::TestImage::test_internals", "Tests/test_image_transpose.py::test_rotate_270[I;16B]", "Tests/test_image_draft.py::test_mode", "Tests/test_file_dds.py::test_short_header", "Tests/test_image_reduce.py::test_mode_RGB[factor16]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox3]", "Tests/test_file_wmf.py::test_load", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[1]", "Tests/test_image_rotate.py::test_fastpath_translate", "Tests/test_file_dds.py::test_dx10_bc4[Tests/images/bc4_unorm.dds]", "Tests/test_file_imt.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/not_enough_data.jp2]", "Tests/test_image_reduce.py::test_mode_RGB[6]", "Tests/test_imagemorph.py::test_roundtrip_mrl", "Tests/test_imagedraw.py::test_arc_no_loops[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGB_target.png]", "Tests/test_imageops.py::test_palette[PA]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/pil123p.png-None]", "Tests/test_image_filter.py::test_sanity[I-UnsharpMask]", "Tests/test_file_xbm.py::test_open_filename_with_underscore", "Tests/test_features.py::test_check_warns_on_nonexistent", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_8.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb16-231.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_rgb.png]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[1-bounding_circle1-0-ValueError-n_sides should be an int > 2]", "Tests/test_deprecate.py::test_action[Upgrade to new thing.]", "Tests/test_image.py::TestImage::test_zero_frombytes[size1]", "Tests/test_file_im.py::test_roundtrip[RGB]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[4]", "Tests/test_image.py::TestImage::test_radial_gradient_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_layer_count.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_various_sizes.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_1[L]", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/bc1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24prof.bmp]", "Tests/test_file_mpo.py::test_eoferror", "Tests/test_file_jpeg.py::TestFileJpeg::test_quality", "Tests/test_image_crop.py::test_crop[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mt.png]", "Tests/test_image.py::TestImage::test_no_new_file_on_error", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1.png]", "Tests/test_imagestat.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ttb.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[RGBX]", "Tests/test_box_blur.py::test_radius_0_02", "Tests/test_file_ppm.py::test_sanity", "Tests/test_image_reduce.py::test_mode_RGBa[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bad_palette_file.gpl]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_no_prefix.jpg]", "Tests/test_lib_pack.py::TestLibUnpack::test_1", "Tests/test_file_gif.py::test_bbox_alpha", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[acTL]", "Tests/test_image_transform.py::TestImageTransform::test_extent", "Tests/test_image_getbbox.py::test_bbox", "Tests/test_imagefontpil.py::test_unicode", "Tests/test_file_tga.py::test_sanity[P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_bl_raw.tga]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P2 3 1 4 0 2 4-L-pixels0]", "Tests/test_image_split.py::test_split_merge[RGBA]", "Tests/test_imagechops.py::test_darker_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill2.png]", "Tests/test_image_transpose.py::test_rotate_270[I;16L]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-PA]", "Tests/test_image_filter.py::test_consistency_3x3[L]", "Tests/test_image_copy.py::test_copy[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_8.webp]", "Tests/test_lib_pack.py::TestLibUnpack::test_CMYK16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_mm.png]", "Tests/test_file_eps.py::test_timeout[Tests/images/timeout-d675703545fee17acab56e5fec644c19979175de.eps]", "Tests/test_image_split.py::test_split_merge[YCbCr]", "Tests/test_file_pixar.py::test_sanity", "Tests/test_file_imt.py::test_invalid_file[\\n-]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5s.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_ycbcr_jpeg_1x1_sampling.tif]", "Tests/test_image_transpose.py::test_rotate_270[L]", "Tests/test_file_container.py::test_read_n0[False]", "Tests/test_file_gif.py::test_optimize_correctness[256-511-256]", "Tests/test_file_tiff.py::TestFileTiff::test_saving_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000002]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox3]", "Tests/test_file_ico.py::test_only_save_relevant_sizes", "Tests/test_file_psd.py::test_unclosed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ms.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65536]", "Tests/test_imagedraw2.py::test_line[points2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_6.webp]", "Tests/test_image_reduce.py::test_mode_I[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_frame_size.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/notes]", "Tests/test_file_dds.py::test_save[RGB-Tests/images/hopper.png]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-1.5-5.5]", "Tests/test_file_jpeg.py::TestFileJpeg::test_qtables", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/different_durations.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow.icns]", "Tests/test_image_filter.py::test_sanity_error[RGB]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/zero_bb.png-None]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[L]", "Tests/test_image.py::TestImage::test_constants", "Tests/test_file_icns.py::test_getimage", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit.ppm]", "Tests/test_image_transpose.py::test_rotate_270[I;16]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy0-30.5-given]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-3]", "Tests/test_imagepath.py::test_map[coords1-expected1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ma.png]", "Tests/test_lib_pack.py::TestLibPack::test_RGBA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_background_text.png]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/itxt_chunks.png-None]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_region.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/expected_to_read.jp2]", "Tests/test_image_transform.py::TestImageTransform::test_unknown_resampling_filter[unknown]", "Tests/test_image_entropy.py::test_entropy", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_16bit_RGBa.tiff]", "Tests/test_file_mpo.py::test_closed_file", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-L]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-1.1-6.9]", "Tests/test_image_putpalette.py::test_imagepalette", "Tests/test_file_pdf.py::test_save[RGB]", "Tests/test_image_rotate.py::test_rotate_no_fill", "Tests/test_file_mpo.py::test_mp_offset", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-9139147ce93e20eb14088fe238e541443ffd64b3.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-abcf1c97b8fe42a6c68f1fb0b978530c98d57ced.sgi]", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat_zero_chunk.png]", "Tests/test_imagedraw.py::test_triangle_right_width[fill0-width]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_edge.png]", "Tests/test_file_msp.py::test_open_windows_v1", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[RGB]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-74d2a78403a5a59db1fb0a2b8735ac068a75f6e3.tif]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_resize[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right_width_no_fill.png]", "Tests/test_image_reduce.py::test_mode_RGBA[3]", "Tests/test_image_filter.py::test_sanity[RGB-EMBOSS]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb24.jpg]", "Tests/test_file_gif.py::test_dispose_none", "Tests/test_imagedraw2.py::test_polygon[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_8.tga]", "Tests/test_imagedraw.py::test_default_font_size", "Tests/test_file_gif.py::test_dispose_none_load_end", "Tests/test_image_getcolors.py::test_pack", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_right.png]", "Tests/test_image_reduce.py::test_mode_RGBA[6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_high.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[0-None]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply15]", "Tests/test_image_filter.py::test_sanity[CMYK-EDGE_ENHANCE]", "Tests/test_file_blp.py::test_load_blp1", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat.png]", "Tests/test_map.py::test_tobytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overflow.fli]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/linear_gradient.png]", "Tests/test_image_crop.py::test_wide_crop", "Tests/test_image.py::TestImage::test_one_item_tuple", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_width_fill.png]", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_typeless.dds-Tests/images/bc5_unorm.dds]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.tif-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_invalid.png]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bw_gradient.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.mic]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/balloon_eciRGBv2_aware.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/notes]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox3]", "Tests/test_image_histogram.py::test_histogram", "Tests/test_image.py::TestImage::test_radial_gradient[F]", "Tests/test_imagedraw.py::test_ellipse_symmetric", "Tests/test_imagepalette.py::test_rawmode_valueerrors", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_bad_mpo_header.jpg]", "Tests/test_file_tiff.py::TestFileTiff::test_timeout", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox1]", "Tests/test_file_png.py::TestFilePng::test_trns_rgb", "Tests/test_image_resample.py::TestCoreResampleBox::test_passthrough", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[RGBA]", "Tests/test_image_convert.py::test_l_macro_rounding[L]", "Tests/test_image_mode.py::test_properties[P-P-L-1-expected_band_names2]", "Tests/test_imagedraw2.py::test_ellipse[bbox2]", "Tests/test_file_cur.py::test_invalid_file", "Tests/test_image_rotate.py::test_alpha_rotate_with_fill", "Tests/test_file_gif.py::test_l_mode_transparency", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor9]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[RGB]", "Tests/test_image_filter.py::test_sanity[I-ModeFilter]", "Tests/test_imagefile.py::TestImageFile::test_parser", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi[Tests/images/hopper.jpg]", "Tests/test_image.py::TestRegistry::test_encode_registry", "Tests/test_imagedraw.py::test_chord_zero_width[bbox1]", "Tests/test_image_putdata.py::test_sanity", "Tests/test_imagepath.py::test_path", "Tests/test_image_access.py::TestImageGetPixel::test_basic[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.webp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_multiple_frame_loop.tiff]", "Tests/test_file_dcx.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_gps_typeerror.jpg]", "Tests/test_file_fli.py::test_tell", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/clipboard.dib]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_compat", "Tests/test_imagefontpil.py::test_textbbox", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_typeless.dds]", "Tests/test_image_thumbnail.py::test_reducing_gap_for_DCT_scaling", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[None-1.5]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_with_normals_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_lt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_after_rgb.gif]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_imagemath.py::test_logical_lt", "Tests/test_file_hdf5stub.py::test_invalid_file", "Tests/test_image_rotate.py::test_fastpath_center", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/colr_bungee.png]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply20]", "Tests/test_file_mpo.py::test_frame_size", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox2]", "Tests/test_image_reduce.py::test_mode_La[6]", "Tests/test_file_spider.py::test_tempfile", "Tests/test_image_filter.py::test_sanity[RGB-UnsharpMask]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r11.fli]", "Tests/test_image_reduce.py::test_mode_RGBA[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_wmf_ref_144.png]", "Tests/test_image_filter.py::test_rankfilter[I-expected3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ra.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w125.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_save_setting_missing_resolution", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65519]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8w124.bmp]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_vertical[0]", "Tests/test_imagedraw2.py::test_rectangle[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnyn.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chromacheck-sbix_mask.png]", "Tests/test_file_im.py::test_sanity", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[1]", "Tests/test_image_reduce.py::test_mode_La[factor9]", "Tests/test_image_filter.py::test_sanity[L-EMBOSS]", "Tests/test_image_putdata.py::test_mode_i[I;16]", "Tests/test_imageenhance.py::test_crash", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-db8bfa78b19721225425530c5946217720d7df4e.sgi]", "Tests/test_file_apng.py::test_apng_repeated_seeks_give_correct_info", "Tests/test_image_point.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r04.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal4rletrns.bmp]", "Tests/test_imagedraw.py::test_pieslice_width[bbox3]", "Tests/test_image_getpalette.py::test_palette_rawmode", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox0]", "Tests/test_image.py::TestImage::test_image_modes_success[RGB]", "Tests/test_file_tar.py::test_unclosed_file", "Tests/test_file_mpo.py::test_app[Tests/images/frozenpond.mpo]", "Tests/test_image_reduce.py::test_mode_RGB[factor17]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif]", "Tests/test_image_reduce.py::test_mode_L[factor15]", "Tests/test_image_point.py::test_16bit_lut", "Tests/test_imagemorph.py::test_erosion4", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox0]", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_1bit_plain.pbm-Tests/images/hopper_1bit.pbm]", "Tests/test_imagedraw.py::test_continuous_horizontal_edges_polygon", "Tests/test_image_quantize.py::test_palette[2-color2]", "Tests/test_image_rotate.py::test_mode[I]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-060745d3f534ad6e4128c51d336ea5489182c69d.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/different_transparency.gif]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox3]", "Tests/test_core_resources.py::TestCoreMemory::test_set_blocks_max", "Tests/test_image_quantize.py::test_quantize_no_dither", "Tests/test_file_eps.py::test_binary", "Tests/test_imageops.py::test_exif_transpose", "Tests/test_file_gbr.py::test_multiple_load_operations", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rectangle_surrounding_text.png]", "Tests/test_imagedraw.py::test_ellipse[bbox0-L]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[RGBA]", "Tests/test_image_filter.py::test_sanity[RGB-BLUR]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower.jpg]", "Tests/test_file_png.py::TestFilePng::test_interlace", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_tl_rle.tga]", "Tests/test_image_transform.py::TestImageTransform::test_alpha_premult_resize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_center.png]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r01.fli]", "Tests/test_image_filter.py::test_sanity[RGB-MaxFilter]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox2]", "Tests/test_imagepalette.py::test_invalid_palette", "Tests/test_file_tiff.py::TestFileTiff::test_palette[PA]", "Tests/test_image.py::TestImage::test_invalid_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123rgba.png]", "Tests/test_box_blur.py::test_three_passes", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_not_needed_for_second_frame.gif]", "Tests/test_image_filter.py::test_consistency_5x5[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_unorm.png]", "Tests/test_file_ico.py::test_save_append_images", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8v4.bmp]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[P]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_8u", "Tests/test_file_pcx.py::test_odd[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_x_odd.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.iccprofile_binary.tif]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/zero_bb_scale2.png-None]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[RGB-band_numbers3-color must be int, or tuple of one, three or four elements]", "Tests/test_file_psd.py::test_negative_top_left_layer", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy0-x]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_L[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_mono.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_not_negative.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8rletrns.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8offs.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_raw.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_None.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_mt.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[RGB]", "Tests/test_imageops.py::test_autocontrast_preserve_gradient", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_tiff", "Tests/test_imagechops.py::test_soft_light", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_stroke_raqm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrow2.bin]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/second_frame_comment.gif]", "Tests/test_image_transpose.py::test_flip_top_bottom[RGB]", "Tests/test_file_gif.py::test_n_frames[Tests/images/hopper.gif-1]", "Tests/test_file_tiff_metadata.py::test_ifd_unsigned_rational", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_3.webp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb32bf.bmp]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor16]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGB]", "Tests/test_image_transform.py::TestImageTransform::test_mesh", "Tests/test_file_mpo.py::test_sanity[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit_plain.ppm]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[box1]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba32abf.bmp]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox2]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;15]", "Tests/test_file_gif.py::test_retain_comment_in_subsequent_frames", "Tests/test_image.py::TestImage::test_comparison_with_other_type", "Tests/test_font_bdf.py::test_invalid_file", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mm.png]", "Tests/test_file_bufrstub.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil168.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_l.png]", "Tests/test_file_tga.py::test_small_palette", "Tests/test_file_pdf.py::test_pdf_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.bmp]", "Tests/test_image_reduce.py::test_mode_LA[factor16]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-1.5-5.5]", "Tests/test_file_gif.py::test_optimize_correctness[64-511-64]", "Tests/test_image_reduce.py::test_mode_RGBa[factor6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_x.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5u.dds]", "Tests/test_image_reduce.py::test_args_factor_error[0-ValueError]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[3]", "Tests/test_imagedraw.py::test_ellipse_width[bbox1]", "Tests/test_imageenhance.py::test_sanity", "Tests/test_000_sanity.py::test_sanity", "Tests/test_image.py::TestImage::test_registered_extensions", "Tests/test_imagewin.py::TestImageWin::test_hwnd", "Tests/test_file_tiff_metadata.py::test_too_many_entries", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow2.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_sepia.png]", "Tests/test_file_tiff.py::TestFileTiff::test_sanity", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/p_trns_single.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_right.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_complex_unicode_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_test.jpg]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gimp_gradient_with_name.ggr]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32768-I;16]", "Tests/test_file_sgi.py::test_rgb16", "Tests/test_imagefile.py::TestImageFile::test_truncated", "Tests/test_imagepalette.py::test_getcolor", "Tests/test_file_dds.py::test_dx10_bc6h[Tests/images/bc6h_sf.dds]", "Tests/test_image_filter.py::test_crash[size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_width_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_descender.png]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_width.png]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/non_zero_bb.png-None]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-RGB]", "Tests/test_file_tar.py::test_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-64834657ee604b8797bf99eac6a194c124a9a8ba.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/missing_background_first_frame.png]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16L]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords0]", "Tests/test_imagemath.py::test_one_image_larger", "Tests/test_image.py::TestImage::test_radial_gradient[P]", "Tests/test_image_transpose.py::test_rotate_180[RGB]", "Tests/test_image_reduce.py::test_mode_RGBa[factor9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_draw_pbm_ter_en_target.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pcx_overrun2.bin]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-1.1-6.9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_translucent.png]", "Tests/test_tiff_ifdrational.py::test_ranges", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_eof_before_boundingbox.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-4f085cc12ece8cde18758d42608bed6a2a2cfb1c.tif]", "Tests/test_image.py::TestImage::test_overrun[fli_overrun.bin]", "Tests/test_file_ppm.py::test_plain_ppm_value_negative", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color1-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_padded.jpg]", "Tests/test_file_ico.py::test_load", "Tests/test_file_container.py::test_readlines[False]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[BGR;24]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_overflow", "Tests/test_file_mpo.py::test_exif[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r03.fli]", "Tests/test_image_quantize.py::test_quantize", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox3]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-L]", "Tests/test_file_xbm.py::test_invalid_file", "Tests/test_imagedraw.py::test_big_rectangle", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-0-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.webp]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.png]", "Tests/test_file_pdf.py::test_redos[\\r]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-6646305047838720]", "Tests/test_mode_i16.py::test_basic[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_center.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_fdat_fctl.png]", "Tests/test_image_tobytes.py::test_sanity", "Tests/test_imagedraw.py::test_rectangle_width[bbox3]", "Tests/test_imageenhance.py::test_alpha[Sharpness]", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size0]", "Tests/test_imagedraw.py::test_ellipse[bbox2-L]", "Tests/test_image_filter.py::test_consistency_5x5[I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_4.tif]", "Tests/test_file_pcx.py::test_break_many_in_loop", "Tests/test_image_resize.py::TestImageResize::test_resize", "Tests/test_image_filter.py::test_sanity[I-SMOOTH]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_rectangle_RGB.png]", "Tests/test_map.py::test_overflow", "Tests/test_file_gif.py::test_strategy", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h_sf.png]", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun2.bin]", "Tests/test_file_im.py::test_n_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGBa.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb24pal.bmp]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_itxt", "Tests/test_file_im.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_grayscale_alpha.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_unexpected.ico]", "Tests/test_image_filter.py::test_sanity[L-MaxFilter]", "Tests/test_image_convert.py::test_16bit", "Tests/test_file_dds.py::test_uncompressed[L-size0-Tests/images/uncompressed_l.dds]", "Tests/test_file_mpo.py::test_exif[Tests/images/frozenpond.mpo]", "Tests/test_imagemath.py::test_convert", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pngtest_bad.png.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_8_raqm.png]", "Tests/test_image.py::TestImage::test_linear_gradient[I]", "Tests/test_imagegrab.py::TestImageGrab::test_grabclipboard", "Tests/test_imagemath.py::test_prevent_exec[(lambda: exec('pass'))()]", "Tests/test_file_tar.py::test_sanity[jpg-hopper.jpg-JPEG]", "Tests/test_image_split.py::test_split_merge[CMYK]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.0-5.5]", "Tests/test_file_ico.py::test_no_duplicates", "Tests/test_file_pcx.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/a.fli]", "Tests/test_file_jpeg.py::TestFileJpeg::test_truncated_jpeg_should_read_all_the_data", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_noise.tif]", "Tests/test_image_putpalette.py::test_putpalette", "Tests/test_file_ico.py::test_unexpected_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_negative.png]", "Tests/test_file_dds.py::test_sanity_dxt3", "Tests/test_image_draft.py::test_several_drafts", "Tests/test_image_transpose.py::test_transpose[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_chord_L.png]", "Tests/test_image_split.py::test_split_merge[L]", "Tests/test_image_reduce.py::test_unsupported_modes[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line_truncated.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_typeerror.jpg]", "Tests/test_file_msp.py::test_sanity", "Tests/test_image_crop.py::test_crop[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/xmp_tags_orientation_exiftool.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.3-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_8bit.pgm]", "Tests/test_file_gif.py::test_eoferror", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/pil123p.png-None]", "Tests/test_image_reduce.py::test_mode_RGBa[factor15]", "Tests/test_imagesequence.py::test_iterator_min_frame", "Tests/test_file_psd.py::test_sanity", "Tests/test_pdfparser.py::test_parsing", "Tests/test_imagedraw.py::test_rounded_rectangle[xy1]", "Tests/test_imagefile.py::TestPyDecoder::test_extents_none", "Tests/test_box_blur.py::test_radius_0_5", "Tests/test_imagedraw.py::test_line_oblique_45", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns-b.png]", "Tests/test_imagepath.py::test_path_constructors[coords2]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-2.5-3.7]", "Tests/test_file_palm.py::test_oserror[RGB]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[0]", "Tests/test_image_getcolors.py::test_getcolors", "Tests/test_image_frombytes.py::test_sanity[memoryview]", "Tests/test_file_xpm.py::test_invalid_file", "Tests/test_file_container.py::test_readlines[True]", "Tests/test_file_tiff_metadata.py::test_iccprofile_binary_save_png", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_jpg.tif]", "Tests/test_file_gif.py::test_seek_rewind", "Tests/test_file_bmp.py::test_rle8", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_large_buffer", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.spider]", "Tests/test_file_png.py::TestFilePng::test_broken", "Tests/test_image_thumbnail.py::test_reducing_gap_values", "Tests/test_imagemath.py::test_binary_mod", "Tests/test_file_pdf.py::test_monochrome", "Tests/test_image_reduce.py::test_mode_LA[factor6]", "Tests/test_imagepath.py::test_getbbox[0-expected2]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-abcf1c97b8fe42a6c68f1fb0b978530c98d57ced.sgi]", "Tests/test_file_eps.py::test_long_binary_data[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image.py::TestImage::test_linear_gradient[P]", "Tests/test_file_imt.py::test_invalid_file[width 1\\n]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage-lastframe.tif]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[65535-I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_0.jpg]", "Tests/test_imagedraw2.py::test_ellipse[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg2.blp]", "Tests/test_file_msp.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/notes]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_lzw.tiff]", "Tests/test_image_reduce.py::test_mode_I[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_extents.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_line.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp_write.ppm]", "Tests/test_imagechops.py::test_multiply_green", "Tests/test_file_gif.py::test_optimize_correctness[64-513-256]", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color0-P]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/test-card.png-None]", "Tests/test_imagecolor.py::test_rounding_errors", "Tests/test_file_tiff.py::TestFileTiff::test_get_photoshop_blocks", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bad_palette_entry.gpl]", "Tests/test_lib_pack.py::TestLibPack::test_YCbCr", "Tests/test_file_jpeg.py::TestFileJpeg::test_eof", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24largepal.bmp]", "Tests/test_image.py::TestImage::test_fp_name", "Tests/test_file_gif.py::test_optimize_correctness[128-511-128]", "Tests/test_image_mode.py::test_properties[RGBA-RGB-L-4-expected_band_names6]", "Tests/test_file_png.py::TestTruncatedPngPLeaks::test_leak_load", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_scale2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_2_basic.png]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_lzma.tif]", "Tests/test_imagefile.py::TestImageFile::test_safeblock", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_adobe_deflate.png]", "Tests/test_imagedraw2.py::test_rectangle[bbox3]", "Tests/test_imagedraw.py::test_chord_width[bbox3]", "Tests/test_file_png.py::TestFilePng::test_exif_from_jpg", "Tests/test_file_im.py::test_eoferror", "Tests/test_image_frombytes.py::test_sanity[bytes]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32769-I;16B]", "Tests/test_lib_pack.py::TestLibPack::test_RGBa", "Tests/test_image_filter.py::test_sanity[CMYK-EMBOSS]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_app14.jpg]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/zero_bb_scale2.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badbitcount.bmp]", "Tests/test_file_jpeg.py::TestFileJpeg::test_subsampling", "Tests/test_imagefile.py::TestImageFile::test_truncated_without_errors", "Tests/test_image_putdata.py::test_mode_i[I;16L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[3]", "Tests/test_mode_i16.py::test_convert", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/child_ifd.tiff]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[RGBA]", "Tests/test_file_gd.py::test_sanity", "Tests/test_file_jpeg.py::TestFileJpeg::test_load_16bit_qtables", "Tests/test_file_gif.py::test_read_multiple_comment_blocks", "Tests/test_image_reduce.py::test_mode_RGBa[6]", "Tests/test_file_palm.py::test_p_mode - Palm P image is wrong", "Tests/test_image.py::TestImage::test_image_modes_success[RGBa]", "Tests/test_font_pcf_charsets.py::test_draw[cp1250]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gfs.t06z.rassda.tm00.bufr_d]", "Tests/test_image_reduce.py::test_unsupported_modes[I;16]", "Tests/test_lib_pack.py::TestLibPack::test_RGBX", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_4_basic.png]", "Tests/test_image_reduce.py::test_mode_LA[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab-green.tif]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_4.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit.pgm]", "Tests/test_lib_pack.py::TestLibPack::test_F_float", "Tests/test_file_fli.py::test_timeouts[Tests/images/timeout-bff0a9dc7243a8e6ede2408d2ffa6a9964698b87.fli]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords3]", "Tests/test_lib_pack.py::TestLibPack::test_I", "Tests/test_image_crop.py::test_crop[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_1px_high_translucent.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badheadersize.bmp]", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var1]", "Tests/test_file_gif.py::test_optimize_full_l", "Tests/test_features.py::test_version", "Tests/test_main.py::test_main", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1a.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_complex_unicode_text2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_ttb_lb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/different_transparency_merged.png]", "Tests/test_image_filter.py::test_sanity[I-MaxFilter]", "Tests/test_file_dcx.py::test_eoferror", "Tests/test_file_dds.py::test__accept_false", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[I]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[2]", "Tests/test_file_tiff.py::TestFileTiff::test_rowsperstrip", "Tests/test_image_split.py::test_split_merge[P]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.xbm]", "Tests/test_imageops.py::test_contain[new_size0]", "Tests/test_imagedraw.py::test_same_color_outline[bbox2]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBA]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[1]", "Tests/test_image_rotate.py::test_angle[90]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox0]", "Tests/test_imagedraw.py::test_triangle_right_width[None-width_no_fill]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_2.jpg]", "Tests/test_image_transpose.py::test_flip_left_right[L]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-False-True]", "Tests/test_file_ppm.py::test_plain_ppm_value_too_large", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[RGB]", "Tests/test_image_getim.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2I.tif]", "Tests/test_mode_i16.py::test_tobytes", "Tests/test_file_palm.py::test_oserror[L]", "Tests/test_features.py::test_supported_modules", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chi.gif]", "Tests/test_image_convert.py::test_opaque", "Tests/test_box_blur.py::test_imageops_box_blur", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow2.icns]", "Tests/test_image_filter.py::test_sanity[CMYK-SHARPEN]", "Tests/test_imageops.py::test_autocontrast_preserve_tone", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_xref_entry.pdf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nynn.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_ma_center.png]", "Tests/test_imagedraw.py::test_line[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGB.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_right.png]", "Tests/test_image_reduce.py::test_mode_L[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile_none.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil168.png]", "Tests/test_file_spider.py::test_is_spider_image", "Tests/test_image_getextrema.py::test_extrema", "Tests/test_image.py::TestImage::test_effect_spread", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi[Tests/images/pil_sample_cmyk.jpg]", "Tests/test_file_ppm.py::test_header_with_comments", "Tests/test_image_reduce.py::test_mode_L[factor9]", "Tests/test_file_psd.py::test_context_manager", "Tests/test_file_mpo.py::test_save_all", "Tests/test_file_gimpgradient.py::test_linear_pos_le_middle", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_right.png]", "Tests/test_file_tiff.py::TestFileTiff::test_exif", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gif_header_data.pkl]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-RGB]", "Tests/test_image.py::TestImage::test_has_transparency_data", "Tests/test_image_resample.py::TestCoreResamplePasses::test_box_vertical", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[L]", "Tests/test_imagedraw.py::test_chord[bbox0-L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_dxt1.png]", "Tests/test_image_rotate.py::test_mode[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb_scale2.png]", "Tests/test_image.py::TestImage::test_exception_inheritance", "Tests/test_imagechops.py::test_subtract_scale_offset", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_256x256.ico]", "Tests/test_file_container.py::test_read_eof[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiple_exif.jpg]", "Tests/test_image_transpose.py::test_rotate_180[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_raw.tif]", "Tests/test_lib_pack.py::TestLibUnpack::test_I", "Tests/test_image_reduce.py::test_mode_I[factor11]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[L]", "Tests/test_imagedraw.py::test_rectangle_I16[bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_typeerror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_R8G8B8A8_UNORM_SRGB.dds]", "Tests/test_image_reduce.py::test_mode_L[2]", "Tests/test_image_reduce.py::test_mode_RGB[factor11]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-1.1-6.9]", "Tests/test_file_dds.py::test_save[LA-Tests/images/uncompressed_la.png]", "Tests/test_image_crop.py::test_crop[P]", "Tests/test_file_jpeg.py::TestFileJpeg::test_progressive_cmyk_buffer", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox0]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_no_icc_profile", "Tests/test_file_dcx.py::test_unclosed_file", "Tests/test_file_pdf.py::test_dpi[params1]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply17]", "Tests/test_imagechops.py::test_hard_light", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_RGB.png]", "Tests/test_imagechops.py::test_add", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32bf-abgr.bmp]", "Tests/test_file_ico.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.MM.cropped.tif]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r04.fli]", "Tests/test_file_pcx.py::test_1px_width", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0c7e0e8e11ce787078f00b5b0ca409a167f070e0.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/split_fdat.png]", "Tests/test_file_gif.py::test_roundtrip_info_duration", "Tests/test_mode_i16.py::test_basic[I;16B]", "Tests/test_imagedraw.py::test_draw_regular_polygon[3-triangle_width-args3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_jpeg.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/notes]", "Tests/test_file_mpo.py::test_mp_no_data", "Tests/test_file_apng.py::test_apng_syntax_errors", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[RGB]", "Tests/test_image_reduce.py::test_mode_LA_opaque[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.fits]", "Tests/test_image_convert.py::test_trns_p", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/baddens1.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_RGB.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[6]", "Tests/test_image.py::TestImage::test_storage_neg", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox0]", "Tests/test_imagemath.py::test_bitwise_xor", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynyy.png]", "Tests/test_file_fli.py::test_palette_chunk_second", "Tests/test_image_reduce.py::test_mode_LA[4]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cbdt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1bg.bmp]", "Tests/test_file_mcidas.py::test_valid_file", "Tests/test_imagemath.py::test_logical_equal", "Tests/test_file_sgi.py::test_write16", "Tests/test_image_filter.py::test_sanity_error[I]", "Tests/test_imagemath.py::test_logical_gt", "Tests/test_image.py::TestRegistry::test_encode_registry_fail", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yynn.png]", "Tests/test_file_psd.py::test_icc_profile", "Tests/test_file_pdf.py::test_save_all", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w101px.png]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder_chunk.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4u.dds]", "Tests/test_image_putpalette.py::test_undefined_palette_index", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnyy.png]", "Tests/test_image_thumbnail.py::test_DCT_scaling_edges", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_draw_regular_polygon[8-regular_octagon-args1]", "Tests/test_file_xvthumb.py::test_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_high.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_wmf_ref.png]", "Tests/test_imageshow.py::test_viewer_show[-1]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_wrong_args", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns_ycbc.jp2]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.tif-None]", "Tests/test_file_spider.py::test_unclosed_file", "Tests/test_format_hsv.py::test_hsv_to_rgb", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/itxt_chunks.png-None]", "Tests/test_file_wmf.py::test_register_handler", "Tests/test_file_ico.py::test_save_to_bytes_bmp[P]", "Tests/test_file_msp.py::test_cannot_save_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/icc_profile_big.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb_trns_ycbc.j2k]", "Tests/test_imagecolor.py::test_colormap", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_regular_octagon.png]", "Tests/test_file_png.py::TestFilePng::test_trns_p", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-1.5-5.5]", "Tests/test_file_ppm.py::test_pnm", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[La]", "Tests/test_imagepath.py::test_path_constructors[coords10]", "Tests/test_imagechops.py::test_blend", "Tests/test_imagedraw.py::test_ellipse[bbox1-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_mask.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r01.fli]", "Tests/test_image_putpalette.py::test_rgba_palette[RGBA-palette0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2R.tif]", "Tests/test_image_reduce.py::test_mode_F[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb.png]", "Tests/test_image_convert.py::test_trns_RGB", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/deerstalker.cur]", "Tests/test_file_mpo.py::test_mp_attribute[Tests/images/frozenpond.mpo]", "Tests/test_deprecate.py::test_replacement_and_action", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_none.png]", "Tests/test_imagedraw.py::test_chord[bbox3-RGB]", "Tests/test_decompression_bomb.py::TestDecompressionCrop::test_enlarge_crop", "Tests/test_image_resample.py::TestCoreResampleCoefficients::test_non_zero_coefficients", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width.png]", "Tests/test_image_transpose.py::test_flip_left_right[I;16B]", "Tests/test_image.py::TestImage::test_exit_fp", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-False-RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/odd_stride.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_rb.png]", "Tests/test_file_fli.py::test_seek_after_close", "Tests/test_imageops.py::test_contain_round", "Tests/test_color_lut.py::TestTransformColorLut3D::test_3_to_3_channels", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[None-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing.emf]", "Tests/test_file_bmp.py::test_rgba_bitfields", "Tests/test_imagedraw.py::test_point[points2]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox2]", "Tests/test_imagepath.py::test_map[0-expected0]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[L]", "Tests/test_image_reduce.py::test_mode_RGB[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_float_coord_1_alt.png]", "Tests/test_image_filter.py::test_sanity[CMYK-MinFilter]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la_tl_rle.tga]", "Tests/test_file_gimpgradient.py::test_linear_pos_le_small_middle", "Tests/test_imagedraw.py::test_arc_no_loops[bbox0]", "Tests/test_file_qoi.py::test_invalid_file", "Tests/test_image_reduce.py::test_mode_L[factor7]", "Tests/test_image_mode.py::test_properties[CMYK-RGB-L-4-expected_band_names8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_3.jpg]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[5]", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[True]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox2]", "Tests/test_file_png.py::TestFilePng::test_save_stdout[True]", "Tests/test_image_transpose.py::test_tranverse[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rotate_45_with_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_shape_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun_expandrow.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[RGBX]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_final.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_1.jpg]", "Tests/test_file_gimppalette.py::test_sanity", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-598843abc37fc080ec36a2699ebbd44f795d3a6f.psd-UnidentifiedImageError]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-True-RGBA]", "Tests/test_imagedraw.py::test_arc_no_loops[bbox1]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[F]", "Tests/test_image_transpose.py::test_flip_top_bottom[L]", "Tests/test_image.py::TestImage::test_linear_gradient_wrong_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[5]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[L]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-754d9c7ec485ffb76a90eeaab191ef69a2a3a3cd.sgi]", "Tests/test_font_leaks.py::TestDefaultFontLeak::test_leak", "Tests/test_file_apng.py::test_apng_num_plays", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_slope1px_w2px.png]", "Tests/test_image_reduce.py::test_mode_F[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgba32.png]", "Tests/test_image_split.py::test_split_merge[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.bdf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_over_near_transparent.png]", "Tests/test_image_filter.py::test_sanity[L-UnsharpMask]", "Tests/test_imagedraw.py::test_chord[bbox0-RGB]", "Tests/test_imagecolor.py::test_color_too_long", "Tests/test_image.py::TestImage::test_image_modes_success[I]", "Tests/test_imagedraw.py::test_pieslice_no_spikes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb32bf-rgba.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_transparent.png]", "Tests/test_font_pcf.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/readme.txt]", "Tests/test_file_jpeg.py::TestFileJpeg::test_zero[size1]", "Tests/test_file_tga.py::test_save_id_section", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_binary_pgm.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/caption_6_33_22.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_stroke_basic.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tRNS_null_1x1.png]", "Tests/test_file_gif.py::test_bbox", "Tests/test_file_apng.py::test_apng_blend_transparency", "Tests/test_file_fits.py::test_truncated_fits", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/default_font.png]", "Tests/test_image_quantize.py::test_palette[0-color0]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[180-3]", "Tests/test_imagedraw.py::test_arc_width[bbox2]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif", "Tests/test_file_png.py::TestFilePng::test_textual_chunks_after_idat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_zero_numer.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_palette_with_background.gif]", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[65535-I;16B]", "Tests/test_imagepalette.py::test_2bit_palette", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-1]", "Tests/test_file_gif.py::test_dispose2_background_frame", "Tests/test_image_resize.py::TestImagingCoreResize::test_cross_platform", "Tests/test_file_png.py::TestFilePng::test_save_icc_profile", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_gps", "Tests/test_imagedraw.py::test_triangle_right", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_dispose.gif]", "Tests/test_imagepath.py::test_transform_with_wrap", "Tests/test_image_reduce.py::test_mode_La[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/pal8badindex.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_dict", "Tests/test_image_thumbnail.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper16.rgb]", "Tests/test_image_filter.py::test_rankfilter_properties", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_top_left_layer.psd]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-None]", "Tests/test_file_eps.py::test_binary_header_only", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r07.fli]", "Tests/test_image_reduce.py::test_mode_La[4]", "Tests/test_file_ppm.py::test_16bit_pgm", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.0-5.5]", "Tests/test_image_reduce.py::test_args_factor[size1-expected1]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius3]", "Tests/test_imagemorph.py::test_lut[dilation4]", "Tests/test_file_png.py::TestFilePng::test_verify_struct_error", "Tests/test_image_transpose.py::test_tranverse[RGB]", "Tests/test_image_reduce.py::test_mode_La[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc7-argb-8bpp_MipMaps-1.dds]", "Tests/test_lib_pack.py::TestLibUnpack::test_I16", "Tests/test_file_ppm.py::test_pfm_big_endian", "Tests/test_image_reduce.py::test_mode_F[factor18]", "Tests/test_image_reduce.py::test_mode_La[factor16]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply22]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_polygon_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny.png]", "Tests/test_file_gbr.py::test_gbr_file", "Tests/test_imagedraw.py::test_chord_too_fat", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_1_basic.png]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_bad_mpo_header", "Tests/test_image_reduce.py::test_mode_RGBa[factor12]", "Tests/test_file_ppm.py::test_plain_invalid_data[P1\\n128 128\\n1009]", "Tests/test_imagedraw.py::test_line[points0]", "Tests/test_image_rotate.py::test_center", "Tests/test_util.py::test_deferred_error", "Tests/test_file_ppm.py::test_truncated_file", "Tests/test_file_jpeg.py::TestFileJpeg::test_ifd_offset_exif", "Tests/test_file_png.py::TestFilePng::test_load_transparent_rgb", "Tests/test_file_png.py::TestFilePng::test_load_verify", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-L]", "Tests/test_image_filter.py::test_sanity[RGB-DETAIL]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_I.tiff]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_values", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-0]", "Tests/test_imagemorph.py::test_edge", "Tests/test_file_gif.py::test_no_transparency_in_second_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_big_rectangle.png]", "Tests/test_pdfparser.py::test_text_encode_decode", "Tests/test_image.py::TestImage::test_getbands", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_blend.png]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGBA]", "Tests/test_imagemath.py::test_bitwise_leftshift", "Tests/test_image_transpose.py::test_transpose[RGB]", "Tests/test_file_gif.py::test_palette_save_duplicate_entries", "Tests/test_file_ico.py::test_mask", "Tests/test_imagemorph.py::test_lut[corner]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns-0.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_6194.j2k]", "Tests/test_lib_pack.py::TestLibPack::test_HSV", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/triangle_right_width.png]", "Tests/test_file_tiff_metadata.py::test_write_metadata", "Tests/test_file_pcx.py::test_break_many_at_end", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/DXGI_FORMAT_BC7_UNORM_SRGB.dds]", "Tests/test_image.py::TestImage::test_effect_spread_zero", "Tests/test_mode_i16.py::test_basic[L]", "Tests/test_imagedraw2.py::test_polygon[points1]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/non_zero_bb.png-None]", "Tests/test_image_filter.py::test_crash[size0]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_transform[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_tl_rle.tga]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 -inf \\x00\\x00\\x00\\x00]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multiline_text_center.png]", "Tests/test_imagepath.py::test_path_constructors[coords7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badwidth.bmp]", "Tests/test_font_pcf.py::test_high_characters", "Tests/test_file_tga.py::test_missing_palette", "Tests/test_imagedraw.py::test_arc_width_fill[bbox2]", "Tests/test_imageshow.py::test_viewer", "Tests/test_file_tiff_metadata.py::test_empty_values", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/00r1_graya_la.jp2]", "Tests/test_file_apng.py::test_apng_save_disposal_previous", "Tests/test_file_png.py::TestFilePng::test_save_p_single_transparency", "Tests/test_image_reduce.py::test_mode_La[factor18]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_16bit.png]", "Tests/test_image_reduce.py::test_mode_RGBa[factor11]", "Tests/test_imagedraw.py::test_sanity", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy3-y]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.msp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_chord_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb.gif]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply16]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.3-3.7]", "Tests/test_image_convert.py::test_p2pa_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_lm_left.png]", "Tests/test_file_gif.py::test_previous_frame_loaded", "Tests/test_imagedraw.py::test_mode_mismatch", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.r.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply17]", "Tests/test_image_resize.py::TestImagingCoreResize::test_convolution_modes", "Tests/test_image_load.py::test_close", "Tests/test_tiff_ifdrational.py::test_sanity", "Tests/test_file_apng.py::test_apng_save_alpha", "Tests/test_imagedraw.py::test_pieslice_width[bbox1]", "Tests/test_lib_image.py::test_setmode", "Tests/test_imagemath.py::test_prevent_exec[(lambda: (lambda: exec('pass'))())()]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_LA[L]", "Tests/test_lib_pack.py::TestLibUnpack::test_LA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-0e16d3bfb83be87356d026d66919deaefca44dac.tif]", "Tests/test_imagepath.py::test_getbbox_no_args", "Tests/test_image_filter.py::test_consistency_3x3[I]", "Tests/test_pdfparser.py::test_pdf_repr", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-ole-file.doc]", "Tests/test_file_dds.py::test_unsupported_bitcount", "Tests/test_file_fli.py::test_crash[Tests/images/crash-5762152299364352.fli]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_bytes[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/courB08.pil]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-d2c93af851d3ab9a19e34503626368b2ecde9c03.j2k]", "Tests/test_file_spider.py::test_closed_file", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-None]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment[]", "Tests/test_file_gimpgradient.py::test_load_via_imagepalette", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox0]", "Tests/test_imageops.py::test_contain[new_size1]", "Tests/test_file_hdf5stub.py::test_handler", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_ynny.png]", "Tests/test_file_fli.py::test_prefix_chunk", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_rm_center.png]", "Tests/test_imageops_usm.py::test_usm_formats", "Tests/test_file_png.py::TestFilePng::test_getchunks", "Tests/test_imagefontpil.py::test_decompression_bomb", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox3]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[YCbCr]", "Tests/test_image_transpose.py::test_tranverse[I;16]", "Tests/test_image.py::TestImage::test__new", "Tests/test_image_rotate.py::test_angle[270]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16-565.png]", "Tests/test_imagedraw.py::test_arc_width[bbox3]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_identities", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[RGB]", "Tests/test_imageenhance.py::test_alpha[Brightness]", "Tests/test_file_eps.py::test_bounding_box_in_trailer", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/reproducing]", "Tests/test_image_filter.py::test_sanity[L-FIND_EDGES]", "Tests/test_image_transpose.py::test_roundtrip[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unknown_compression_method.png]", "Tests/test_imagedraw.py::test_polygon_kite[kite_points0-RGB]", "Tests/test_image_reduce.py::test_args_box_error[size3-ValueError]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBa[RGBA]", "Tests/test_image_reduce.py::test_mode_La[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiny.png]", "Tests/test_image_reduce.py::test_mode_F[5]", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_fallback_tiff", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_lzw.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_unknown_pixel_mode.tif]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor12]", "Tests/test_file_png.py::TestFilePng::test_verify_ignores_crc_error", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illu10_no_preview.eps]", "Tests/test_image_filter.py::test_sanity[L-SMOOTH]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/sgi_overrun_expandrowF04.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/app13-multiple.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_axes.png]", "Tests/test_imagedraw.py::test_chord[bbox2-L]", "Tests/test_file_dds.py::test__accept_true", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/duplicate_number_of_loops.gif]", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/bmp/q/pal8rletrns.bmp-3670]", "Tests/test_image_reduce.py::test_mode_I[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_y_offset.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/chromacheck-sbix.png]", "Tests/test_features.py::test_check_modules[webp]", "Tests/test_imagecolor.py::test_color_hsv", "Tests/test_file_eps.py::test_1_mode", "Tests/test_image.py::TestImage::test_getchannel_wrong_params", "Tests/test_file_jpeg.py::TestFileJpeg::test_multiple_exif", "Tests/test_image_filter.py::test_sanity[CMYK-MedianFilter]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_2_raqm.png]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16N]", "Tests/test_image_access.py::TestImagePutPixel::test_sanity", "Tests/test_image_reduce.py::test_mode_F[6]", "Tests/test_imageops.py::test_pad_round", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 inf \\x00\\x00\\x00\\x00]", "Tests/test_file_tiff_metadata.py::test_iccprofile_save_png", "Tests/test_file_spider.py::test_sanity", "Tests/test_core_resources.py::TestEnvVars::test_units", "Tests/test_file_pcx.py::test_break_padding", "Tests/test_image_access.py::TestImageGetPixel::test_p_putpixel_rgb_rgba[color1-P]", "Tests/test_image_split.py::test_split_merge[1]", "Tests/test_file_pcx.py::test_invalid_file", "Tests/test_lib_pack.py::TestLibUnpack::test_RGB", "Tests/test_image_filter.py::test_sanity[I-EMBOSS]", "Tests/test_file_mpo.py::test_save[Tests/images/frozenpond.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r03.fli]", "Tests/test_image.py::TestImage::test_set_mode", "Tests/test_imageops.py::test_palette[P]", "Tests/test_image_reduce.py::test_mode_RGBa[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_repeat_chunk.png]", "Tests/test_file_wal.py::test_open", "Tests/test_file_gimpgradient.py::test_load_1_3_via_imagepalette", "Tests/test_imagepath.py::test_getbbox[coords0-expected0]", "Tests/test_file_png.py::TestFilePng::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/non_zero_bb.png-None]", "Tests/test_file_pdf.py::test_save[L]", "Tests/test_file_tiff.py::TestFileTiff::test__delitem__", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[box2-10]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_dpi", "Tests/test_lib_pack.py::TestLibUnpack::test_HSV", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_tuple_from_exif", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pal8_offset.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float", "Tests/test_file_tiff.py::TestFileTiff::test_save_unsupported_mode", "Tests/test_imagepalette.py::test_make_linear_lut_not_yet_implemented", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16.png]", "Tests/test_image.py::TestImage::test_fli_overrun2", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc7-argb-8bpp_MipMaps-1.png]", "Tests/test_file_gif.py::test_dispose2_background", "Tests/test_image.py::TestImage::test_check_size", "Tests/test_image_reduce.py::test_mode_F[factor8]", "Tests/test_file_tga.py::test_palette_depth_16", "Tests/test_imagemorph.py::test_set_lut", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_L[L]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-I]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal1p1.png]", "Tests/test_imagedraw.py::test_rectangle_width[bbox0]", "Tests/test_image_filter.py::test_rankfilter[1-expected0]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[box1-1.5]", "Tests/test_image_reduce.py::test_mode_L[factor12]", "Tests/test_imagedraw.py::test_point_I16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal2.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pcx_overrun.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/decompression_bomb_extents.gif]", "Tests/test_image.py::TestImage::test_image_modes_success[YCbCr]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc", "Tests/test_image_filter.py::test_sanity[L-MedianFilter]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox3]", "Tests/test_image_reduce.py::test_mode_LA[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r02.fli]", "Tests/test_imagedraw.py::test_same_color_outline[bbox1]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.jpg-None]", "Tests/test_file_mpo.py::test_seek[Tests/images/sugarshack.mpo]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bw_gradient.imt]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_2.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_mask.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_left.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.MM.deflate.tif]", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_kerning_features.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken_data_stream.png]", "Tests/test_file_tiff_metadata.py::test_ifd_signed_long", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[None-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p.png]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I]", "Tests/test_image_transform.py::TestImageTransform::test_missing_method_data", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_1[RGB]", "Tests/test_imagedraw.py::test_rectangle[bbox3]", "Tests/test_imageops_usm.py::test_blur_accuracy", "Tests/test_imagedraw.py::test_line_joint[xy2]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[BGR;15]", "Tests/test_file_gif.py::test_comment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32fakealpha.bmp]", "Tests/test_imageops.py::test_expand_palette[10]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[RGB]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb_st.png]", "Tests/test_imagedraw.py::test_floodfill_border[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_no_loops.png]", "Tests/test_file_im.py::test_roundtrip[P]", "Tests/test_imagedraw.py::test_ellipse_various_sizes", "Tests/test_image_rotate.py::test_angle[180]", "Tests/test_file_gif.py::test_transparent_dispose[1-expected_colors1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal1p1.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_gray_4bpp.tif]", "Tests/test_file_ico.py::test_save_to_bytes_bmp[RGBA]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/non_zero_bb.png-None]", "Tests/test_file_jpeg.py::TestFileJpeg::test_mp", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[RGB]", "Tests/test_image_reduce.py::test_mode_RGB[factor14]", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_r", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_RGB.png]", "Tests/test_file_apng.py::test_apng_save_blend", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.iccprofile.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_v_1.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad_exif.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_merged.psd]", "Tests/test_imagedraw2.py::test_polygon[points2]", "Tests/test_file_png.py::TestFilePng::test_scary", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-False-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hdf5.h5]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-1]", "Tests/test_image_transpose.py::test_roundtrip[RGB]", "Tests/test_file_pcd.py::test_load_raw", "Tests/test_lib_pack.py::TestLibUnpack::test_F_float", "Tests/test_imagedraw.py::test_ellipse_width[bbox3]", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy2-85-height]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_idat_after_image_end.png]", "Tests/test_image_reduce.py::test_mode_RGB[factor10]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/hopper.tif-None]", "Tests/test_imagemath.py::test_prevent_double_underscores", "Tests/test_imagedraw.py::test_rectangle[bbox1]", "Tests/test_file_tiff_metadata.py::test_no_duplicate_50741_tag", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/create_eps.gnuplot]", "Tests/test_imagedraw.py::test_line_joint[xy0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-f46f5b2f43c370fe65706c11449f567ecc345e74.tif]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_text", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_g4_500.tif]", "Tests/test_file_apng.py::test_apng_basic", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-465703f71a0f0094873a3e0e82c9f798161171b8.sgi]", "Tests/test_image_convert.py::test_rgba_p", "Tests/test_image_mode.py::test_properties[YCbCr-RGB-L-3-expected_band_names9]", "Tests/test_format_lab.py::test_red", "Tests/test_file_png.py::TestFilePng::test_repr_png_error_returns_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp_padded", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[RGB]", "Tests/test_image_reduce.py::test_mode_LA[factor8]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox2]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[L]", "Tests/test_image_transpose.py::test_rotate_90[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_yyyy.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_16bit_RGBa.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r01.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper-XYZ.png]", "Tests/test_imagedraw2.py::test_line[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_unorm.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow3.icns]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[4-expected_vertices1]", "Tests/test_image_putdata.py::test_long_integers", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.3-3.7]", "Tests/test_file_jpeg.py::TestFileJpeg::test_large_icc_meta", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-1.5-5.5]", "Tests/test_file_mpo.py::test_save[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ifd_tag_type.tiff]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-True-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_pieslice_L.png]", "Tests/test_file_wmf.py::test_load_set_dpi", "Tests/test_format_hsv.py::test_sanity", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/junk_jpeg_header.jpg]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_2[box2-1]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox2]", "Tests/test_image_filter.py::test_sanity[L-SHARPEN]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette_wedge.png]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overrun2.bin]", "Tests/test_image_reduce.py::test_mode_RGBA[factor15]", "Tests/test_file_tiff_metadata.py::test_iptc", "Tests/test_file_tiff.py::TestFileTiff::test_seek_eof", "Tests/test_imagepath.py::test_path_constructors[coords3]", "Tests/test_file_tga.py::test_save_mapdepth", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_dpi_rounding", "Tests/test_file_png.py::TestFilePng::test_save_stdout[False]", "Tests/test_file_spider.py::test_save", "Tests/test_image.py::TestImage::test_overrun[ossfuzz-4836216264589312.pcx]", "Tests/test_image.py::TestImage::test_image_modes_fail[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz.png]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[5-expected_vertices2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iptc_roundUp.jpg]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/p_trns_single.png-None]", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/itxt_chunks.png-None]", "Tests/test_image_reduce.py::test_mode_RGB[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-50-0-TypeError-bounding_circle should be a sequence]", "Tests/test_imagedraw.py::test_arc[0-180-bbox1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_low_quality_baseline_qtables", "Tests/test_image_filter.py::test_sanity_error[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_none.gif]", "Tests/test_image.py::TestImage::test_image_modes_success[CMYK]", "Tests/test_lib_pack.py::TestLibUnpack::test_CMYK", "Tests/test_imagepalette.py::test_rawmode_getdata", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[La]", "Tests/test_file_jpeg.py::TestFileJpeg::test_sanity", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[2]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_exception_gif", "Tests/test_file_pdf.py::test_resolution", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/discontiguous_corners_polygon.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns-0.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-multi.tiff]", "Tests/test_image_crop.py::test_negative_crop[box0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/clipboard_target.png]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/high_ascii_chars.png]", "Tests/test_image.py::TestImage::test_image_modes_success[1]", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-c1b2595b8b0b92cc5f38b6635e98e3a119ade807.sgi]", "Tests/test_file_gif.py::test_palette_save_L", "Tests/test_file_gif.py::test_full_palette_second_frame", "Tests/test_image.py::TestImage::test_tempfile", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-754d9c7ec485ffb76a90eeaab191ef69a2a3a3cd.sgi]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_4_to_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_arabictext_features.png]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/non_zero_bb.png-None]", "Tests/test_file_png.py::TestFilePng::test_specify_bits", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/reproducing]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_region.png]", "Tests/test_image.py::TestImage::test_no_resource_warning_on_save", "Tests/test_image_filter.py::test_sanity[RGB-SMOOTH]", "Tests/test_image_reduce.py::test_args_box_error[size1-ValueError]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[RGBA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/7x13.png]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment_valid_imagedata_comment[]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ttb_stroke.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line.tga]", "Tests/test_file_sgi.py::test_rle16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_overrun.bin]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r06.fli]", "Tests/test_file_fli.py::test_closed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width_non_whole_angle.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/num_plays.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper2IR.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_cmyk_16l_jpeg.tif]", "Tests/test_image_reduce.py::test_mode_La[factor10]", "Tests/test_file_tga.py::test_sanity[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_language.png]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBA[RGBA]", "Tests/test_file_gd.py::test_invalid_file", "Tests/test_imagedraw.py::test_pieslice_wide", "Tests/test_file_ppm.py::test_plain_data_with_comment[P2\\n3 1\\n4-0 2 4-1]", "Tests/test_imagedraw.py::test_square", "Tests/test_image_reduce.py::test_mode_RGB[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/input_bw_five_bands.fpx]", "Tests/test_file_tga.py::test_sanity[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga_id_field.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_Nastalifont_text.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.rgb]", "Tests/test_image_reduce.py::test_mode_F[factor9]", "Tests/test_image_reduce.py::test_mode_RGB[2]", "Tests/test_image_thumbnail.py::test_load_first_unless_jpeg", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette_alpha.png]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points2]", "Tests/test_file_xpm.py::test_load_read", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_1[box1-4]", "Tests/test_imagedraw.py::test_chord_width[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/oom-8ed3316a4109213ca96fb8a256a0bfefdece1461.icns]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_draw.ico]", "Tests/test_image_reduce.py::test_mode_La[factor17]", "Tests/test_imagefile.py::TestImageFile::test_ico", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pillow.ico]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dummy.container]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_unorm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/black_and_white.ico]", "Tests/test_image_paste.py::TestImagingPaste::test_color_mask_RGBA[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_2.webp]", "Tests/test_image_reduce.py::test_mode_F[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/palette.dds]", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/hopper_rle8.bmp-1078]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_bl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette_1bit_alpha.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken_exif_dpi.jpg]", "Tests/test_image.py::TestImage::test_image_modes_success[LA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_jpeg_magic_number", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-fillorder-test.png]", "Tests/test_file_spider.py::test_n_frames", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_gps_typeerror", "Tests/test_file_tar.py::test_sanity[zlib-hopper.png-PNG]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-3]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_16bit_RGBa_target.png]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-2020-10-test.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_repr_jpeg", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/bmp/g/pal8rle.bmp-1064]", "Tests/test_file_fits.py::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-PA]", "Tests/test_image_reduce.py::test_mode_RGBA[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_wal.png]", "Tests/test_image_resample.py::TestCoreResampleBox::test_subsample", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.ppm]", "Tests/test_file_gif.py::test_comment_over_255", "Tests/test_file_tiff.py::TestFileTiff::test_seek_after_close", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_4_channels", "Tests/test_imagedraw.py::test_arc_width[bbox1]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/background_outside_palette.gif]", "Tests/test_lib_pack.py::TestLibPack::test_1", "Tests/test_file_gif.py::test_dispose2_previous_frame", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_3.tif]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply22]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r04.fli]", "Tests/test_image_filter.py::test_sanity[I-MedianFilter]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[LA-band_numbers1-color must be int, or tuple of one or two elements]", "Tests/test_imagepalette.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_zero_denom.png]", "Tests/test_imagepath.py::test_path_constructors[coords5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_wide_line_larger_than_int.png]", "Tests/test_imagedraw.py::test_draw_regular_polygon[4-square_rotate_45-args2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_resized.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.sgi]", "Tests/test_image_reduce.py::test_mode_RGBa[factor7]", "Tests/test_file_iptc.py::test_getiptcinfo_jpg_none", "Tests/test_file_mpo.py::test_ignore_frame_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-ccca68ff40171fdae983d924e127a721cab2bd50.j2k]", "Tests/test_imagedraw.py::test_arc_width_pieslice_large[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil136.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_height.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_1bit.pbm]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox2]", "Tests/test_imagedraw.py::test_chord_width[bbox0]", "Tests/test_image_reduce.py::test_args_factor_error[size2-ValueError]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000000]", "Tests/test_image_reduce.py::test_mode_RGBA[1]", "Tests/test_imagemorph.py::test_pattern_syntax_error", "Tests/test_file_wal.py::test_load", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[RGBX]", "Tests/test_file_pdf.py::test_redos[\\n]", "Tests/test_file_dds.py::test_save[RGBA-Tests/images/pil123rgba.png]", "Tests/test_core_resources.py::TestCoreMemory::test_get_block_size", "Tests/test_image_thumbnail.py::test_division_by_zero", "Tests/test_font_pcf.py::test_textsize", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/radial_gradients.png]", "Tests/test_color_lut.py::TestGenerateColorLut3D::test_3_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage-mmap.tiff]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[RGB]", "Tests/test_file_eps.py::test_open_eps[Tests/images/illuCS6_preview.eps]", "Tests/test_image_filter.py::test_sanity[CMYK-MaxFilter]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.dcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rectangle_translucent_outline.png]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16L]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/pil123p.png-None]", "Tests/test_image_filter.py::test_sanity[L-MinFilter]", "Tests/test_image_filter.py::test_sanity[I-GaussianBlur]", "Tests/test_image_reduce.py::test_mode_RGBA[factor6]", "Tests/test_imagedraw.py::test_arc_width_fill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_mb.png]", "Tests/test_file_gif.py::test_roundtrip2", "Tests/test_imagedraw.py::test_pieslice[-92.2-46.2-bbox3]", "Tests/test_core_resources.py::TestCoreMemory::test_set_blocks_max_stats", "Tests/test_features.py::test_check", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-dedc7a4ebd856d79b4359bbcc79e8ef231ce38f6.psd-OSError]", "Tests/test_file_png.py::TestFilePng::test_read_private_chunks", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/04r00.fli]", "Tests/test_file_im.py::test_small_palette", "Tests/test_image_reduce.py::test_mode_LA[3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/edge.lut]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb32bf-xbgr.bmp]", "Tests/test_image.py::TestImage::test_bad_mode", "Tests/test_file_dds.py::test_sanity_ati1_bc4u[Tests/images/ati1.dds]", "Tests/test_file_apng.py::test_apng_save_size", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[8-0-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit_qtables.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w3px.png]", "Tests/test_file_eps.py::test_readline_psfile", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[box2-0.5]", "Tests/test_image_reduce.py::test_mode_LA[factor18]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_L.png]", "Tests/test_image_transform.py::TestImageTransform::test_info", "Tests/test_image_rotate.py::test_center_14", "Tests/test_image_draft.py::test_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_unorm.dds]", "Tests/test_image_transpose.py::test_tranverse[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/delay_short_max.png]", "Tests/test_imagedraw2.py::test_rectangle[bbox1]", "Tests/test_file_iptc.py::test_dump", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_rs.png]", "Tests/test_file_gif.py::test_missing_background", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r03.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_prev_first_frame_seeked.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb16-565.bmp]", "Tests/test_imagedraw.py::test_ellipse_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/1_trns.png]", "Tests/test_file_dds.py::test_dx10_bc6h[Tests/images/bc6h.dds]", "Tests/test_features.py::test_unsupported_module", "Tests/test_imageops.py::test_colorize_2color", "Tests/test_image_transpose.py::test_flip_left_right[I;16L]", "Tests/test_file_gif.py::test_invalid_file", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_3[box1-1]", "Tests/test_color_lut.py::TestColorLut3DFilter::test_repr", "Tests/test_image_filter.py::test_consistency_3x3[CMYK]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/non_zero_bb.png-None]", "Tests/test_image_reduce.py::test_args_box[size0-expected0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bgr15.png]", "Tests/test_file_spider.py::test_load_image_series", "Tests/test_image_reduce.py::test_mode_I[factor9]", "Tests/test_imagemath.py::test_prevent_exec[exec('pass')]", "Tests/test_image_transpose.py::test_rotate_90[I;16L]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_3.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/02r00.fli]", "Tests/test_file_sgi.py::test_invalid_file", "Tests/test_image_filter.py::test_kernel_not_enough_coefficients", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/single_frame.png]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/a_fli.png]", "Tests/test_image_reduce.py::test_mode_F[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/standard_embedded.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy4-y_odd]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[2]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error1[RGBA]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[3-expected_vertices0]", "Tests/test_image_filter.py::test_modefilter[1-expected0]", "Tests/test_font_pcf_charsets.py::test_textsize[iso8859-1]", "Tests/test_file_eps.py::test_invalid_file", "Tests/test_file_iptc.py::test_open", "Tests/test_image_rotate.py::test_mode[1]", "Tests/test_file_ppm.py::test_magic", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_kite_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unicode_extended.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/01r_00.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/bkgd.png]", "Tests/test_deprecate.py::test_no_replacement_or_action", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_pieslice_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/single_frame_default.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[L]", "Tests/test_file_ppm.py::test_not_enough_image_data", "Tests/test_imagepath.py::test_invalid_path_constructors[coords0]", "Tests/test_file_jpeg.py::TestFileJpeg::test_optimize_large_buffer", "Tests/test_image_reduce.py::test_mode_F[factor6]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply22]", "Tests/test_imagedraw.py::test_wide_line_larger_than_int", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[None-bounding_circle0-0-TypeError-n_sides should be an int]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[LA]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_transform[RGBA]", "Tests/test_image_reduce.py::test_mode_LA[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/compression.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_bl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-060745d3f534ad6e4128c51d336ea5489182c69d.blp]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/hopper.jpg-PA]", "Tests/test_image_reduce.py::test_mode_I[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_gap.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline.png]", "Tests/test_file_eps.py::test_readline[\\r\\n-]", "Tests/test_image_reduce.py::test_mode_LA[1]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8w125.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/photoshop-200dpi.jpg]", "Tests/test_imagemorph.py::test_mirroring", "Tests/test_image_reduce.py::test_mode_RGBA[factor11]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-f46f5b2f43c370fe65706c11449f567ecc345e74.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/others/06r02.fli]", "Tests/test_file_dds.py::test_sanity_dxt1_bc1[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/1.eps]", "Tests/test_image_putpalette.py::test_putpalette_with_alpha_values", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[1500]", "Tests/test_file_imt.py::test_invalid_file[\\n]", "Tests/test_imagefontpil.py::test_default_font", "Tests/test_image_paste.py::TestImagingPaste::test_image_solid[L]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bilinear[L]", "Tests/test_file_ico.py::test_incorrect_size", "Tests/test_imagepath.py::test_invalid_path_constructors[coords3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_imagemagick_orientation.png]", "Tests/test_file_gif.py::test_background", "Tests/test_file_gribstub.py::test_load", "Tests/test_imagepath.py::test_path_constructors[coords4]", "Tests/test_file_tga.py::test_save_wrong_mode", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-False-True]", "Tests/test_image_reduce.py::test_mode_F[factor15]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_crash.bin]", "Tests/test_image_reduce.py::test_mode_L[factor16]", "Tests/test_imagemath.py::test_prevent_builtins", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_la.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc6h.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_oblique_45_w3px_b.png]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[I]", "Tests/test_image_transpose.py::test_tranverse[L]", "Tests/test_image_putpalette.py::test_rgba_palette[RGBAX-palette1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_tiff_with_dpi", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-L]", "Tests/test_file_png.py::TestFilePng::test_trns_null", "Tests/test_file_gif.py::test_dispose_background_transparency", "Tests/test_image_reduce.py::test_mode_RGBA[factor14]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sugarshack_no_data.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no-dpi-in-exif.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fujifilm.mpo]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P2 3 1 257 0 128 257-I-pixels1]", "Tests/test_image_filter.py::test_sanity[I-MinFilter]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0da013a13571cc8eb457a39fee8db18f8a3c7127.tif]", "Tests/test_imagedraw.py::test_arc_end_le_start[bbox1]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0e16d3bfb83be87356d026d66919deaefca44dac.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.fli]", "Tests/test_file_pcx.py::test_odd[1]", "Tests/test_imagemath.py::test_compare", "Tests/test_imagechops.py::test_multiply_white", "Tests/test_image_resample.py::TestCoreResamplePasses::test_box_horizontal", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.im]", "Tests/test_decompression_bomb.py::TestDecompressionBomb::test_no_warning_no_limit", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/8bit.s.tif]", "Tests/test_image_resample.py::TestCoreResamplePasses::test_horizontal", "Tests/test_image_access.py::TestImageGetPixel::test_basic[BGR;16]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[YCbCr]", "Tests/test_file_ico.py::test_getpixel", "Tests/test_image_crop.py::test_crop[I]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy2-x_odd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_default_font_size.png]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16]", "Tests/test_features.py::test_check_codecs[libtiff]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_type_error2[L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_bl_raw.tga]", "Tests/test_image_filter.py::test_sanity[CMYK-SMOOTH]", "Tests/test_file_ppm.py::test_pfm", "Tests/test_image_reduce.py::test_mode_F[4]", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-1-3]", "Tests/test_imagepath.py::test_invalid_path_constructors[coords2]", "Tests/test_file_ppm.py::test_plain_ppm_token_too_long[P3\\n128 128\\n255\\n012345678910]", "Tests/test_imagechops.py::test_subtract_modulo_no_clip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_quick_ma.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[P]", "Tests/test_file_ppm.py::test_save_stdout[False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_la.png]", "Tests/test_image_getdata.py::test_sanity", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/itxt_chunks.png-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/anim_frame1.webp]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_file_ico.py::test_black_and_white", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices[6-expected_vertices3]", "Tests/test_features.py::test_check_modules[pil]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[2-1.5-0.6-0-9.1]", "Tests/test_file_dds.py::test_sanity_ati2_bc5u[Tests/images/bc5u.dds]", "Tests/test_image_reduce.py::test_mode_RGBA[4]", "Tests/test_file_container.py::test_sanity", "Tests/test_image_reduce.py::test_args_box[size1-expected1]", "Tests/test_deprecate.py::test_unknown_version", "Tests/test_imagedraw.py::test_polygon_translucent", "Tests/test_file_dds.py::test_uncompressed[RGB-size3-Tests/images/bgr15.dds]", "Tests/test_imagechops.py::test_offset", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000003]", "Tests/test_file_dds.py::test_dx10_bc4[Tests/images/bc4_typeless.dds]", "Tests/test_file_gif.py::test_palette_handling", "Tests/test_image_copy.py::test_copy[P]", "Tests/test_file_gif.py::test_rgba_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_bl_raw.tga]", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_4.webp]", "Tests/test_file_apng.py::test_apng_save_disposal", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply15]", "Tests/test_binary.py::test_standard", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/combined_larger_than_size.psd]", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw_with_overviews", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_single_16bit_qtable", "Tests/test_image_filter.py::test_rankfilter[L-expected1]", "Tests/test_imagestat.py::test_constant", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_y.png]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-2.0-5.5]", "Tests/test_image_convert.py::test_matrix_xyz[L]", "Tests/test_box_blur.py::test_radius_bigger_then_width", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-0c7e0e8e11ce787078f00b5b0ca409a167f070e0.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_exif_rollback", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_outline_shape_RGB.png]", "Tests/test_image_transform.py::TestImageTransform::test_palette", "Tests/test_image_convert.py::test_trns_p_transparency[RGBA]", "Tests/test_imagedraw.py::test_floodfill[bbox1]", "Tests/test_image_mode.py::test_properties[RGBX-RGB-L-4-expected_band_names7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/split_fdat_zero_chunk.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_RGBA.png]", "Tests/test_image_reduce.py::test_mode_I[factor17]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.qoi]", "Tests/test_file_ppm.py::test_plain_truncated_data[P1\\n128 128\\n]", "Tests/test_imagechops.py::test_subtract_clip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pcd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_rt.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_ligature_features.png]", "Tests/test_image_load.py::test_contextmanager", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/00r0_gray_l.jp2]", "Tests/test_file_iptc.py::test_getiptcinfo_jpg_found", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8rletrns.png]", "Tests/test_image_reduce.py::test_mode_RGBA[factor9]", "Tests/test_core_resources.py::TestCoreMemory::test_get_alignment", "Tests/test_image_transpose.py::test_flip_left_right[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil184.pcx]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[1]", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage-lastframe.tif-1]", "Tests/test_image_resize.py::TestReducingGapResize::test_box_filter[box0-5.5]", "Tests/test_image_putalpha.py::test_promote", "Tests/test_imagedraw.py::test_polygon_kite[kite_points1-RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w3px.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyyy.png]", "Tests/test_image_resize.py::TestReducingGapResize::test_box_filter[box1-9.5]", "Tests/test_image_convert.py::test_unsupported_conversion", "Tests/test_imagemorph.py::test_str_to_img", "Tests/test_util.py::test_is_path[filename.ext]", "Tests/test_file_pdf.py::test_unsupported_mode", "Tests/test_file_tiff.py::TestFileTiff::test_seek", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_ycbcr_jpeg_2x2_sampling.tif]", "Tests/test_image.py::TestImage::test_image_modes_success[L]", "Tests/test_imageops.py::test_cover[hopper.png-expected_size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/app13.jpg]", "Tests/test_image_convert.py::test_trns_p_transparency[PA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_multi_actl.png]", "Tests/test_image_mode.py::test_properties[L-L-L-1-expected_band_names1]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[YCbCr]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_single_frame_loop.tiff]", "Tests/test_image_transpose.py::test_transpose[I;16L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgb.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/effect_spread.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[3-1-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb32.bmp]", "Tests/test_file_xbm.py::test_open", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_arc_width.png]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dilation8.lut]", "Tests/test_image_reduce.py::test_mode_L[6]", "Tests/test_file_eps.py::test_missing_boundingbox_comment[]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[3-1-50-50-0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_planar_16bit_RGB.tiff]", "Tests/test_file_tiff.py::TestFileTiff::test_getxmp", "Tests/test_imagedraw.py::test_arc[0-180-bbox3]", "Tests/test_image.py::TestImage::test_zero_tobytes[size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/python.ico]", "Tests/test_image_reduce.py::test_mode_LA_opaque[3]", "Tests/test_file_gif.py::test_n_frames[Tests/images/iss634.gif-42]", "Tests/test_file_fli.py::test_context_manager", "Tests/test_image.py::TestImage::test_image_modes_fail[very very long]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.3-3.7]", "Tests/test_file_bmp.py::test_save_float_dpi", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_1bit_plain.pbm]", "Tests/test_file_tiff.py::TestFileTiff::test_save_rgba", "Tests/test_imagedraw.py::test_floodfill_not_negative", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[PA]", "Tests/test_imagedraw.py::test_rounded_rectangle_translucent[xy6-both]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w2px_inverted.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_rtl.png]", "Tests/test_imagefile.py::TestPyEncoder::test_setimage", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tv.rgb]", "Tests/test_file_bufrstub.py::test_handler", "Tests/test_file_apng.py::test_apng_save_duration_loop", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uncompressed_l.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_horizontal_w101px.png]", "Tests/test_file_png.py::TestFilePng::test_bad_itxt", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor14]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_near_transparent.png]", "Tests/test_image_transpose.py::test_flip_top_bottom[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_naxis_zero.fits]", "Tests/test_file_fits.py::test_comment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_7.webp]", "Tests/test_imagedraw2.py::test_line[points1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rgba.psd]", "Tests/test_image_reduce.py::test_mode_L[factor18]", "Tests/test_image_transform.py::TestImageTransformAffine::test_rotate[270-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_mm_left.png]", "Tests/test_deprecate.py::test_version[11-Old thing is deprecated and will be removed in Pillow 11 \\\\(2024-10-15\\\\)\\\\. Use new thing instead\\\\.]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon.png]", "Tests/test_file_tiff.py::TestFileTiff::test_modify_exif", "Tests/test_image_access.py::TestImageGetPixel::test_basic[PA]", "Tests/test_image_filter.py::test_sanity[I-FIND_EDGES]", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[3]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/hopper.jpg-L]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[262147]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_lzw.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_given.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[I]", "Tests/test_color_lut.py::TestColorLut3DFilter::test_convert_table", "Tests/test_imagefile.py::TestImageFile::test_no_format", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-0]", "Tests/test_file_spider.py::test_context_manager", "Tests/test_color_lut.py::TestColorLut3DFilter::test_wrong_args", "Tests/test_file_tiff.py::TestFileTiff::test___str__", "Tests/test_file_iptc.py::test_i", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor18]", "Tests/test_file_tga.py::test_sanity[RGB]", "Tests/test_file_dds.py::test_not_implemented[Tests/images/unimplemented_pfflags.dds]", "Tests/test_file_dds.py::test_save_unsupported_mode", "Tests/test_file_psd.py::test_rgba", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_copy_alpha_channel", "Tests/test_file_sun.py::test_im1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pxr]", "Tests/test_image_transpose.py::test_rotate_90[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_line_joint_curve.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_direction_ltr.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_ttb_f_sm.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_non_integer_radius_width.png]", "Tests/test_file_gif.py::test_optimize_correctness[128-513-256]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.pfm]", "Tests/test_file_eps.py::test_ascii_comment_too_long[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/p_trns_single.png-None]", "Tests/test_file_msp.py::test_bad_checksum", "Tests/test_features.py::test_check_codecs[zlib]", "Tests/test_image_putalpha.py::test_interface", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_both.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-True-False]", "Tests/test_file_bmp.py::test_small_palette", "Tests/test_file_dds.py::test_palette", "Tests/test_imagefile.py::TestImageFile::test_oserror", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_vertical[3]", "Tests/test_image_reduce.py::test_args_factor_error[2.0-TypeError]", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_tga.py::test_save_orientation", "Tests/test_imagedraw.py::test_polygon_1px_high_translucent", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-74d2a78403a5a59db1fb0a2b8735ac068a75f6e3.tif]", "Tests/test_image_reduce.py::test_mode_L[factor8]", "Tests/test_image_reduce.py::test_mode_L[factor10]", "Tests/test_imagedraw2.py::test_line[points3]", "Tests/test_imagemorph.py::test_lut[dilation8]", "Tests/test_imagedraw.py::test_floodfill[bbox2]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_4_to_3_channels", "Tests/test_file_cur.py::test_sanity", "Tests/test_imageops.py::test_scale", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/drawing_emf_ref.png]", "Tests/test_file_dcx.py::test_n_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tv16.sgi]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-d6ec061c4afdef39d3edf6da8927240bb07fe9b7.blp]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bicubic[RGBX]", "Tests/test_file_icns.py::test_sanity", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[180-3]", "Tests/test_image.py::TestImage::test_effect_noise", "Tests/test_imagemath.py::test_bitwise_and", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample_2.tiff]", "Tests/test_file_tga.py::test_sanity[RGBA]", "Tests/test_file_tiff.py::TestFileTiff::test_set_legacy_api", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_cmyk_jpeg.tif]", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-1ee28a249896e05b83840ae8140622de8e648ba9.psd-UnidentifiedImageError]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_decompression_bomb.py::TestDecompressionCrop::test_crop_decompression_checks", "Tests/test_file_blp.py::test_load_blp2_raw", "Tests/test_sgi_crash.py::test_crashes[Tests/images/crash-64834657ee604b8797bf99eac6a194c124a9a8ba.sgi]", "Tests/test_imagedraw.py::test_rectangle[bbox2]", "Tests/test_image_rotate.py::test_zero[90]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r02.fli]", "Tests/test_file_png.py::TestFilePng::test_load_transparent_p", "Tests/test_file_sun.py::test_sanity", "Tests/test_imageshow.py::test_show_without_viewers", "Tests/test_imagedraw.py::test_shape1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_g4.tif]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-8073b430977660cdd48d96f6406ddfd4114e69c7.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/reproducing]", "Tests/test_imageops_usm.py::test_filter_api", "Tests/test_image_reduce.py::test_mode_L[factor17]", "Tests/test_image_transpose.py::test_rotate_180[I;16L]", "Tests/test_file_pcx.py::test_break_one_in_loop", "Tests/test_image_rotate.py::test_mode[P]", "Tests/test_image_resample.py::TestCoreResampleCoefficients::test_reduce", "Tests/test_imageenhance.py::test_alpha[Contrast]", "Tests/test_file_ico.py::test_save_to_bytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_woff2.png]", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_palette", "Tests/test_imageops.py::test_cover[colr_bungee.png-expected_size0]", "Tests/test_file_icns.py::test_not_an_icns_file", "Tests/test_image_transform.py::TestImageTransform::test_unknown_resampling_filter[4]", "Tests/test_imagepalette.py::test_reload", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/colr_bungee_mask.png]", "Tests/test_image_transform.py::TestImageTransform::test_nearest_resize[RGBA]", "Tests/test_lib_pack.py::TestLibUnpack::test_P", "Tests/test_image_filter.py::test_sanity[L-CONTOUR]", "Tests/test_file_psd.py::test_seek_eoferror", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_fctl.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid-exif-without-x-resolution.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal1wb.bmp]", "Tests/test_file_jpeg.py::TestFileJpeg::test_rgb", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_adobe_deflate.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/mmap_error.bmp]", "Tests/test_image_crop.py::test_crop[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/shortfile.bmp]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_overflow_error[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_long_name.im]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor15]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply17]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/initial.fli]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor9]", "Tests/test_image.py::TestImage::test_stringio", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[I;16]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P3 3 1 17 0 1 2 8 9 10 15 16 17-RGB-pixels2]", "Tests/test_image_filter.py::test_sanity[RGB-MinFilter]", "Tests/test_file_dds.py::test_short_file", "Tests/test_file_ico.py::test_save_to_bytes_bmp[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-338516dbd2f0e83caddb8ce256c22db3bd6dc40f.tif]", "Tests/test_file_tiff_metadata.py::test_tag_group_data", "Tests/test_image_getbbox.py::test_sanity", "Tests/test_font_pcf_charsets.py::test_draw[iso8859-2]", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-ef9112a065e7183fa7faa2e18929b03e44ee16bf.blp]", "Tests/test_image_filter.py::test_sanity[RGB-ModeFilter]", "Tests/test_imagemath.py::test_ops", "Tests/test_file_ppm.py::test_plain[Tests/images/hopper_8bit_plain.ppm-Tests/images/hopper_8bit.ppm]", "Tests/test_file_bmp.py::test_dpi", "Tests/test_image_filter.py::test_consistency_3x3[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_dxt1.ftc]", "Tests/test_file_gif.py::test_no_change", "Tests/test_file_png.py::TestFilePng::test_exif_argument", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ossfuzz-5730089102868480.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bw_500.png]", "Tests/test_imagemath.py::test_bitwise_rightshift", "Tests/test_util.py::test_is_not_directory", "Tests/test_image_resample.py::TestCoreResampleBox::test_wrong_arguments[0]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/test-card.png-None]", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-bba4f2e026b5786529370e5dfe9a11b1bf991f07.blp]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.0-5.5]", "Tests/test_file_gif.py::test_removed_transparency", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illu10_preview.eps]", "Tests/test_file_apng.py::test_apng_chunk_order", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-b82e64d4f3f76d7465b6af535283029eda211259.sgi]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_multiple_16bit_qtables", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor12]", "Tests/test_file_container.py::test_readline[True]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/l_trns.png]", "Tests/test_image_reduce.py::test_mode_RGBA[factor16]", "Tests/test_font_pcf_charsets.py::test_textsize[iso8859-2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/multipage_out_of_order.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/chunk_no_fdat.png]", "Tests/test_file_container.py::test_read_n[False]", "Tests/test_image_reduce.py::test_mode_LA[2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_gray_2_4_bpp/hopper4R.tif]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-1]", "Tests/test_file_gribstub.py::test_handler", "Tests/test_image_reduce.py::test_mode_L[factor13]", "Tests/test_image_reduce.py::test_mode_F[factor12]", "Tests/test_image_filter.py::test_modefilter[P-expected2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd_transparency.gif]", "Tests/test_image_transform.py::TestImageTransform::test_fill[RGB-expected_pixel0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_lm_center.png]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[RGBX]", "Tests/test_file_iptc.py::test_getiptcinfo_tiff_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_repr_jpeg_error_returns_none", "Tests/test_imagefile.py::TestPyEncoder::test_zero_height", "Tests/test_imagedraw.py::test_floodfill_border[bbox1]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 0.0 \\x00\\x00\\x00\\x00]", "Tests/test_image_crop.py::test_crop_zero", "Tests/test_file_qoi.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_2.tif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_no_duplicate_0x1001_tag", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor6]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[3]", "Tests/test_imagedraw.py::test_pieslice_width[bbox0]", "Tests/test_image.py::TestImage::test_ne", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badfilesize.bmp]", "Tests/test_file_ico.py::test_draw_reloaded", "Tests/test_imagedraw2.py::test_ellipse[bbox3]", "Tests/test_imagechops.py::test_difference_pixel", "Tests/test_file_tiff_metadata.py::test_change_stripbytecounts_tag_type", "Tests/test_image_transpose.py::test_rotate_90[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_kite_RGB.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_8_basic.png]", "Tests/test_file_tiff.py::TestFileTiff::test_multipage", "Tests/test_file_gif.py::test_sanity", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-4]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-0.6-0-9.1]", "Tests/test_imagedraw2.py::test_polygon[points3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/default_font_freetype.png]", "Tests/test_image_filter.py::test_sanity[RGB-GaussianBlur]", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_image_filter.py::test_rankfilter[RGB-expected2]", "Tests/test_file_eps.py::test_invalid_boundingbox_comment_valid_imagedata_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[La]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-1152ec2d1a1a71395b6f2ce6721c38924d025bf3.tif]", "Tests/test_file_png.py::TestFilePng::test_plte_length", "Tests/test_image_convert.py::test_l_macro_rounding[LA]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_7.tif]", "Tests/test_file_bmp.py::test_offset", "Tests/test_file_pdf.py::test_multiframe_normal_save", "Tests/test_file_psd.py::test_crashes[Tests/images/timeout-c8efc3fded6426986ba867a399791bae544f59bc.psd-OSError]", "Tests/test_imagedraw.py::test_rectangle_zero_width[bbox3]", "Tests/test_image_reduce.py::test_args_factor[3-expected0]", "Tests/test_file_bmp.py::test_sanity", "Tests/test_image_reduce.py::test_args_box_error[size4-ValueError]", "Tests/test_image.py::TestImage::test_exif_jpeg", "Tests/test_file_png.py::TestFilePng::test_roundtrip_icc_profile", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_box_filter_correct_range", "Tests/test_image_reduce.py::test_mode_RGBA[2]", "Tests/test_file_tga.py::test_palette_depth_8", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_before_region.png]", "Tests/test_file_icns.py::test_save", "Tests/test_image_reduce.py::test_args_box_error[size6-ValueError]", "Tests/test_file_tiff.py::TestFileTiff::test_4bit", "Tests/test_image.py::TestImage::test_image_modes_success[HSV]", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_exclusive", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/child_ifd_jpeg.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_emptyline.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-6b7f2244da6d0ae297ee0754a424213444e92778.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-d6ec061c4afdef39d3edf6da8927240bb07fe9b7.blp]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/p_trns_single.png-None]", "Tests/test_image_reduce.py::test_args_factor[size2-expected2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4.png]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-0]", "Tests/test_image_filter.py::test_sanity[CMYK-ModeFilter]", "Tests/test_file_pdf.py::test_save[CMYK]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/illuCS6_no_preview.eps]", "Tests/test_imagedraw.py::test_draw_regular_polygon[4-square-args0]", "Tests/test_imagefile.py::TestImageFile::test_broken_datastream_without_errors", "Tests/test_image_reduce.py::test_mode_RGBA[5]", "Tests/test_file_tga.py::test_id_field_rle", "Tests/test_imagewin.py::TestImageWin::test_sanity", "Tests/test_file_gimpgradient.py::test_linear_pos_gt_small_middle", "Tests/test_image_filter.py::test_consistency_5x5[RGB]", "Tests/test_image_resample.py::TestCoreResampleBox::test_skip_horizontal[3]", "Tests/test_file_dds.py::test_uncompressed[RGB-size2-Tests/images/hopper.dds]", "Tests/test_imageops.py::test_autocontrast_mask_toy_input", "Tests/test_image_filter.py::test_sanity[RGB-FIND_EDGES]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[BGR;16]", "Tests/test_imagedraw.py::test_floodfill[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iptc.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_bl_rle.tga]", "Tests/test_image_reduce.py::test_mode_RGBa[factor13]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration0]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/zero_bb.png-None]", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_p_bl_raw.tga]", "Tests/test_locale.py::test_sanity", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-L]", "Tests/test_image_resample.py::TestCoreResampleBox::test_no_passthrough", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_vertical_w2px_normal.png]", "Tests/test_features.py::test_check_modules[tkinter]", "Tests/test_lib_pack.py::TestLibPack::test_L", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[La]", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r05.fli]", "Tests/test_image.py::TestImage::test_zero_frombytes[size0]", "Tests/test_font_pcf_charsets.py::test_textsize[cp1250]", "Tests/test_imagedraw.py::test_arc_high", "Tests/test_file_dds.py::test_not_implemented[Tests/images/unimplemented_dxgi_format.dds]", "Tests/test_image_rotate.py::test_resample", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/corner.lut]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[RGB]", "Tests/test_imagedraw.py::test_same_color_outline[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_right.png]", "Tests/test_file_bufrstub.py::test_save", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_chunks", "Tests/test_image_reduce.py::test_mode_F[factor13]", "Tests/test_imagefile.py::TestImageFile::test_raise_typeerror", "Tests/test_image.py::TestImage::test_width_height", "Tests/test_file_dds.py::test_dxt5_colorblock_alpha_issue_4142", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_square.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rdf.tif]", "Tests/test_box_blur.py::test_radius_0", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGB-channels_set0-5]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-RGB]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd.gif-RGB]", "Tests/test_image_filter.py::test_sanity[CMYK-BLUR]", "Tests/test_image_rotate.py::test_rotate_with_fill", "Tests/test_pickle.py::test_pickle_image[2-Tests/images/hopper.jpg-L]", "Tests/test_image.py::TestImage::test_image_modes_fail[bad]", "Tests/test_imagefile.py::TestImageFile::test_raise_oserror", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_wrong_modes[RGBa]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-31c8f86233ea728339c6e586be7af661a09b5b98.blp]", "Tests/test_imagedraw.py::test_transform", "Tests/test_file_dcx.py::test_context_manager", "Tests/test_pdfparser.py::test_duplicate_xref_entry", "Tests/test_image_access.py::TestImageGetPixel::test_signedness[32769-I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_gps.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_la.png]", "Tests/test_file_tiff.py::TestFileTiff::test_roundtrip_tiff_uint16", "Tests/test_file_png.py::TestFilePng::test_unknown_compression_method", "Tests/test_imagemath.py::test_bitwise_or", "Tests/test_image.py::TestImage::test_image_modes_success[PA]", "Tests/test_image_resize.py::TestImagingCoreResize::test_reduce_filters[4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc1.dds]", "Tests/test_file_png.py::TestFilePng::test_padded_idat", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz_axes.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil123p.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/lab.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_wrong_bits_per_sample_3.tiff]", "Tests/test_image_reduce.py::test_mode_La[factor12]", "Tests/test_image_reduce.py::test_mode_RGB[factor12]", "Tests/test_image_reduce.py::test_mode_L[4]", "Tests/test_image_reduce.py::test_mode_I[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/copyleft.tiff]", "Tests/test_file_mpo.py::test_mp_attribute[Tests/images/sugarshack.mpo]", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16bit.cropped.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/fakealpha.png]", "Tests/test_image_getbbox.py::test_bbox_alpha_only_false[RGBa]", "Tests/test_file_mcidas.py::test_invalid_file", "Tests/test_file_gif.py::test_optimize_correctness[4-513-256]", "Tests/test_image_reduce.py::test_mode_RGB[factor13]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_grayscale.png]", "Tests/test_image_access.py::TestImagePutPixelError::test_putpixel_invalid_number_of_bands[L-band_numbers0-color must be int or single-element tuple]", "Tests/test_image_filter.py::test_sanity[L-EDGE_ENHANCE_MORE]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_overflow", "Tests/test_file_png.py::TestFilePng::test_tell", "Tests/test_file_container.py::test_readline[False]", "Tests/test_imagedraw.py::test_arc[0-180-bbox0]", "Tests/test_image_mode.py::test_properties[RGB-RGB-L-3-expected_band_names5]", "Tests/test_file_eps.py::test_readline[\\n\\r-]", "Tests/test_font_bdf.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_below_lb.png]", "Tests/test_image_filter.py::test_sanity[RGB-EDGE_ENHANCE]", "Tests/test_file_mpo.py::test_mp[Tests/images/sugarshack.mpo]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_width.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_uncompressed.ftu]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[2-2-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal4.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-dedc7a4ebd856d79b4359bbcc79e8ef231ce38f6.psd]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/line_oblique_45_w3px_a.png]", "Tests/test_image_resample.py::TestImagingResampleVulnerability::test_modify_after_resizing", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color1]", "Tests/test_file_spider.py::test_odd_size", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unbound_variable.jp2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8-0.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_reload_exif_after_seek", "Tests/test_imagemath.py::test_bitwise_invert", "Tests/test_image_resize.py::TestImageResize::test_default_filter_bicubic[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/12bit.cropped.tif]", "Tests/test_file_im.py::test_number", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2v2.bmp]", "Tests/test_image_filter.py::test_crash[size1]", "Tests/test_lib_pack.py::TestLibPack::test_LA", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[P]", "Tests/test_file_mpo.py::test_n_frames", "Tests/test_file_fits.py::test_open", "Tests/test_file_tiff.py::TestFileTiff::test_with_underscores", "Tests/test_lib_pack.py::TestLibPack::test_I16", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/uint16_1_4660.tif]", "Tests/test_file_gif.py::test_optimize_if_palette_can_be_reduced_by_half", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_int_from_exif", "Tests/test_file_container.py::test_read_n[True]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply18]", "Tests/test_image.py::TestImage::test_zero_tobytes[size1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-argb-8bbp-interpolatedalpha_MipMaps-1.dds]", "Tests/test_imagedraw.py::test_polygon[points0]", "Tests/test_image.py::TestImage::test_radial_gradient[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8_row_overflow.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dispose_bgnd_rgba.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ttb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/bmpsuite.html]", "Tests/test_image_filter.py::test_sanity[CMYK-FIND_EDGES]", "Tests/test_file_gif.py::test_append_different_size_image", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/p_trns_single.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/10ct_32bit_128.tiff]", "Tests/test_image_convert.py::test_p_la", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ra.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P3 3 1 257 0 1 2 128 129 130 256 257 257-RGB-pixels3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgba_bl_raw.tga]", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp", "Tests/test_lib_pack.py::TestLibUnpack::test_F_int", "Tests/test_imagefile.py::TestPyDecoder::test_negsize", "Tests/test_file_jpeg.py::TestFileJpeg::test_empty_exif_gps", "Tests/test_color_lut.py::TestTransformColorLut3D::test_with_normals_3_channels", "Tests/test_image.py::TestImage::test_image_modes_success[P]", "Tests/test_image_putdata.py::test_mode_with_L_with_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/12in16bit.tif]", "Tests/test_image_reduce.py::test_mode_RGBA[factor7]", "Tests/test_file_pixar.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle.png]", "Tests/test_image_reduce.py::test_mode_RGBa[1]", "Tests/test_image.py::TestImage::test_effect_mandelbrot_bad_arguments", "Tests/test_imagemath.py::test_logical", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply18]", "Tests/test_imagedraw.py::test_ellipse_width[bbox2]", "Tests/test_file_gimpgradient.py::test_sphere_increasing", "Tests/test_file_ftex.py::test_load_dxt1", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r05.fli]", "Tests/test_image_transpose.py::test_roundtrip[I;16B]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pport_g4.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/truncated_image.png]", "Tests/test_file_gif.py::test_l_mode_after_rgb", "Tests/test_file_gribstub.py::test_save", "Tests/test_image.py::TestImage::test_alpha_composite", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.jpg-L]", "Tests/test_file_png.py::TestFilePng::test_bad_text", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/zero_bb.png-None]", "Tests/test_file_fits.py::test_naxis_zero", "Tests/test_file_bmp.py::test_save_too_large", "Tests/test_deprecate.py::test_action[Upgrade to new thing]", "Tests/test_image_load.py::test_sanity", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-False-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/text_float_coord.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment_after_last_frame.gif]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-True-True]", "Tests/test_file_mpo.py::test_context_manager", "Tests/test_file_tiff.py::TestFileTiff::test_exif_frames", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nnny.png]", "Tests/test_imagemorph.py::test_unknown_pattern", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-338516dbd2f0e83caddb8ce256c22db3bd6dc40f.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-86214e58da443d2b80820cff9677a38a33dcbbca.tif]", "Tests/test_imageshow.py::test_register", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox0]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bgr15.dds]", "Tests/test_file_mpo.py::test_image_grab[Tests/images/frozenpond.mpo]", "Tests/test_file_tiff_metadata.py::test_undefined_zero", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[LA-channels_set2-2]", "Tests/test_image_transpose.py::test_roundtrip[L]", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-4]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal4rletrns-b.png]", "Tests/test_image.py::TestImage::test_exif_hide_offsets", "Tests/test_image_paste.py::TestImagingPaste::test_different_sizes", "Tests/test_file_tiff.py::TestFileTiff::test_invalid_file", "Tests/test_image_resize.py::TestImageResize::test_default_filter_nearest[1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/flower_thumbnail.png]", "Tests/test_image_filter.py::test_rankfilter[F-expected4]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[True-False-True-True]", "Tests/test_file_gif.py::test_optimize_correctness[4-511-4]", "Tests/test_lib_pack.py::TestLibPack::test_La", "Tests/test_imagefile.py::TestPyEncoder::test_extents_none", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_truncated", "Tests/test_imagedraw.py::test_chord_zero_width[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_emboss.bmp]", "Tests/test_file_wmf.py::test_load_float_dpi", "Tests/test_image_transform.py::TestImageTransformPerspective::test_rotate[0-None]", "Tests/test_image_filter.py::test_invalid_box_blur_filter[radius1]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor10]", "Tests/test_file_tiff.py::TestFileTiff::test_load_double", "Tests/test_file_tga.py::test_horizontal_orientations", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_zero_width.png]", "Tests/test_image.py::TestImage::test_dump", "Tests/test_image_convert.py::test_matrix_identity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb.png]", "Tests/test_imagedraw.py::test_line_joint[xy1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_rle8.bmp]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_start.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_6.jpg]", "Tests/test_core_resources.py::TestCoreMemory::test_get_blocks_max", "Tests/test_image_split.py::test_split_merge[I]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/non_zero_bb_scale2.png-None]", "Tests/test_file_xbm.py::test_save_wrong_mode", "Tests/test_file_eps.py::test_ascii_comment_too_long[]", "Tests/test_image_convert.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/patch0/000001]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_zero_division", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb_trailer.eps]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[I;16]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-LA]", "Tests/test_imagemorph.py::test_dialation8", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb.eps]", "Tests/test_imagedraw.py::test_arc_width_non_whole_angle[bbox0]", "Tests/test_image_resample.py::TestCoreResampleConsistency::test_32i", "Tests/test_imagechops.py::test_duplicate", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/i_trns.png]", "Tests/test_image_reduce.py::test_mode_RGBA_opaque[factor17]", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle6-0-ValueError-bounding_circle radius should be > 0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_previous_first.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5s.dds]", "Tests/test_file_pdf.py::test_pdf_append", "Tests/test_file_gif.py::test_first_frame_transparency", "Tests/test_core_resources.py::TestEnvVars::test_warnings[var2]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[2-1.5-0.6-0-9.1]", "Tests/test_image_resample.py::TestCoreResamplePasses::test_both", "Tests/test_file_gif.py::test_roundtrip_save_all", "Tests/test_image_convert.py::test_16bit_workaround", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/others/05r07.fli]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_lanczos[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_center.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-1185209cf7655b5aed8ae5e77784dfdd18ab59e9.tif]", "Tests/test_imagedraw.py::test_wide_line_dot", "Tests/test_file_psd.py::test_layer_skip", "Tests/test_file_tiff.py::TestFileTiff::test_strip_raw", "Tests/test_image_filter.py::test_sanity[I-SHARPEN]", "Tests/test_image_mode.py::test_properties[1-L-L-1-expected_band_names0]", "Tests/test_file_psd.py::test_seek_tell", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox2]", "Tests/test_imagemath.py::test_logical_eq", "Tests/test_image_reduce.py::test_mode_F[factor16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp2_dxt1a.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/missing_background.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/morph_a.png]", "Tests/test_imagechops.py::test_add_modulo_no_clip", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_undefined[1]", "Tests/test_image_reduce.py::test_mode_LA_opaque[2]", "Tests/test_font_pcf.py::test_draw", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[La]", "Tests/test_file_tiff_metadata.py::test_exif_div_zero", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_floodfill_L.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_strip_cmyk_jpeg.tif]", "Tests/test_file_gif.py::test_remapped_transparency", "Tests/test_image_rotate.py::test_mode[F]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test.gpl]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/baddens2.bmp]", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply19]", "Tests/test_file_gif.py::test_empty_string_comment", "Tests/test_file_png.py::TestFilePng::test_chunk_order", "Tests/test_imagedraw.py::test_line_horizontal", "Tests/test_image_convert.py::test_trns_p_transparency[LA]", "Tests/test_file_jpeg.py::TestFileJpeg::test_junk_jpeg_header", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/issue_2278.tif]", "Tests/test_image_transform.py::TestImageTransform::test_quad", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24png.bmp]", "Tests/test_image_reduce.py::test_mode_LA[factor9]", "Tests/test_core_resources.py::test_reset_stats", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/pal8.png]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_ascii[test-test]", "Tests/test_image_getextrema.py::test_true_16", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_hamming[La]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-LA]", "Tests/test_image_reduce.py::test_mode_La[factor14]", "Tests/test_image_reduce.py::test_mode_L[factor14]", "Tests/test_file_im.py::test_context_manager", "Tests/test_image_filter.py::test_sanity[I-filter_to_apply16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/anim_frame2.webp]", "Tests/test_imagechops.py::test_add_scale_offset", "Tests/test_image.py::TestImage::test_expand_xy", "Tests/test_file_gif.py::test_zero_comment_subblocks", "Tests/test_imagedraw.py::test_rectangle_I16[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_cmyk.eps]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_gap.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-200dpcm.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ftex_uncompressed.png]", "Tests/test_fontfile.py::test_save", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_width.gif]", "Tests/test_file_ppm.py::test_plain_data_with_comment[P1\\n2 2-1010-1000000]", "Tests/test_image_getdata.py::test_roundtrip", "Tests/test_file_container.py::test_seek_mode[2-100]", "Tests/test_image_reduce.py::test_mode_RGBa[2]", "Tests/test_imagedraw.py::test_rectangle[bbox0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_imagemagick.png]", "Tests/test_file_gif.py::test_append_images", "Tests/test_image_reduce.py::test_mode_RGBA[factor8]", "Tests/test_file_apng.py::test_apng_delay", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw", "Tests/test_image_reduce.py::test_mode_RGB[5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-c1b2595b8b0b92cc5f38b6635e98e3a119ade807.sgi]", "Tests/test_file_png.py::TestFilePng::test_load_float_dpi", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/continuous_horizontal_edges_polygon.png]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-86214e58da443d2b80820cff9677a38a33dcbbca.tif]", "Tests/test_image_convert.py::test_default", "Tests/test_imagedraw.py::test_polygon_kite[kite_points1-L]", "Tests/test_image_convert.py::test_gif_with_rgba_palette_to_p", "Tests/test_file_tiff.py::TestFileTiff::test_palette[P]", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-4f085cc12ece8cde18758d42608bed6a2a2cfb1c.tif]", "Tests/test_image_reduce.py::test_mode_RGBa[3]", "Tests/test_imagefile.py::TestPyDecoder::test_decode", "Tests/test_imagepath.py::test_path_constructors[coords6]", "Tests/test_image_crop.py::test_crop_float", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/notes]", "Tests/test_file_mpo.py::test_seek_after_close", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/gbr.gbr]", "Tests/test_file_blp.py::test_load_blp2_dxt1a", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal2.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_reorder.png]", "Tests/test_image_filter.py::test_sanity[L-DETAIL]", "Tests/test_file_iptc.py::test_getiptcinfo_fotostation", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below_ttb.png]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords1]", "Tests/test_file_ppm.py::test_mimetypes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron.png]", "Tests/test_file_wmf.py::test_save[.emf]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_ellipse_width_fill.png]", "Tests/test_image_transpose.py::test_roundtrip[I;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-598843abc37fc080ec36a2699ebbd44f795d3a6f.psd]", "Tests/test_lib_pack.py::TestLibPack::test_RGB", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_paste.py::TestImagingPaste::test_image_mask_RGBa[RGB]", "Tests/test_file_eps.py::test_readline[\\r\\n-\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/test_image_transform.py::TestImageTransformAffine::test_translate[0-0-0.6-0-9.1]", "Tests/test_imagedraw2.py::test_ellipse[bbox1]", "Tests/test_image.py::TestImage::test_open_formats", "Tests/test_file_im.py::test_roundtrip[PA]", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[3-1-1.1-6.9]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_none_region.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[3-1-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_pieslice_zero_width.png]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-False-True-False]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid_header_length.jp2]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_chord_too_fat.png]", "Tests/test_image_transpose.py::test_rotate_90[I;16]", "Tests/test_image_transform.py::TestImageTransform::test_fill[LA-expected_pixel2]", "Tests/test_features.py::test_libjpeg_turbo_version", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cmx3g8_wv_1998.260_0745_mcidas.tiff]", "Tests/test_image_access.py::TestImageGetPixel::test_basic[1]", "Tests/test_file_fli.py::test_sanity", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_wrong_args", "Tests/test_imagedraw.py::test_polygon[points2]", "Tests/test_file_ppm.py::test_plain_invalid_data[P3\\n128 128\\n255\\n100A]", "Tests/test_imagedraw.py::test_pieslice_width_fill[bbox1]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply17]", "Tests/test_format_hsv.py::test_convert", "Tests/test_image_filter.py::test_sanity_error[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unimplemented_dxgi_format.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_tiny_axes.png]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/pil123p.png-None]", "Tests/test_image_quantize.py::test_colors", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_repeat.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif_text.png]", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-1.1-6.9]", "Tests/test_file_fli.py::test_timeouts[Tests/images/timeout-9139147ce93e20eb14088fe238e541443ffd64b3.fli]", "Tests/test_file_ppm.py::test_plain_ppm_token_too_long[P3\\n128 128\\n255\\n012345678910 0]", "Tests/test_imagemath.py::test_logical_le", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_tl_raw.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-8073b430977660cdd48d96f6406ddfd4114e69c7.blp]", "Tests/test_image_rotate.py::test_zero[45]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/04r/others/04r04.fli]", "Tests/test_image_reduce.py::test_mode_LA[factor10]", "Tests/test_file_psd.py::test_eoferror", "Tests/test_file_fli.py::test_unclosed_file", "Tests/test_file_tiff.py::TestFileTiff::test_multipage_last_frame", "Tests/test_imagedraw.py::test_ellipse_width_large", "Tests/test_imagedraw.py::test_rectangle_translucent_outline[bbox2]", "Tests/test_file_dcx.py::test_closed_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/broken.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4_orientation_6.tif]", "Tests/test_imagechops.py::test_screen", "Tests/test_image.py::TestImage::test_alpha_inplace", "Tests/test_file_jpeg.py::TestFileJpeg::test_ff00_jpeg_header", "Tests/test_image_transform.py::TestImageTransformAffine::test_resize[0-0-2.0-5.5]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/balloon.jpf]", "Tests/test_image_quantize.py::test_palette[2-color3]", "Tests/test_file_gimpgradient.py::test_sphere_decreasing", "Tests/test_image_transform.py::TestImageTransformPerspective::test_translate[0-0-0.1-0-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw/square.png]", "Tests/test_imagepath.py::test_path_odd_number_of_coordinates[coords2]", "Tests/test_file_eps.py::test_invalid_data_after_eof", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_rounded_rectangle_corners_nyyn.png]", "Tests/test_image_convert.py::test_l_macro_rounding[I]", "Tests/test_image_reduce.py::test_mode_RGBa[4]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor17]", "Tests/test_file_jpeg.py::TestFileJpeg::test_photoshop", "Tests/test_imagepath.py::test_getbbox[coords1-expected1]", "Tests/test_imagedraw.py::test_rectangle_width[bbox2]", "Tests/test_file_ico.py::test_save_to_bytes_bmp[L]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/test-card.png-None]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[2-72.8]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card-lossless.jp2]", "Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_dirty_pixels_rgba", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/WAlaska.wind.7days.grb]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/negative_size.ppm]", "Tests/test_file_sgi.py::test_rgb", "Tests/test_imagedraw.py::test_floodfill_thresh[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_caron_ttb_lt.png]", "Tests/test_file_ftex.py::test_load_raw", "Tests/test_file_ppm.py::test_non_integer_token", "Tests/test_file_gif.py::test_background_outside_palettte", "Tests/test_image_resize.py::TestImagingCoreResize::test_endianness[RGBA-channels_set1-5]", "Tests/test_file_tga.py::test_save_rle", "Tests/test_image_reduce.py::test_args_box_error[size5-ValueError]", "Tests/test_image_convert.py::test_matrix_xyz[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/dispose_op_background_p_mode.png]", "Tests/test_file_hdf5stub.py::test_load", "Tests/test_font_pcf.py::test_invalid_file", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_s", "Tests/test_file_tiff.py::TestFileTiff::test_frame_order", "Tests/test_image.py::TestImage::test_empty_image[size1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/syntax_num_frames_low.png]", "Tests/test_file_eps.py::test_long_binary_data[]", "Tests/test_image_getprojection.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/iss634.webp]", "Tests/test_imagedraw.py::test_arc_width[bbox0]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_correct_mode", "Tests/test_image.py::TestImage::test_remap_palette_transparency", "Tests/test_image_split.py::test_split_merge[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-72dpi-int.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sunraster.im1.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/non_zero_bb.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/erosion4.lut]", "Tests/test_file_jpeg.py::TestFileJpeg::test_app", "Tests/test_image_copy.py::test_copy[1]", "Tests/test_features.py::test_check_codecs[jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badrle.bmp]", "Tests/test_image_reduce.py::test_mode_RGB[factor9]", "Tests/test_file_eps.py::test_read_binary_preview", "Tests/test_image_resample.py::TestCoreResamplePasses::test_vertical", "Tests/test_lib_pack.py::TestLibUnpack::test_La", "Tests/test_file_tiff.py::TestFileTiff::test_8bit_s", "Tests/test_file_blp.py::test_crashes[Tests/images/timeout-ef9112a065e7183fa7faa2e18929b03e44ee16bf.blp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_rgb.jpg]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply20]", "Tests/test_file_icns.py::test_sizes", "Tests/test_file_eps.py::test_psfile_deprecation", "Tests/test_image.py::TestImage::test_exif_ifd", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bigtiff.tif]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16B]", "Tests/test_image_rotate.py::test_zero[270]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_double_breve_below.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/comment.jp2]", "Tests/test_file_im.py::test_save_unsupported_mode", "Tests/test_image_filter.py::test_sanity[CMYK-UnsharpMask]", "Tests/test_imagepalette.py::test_getdata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8oversizepal.bmp]", "Tests/test_file_gif.py::test_dispose2_palette", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgb16-231.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/pal8os2sp.bmp]", "Tests/test_image_filter.py::test_builtinfilter_p", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt1-rgb-4bbp-noalpha_MipMaps-1.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_webp.tif]", "Tests/test_image_transform.py::TestImageTransform::test_sanity", "Tests/test_image_quantize.py::test_small_palette", "Tests/test_image_filter.py::test_rankfilter_error[MinFilter]", "Tests/test_file_psd.py::test_open_after_exclusive_load", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ati2.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/cross_scan_line.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/pil_sample_cmyk.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_l_tl_raw.tga]", "Tests/test_file_gif.py::test_optimize_correctness[255-511-255]", "Tests/test_box_blur.py::test_radius_0_1", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle5-0-ValueError-bounding_circle centre should contain 2D coordinates (e.g. (x, y))]", "Tests/test_image_reduce.py::test_mode_I[factor16]", "Tests/test_file_ppm.py::test_invalid_maxval[65536]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[2-]", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration2]", "Tests/test_imagedraw.py::test_rectangle_width_fill[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8topdown.bmp]", "Tests/test_file_sgi.py::test_rgba", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_bytes[value1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_overflow_rows_per_strip.tif]", "Tests/test_file_png.py::TestFilePng::test_unicode_text", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[2-2-2.5-3.7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/erosion8.lut]", "Tests/test_file_dds.py::test_dx10_bc7", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_box[RGB]", "Tests/test_file_bmp.py::test_invalid_file", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/hopper.tif-None]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.sgi]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/rgb24.bmp]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_channels_order", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[False]", "Tests/test_image_reduce.py::test_args_box_error[stri-TypeError]", "Tests/test_image_filter.py::test_sanity[CMYK-filter_to_apply15]", "Tests/test_image_crop.py::test_negative_crop[box2]", "Tests/test_file_gif.py::test_lzw_bits", "Tests/test_core_resources.py::TestCoreMemory::test_set_alignment", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-60d8b7c8469d59fc9ffff6b3a3dc0faeae6ea8ee.blp]", "Tests/test_file_webp.py::TestUnsupportedWebp::test_unsupported", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_float", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_float_dpi_2.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tiff_tiled_planar_16bit_RGB.tiff]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_orientation_5.jpg]", "Tests/test_image.py::TestImage::test_image_modes_success[La]", "Tests/test_file_psd.py::test_invalid_file", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.gif]", "Tests/test_psdraw.py::test_draw_postscript", "Tests/test_file_jpeg.py::TestFileJpeg::test_MAXBLOCK_scaling", "Tests/test_file_pdf.py::test_p_alpha", "Tests/test_image_convert.py::test_trns_l", "Tests/test_lib_pack.py::TestLibPack::test_P", "Tests/test_bmp_reference.py::test_questionable", "Tests/test_imagedraw.py::test_chord[bbox1-RGB]", "Tests/test_imagedraw.py::test_rounded_rectangle_corners[False-True-False-True]", "Tests/test_imagedraw.py::test_rounded_rectangle[xy2]", "Tests/test_file_gimpgradient.py::test_sine", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_same.png]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P5 3 1 4 \\x00\\x02\\x04-L-pixels4]", "Tests/test_pickle.py::test_pickle_image[0-Tests/images/zero_bb.png-None]", "Tests/test_file_gif.py::test_seek", "Tests/test_file_icns.py::test_save_append_images", "Tests/test_file_jpeg.py::TestFileJpeg::test_comment_write", "Tests/test_file_tga.py::test_cross_scan_line", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/zero_bb.eps]", "Tests/test_imagedraw.py::test_ellipse[bbox0-RGB]", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_int", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_emboss_more.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/g4-fillorder-test.tif]", "Tests/test_imagefontpil.py::test_size_without_freetype", "Tests/test_file_png.py::TestFilePng::test_save_rgb_single_transparency", "Tests/test_imagedraw.py::test_line[points2]", "Tests/test_pickle.py::test_pickle_image[1-Tests/images/zero_bb_scale2.png-None]", "Tests/test_image_reduce.py::test_mode_RGBa[factor17]", "Tests/test_imagepath.py::test_getbbox[1-expected3]", "Tests/test_file_mpo.py::test_unclosed_file", "Tests/test_lib_pack.py::TestLibUnpack::test_PA", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/03r/others/03r01.fli]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;24]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply19]", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_zero[0]", "Tests/test_image_resize.py::TestReducingGapResize::test_reducing_gap_8[box2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/timeout-d675703545fee17acab56e5fec644c19979175de.eps]", "Tests/test_file_tiff.py::TestFileTiff::test_discard_icc_profile", "Tests/test_imagechops.py::test_darker_pixel", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_triangle_width.png]", "Tests/test_imagedraw.py::test_chord_width_fill[bbox3]", "Tests/test_image.py::TestImage::test_load_on_nonexclusive_multiframe", "Tests/test_imagedraw.py::test_polygon_kite[kite_points0-L]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun.bin]", "Tests/test_image_resample.py::TestCoreResampleAlphaCorrect::test_dirty_pixels_la", "Tests/test_imagefile.py::TestPyDecoder::test_oversize", "Tests/test_file_jpeg.py::TestFileJpeg::test_get_child_images", "Tests/test_file_jpeg.py::TestFileJpeg::test_restart_markers[0-2-1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l_tl_raw.tga]", "Tests/test_imagepalette.py::test_make_gamma_lut", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/ossfuzz-4836216264589312.pcx]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc4_typeless.dds]", "Tests/test_file_bmp.py::test_save_to_bytes", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/05r/05r00.fli]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/reqd_showpage.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_after_SOF", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_enlarge_bicubic[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/200x32_rgb_tl_rle.tga]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/blend_op_source_solid.png]", "Tests/test_imagedraw.py::test_chord[bbox3-L]", "Tests/test_lib_pack.py::TestLibUnpack::test_value_error", "Tests/test_file_gif.py::test_getdata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blend_transparency.png]", "Tests/test_file_dds.py::test_uncompressed[RGBA-size4-Tests/images/uncompressed_rgb.dds]", "Tests/test_file_tiff.py::TestFileTiff::test_bad_exif", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[RGBX]", "Tests/test_imagedraw.py::test_arc[0.5-180.4-bbox3]", "Tests/test_file_ppm.py::test_arbitrary_maxval[P6 3 1 17 \\x00\\x01\\x02\\x08\\t\\n\\x0f\\x10\\x11-RGB-pixels6]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/dxt5-colorblock-alpha-issue-4142.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/html/rgba16-4444.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/badbitssize.bmp]", "Tests/test_pickle.py::test_pickle_image[5-Tests/images/test-card.png-None]", "Tests/test_file_dds.py::test_uncompressed[LA-size1-Tests/images/uncompressed_la.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_multiline_mm_left.png]", "Tests/test_file_gif.py::test_transparent_optimize", "Tests/test_imagedraw.py::test_pieslice[-92-46-bbox2]", "Tests/test_imagefile.py::TestImageFile::test_truncated_with_errors", "Tests/test_pickle.py::test_pickle_image[3-Tests/images/hopper.jpg-None]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox3]", "Tests/test_file_jpeg.py::TestFileJpeg::test_icc_big[65520]", "Tests/test_image_resample.py::TestCoreResampleBox::test_tiles", "Tests/test_image_quantize.py::test_transparent_colors_equal", "Tests/test_imagedraw.py::test_polygon2", "Tests/test_file_eps.py::test_open_eps[Tests/images/illuCS6_no_preview.eps]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.gd]", "Tests/test_core_resources.py::test_get_stats", "Tests/test_file_eps.py::test_missing_version_comment[]", "Tests/test_imageshow.py::test_viewer_show[0]", "Tests/test_lib_pack.py::TestLibPack::test_LAB", "Tests/test_file_dds.py::test_dx10_bc7_unorm_srgb", "Tests/test_file_apng.py::test_apng_mode", "Tests/test_color_lut.py::TestTransformColorLut3D::test_3_to_4_channels", "Tests/test_image_transform.py::TestImageTransformPerspective::test_resize[0-0-1.1-6.9]", "Tests/test_lib_pack.py::TestLibUnpack::test_L", "Tests/test_tiff_crashes.py::test_tiff_crashes[Tests/images/crash-63b1dffefc8c075ddc606c0a2f5fdc15ece78863.tif]", "Tests/test_imageops.py::test_autocontrast_preserve_one_color[color2]", "Tests/test_image_access.py::TestImageGetPixel::test_list", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_bad.p7]", "Tests/test_box_blur.py::test_radius_1_5", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/padded_idat.png]", "Tests/test_imagedraw.py::test_floodfill_border[bbox2]", "Tests/test_image_copy.py::test_copy_zero", "Tests/test_file_jpeg.py::TestFileJpeg::test_adobe_transform", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun.bin]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[RGB]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/l2rgb_read.bmp]", "Tests/test_file_tga.py::test_save", "Tests/test_image.py::TestImage::test_register_open_duplicates", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/16_bit_binary.pgm]", "Tests/test_file_gd.py::test_bad_mode", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_box[La]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_16bit_plain.pgm]", "Tests/test_file_jpeg.py::TestFileJpeg::test_dpi_exif_string", "Tests/test_imagedraw.py::test_rounded_rectangle_non_integer_radius[xy1-90-width]", "Tests/test_file_eps.py::test_missing_version_comment[\\xc5\\xd0\\xd3\\xc6\\x0c\\x00\\x00\\x00\\x00\\x00\\x00\\x00]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/blp/blp1_jpeg.png]", "Tests/test_image_paste.py::TestImagingPaste::test_color_solid[RGBA]", "Tests/test_file_tiff.py::TestFileTiff::test_12bit_rawmode", "Tests/test_image_reduce.py::test_mode_I[2]", "Tests/test_image_load.py::test_contextmanager_non_exclusive_fp", "Tests/test_file_tiff_metadata.py::test_rt_metadata", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-2020-10-test.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/argb-32bpp_MipMaps-1.png]", "Tests/test_color_lut.py::TestColorLut3DCoreAPI::test_identities_4_channels", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/mode_palette.png]", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor6]", "Tests/test_imagefontpil.py::test_oom", "Tests/test_image_reduce.py::test_mode_F[factor7]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/tga/common/1x1_l.png]", "Tests/test_imageops.py::test_fit_same_ratio", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_cursors.cur]", "Tests/test_imagedraw.py::test_chord_zero_width[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/unimplemented_pfflags.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bitmap_font_4_raqm.png]", "Tests/test_image_reduce.py::test_mode_I[5]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_bilinear[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/apng/sequence_start.png]", "Tests/test_imagedraw.py::test_pieslice_zero_width[bbox1]", "Tests/test_file_apng.py::test_apng_dispose", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw2_text.png]", "Tests/test_file_gribstub.py::test_open", "Tests/test_imageops.py::test_contain[new_size2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/06r/06r00.fli]", "Tests/test_image_filter.py::test_sanity[RGB-SHARPEN]", "Tests/test_color_lut.py::TestTransformColorLut3D::test_target_mode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/variation_adobe_older_harfbuzz_name.png]", "Tests/test_file_jpeg.py::TestFileJpeg::test_getxmp_no_prefix", "Tests/test_image_reduce.py::test_mode_La[3]", "Tests/test_pickle.py::test_pickle_image[4-Tests/images/itxt_chunks.png-None]", "Tests/test_imagedraw.py::test_chord_width[bbox2]", "Tests/test_imagechops.py::test_sanity", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-1152ec2d1a1a71395b6f2ce6721c38924d025bf3.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgb24jpeg.bmp]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/g/pal8os2.bmp]", "Tests/test_file_spider.py::test_nonstack_file", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5_snorm.dds-Tests/images/bc5s.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/orientation_rectangle.jpg]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test-card-lossy-tiled.jp2]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;15]", "Tests/test_file_pcx.py::test_pil184", "Tests/test_file_jpeg.py::TestFileJpeg::test_no_dpi_in_exif", "Tests/test_image_getbands.py::test_getbands", "Tests/test_imagedraw.py::test_ellipse_zero_width[bbox0]", "Tests/test_file_psd.py::test_no_icc_profile", "Tests/test_imagecolor.py::test_functions", "Tests/test_image_reduce.py::test_mode_LA[factor11]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/no_rows_per_strip.tif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_anchor_multiline_rm_center.png]", "Tests/test_file_im.py::test_closed_file", "Tests/test_imageops.py::test_autocontrast_unsupported_mode", "Tests/test_file_tiff.py::TestFileTiff::test_gray_semibyte_per_pixel", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.Lab.tif]", "Tests/test_imagefile.py::TestPyEncoder::test_encode", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_polygon_translucent.png]", "Tests/test_file_pcx.py::test_odd[P]", "Tests/test_image_rotate.py::test_alpha_rotate_no_fill", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bc5_snorm.dds]", "Tests/test_file_gif.py::test_saving_rgba", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent_background_text_L.png]", "Tests/test_imagechops.py::test_difference", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/transparent.gif]", "Tests/test_file_jpeg.py::TestFileJpeg::test_invalid_exif", "Tests/test_image_resize.py::TestImagingCoreResize::test_nearest_mode[CMYK]", "Tests/test_image_transform.py::TestImageTransform::test_fill[RGBA-expected_pixel1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imagedraw_stroke_multiline.png]", "Tests/test_core_resources.py::TestCoreMemory::test_set_block_size_stats", "Tests/test_format_hsv.py::test_wedge", "Tests/test_image_reduce.py::test_mode_LA_opaque[factor13]", "Tests/test_image_resize.py::TestImagingCoreResize::test_unknown_filter", "Tests/test_imagedraw.py::test_ellipse_translucent[bbox1]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_zero_comment_subblocks.gif]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/crash-7d4c83eb92150fb8f1653a697703ae06ae7c4998.j2k]", "Tests/test_file_ppm.py::test_neg_ppm", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_lanczos[L]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_be.pfm]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/fli_oob/02r/others/02r04.fli]", "Tests/test_font_pcf_charsets.py::test_sanity[cp1250]", "Tests/test_image_mode.py::test_properties[I-L-I-1-expected_band_names3]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/test_combine_overline_ttb_mt.png]", "Tests/test_image_filter.py::test_sanity[RGB-filter_to_apply19]", "Tests/test_file_blp.py::test_save", "Tests/test_imagedraw.py::test_chord_width_fill[bbox2]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/invalid.spider]", "Tests/test_imagedraw.py::test_rounded_rectangle_zero_radius[bbox0]", "Tests/test_image_filter.py::test_sanity[RGB-EDGE_ENHANCE_MORE]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-True-P]", "Tests/test_file_png.py::TestFilePng::test_discard_icc_profile", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/b/reallybig.bmp]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[3-184.912]", "Tests/test_features.py::test_pilinfo", "Tests/test_image_putalpha.py::test_readonly", "Tests/test_imagedraw2.py::test_sanity", "Tests/test_image_resize.py::TestImagingCoreResize::test_enlarge_filters[4]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 NaN \\x00\\x00\\x00\\x00]", "Tests/test_imageops.py::test_autocontrast_cutoff", "Tests/test_file_jpeg.py::TestFileJpeg::test_quality_keep", "Tests/test_file_png.py::TestFilePng::test_roundtrip_private_chunk", "Tests/test_image.py::TestImage::test_register_extensions", "Tests/test_image.py::TestImage::test_radial_gradient[I]", "Tests/test_imagedraw2.py::test_ellipse_edge", "Tests/test_file_blp.py::test_load_blp2_dxt1", "Tests/test_image_mode.py::test_properties[F-L-F-1-expected_band_names4]", "Tests/test_file_sgi.py::test_rle", "Tests/test_image_transpose.py::test_rotate_180[I;16]", "Tests/test_image_reduce.py::test_mode_RGB[4]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply16]", "Tests/test_imagechops.py::test_add_clip", "Tests/test_imagechops.py::test_multiply_black", "Tests/test_imagedraw.py::test_rectangle_I16[bbox0]", "Tests/test_imagemath.py::test_abs", "Tests/test_file_xbm.py::test_hotspot", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/imageops_pad_h_0.jpg]", "Tests/test_file_spider.py::test_invalid_file", "Tests/test_imagedraw.py::test_compute_regular_polygon_vertices_input_error_handling[3-bounding_circle4-0-ValueError-bounding_circle should only contain numeric data]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/exif-dpi-zerodivision.jpg]", "Tests/test_image_reduce.py::test_mode_F[factor10]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper.tar]", "Tests/test_file_ppm.py::test_pfm_invalid[Pf 1 1 -0.0 \\x00\\x00\\x00\\x00]", "Tests/test_imagedraw.py::test_ellipse_width[bbox0]", "Tests/test_image_putdata.py::test_mode_BGR[BGR;16]", "Tests/test_image_resample.py::TestCoreResampleBox::test_formats[0-RGBA]", "Tests/test_image.py::TestImage::test_exif_png", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/photoshop-200dpi-broken.jpg]", "Tests/test_file_jpeg.py::TestFileJpeg::test_save_correct_modes[RGBX]", "Tests/test_file_dds.py::test_dx10_bc5[Tests/images/bc5s.dds-Tests/images/bc5s.dds]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba32.bmp]", "Tests/test_imagedraw2.py::test_line_pen_as_brush[points0]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/rotate_45_no_fill.png]", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/bmp/q/rgba16-4444.bmp]", "Tests/test_image_resample.py::TestImagingCoreResampleAccuracy::test_reduce_hamming[La]", "Tests/test_image_transform.py::TestImageTransform::test_blank_fill", "Tests/test_file_jpeg.py::TestFileJpeg::test_invalid_exif_x_resolution", "Tests/test_file_dds.py::test_dx10_r8g8b8a8", "Tests/test_image_filter.py::test_consistency_5x5[LA]", "Tests/test_file_gimppalette.py::test_get_palette", "Tests/test_file_gif.py::test_dispose2_diff", "Tests/test_file_gif.py::test_roundtrip", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/hopper_gray.jpg]", "Tests/test_imagedraw.py::test_arc[0-180-bbox2]", "Tests/test_file_container.py::test_isatty", "Tests/oss-fuzz/test_fuzzers.py::test_fuzz_images[Tests/images/sgi_overrun.bin]", "Tests/test_image_filter.py::test_sanity[L-filter_to_apply15]"] | ["Tests/test_tiff_ifdrational.py::test_ifd_rational_save - OSError: encoder libtiff not available", "Tests/test_file_palm.py::test_p_mode - Palm P image is wrong"] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.4.4", "distlib==0.3.8", "filelock==3.13.1", "iniconfig==2.0.0", "packaging==24.0", "pip==24.0", "platformdirs==4.2.0", "pluggy==1.4.0", "pyproject-api==1.6.1", "pytest==8.1.1", "pytest-cov==4.1.0", "tox==4.14.2", "uv==0.1.24", "virtualenv==20.25.1", "wheel==0.44.0"]} | null | ["pytest --tb=no -rA -p no:cacheprovider"] | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-7788 | 6782a07b8e404271dbd2e5ddf5fbb93e575ed2bc | diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
index dc842d7a30b..9368dd7e7c4 100644
--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -629,7 +629,7 @@ def _write_multiple_frames(im, fp, palette):
"duration"
]
continue
- if encoderinfo.get("disposal") == 2:
+ if im_frames[-1]["encoderinfo"].get("disposal") == 2:
if background_im is None:
color = im.encoderinfo.get(
"transparency", im.info.get("transparency", (0, 0, 0))
@@ -637,8 +637,8 @@ def _write_multiple_frames(im, fp, palette):
background = _get_background(im_frame, color)
background_im = Image.new("P", im_frame.size, background)
background_im.putpalette(im_frames[0]["im"].palette)
- delta, bbox = _getbbox(background_im, im_frame)
- if encoderinfo.get("optimize") and im_frame.mode != "1":
+ bbox = _getbbox(background_im, im_frame)[1]
+ elif encoderinfo.get("optimize") and im_frame.mode != "1":
if "transparency" not in encoderinfo:
try:
encoderinfo["transparency"] = (
| diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index db9d3586c4d..6527d90de96 100644
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -647,6 +647,9 @@ def test_dispose2_palette(tmp_path: Path) -> None:
# Center remains red every frame
assert rgb_img.getpixel((50, 50)) == circle
+ # Check that frame transparency wasn't added unnecessarily
+ assert img._frame_transparency is None
+
def test_dispose2_diff(tmp_path: Path) -> None:
out = str(tmp_path / "temp.gif")
@@ -734,6 +737,25 @@ def test_dispose2_background_frame(tmp_path: Path) -> None:
assert im.n_frames == 3
+def test_dispose2_previous_frame(tmp_path: Path) -> None:
+ out = str(tmp_path / "temp.gif")
+
+ im = Image.new("P", (100, 100))
+ im.info["transparency"] = 0
+ d = ImageDraw.Draw(im)
+ d.rectangle([(0, 0), (100, 50)], 1)
+ im.putpalette((0, 0, 0, 255, 0, 0))
+
+ im2 = Image.new("P", (100, 100))
+ im2.putpalette((0, 0, 0))
+
+ im.save(out, save_all=True, append_images=[im2], disposal=[0, 2])
+
+ with Image.open(out) as im:
+ im.seek(1)
+ assert im.getpixel((0, 0)) == (0, 0, 0, 255)
+
+
def test_transparency_in_second_frame(tmp_path: Path) -> None:
out = str(tmp_path / "temp.gif")
with Image.open("Tests/images/different_transparency.gif") as im:
| Setting disposal=2 on gif export can cause issues with transparency
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/questions/tagged/python-imaging-library
Do not ask a question in both places.
If you think you have found a bug or have an unexplained exception
then file a bug report here.
2. Bug report: include a self-contained, copy-pastable example that
generates the issue if possible. Be concise with code posted.
Guidelines on how to provide a good bug report:
* https://stackoverflow.com/help/mcve
Bug reports which follow these guidelines are easier to diagnose,
and are often handled much more quickly.
3. Feature request: do a quick search of existing issues
to make sure this has not been asked before.
We know asking good questions takes effort, and we appreciate your time.
Thank you.
-->
### What did you do?
Created a sequence of images with jittering text and saved them as a gif, specifying `disposal=2`
### What did you expect to happen?
The gif to correctly display the images, with a consistent background
### What actually happened?
The background flashes between opaque and transparent, with which frames are which depending on how exactly the text is jittering

### What are your OS, Python and Pillow versions?
* OS: Linux (Arch)
* Python: 3.11.6
* Pillow: 10.2.0
<!--
Please include **code** that reproduces the issue and whenever possible, an **image** that demonstrates the issue. Please upload images to GitHub, not to third-party file hosting sites. If necessary, add the image to a zip or tar archive.
The best reproductions are self-contained scripts with minimal dependencies. If you are using a framework such as Plone, Django, or Buildout, try to replicate the issue just using Pillow.
-->
This code with these images was used to generate the above gif:
```python
from PIL import Image
baseimage = Image.open("test0.png")
images = [
Image.open("test1.png")
]
baseimage.save("testout.gif", save_all=True, append_images=images, loop=0, duration=1000, disposal=2)
```
test0.png:

test1.png:

As far as I can tell, this is occurring because of the optimization in #7568 depending on a delta image which, when `disposal` is 2, can have been generated with a background image that is filled with a color with a palette index that does not exist in the frame's palette, presumably creating a nonsense delta.
Moving [these lines of code](https://github.com/python-pillow/Pillow/blob/main/src/PIL/GifImagePlugin.py#L634C1-L637C70) outside the if statement seems to fix the issue, presumably due to `_get_background` having a side effect of placing the appropriate color into the frame's palette with the same index as in the background.
This does not occur when `disposal` is set to any other value or when `optimize` is set to `False` due to skipping one or both of the codepaths involved in the bug.
| 2024-02-09T08:55:44Z | 2024-03-11T15:48:13Z | ["Tests/test_file_gif.py::test_dispose_none", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_gif.py::test_context_manager", "Tests/test_file_gif.py::test_seek_info", "Tests/test_file_gif.py::test_append_images", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Tests/test_file_gif.py::test_l_mode_after_rgb", "Tests/test_file_gif.py::test_seek_rewind", "Tests/test_file_gif.py::test_version", "Tests/test_file_gif.py::test_lzw_bits", "Tests/test_file_gif.py::test_save_dispose", "Tests/test_file_gif.py::test_dispose_previous", "Tests/test_file_gif.py::test_number_of_loops", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration2]", "Tests/test_file_gif.py::test_sanity", "Tests/test_file_gif.py::test_background", "Tests/test_file_gif.py::test_seek", "Tests/test_file_gif.py::test_n_frames[Tests/images/hopper.gif-1]", "Tests/test_file_gif.py::test_missing_background", "Tests/test_file_gif.py::test_optimize_correctness[128-513-256]", "Tests/test_file_gif.py::test_eoferror", "Tests/test_file_gif.py::test_dispose_background", "Tests/test_file_gif.py::test_palette_save_all_P", "Tests/test_file_gif.py::test_identical_frames", "Tests/test_file_gif.py::test_webp_background", "Tests/test_file_gif.py::test_roundtrip_save_all", "Tests/test_file_gif.py::test_optimize_correctness[129-511-129]", "Tests/test_file_gif.py::test_optimize_correctness[128-511-128]", "Tests/test_file_gif.py::test_no_change", "Tests/test_file_gif.py::test_optimize_correctness[4-513-256]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd.gif-RGB]", "Tests/test_file_gif.py::test_extents", "Tests/test_file_gif.py::test_dispose_background_transparency", "Tests/test_file_gif.py::test_optimize_correctness[255-511-255]", "Tests/test_file_gif.py::test_optimize_correctness[256-511-256]", "Tests/test_file_gif.py::test_palette_handling", "Tests/test_file_gif.py::test_palette_save_duplicate_entries", "Tests/test_file_gif.py::test_comment", "Tests/test_file_gif.py::test_multiple_duration", "Tests/test_file_gif.py::test_read_multiple_comment_blocks", "Tests/test_file_gif.py::test_previous_frame_loaded", "Tests/test_file_gif.py::test_roundtrip_info_duration_combined", "Tests/test_file_gif.py::test_empty_string_comment", "Tests/test_file_gif.py::test_n_frames[Tests/images/comment_after_last_frame.gif-2]", "Tests/test_file_gif.py::test_transparent_dispose[1-expected_colors1]", "Tests/test_file_gif.py::test_optimize_full_l", "Tests/test_file_gif.py::test_full_palette_second_frame", "Tests/test_file_gif.py::test_invalid_file", "Tests/test_file_gif.py::test_removed_transparency", "Tests/test_file_gif.py::test_roundtrip_info_duration", "Tests/test_file_gif.py::test_optimize_correctness[64-511-64]", "Tests/test_file_gif.py::test_no_transparency_in_second_frame", "Tests/test_file_gif.py::test_palette_not_needed_for_second_frame", "Tests/test_file_gif.py::test_save_I", "Tests/test_file_gif.py::test_optimize_correctness[64-513-256]", "Tests/test_file_gif.py::test_transparent_optimize", "Tests/test_file_gif.py::test_optimize_if_palette_can_be_reduced_by_half", "Tests/test_file_gif.py::test_comment_over_255", "Tests/test_file_gif.py::test_l_mode_transparency", "Tests/test_file_gif.py::test_unclosed_file", "Tests/test_file_gif.py::test_n_frames[Tests/images/iss634.gif-42]", "Tests/test_file_gif.py::test_dispose_previous_first_frame", "Tests/test_file_gif.py::test_optimize_correctness[4-511-4]", "Tests/test_file_gif.py::test_rgb_transparency", "Tests/test_file_gif.py::test_retain_comment_in_subsequent_frames", "Tests/test_file_gif.py::test_duration", "Tests/test_file_gif.py::test_first_frame_transparency", "Tests/test_file_gif.py::test_palette_434", "Tests/test_file_gif.py::test_palette_save_P", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd_rgba.gif-RGBA]", "Tests/test_file_gif.py::test_loop_none", "Tests/test_file_gif.py::test_palette_save_L", "Tests/test_file_gif.py::test_zero_comment_subblocks", "Tests/test_file_gif.py::test_roundtrip", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[1500]", "Tests/test_file_gif.py::test_closed_file", "Tests/test_file_gif.py::test_strategy", "Tests/test_file_gif.py::test_bbox_alpha", "Tests/test_file_gif.py::test_saving_rgba", "Tests/test_file_gif.py::test_optimize", "Tests/test_file_gif.py::test_roundtrip_save_all_1", "Tests/test_file_gif.py::test_dispose2_background", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration1]", "Tests/test_file_gif.py::test_seek_after_close", "Tests/test_file_gif.py::test_roundtrip2", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration0]", "Tests/test_file_gif.py::test_rgba_transparency", "Tests/test_file_gif.py::test_remapped_transparency", "Tests/test_file_gif.py::test_palette_save_ImagePalette", "Tests/test_file_gif.py::test_dispose2_background_frame", "Tests/test_file_gif.py::test_background_outside_palettte", "Tests/test_file_gif.py::test_headers_saving_for_animated_gifs", "Tests/test_file_gif.py::test_bbox", "Tests/test_file_gif.py::test_getdata", "Tests/test_file_gif.py::test_dispose_none_load_end", "Tests/test_file_gif.py::test_dispose2_diff"] | [] | ["Tests/test_file_gif.py::test_dispose2_palette", "Tests/test_file_gif.py::test_dispose2_previous_frame"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.4.3", "distlib==0.3.8", "filelock==3.13.1", "iniconfig==2.0.0", "packaging==24.0", "platformdirs==4.2.0", "pluggy==1.4.0", "pyproject-api==1.6.1", "pytest==8.1.1", "pytest-cov==4.1.0", "setuptools==75.1.0", "tox==4.14.1", "virtualenv==20.25.1", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
python-pillow/Pillow | python-pillow__Pillow-7779 | 1b6723967440cf8474a9bd1e1c394c90c5c2f986 | diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py
index 57d87078bca..935b95ca8c6 100644
--- a/src/PIL/GifImagePlugin.py
+++ b/src/PIL/GifImagePlugin.py
@@ -649,9 +649,7 @@ def _write_multiple_frames(im, fp, palette):
if "transparency" in encoderinfo:
# When the delta is zero, fill the image with transparency
diff_frame = im_frame.copy()
- fill = Image.new(
- "P", diff_frame.size, encoderinfo["transparency"]
- )
+ fill = Image.new("P", delta.size, encoderinfo["transparency"])
if delta.mode == "RGBA":
r, g, b, a = delta.split()
mask = ImageMath.eval(
| diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index 3f550fd1109..263c897ef51 100644
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -1105,6 +1105,21 @@ def im_generator(ims):
assert reread.n_frames == 10
+def test_append_different_size_image(tmp_path: Path) -> None:
+ out = str(tmp_path / "temp.gif")
+
+ im = Image.new("RGB", (100, 100))
+ bigger_im = Image.new("RGB", (200, 200), "#f00")
+
+ im.save(out, save_all=True, append_images=[bigger_im])
+
+ with Image.open(out) as reread:
+ assert reread.size == (100, 100)
+
+ reread.seek(1)
+ assert reread.size == (100, 100)
+
+
def test_transparent_optimize(tmp_path: Path) -> None:
# From issue #2195, if the transparent color is incorrectly optimized out, GIF loses
# transparency.
| ValueError: images do not match
Without changing code, only upgrading from 10.1.0 to 10.2.0, started getting this error when generating animated GIFs:
```pytb
File "wakatime/insights/utils.py", line 481, in get_animated_insight
images[0].save(out, format="gif", append_images=images[1:-1], save_all=True, duration=80, loop=0)
File "venv/lib/python3.10/site-packages/PIL/Image.py", line 2439, in save
save_handler(self, fp, filename)
File "venv/lib/python3.10/site-packages/PIL/GifImagePlugin.py", line 704, in _save_all
_save(im, fp, filename, save_all=True)
File "venv/lib/python3.10/site-packages/PIL/GifImagePlugin.py", line 715, in _save
if not save_all or not _write_multiple_frames(im, fp, palette):
File "venv/lib/python3.10/site-packages/PIL/GifImagePlugin.py", line 671, in _write_multiple_frames
diff_frame.paste(fill, mask=ImageOps.invert(mask))
File "venv/lib/python3.10/site-packages/PIL/Image.py", line 1738, in paste
self.im.paste(im, box, mask.im)
ValueError: images do not match
```
* OS: Linux
* Python: Python 3.10.12
* Pillow: pillow==10.2.0
| Thank you for reporting an issue.
Please include a self-contained, copy-pastable example that generates the issue if possible. Be concise with code posted. Guidelines on how to provide a good bug report:
* https://stackoverflow.com/help/mcve
Bug reports which follow these guidelines are easier to diagnose, and are often handled much more quickly.
Please include **code** that reproduces the issue and whenever possible, an **image** that demonstrates the issue. Please upload images to GitHub, not to third-party file hosting sites. If necessary, add the image to a zip or tar archive.
The best reproductions are self-contained scripts with minimal dependencies.
Looks like this commit is the culprit: 55c5587437669389bd7b0044753b47ca43afe59e
Yes, that would be the cause - but rather than just undoing that change, it would be better to adjust it, to both reduce filesize and to fix your problem. The quickest way of understanding how to do that would be for you to post a self-contained example of your problem.
Here's a repo to reproduce the bug:
https://github.com/alanhamlett/pillow-issue-7777
Thanks.
0.png, 4.png and 5.png are 120px wide.
1.png, 2.png and 3.png are 108px wide.
The images you are using to create your GIF are not all the same size. So, as error says, the images do not match.
If you change them to all be the same size, the error goes away.
Got it, so it should have raised that exception in previous versions too. Thanks!
Actually, looks like animated GIF format supports images of different sizes. Should Pillow also? | 2024-02-05T08:20:06Z | 2024-03-01T10:14:06Z | ["Tests/test_file_gif.py::test_dispose_none", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_gif.py::test_context_manager", "Tests/test_file_gif.py::test_seek_info", "Tests/test_file_gif.py::test_append_images", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Tests/test_file_gif.py::test_l_mode_after_rgb", "Tests/test_file_gif.py::test_seek_rewind", "Tests/test_file_gif.py::test_version", "Tests/test_file_gif.py::test_lzw_bits", "Tests/test_file_gif.py::test_save_dispose", "Tests/test_file_gif.py::test_dispose_previous", "Tests/test_file_gif.py::test_number_of_loops", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration2]", "Tests/test_file_gif.py::test_sanity", "Tests/test_file_gif.py::test_background", "Tests/test_file_gif.py::test_seek", "Tests/test_file_gif.py::test_n_frames[Tests/images/hopper.gif-1]", "Tests/test_file_gif.py::test_missing_background", "Tests/test_file_gif.py::test_dispose2_palette", "Tests/test_file_gif.py::test_optimize_correctness[128-513-256]", "Tests/test_file_gif.py::test_eoferror", "Tests/test_file_gif.py::test_dispose_background", "Tests/test_file_gif.py::test_palette_save_all_P", "Tests/test_file_gif.py::test_identical_frames", "Tests/test_file_gif.py::test_webp_background", "Tests/test_file_gif.py::test_roundtrip_save_all", "Tests/test_file_gif.py::test_optimize_correctness[129-511-129]", "Tests/test_file_gif.py::test_optimize_correctness[128-511-128]", "Tests/test_file_gif.py::test_no_change", "Tests/test_file_gif.py::test_optimize_correctness[4-513-256]", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd.gif-RGB]", "Tests/test_file_gif.py::test_extents", "Tests/test_file_gif.py::test_dispose_background_transparency", "Tests/test_file_gif.py::test_optimize_correctness[255-511-255]", "Tests/test_file_gif.py::test_optimize_correctness[256-511-256]", "Tests/test_file_gif.py::test_palette_handling", "Tests/test_file_gif.py::test_palette_save_duplicate_entries", "Tests/test_file_gif.py::test_comment", "Tests/test_file_gif.py::test_multiple_duration", "Tests/test_file_gif.py::test_read_multiple_comment_blocks", "Tests/test_file_gif.py::test_previous_frame_loaded", "Tests/test_file_gif.py::test_roundtrip_info_duration_combined", "Tests/test_file_gif.py::test_empty_string_comment", "Tests/test_file_gif.py::test_n_frames[Tests/images/comment_after_last_frame.gif-2]", "Tests/test_file_gif.py::test_transparent_dispose[1-expected_colors1]", "Tests/test_file_gif.py::test_optimize_full_l", "Tests/test_file_gif.py::test_full_palette_second_frame", "Tests/test_file_gif.py::test_invalid_file", "Tests/test_file_gif.py::test_removed_transparency", "Tests/test_file_gif.py::test_roundtrip_info_duration", "Tests/test_file_gif.py::test_optimize_correctness[64-511-64]", "Tests/test_file_gif.py::test_no_transparency_in_second_frame", "Tests/test_file_gif.py::test_palette_not_needed_for_second_frame", "Tests/test_file_gif.py::test_save_I", "Tests/test_file_gif.py::test_optimize_correctness[64-513-256]", "Tests/test_file_gif.py::test_transparent_optimize", "Tests/test_file_gif.py::test_optimize_if_palette_can_be_reduced_by_half", "Tests/test_file_gif.py::test_comment_over_255", "Tests/test_file_gif.py::test_l_mode_transparency", "Tests/test_file_gif.py::test_unclosed_file", "Tests/test_file_gif.py::test_n_frames[Tests/images/iss634.gif-42]", "Tests/test_file_gif.py::test_dispose_previous_first_frame", "Tests/test_file_gif.py::test_optimize_correctness[4-511-4]", "Tests/test_file_gif.py::test_rgb_transparency", "Tests/test_file_gif.py::test_retain_comment_in_subsequent_frames", "Tests/test_file_gif.py::test_duration", "Tests/test_file_gif.py::test_first_frame_transparency", "Tests/test_file_gif.py::test_palette_434", "Tests/test_file_gif.py::test_palette_save_P", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd_rgba.gif-RGBA]", "Tests/test_file_gif.py::test_loop_none", "Tests/test_file_gif.py::test_palette_save_L", "Tests/test_file_gif.py::test_zero_comment_subblocks", "Tests/test_file_gif.py::test_roundtrip", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[1500]", "Tests/test_file_gif.py::test_closed_file", "Tests/test_file_gif.py::test_strategy", "Tests/test_file_gif.py::test_bbox_alpha", "Tests/test_file_gif.py::test_saving_rgba", "Tests/test_file_gif.py::test_optimize", "Tests/test_file_gif.py::test_roundtrip_save_all_1", "Tests/test_file_gif.py::test_dispose2_background", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration1]", "Tests/test_file_gif.py::test_seek_after_close", "Tests/test_file_gif.py::test_roundtrip2", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration0]", "Tests/test_file_gif.py::test_rgba_transparency", "Tests/test_file_gif.py::test_remapped_transparency", "Tests/test_file_gif.py::test_palette_save_ImagePalette", "Tests/test_file_gif.py::test_dispose2_background_frame", "Tests/test_file_gif.py::test_background_outside_palettte", "Tests/test_file_gif.py::test_headers_saving_for_animated_gifs", "Tests/test_file_gif.py::test_bbox", "Tests/test_file_gif.py::test_getdata", "Tests/test_file_gif.py::test_dispose_none_load_end", "Tests/test_file_gif.py::test_dispose2_diff"] | [] | ["Tests/test_file_gif.py::test_append_different_size_image"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.3", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.4.3", "distlib==0.3.8", "filelock==3.13.1", "iniconfig==2.0.0", "packaging==23.2", "platformdirs==4.2.0", "pluggy==1.4.0", "pyproject-api==1.6.1", "pytest==8.0.2", "pytest-cov==4.1.0", "setuptools==75.1.0", "tox==4.13.0", "virtualenv==20.25.1", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7654 | 109c6bf6c0abc00c37b0819ebd573390647692e4 | diff --git a/src/PIL/TiffImagePlugin.py b/src/PIL/TiffImagePlugin.py
index fc242ca64c2..e9db64e5fc5 100644
--- a/src/PIL/TiffImagePlugin.py
+++ b/src/PIL/TiffImagePlugin.py
@@ -1705,20 +1705,23 @@ def _save(im, fp, filename):
ifd[COLORMAP] = colormap
# data orientation
stride = len(bits) * ((im.size[0] * bits[0] + 7) // 8)
- # aim for given strip size (64 KB by default) when using libtiff writer
- if libtiff:
- im_strip_size = encoderinfo.get("strip_size", STRIP_SIZE)
- rows_per_strip = 1 if stride == 0 else min(im_strip_size // stride, im.size[1])
- # JPEG encoder expects multiple of 8 rows
- if compression == "jpeg":
- rows_per_strip = min(((rows_per_strip + 7) // 8) * 8, im.size[1])
- else:
- rows_per_strip = im.size[1]
- if rows_per_strip == 0:
- rows_per_strip = 1
- strip_byte_counts = 1 if stride == 0 else stride * rows_per_strip
- strips_per_image = (im.size[1] + rows_per_strip - 1) // rows_per_strip
- ifd[ROWSPERSTRIP] = rows_per_strip
+ if ROWSPERSTRIP not in ifd:
+ # aim for given strip size (64 KB by default) when using libtiff writer
+ if libtiff:
+ im_strip_size = encoderinfo.get("strip_size", STRIP_SIZE)
+ rows_per_strip = (
+ 1 if stride == 0 else min(im_strip_size // stride, im.size[1])
+ )
+ # JPEG encoder expects multiple of 8 rows
+ if compression == "jpeg":
+ rows_per_strip = min(((rows_per_strip + 7) // 8) * 8, im.size[1])
+ else:
+ rows_per_strip = im.size[1]
+ if rows_per_strip == 0:
+ rows_per_strip = 1
+ ifd[ROWSPERSTRIP] = rows_per_strip
+ strip_byte_counts = 1 if stride == 0 else stride * ifd[ROWSPERSTRIP]
+ strips_per_image = (im.size[1] + ifd[ROWSPERSTRIP] - 1) // ifd[ROWSPERSTRIP]
if strip_byte_counts >= 2**16:
ifd.tagtype[STRIPBYTECOUNTS] = TiffTags.LONG
ifd[STRIPBYTECOUNTS] = (strip_byte_counts,) * (strips_per_image - 1) + (
| diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py
index 0851796d000..0737c8a2af2 100644
--- a/Tests/test_file_tiff.py
+++ b/Tests/test_file_tiff.py
@@ -612,6 +612,14 @@ def test_roundtrip_tiff_uint16(self, tmp_path):
assert_image_equal_tofile(im, tmpfile)
+ def test_rowsperstrip(self, tmp_path):
+ outfile = str(tmp_path / "temp.tif")
+ im = hopper()
+ im.save(outfile, tiffinfo={278: 256})
+
+ with Image.open(outfile) as im:
+ assert im.tag_v2[278] == 256
+
def test_strip_raw(self):
infile = "Tests/images/tiff_strip_raw.tif"
with Image.open(infile) as im:
diff --git a/Tests/test_file_tiff_metadata.py b/Tests/test_file_tiff_metadata.py
index edd57e6b54d..1a814d97eb9 100644
--- a/Tests/test_file_tiff_metadata.py
+++ b/Tests/test_file_tiff_metadata.py
@@ -123,6 +123,7 @@ def test_write_metadata(tmp_path):
"""Test metadata writing through the python code"""
with Image.open("Tests/images/hopper.tif") as img:
f = str(tmp_path / "temp.tiff")
+ del img.tag[278]
img.save(f, tiffinfo=img.tag)
original = img.tag_v2.named()
@@ -159,6 +160,7 @@ def test_change_stripbytecounts_tag_type(tmp_path):
out = str(tmp_path / "temp.tiff")
with Image.open("Tests/images/hopper.tif") as im:
info = im.tag_v2
+ del info[278]
# Resize the image so that STRIPBYTECOUNTS will be larger than a SHORT
im = im.resize((500, 500))
| TiffImagePlugin doesn't honor the ROWSPERSTRIP tag value
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/questions/tagged/python-imaging-library
Do not ask a question in both places.
If you think you have found a bug or have an unexplained exception
then file a bug report here.
2. Bug report: include a self-contained, copy-pastable example that
generates the issue if possible. Be concise with code posted.
Guidelines on how to provide a good bug report:
* https://stackoverflow.com/help/mcve
Bug reports which follow these guidelines are easier to diagnose,
and are often handled much more quickly.
3. Feature request: do a quick search of existing issues
to make sure this has not been asked before.
We know asking good questions takes effort, and we appreciate your time.
Thank you.
-->
### What did you do?
I tried to save a PIL.Image.Image (mode=RGBA, size=335x333, 8 bits per sample) to a TIFF file with LZW compression and 9 rows per strip.
```python
img.save('output.tiff', compression='tiff_lzw', tiffinfo={278: 9})
```
### What did you expect to happen?
The file to be saved as a TIFF file with LZW compression and 9 rows per strip.
### What actually happened?
The file was saved as a TIFF file with LZW compression and 48 rows per strip.
### What are your OS, Python and Pillow versions?
* OS: Windows 10 64-bit
* Python: 3.9.5
* Pillow: 9.2.0
<!--
Please include **code** that reproduces the issue and whenever possible, an **image** that demonstrates the issue. Please upload images to GitHub, not to third-party file hosting sites. If necessary, add the image to a zip or tar archive.
The best reproductions are self-contained scripts with minimal dependencies. If you are using a framework such as Plone, Django, or Buildout, try to replicate the issue just using Pillow.
-->
| As context, ROWSPERSTRIP has been set by TiffImagePlugin since PIL.
If I make a change to allow ROWSPERSTRIP to be set by the user, the following test code starts failing.
https://github.com/python-pillow/Pillow/blob/53b6e5f4bf9a6a68e29109c457b12d17761d0035/Tests/test_file_tiff_metadata.py#L124-L128
The error is
https://github.com/python-pillow/Pillow/blob/53b6e5f4bf9a6a68e29109c457b12d17761d0035/src/PIL/TiffImagePlugin.py#L906
@radarhere, thanks.
Opening an image with a certain number of rows per strip and just saving it without any manipulation and with the same tags:
```Python
sourceimg = Image.open('input.tiff')
tiffinfo = sourceimg.tag_v2
sourceimg.save('output', tiffinfo=tiffinfo)
```
then the saved image will have a different number of rows per strip.
Anyway, changing the TiffImagePlugin.ROWSPERSTRIP tag number to another bogus non conflicting tag number, e.g. 10, it is possible to trick the TiffImagePlugin, so it will write its calculated value of the rows per strip to such bogus tag number 10 so the tiff library will use the rows per strip provided by the tiffinfo:
```Python
sourceimg = Image.open('input.tiff')
tiffinfo = sourceimg.tag_v2
TiffImagePlugin.ROWSPERSTRIP = 10
sourceimg.save('output', tiffinfo=tiffinfo)
```
However, this is not a complete workaround, as the saved image will have a spurious tag number 10.
Changing `TiffImagePlugin.ROWSPERSTRIP` is an inventive idea, but I think it might break reading TIFF files afterwards.
If you're looking for a workaround, see what you think of this.
```python
from PIL import Image, TiffImagePlugin
def setRowsPerStrip(im, rows_per_strip):
TiffImagePlugin.WRITE_LIBTIFF = True
bits = TiffImagePlugin.SAVE_INFO[im.mode][4]
stride = len(bits) * ((im.size[0] * bits[0] + 7) // 8)
TiffImagePlugin.STRIP_SIZE = rows_per_strip * stride
im = Image.open("Tests/images/hopper.tif")
setRowsPerStrip(im, 110)
im.save("out.tif")
``` | 2023-12-29T12:05:58Z | 2023-12-31T15:29:26Z | ["Tests/test_file_tiff.py::TestFileTiff::test_getxmp", "Tests/test_file_tiff.py::TestFileTiff::test_dict", "Tests/test_file_tiff.py::TestFileTiff::test_tiled_planar_raw", "Tests/test_file_tiff.py::TestFileTiff::test_save_rgba", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[True]", "Tests/test_file_tiff_metadata.py::test_ifd_signed_rational", "Tests/test_file_tiff_metadata.py::test_photoshop_info", "Tests/test_file_tiff.py::TestFileTiff::test_oom[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw", "Tests/test_file_tiff.py::TestFileTiff::test_mac_tiff", "Tests/test_file_tiff.py::TestFileTiff::test_eoferror", "Tests/test_file_tiff.py::TestFileTiff::test_saving_icc_profile", "Tests/test_file_tiff.py::TestFileTiff::test_palette[P]", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[3-184.912]", "Tests/test_file_tiff_metadata.py::test_empty_values", "Tests/test_file_tiff.py::TestFileTiff::test_unclosed_file", "Tests/test_file_tiff.py::TestFileTiff::test_context_manager", "Tests/test_file_tiff.py::TestFileTiff::test_gray_semibyte_per_pixel", "Tests/test_file_tiff.py::TestFileTiff::test_exif_frames", "Tests/test_file_tiff.py::TestFileTiff::test_load_float", "Tests/test_file_tiff.py::TestFileTiff::test_save_bmp_compression", "Tests/test_file_tiff.py::TestFileTiff::test_timeout", "Tests/test_file_tiff_metadata.py::test_ifd_unsigned_rational", "Tests/test_file_tiff_metadata.py::test_iccprofile_binary", "Tests/test_file_tiff.py::TestFileTiff::test_unknown_pixel_mode", "Tests/test_file_tiff.py::TestFileTiff::test_big_endian", "Tests/test_file_tiff.py::TestFileTiff::test_8bit_s", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[1]", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_r", "Tests/test_file_tiff.py::TestFileTiff::test_save_setting_missing_resolution", "Tests/test_file_tiff.py::TestFileTiff::test_int_resolution", "Tests/test_file_tiff.py::TestFileTiff::test_closed_file", "Tests/test_file_tiff.py::TestFileTiff::test_tiff_save_all", "Tests/test_file_tiff.py::TestFileTiff::test_with_underscores", "Tests/test_file_tiff.py::TestFileTiff::test_strip_planar_raw_with_overviews", "Tests/test_file_tiff.py::TestFileTiff::test_16bit_s", "Tests/test_file_tiff.py::TestFileTiff::test_32bit_float", "Tests/test_file_tiff.py::TestFileTiff::test_load_string", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[None-72.8]", "Tests/test_file_tiff.py::TestFileTiff::test_save_unsupported_mode", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_tiff", "Tests/test_file_tiff.py::TestFileTiff::test_set_legacy_api", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_bytes[value1]", "Tests/test_file_tiff_metadata.py::test_empty_metadata", "Tests/test_file_tiff.py::TestFileTiff::test_invalid_file", "Tests/test_file_tiff_metadata.py::test_write_metadata", "Tests/test_file_tiff.py::TestFileTiff::test_reload_exif_after_seek", "Tests/test_file_tiff.py::TestFileTiff::test_photometric[L]", "Tests/test_file_tiff.py::TestFileTiff::test_little_endian", "Tests/test_file_tiff_metadata.py::test_undefined_zero", "Tests/test_file_tiff.py::TestFileTiff::test_exif", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage-lastframe.tif-1]", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_undefined", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_float", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_nonexclusive", "Tests/test_file_tiff.py::TestFileTiff::test_xyres_fallback_tiff", "Tests/test_file_tiff_metadata.py::test_rt_metadata", "Tests/test_file_tiff.py::TestFileTiff::test_multipage", "Tests/test_file_tiff.py::TestFileTiff::test_bigtiff", "Tests/test_file_tiff.py::TestFileTiff::test_seek", "Tests/test_file_tiff.py::TestFileTiff::test_discard_icc_profile", "Tests/test_file_tiff.py::TestFileTiff::test_load_double", "Tests/test_file_tiff_metadata.py::test_ifd_signed_long", "Tests/test_file_tiff_metadata.py::test_too_many_entries", "Tests/test_file_tiff.py::TestFileTiff::test_close_on_load_exclusive", "Tests/test_file_tiff.py::TestFileTiff::test_planar_configuration_save", "Tests/test_file_tiff.py::TestFileTiff::test_palette[PA]", "Tests/test_file_tiff.py::TestFileTiff::test_load_byte[False]", "Tests/test_file_tiff_metadata.py::test_exif_div_zero", "Tests/test_file_tiff_metadata.py::test_empty_subifd", "Tests/test_file_tiff.py::TestFileTiff::test_strip_raw", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_ascii[1-1]", "Tests/test_file_tiff.py::TestFileTiff::test_seek_after_close", "Tests/test_file_tiff_metadata.py::test_tag_group_data", "Tests/test_file_tiff.py::TestFileTiff::test_4bit", "Tests/test_file_tiff_metadata.py::test_iccprofile", "Tests/test_file_tiff_metadata.py::test_iccprofile_save_png", "Tests/test_file_tiff.py::TestFileTiff::test_get_photoshop_blocks", "Tests/test_file_tiff.py::TestFileTiff::test_modify_exif", "Tests/test_file_tiff.py::TestFileTiff::test_load_float_dpi[2-72.8]", "Tests/test_file_tiff_metadata.py::test_change_stripbytecounts_tag_type", "Tests/test_file_tiff.py::TestFileTiff::test__limit_rational_int", "Tests/test_file_tiff.py::TestFileTiff::test_frame_order", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_bytes[1]", "Tests/test_file_tiff.py::TestFileTiff::test_12bit_rawmode", "Tests/test_file_tiff.py::TestFileTiff::test_ifd_tag_type", "Tests/test_file_tiff.py::TestFileTiff::test_multipage_last_frame", "Tests/test_file_tiff.py::TestFileTiff::test_seek_eof", "Tests/test_file_tiff_metadata.py::test_writing_other_types_to_ascii[test-test]", "Tests/test_file_tiff_metadata.py::test_no_duplicate_50741_tag", "Tests/test_file_tiff.py::TestFileTiff::test_bad_exif", "Tests/test_file_tiff.py::TestFileTiff::test_sanity", "Tests/test_file_tiff.py::TestFileTiff::test_roundtrip_tiff_uint16", "Tests/test_file_tiff.py::TestFileTiff::test_save_float_dpi", "Tests/test_file_tiff.py::TestFileTiff::test__delitem__", "Tests/test_file_tiff.py::TestFileTiff::test_save_icc_profile", "Tests/test_file_tiff.py::TestFileTiff::test___str__", "Tests/test_file_tiff_metadata.py::test_iccprofile_binary_save_png", "Tests/test_file_tiff_metadata.py::test_iptc", "Tests/test_file_tiff.py::TestFileTiff::test_n_frames[Tests/images/multipage.tiff-3]", "Tests/test_file_tiff_metadata.py::test_read_metadata"] | [] | ["Tests/test_file_tiff.py::TestFileTiff::test_rowsperstrip"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.2", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.4.0", "distlib==0.3.8", "filelock==3.13.1", "iniconfig==2.0.0", "packaging==23.2", "platformdirs==4.1.0", "pluggy==1.3.0", "pyproject-api==1.6.1", "pytest==7.4.4", "pytest-cov==4.1.0", "setuptools==75.1.0", "tox==4.11.4", "virtualenv==20.25.0", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7493 | d05ff5059f2bb9a46c512f8d303e8e3f8cc6939e | diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index 771cb33c3de..cb092f1ae1f 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -791,6 +791,9 @@ def frombytes(self, data, decoder_name="raw", *args):
but loads data into this image instead of creating a new image object.
"""
+ if self.width == 0 or self.height == 0:
+ return
+
# may pass tuple instead of argument list
if len(args) == 1 and isinstance(args[0], tuple):
args = args[0]
@@ -2967,15 +2970,16 @@ def frombytes(mode, size, data, decoder_name="raw", *args):
_check_size(size)
- # may pass tuple instead of argument list
- if len(args) == 1 and isinstance(args[0], tuple):
- args = args[0]
+ im = new(mode, size)
+ if im.width != 0 and im.height != 0:
+ # may pass tuple instead of argument list
+ if len(args) == 1 and isinstance(args[0], tuple):
+ args = args[0]
- if decoder_name == "raw" and args == ():
- args = mode
+ if decoder_name == "raw" and args == ():
+ args = mode
- im = new(mode, size)
- im.frombytes(data, decoder_name, args)
+ im.frombytes(data, decoder_name, args)
return im
| diff --git a/Tests/test_image.py b/Tests/test_image.py
index 83dac70802f..039eb33d1ef 100644
--- a/Tests/test_image.py
+++ b/Tests/test_image.py
@@ -906,6 +906,13 @@ def test_zero_tobytes(self, size):
im = Image.new("RGB", size)
assert im.tobytes() == b""
+ @pytest.mark.parametrize("size", ((1, 0), (0, 1), (0, 0)))
+ def test_zero_frombytes(self, size):
+ Image.frombytes("RGB", size, b"")
+
+ im = Image.new("RGB", size)
+ im.frombytes(b"")
+
def test_has_transparency_data(self):
for mode in ("1", "L", "P", "RGB"):
im = Image.new(mode, (1, 1))
| `Image.frombytes` throws on empty image
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/questions/tagged/python-imaging-library
Do not ask a question in both places.
If you think you have found a bug or have an unexplained exception
then file a bug report here.
2. Bug report: include a self-contained, copy-pastable example that
generates the issue if possible. Be concise with code posted.
Guidelines on how to provide a good bug report:
* https://stackoverflow.com/help/mcve
Bug reports which follow these guidelines are easier to diagnose,
and are often handled much more quickly.
3. Feature request: do a quick search of existing issues
to make sure this has not been asked before.
We know asking good questions takes effort, and we appreciate your time.
Thank you.
-->
### What did you do?
I have some code I use to render text as images. When trying to render an empty string, it fails on `Image.frombytes`
### What did you expect to happen?
I expected `Image.frombytes` with size `(0, 0)` and bytes `[]` (as a numpy array of uint8) to successfully yield an empty image.
### What actually happened?
An exception is thrown:
```pytb
Traceback (most recent call last):
File "/home/devin/Desktop/pyblox/netsblox/turtle.py", line 89, in wrapped
fn(*args, **kwargs)
File "/home/devin/Desktop/pyblox/netsblox/turtle.py", line 119, in wrapped
return f(*args, **kwargs)
File "<stdin>", line 34, in my_onstart
File "/home/devin/Desktop/pyblox/netsblox/turtle.py", line 1250, in say
imgs = [_render_text(x, size = 8, color = (0, 0, 0)) for x in lines]
File "/home/devin/Desktop/pyblox/netsblox/turtle.py", line 1250, in <listcomp>
imgs = [_render_text(x, size = 8, color = (0, 0, 0)) for x in lines]
File "/home/devin/Desktop/pyblox/netsblox/turtle.py", line 80, in _render_text
text_mask = Image.frombytes('L', text_mask.size, _np.array(text_mask).astype(_np.uint8)) # convert ImagingCore to Image
File "/home/devin/.local/lib/python3.8/site-packages/PIL/Image.py", line 2976, in frombytes
im.frombytes(data, decoder_name, args)
File "/home/devin/.local/lib/python3.8/site-packages/PIL/Image.py", line 804, in frombytes
d.setimage(self.im)
ValueError: tile cannot extend outside image
```
### What are your OS, Python and Pillow versions?
* OS: Linux Mint 20
* Python: 3.8.10
* Pillow: 10.1.0
<!--
Please include **code** that reproduces the issue and whenever possible, an **image** that demonstrates the issue. Please upload images to GitHub, not to third-party file hosting sites. If necessary, add the image to a zip or tar archive.
The best reproductions are self-contained scripts with minimal dependencies. If you are using a framework such as Plone, Django, or Buildout, try to replicate the issue just using Pillow.
-->
```python
font = ImageFont.truetype('example-font.otf')
text = ''
color = (0, 0, 0)
text_mask = font.getmask(text, mode = 'L')
text_mask = Image.frombytes('L', text_mask.size, _np.array(text_mask).astype(_np.uint8)) # fails here with exception
```
| Looks like I constructed a minimal example incorrectly. The issue was actually from trying to render empty string, due to a pagination step in between getting the text and rendering it. In that case, the issue would actually be that `Image.frombytes` throws an error when initializing it with size `(0, 0)` and bytes `[]`. It seems like this should just successfully return an empty image.
**updated the issue report** | 2023-10-24T21:57:40Z | 2023-11-03T07:56:35Z | ["Tests/test_image.py::TestImage::test_dump", "Tests/test_image.py::TestImage::test_load_on_nonexclusive_multiframe", "Tests/test_image.py::TestImage::test_empty_image[size0]", "Tests/test_image.py::TestImage::test_linear_gradient[L]", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;16]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16N]", "Tests/test_image.py::TestImage::test_exif_load_from_fp", "Tests/test_image.py::TestImage::test_overrun[01r_00.pcx]", "Tests/test_image.py::TestImage::test_storage_neg", "Tests/test_image.py::TestImage::test_exif_jpeg", "Tests/test_image.py::TestImage::test_radial_gradient[F]", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun.bin]", "Tests/test_image.py::TestImage::test_one_item_tuple", "Tests/test_image.py::TestImage::test_radial_gradient[I]", "Tests/test_image.py::TestImage::test_exif_png", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow.bin]", "Tests/test_image.py::TestImage::test_image_modes_success[CMYK]", "Tests/test_image.py::TestImage::test_exception_inheritance", "Tests/test_image.py::TestImage::test_image_modes_success[RGBa]", "Tests/test_image.py::TestImage::test_radial_gradient[P]", "Tests/test_image.py::TestImage::test_effect_spread_zero", "Tests/test_image.py::TestImage::test_no_new_file_on_error", "Tests/test_image.py::TestImage::test_image_modes_success[RGB]", "Tests/test_image.py::TestImage::test_getbands", "Tests/test_image.py::TestImage::test_overrun[sgi_overrun_expandrow2.bin]", "Tests/test_image.py::TestImage::test_getbbox", "Tests/test_image.py::TestImage::test_image_modes_success[I;16]", "Tests/test_image.py::TestImage::test_unknown_extension", "Tests/test_image.py::TestImage::test_exif_hide_offsets", "Tests/test_image.py::TestImage::test_image_modes_success[F]", "Tests/test_image.py::TestImage::test_readonly_save", "Tests/test_image.py::TestImage::test_remap_palette_transparency", "Tests/test_image.py::TestImage::test_getchannel", "Tests/test_image.py::TestImage::test_exif_ifd1", "Tests/test_image.py::TestImage::test_internals", "Tests/test_image.py::TestImage::test_image_modes_fail[very very long]", "Tests/test_image.py::TestImage::test_register_open_duplicates", "Tests/test_image.py::TestImage::test_overrun[ossfuzz-4836216264589312.pcx]", "Tests/test_image.py::TestImage::test_zero_tobytes[size0]", "Tests/test_image.py::TestImage::test_image_modes_success[I]", "Tests/test_image.py::TestImage::test_image_modes_success[RGBA]", "Tests/test_image.py::TestImage::test_getchannel_wrong_params", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun.bin]", "Tests/test_image.py::TestImage::test_effect_mandelbrot_bad_arguments", "Tests/test_image.py::TestImage::test_registered_extensions", "Tests/test_image.py::TestImage::test_image_modes_fail[]", "Tests/test_image.py::TestRegistry::test_encode_registry", "Tests/test_image.py::TestImage::test_register_extensions", "Tests/test_image.py::TestImage::test_linear_gradient[P]", "Tests/test_image.py::TestImage::test_effect_mandelbrot", "Tests/test_image.py::TestImage::test_set_mode", "Tests/test_image.py::TestImage::test_width_height", "Tests/test_image.py::TestImage::test_stringio", "Tests/test_image.py::TestImage::test_fp_name", "Tests/test_image.py::TestImage::test_radial_gradient[L]", "Tests/test_image.py::TestImage::test_p_from_rgb_rgba", "Tests/test_image.py::TestImage::test_invalid_image", "Tests/test_image.py::TestImage::test_overrun[fli_overrun.bin]", "Tests/test_image.py::TestRegistry::test_encode_registry_fail", "Tests/test_image.py::TestImage::test_image_modes_success[LAB]", "Tests/test_image.py::TestImage::test_image_modes_success[HSV]", "Tests/test_image.py::TestImage::test_comparison_with_other_type", "Tests/test_image.py::TestImage::test_empty_image[size1]", "Tests/test_image.py::TestImage::test_sanity", "Tests/test_image.py::TestImage::test_fli_overrun2", "Tests/test_image.py::TestImage::test_alpha_composite", "Tests/test_image.py::TestImage::test_apply_transparency", "Tests/test_image.py::TestImage::test_image_modes_success[L]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16B]", "Tests/test_image.py::TestImage::test_check_size", "Tests/test_image.py::TestImage::test__new", "Tests/test_image.py::TestImage::test_overrun[pcx_overrun2.bin]", "Tests/test_image.py::TestImage::test_ne", "Tests/test_image.py::TestImage::test_repr_pretty", "Tests/test_image.py::TestImage::test_image_modes_success[LA]", "Tests/test_image.py::TestImage::test_linear_gradient[I]", "Tests/test_image.py::TestImage::test_zero_tobytes[size1]", "Tests/test_image.py::TestImage::test_has_transparency_data", "Tests/test_image.py::TestImage::test_image_modes_fail[bad]", "Tests/test_image.py::TestImage::test_zero_tobytes[size2]", "Tests/test_image.py::TestImage::test_no_resource_warning_on_save", "Tests/test_image.py::TestImage::test_expand_x", "Tests/test_image.py::TestImage::test_exif_interop", "Tests/test_image.py::TestImage::test_effect_spread", "Tests/test_image.py::TestImage::test_bad_mode", "Tests/test_image.py::TestImage::test_effect_noise", "Tests/test_image.py::TestImage::test_remap_palette", "Tests/test_image.py::TestImage::test_linear_gradient_wrong_mode", "Tests/test_image.py::TestImage::test_image_modes_success[RGBX]", "Tests/test_image.py::TestImage::test_open_formats", "Tests/test_image.py::TestImage::test_image_modes_success[P]", "Tests/test_image.py::TestImage::test_image_modes_success[1]", "Tests/test_image.py::TestImage::test_image_modes_success[I;16L]", "Tests/test_image.py::TestImage::test_constants", "Tests/test_image.py::TestImage::test_exif_ifd", "Tests/test_image.py::TestImage::test_radial_gradient_wrong_mode", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;24]", "Tests/test_image.py::TestImage::test_image_modes_success[PA]", "Tests/test_image.py::TestImage::test_linear_gradient[F]", "Tests/test_image.py::TestImage::test_alpha_inplace", "Tests/test_image.py::TestImage::test_expand_xy", "Tests/test_image.py::TestImage::test_registered_extensions_uninitialized", "Tests/test_image.py::TestImage::test_empty_exif", "Tests/test_image.py::TestImage::test_image_modes_success[YCbCr]", "Tests/test_image.py::TestImage::test_image_modes_success[La]", "Tests/test_image.py::TestImage::test_tempfile", "Tests/test_image.py::TestImage::test_image_modes_success[BGR;15]"] | [] | ["Tests/test_image.py::TestImage::test_zero_frombytes[size1]", "Tests/test_image.py::TestImage::test_zero_frombytes[size2]", "Tests/test_image.py::TestImage::test_zero_frombytes[size0]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.2", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.3.2", "distlib==0.3.7", "filelock==3.13.1", "iniconfig==2.0.0", "packaging==23.2", "platformdirs==3.11.0", "pluggy==1.3.0", "pyproject-api==1.6.1", "pytest==7.4.3", "pytest-cov==4.1.0", "setuptools==75.1.0", "tox==4.11.3", "virtualenv==20.24.6", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
python-pillow/Pillow | python-pillow__Pillow-7481 | a10dec01b5a3f63c43f7095dbc7aec5658aad251 | diff --git a/CHANGES.rst b/CHANGES.rst
index d2f2bb46231..f4d11ba48e6 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -2191,7 +2191,7 @@ Changelog (Pillow)
- Cache EXIF information #3498
[Glandos]
-- Added transparency for all PNG greyscale modes #3744
+- Added transparency for all PNG grayscale modes #3744
[radarhere]
- Fix deprecation warnings in Python 3.8 #3749
@@ -4693,7 +4693,7 @@ Changelog (Pillow)
- Fix Bicubic interpolation #970
[homm]
-- Support for 4-bit greyscale TIFF images #980
+- Support for 4-bit grayscale TIFF images #980
[hugovk]
- Updated manifest #957
@@ -6768,7 +6768,7 @@ The test suite includes 750 individual tests.
- You can now convert directly between all modes supported by
PIL. When converting colour images to "P", PIL defaults to
- a "web" palette and dithering. When converting greyscale
+ a "web" palette and dithering. When converting grayscale
images to "1", PIL uses a thresholding and dithering.
- Added a "dither" option to "convert". By default, "convert"
@@ -6846,13 +6846,13 @@ The test suite includes 530 individual tests.
- Fixed "paste" to allow a mask also for mode "F" images.
- The BMP driver now saves mode "1" images. When loading images, the mode
- is set to "L" for 8-bit files with greyscale palettes, and to "P" for
+ is set to "L" for 8-bit files with grayscale palettes, and to "P" for
other 8-bit files.
- The IM driver now reads and saves "1" images (file modes "0 1" or "L 1").
- The JPEG and GIF drivers now saves "1" images. For JPEG, the image
- is saved as 8-bit greyscale (it will load as mode "L"). For GIF, the
+ is saved as 8-bit grayscale (it will load as mode "L"). For GIF, the
image will be loaded as a "P" image.
- Fixed a potential buffer overrun in the GIF encoder.
@@ -7156,7 +7156,7 @@ The test suite includes 400 individual tests.
drawing capabilities can be used to render vector and metafile
formats.
-- Added restricted drivers for images from Image Tools (greyscale
+- Added restricted drivers for images from Image Tools (grayscale
only) and LabEye/IFUNC (common interchange modes only).
- Some minor improvements to the sample scripts provided in the
diff --git a/Tests/images/apng/mode_greyscale.png b/Tests/images/apng/mode_grayscale.png
similarity index 100%
rename from Tests/images/apng/mode_greyscale.png
rename to Tests/images/apng/mode_grayscale.png
diff --git a/Tests/images/apng/mode_greyscale_alpha.png b/Tests/images/apng/mode_grayscale_alpha.png
similarity index 100%
rename from Tests/images/apng/mode_greyscale_alpha.png
rename to Tests/images/apng/mode_grayscale_alpha.png
diff --git a/Tests/images/hopper_rle8_greyscale.bmp b/Tests/images/hopper_rle8_grayscale.bmp
similarity index 100%
rename from Tests/images/hopper_rle8_greyscale.bmp
rename to Tests/images/hopper_rle8_grayscale.bmp
diff --git a/docs/handbook/tutorial.rst b/docs/handbook/tutorial.rst
index 2fbce86d4b6..d79f2465f16 100644
--- a/docs/handbook/tutorial.rst
+++ b/docs/handbook/tutorial.rst
@@ -26,7 +26,7 @@ image. If the image was not read from a file, it is set to None. The size
attribute is a 2-tuple containing width and height (in pixels). The
:py:attr:`~PIL.Image.Image.mode` attribute defines the number and names of the
bands in the image, and also the pixel type and depth. Common modes are “L”
-(luminance) for greyscale images, “RGB” for true color images, and “CMYK” for
+(luminance) for grayscale images, “RGB” for true color images, and “CMYK” for
pre-press images.
If the file cannot be opened, an :py:exc:`OSError` exception is raised.
@@ -599,7 +599,7 @@ Controlling the decoder
Some decoders allow you to manipulate the image while reading it from a file.
This can often be used to speed up decoding when creating thumbnails (when
speed is usually more important than quality) and printing to a monochrome
-laser printer (when only a greyscale version of the image is needed).
+laser printer (when only a grayscale version of the image is needed).
The :py:meth:`~PIL.Image.Image.draft` method manipulates an opened but not yet
loaded image so it as closely as possible matches the given mode and size. This
diff --git a/docs/handbook/writing-your-own-image-plugin.rst b/docs/handbook/writing-your-own-image-plugin.rst
index ad1bf7f9523..956d63aa771 100644
--- a/docs/handbook/writing-your-own-image-plugin.rst
+++ b/docs/handbook/writing-your-own-image-plugin.rst
@@ -45,7 +45,7 @@ Example
The following plugin supports a simple format, which has a 128-byte header
consisting of the words “SPAM” followed by the width, height, and pixel size in
bits. The header fields are separated by spaces. The image data follows
-directly after the header, and can be either bi-level, greyscale, or 24-bit
+directly after the header, and can be either bi-level, grayscale, or 24-bit
true color.
**SpamImagePlugin.py**::
@@ -211,9 +211,9 @@ table describes some commonly used **raw modes**:
| ``1;R`` | | 1-bit reversed bilevel, stored with the leftmost pixel in the |
| | | least significant bit. 0 means black, 1 means white. |
+-----------+-------------------------------------------------------------------+
-| ``L`` | 8-bit greyscale. 0 means black, 255 means white. |
+| ``L`` | 8-bit grayscale. 0 means black, 255 means white. |
+-----------+-------------------------------------------------------------------+
-| ``L;I`` | 8-bit inverted greyscale. 0 means white, 255 means black. |
+| ``L;I`` | 8-bit inverted grayscale. 0 means white, 255 means black. |
+-----------+-------------------------------------------------------------------+
| ``P`` | 8-bit palette-mapped image. |
+-----------+-------------------------------------------------------------------+
diff --git a/docs/reference/ImageColor.rst b/docs/reference/ImageColor.rst
index 20237eccf78..31faeac788b 100644
--- a/docs/reference/ImageColor.rst
+++ b/docs/reference/ImageColor.rst
@@ -59,7 +59,7 @@ Functions
.. py:method:: getcolor(color, mode)
Same as :py:func:`~PIL.ImageColor.getrgb`, but converts the RGB value to a
- greyscale value if the mode is not color or a palette image. If the string
+ grayscale value if the mode is not color or a palette image. If the string
cannot be parsed, this function raises a :py:exc:`ValueError` exception.
.. versionadded:: 1.1.4
diff --git a/docs/reference/ImageEnhance.rst b/docs/reference/ImageEnhance.rst
index 457f0d4df1b..529acad4a91 100644
--- a/docs/reference/ImageEnhance.rst
+++ b/docs/reference/ImageEnhance.rst
@@ -58,7 +58,7 @@ method:
This class can be used to control the contrast of an image, similar to the
contrast control on a TV set. An
- :ref:`enhancement factor <enhancement-factor>` of 0.0 gives a solid grey
+ :ref:`enhancement factor <enhancement-factor>` of 0.0 gives a solid gray
image, a factor of 1.0 gives the original image, and greater values
increase the contrast of the image.
diff --git a/docs/reference/ImageMath.rst b/docs/reference/ImageMath.rst
index 118d988d6d4..ee07efa0132 100644
--- a/docs/reference/ImageMath.rst
+++ b/docs/reference/ImageMath.rst
@@ -72,7 +72,7 @@ pixel bits.
Note that the operands are converted to 32-bit signed integers before the
bitwise operation is applied. This means that you’ll get negative values if
-you invert an ordinary greyscale image. You can use the and (&) operator to
+you invert an ordinary grayscale image. You can use the and (&) operator to
mask off unwanted bits.
Bitwise operators don’t work on floating point images.
diff --git a/docs/releasenotes/6.1.0.rst b/docs/releasenotes/6.1.0.rst
index 76e13b06172..e7c593e6e63 100644
--- a/docs/releasenotes/6.1.0.rst
+++ b/docs/releasenotes/6.1.0.rst
@@ -29,10 +29,10 @@ API Additions
Image.entropy
^^^^^^^^^^^^^
Calculates and returns the entropy for the image. A bilevel image (mode "1") is treated
-as a greyscale ("L") image by this method. If a mask is provided, the method employs
+as a grayscale ("L") image by this method. If a mask is provided, the method employs
the histogram for those parts of the image where the mask image is non-zero. The mask
image must have the same size as the image, and be either a bi-level image (mode "1") or
-a greyscale image ("L").
+a grayscale image ("L").
ImageGrab.grab
^^^^^^^^^^^^^^
diff --git a/src/PIL/BmpImagePlugin.py b/src/PIL/BmpImagePlugin.py
index 9abfd0b5b8d..ef719e3eca2 100644
--- a/src/PIL/BmpImagePlugin.py
+++ b/src/PIL/BmpImagePlugin.py
@@ -230,21 +230,21 @@ def _bitmap(self, header=0, offset=0):
else:
padding = file_info["palette_padding"]
palette = read(padding * file_info["colors"])
- greyscale = True
+ grayscale = True
indices = (
(0, 255)
if file_info["colors"] == 2
else list(range(file_info["colors"]))
)
- # ----------------- Check if greyscale and ignore palette if so
+ # ----------------- Check if grayscale and ignore palette if so
for ind, val in enumerate(indices):
rgb = palette[ind * padding : ind * padding + 3]
if rgb != o8(val) * 3:
- greyscale = False
+ grayscale = False
- # ------- If all colors are grey, white or black, ditch palette
- if greyscale:
+ # ------- If all colors are gray, white or black, ditch palette
+ if grayscale:
self._mode = "1" if file_info["colors"] == 2 else "L"
raw_mode = self.mode
else:
diff --git a/src/PIL/Image.py b/src/PIL/Image.py
index b493c65b6cb..771cb33c3de 100644
--- a/src/PIL/Image.py
+++ b/src/PIL/Image.py
@@ -878,12 +878,12 @@ def convert(
"L", "RGB" and "CMYK". The ``matrix`` argument only supports "L"
and "RGB".
- When translating a color image to greyscale (mode "L"),
+ When translating a color image to grayscale (mode "L"),
the library uses the ITU-R 601-2 luma transform::
L = R * 299/1000 + G * 587/1000 + B * 114/1000
- The default method of converting a greyscale ("L") or "RGB"
+ The default method of converting a grayscale ("L") or "RGB"
image into a bilevel (mode "1") image uses Floyd-Steinberg
dither to approximate the original image luminosity levels. If
dither is ``None``, all values larger than 127 are set to 255 (white),
@@ -1238,7 +1238,7 @@ def draft(self, mode, size):
Configures the image file loader so it returns a version of the
image that as closely as possible matches the given mode and
size. For example, you can use this method to convert a color
- JPEG to greyscale while loading it.
+ JPEG to grayscale while loading it.
If any changes are made, returns a tuple with the chosen ``mode`` and
``box`` with coordinates of the original image within the altered one.
@@ -1610,13 +1610,13 @@ def histogram(self, mask=None, extrema=None):
than one band, the histograms for all bands are concatenated (for
example, the histogram for an "RGB" image contains 768 values).
- A bilevel image (mode "1") is treated as a greyscale ("L") image
+ A bilevel image (mode "1") is treated as a grayscale ("L") image
by this method.
If a mask is provided, the method returns a histogram for those
parts of the image where the mask image is non-zero. The mask
image must have the same size as the image, and be either a
- bi-level image (mode "1") or a greyscale image ("L").
+ bi-level image (mode "1") or a grayscale image ("L").
:param mask: An optional mask.
:param extrema: An optional tuple of manually-specified extrema.
@@ -1636,13 +1636,13 @@ def entropy(self, mask=None, extrema=None):
"""
Calculates and returns the entropy for the image.
- A bilevel image (mode "1") is treated as a greyscale ("L")
+ A bilevel image (mode "1") is treated as a grayscale ("L")
image by this method.
If a mask is provided, the method employs the histogram for
those parts of the image where the mask image is non-zero.
The mask image must have the same size as the image, and be
- either a bi-level image (mode "1") or a greyscale image ("L").
+ either a bi-level image (mode "1") or a grayscale image ("L").
:param mask: An optional mask.
:param extrema: An optional tuple of manually-specified extrema.
@@ -2876,7 +2876,7 @@ class ImageTransformHandler:
def _wedge():
- """Create greyscale wedge (for debugging only)"""
+ """Create grayscale wedge (for debugging only)"""
return Image()._new(core.wedge("L"))
diff --git a/src/PIL/ImageChops.py b/src/PIL/ImageChops.py
index 70120031797..0255f41b6f7 100644
--- a/src/PIL/ImageChops.py
+++ b/src/PIL/ImageChops.py
@@ -19,7 +19,7 @@
def constant(image, value):
- """Fill a channel with a given grey level.
+ """Fill a channel with a given gray level.
:rtype: :py:class:`~PIL.Image.Image`
"""
diff --git a/src/PIL/ImageColor.py b/src/PIL/ImageColor.py
index befc1fd1d88..894461c831d 100644
--- a/src/PIL/ImageColor.py
+++ b/src/PIL/ImageColor.py
@@ -124,7 +124,7 @@ def getcolor(color, mode):
"""
Same as :py:func:`~PIL.ImageColor.getrgb` for most modes. However, if
``mode`` is HSV, converts the RGB value to a HSV value, or if ``mode`` is
- not color or a palette image, converts the RGB value to a greyscale value.
+ not color or a palette image, converts the RGB value to a grayscale value.
If the string cannot be parsed, this function raises a :py:exc:`ValueError`
exception.
diff --git a/src/PIL/ImageEnhance.py b/src/PIL/ImageEnhance.py
index 3b79d5c46a1..d7fdec262f4 100644
--- a/src/PIL/ImageEnhance.py
+++ b/src/PIL/ImageEnhance.py
@@ -59,7 +59,7 @@ class Contrast(_Enhance):
This class can be used to control the contrast of an image, similar
to the contrast control on a TV set. An enhancement factor of 0.0
- gives a solid grey image. A factor of 1.0 gives the original image.
+ gives a solid gray image. A factor of 1.0 gives the original image.
"""
def __init__(self, image):
diff --git a/src/PIL/ImageOps.py b/src/PIL/ImageOps.py
index 42f2152b39a..6d70f02483d 100644
--- a/src/PIL/ImageOps.py
+++ b/src/PIL/ImageOps.py
@@ -593,7 +593,7 @@ def solarize(image, threshold=128):
Invert all pixel values above a threshold.
:param image: The image to solarize.
- :param threshold: All pixels above this greyscale level are inverted.
+ :param threshold: All pixels above this grayscale level are inverted.
:return: An image.
"""
lut = []
diff --git a/src/PIL/ImageWin.py b/src/PIL/ImageWin.py
index ca9b14c8adf..c7c64b35add 100644
--- a/src/PIL/ImageWin.py
+++ b/src/PIL/ImageWin.py
@@ -54,9 +54,9 @@ class Dib:
"L", "P", or "RGB".
If the display requires a palette, this constructor creates a suitable
- palette and associates it with the image. For an "L" image, 128 greylevels
+ palette and associates it with the image. For an "L" image, 128 graylevels
are allocated. For an "RGB" image, a 6x6x6 colour cube is used, together
- with 20 greylevels.
+ with 20 graylevels.
To make sure that palettes work properly under Windows, you must call the
``palette`` method upon certain events from Windows.
diff --git a/src/PIL/PSDraw.py b/src/PIL/PSDraw.py
index 13b3048f67e..c01534bbf42 100644
--- a/src/PIL/PSDraw.py
+++ b/src/PIL/PSDraw.py
@@ -109,7 +109,7 @@ def image(self, box, im, dpi=None):
if im.mode == "1":
dpi = 200 # fax
else:
- dpi = 100 # greyscale
+ dpi = 100 # grayscale
# image size (on paper)
x = im.size[0] * 72 / dpi
y = im.size[1] * 72 / dpi
diff --git a/src/PIL/PalmImagePlugin.py b/src/PIL/PalmImagePlugin.py
index a88a907917d..606739c8766 100644
--- a/src/PIL/PalmImagePlugin.py
+++ b/src/PIL/PalmImagePlugin.py
@@ -124,7 +124,7 @@ def _save(im, fp, filename):
if im.encoderinfo.get("bpp") in (1, 2, 4):
# this is 8-bit grayscale, so we shift it to get the high-order bits,
# and invert it because
- # Palm does greyscale from white (0) to black (1)
+ # Palm does grayscale from white (0) to black (1)
bpp = im.encoderinfo["bpp"]
im = im.point(
lambda x, shift=8 - bpp, maxval=(1 << bpp) - 1: maxval - (x >> shift)
diff --git a/src/PIL/PcxImagePlugin.py b/src/PIL/PcxImagePlugin.py
index 854d9e83ee7..67990b0adc1 100644
--- a/src/PIL/PcxImagePlugin.py
+++ b/src/PIL/PcxImagePlugin.py
@@ -91,7 +91,7 @@ def _open(self):
self.fp.seek(-769, io.SEEK_END)
s = self.fp.read(769)
if len(s) == 769 and s[0] == 12:
- # check if the palette is linear greyscale
+ # check if the palette is linear grayscale
for i in range(256):
if s[i * 3 + 1 : i * 3 + 4] != o8(i) * 3:
mode = rawmode = "P"
@@ -203,7 +203,7 @@ def _save(im, fp, filename):
palette += b"\x00" * (768 - len(palette))
fp.write(palette) # 768 bytes
elif im.mode == "L":
- # greyscale palette
+ # grayscale palette
fp.write(o8(12))
for i in range(256):
fp.write(o8(i) * 3)
diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py
index 55ca87b0bb9..1bd0f442f76 100644
--- a/src/PIL/PngImagePlugin.py
+++ b/src/PIL/PngImagePlugin.py
@@ -56,7 +56,7 @@
_MODES = {
# supported bits/color combinations, and corresponding modes/rawmodes
- # Greyscale
+ # Grayscale
(1, 0): ("1", "1"),
(2, 0): ("L", "L;2"),
(4, 0): ("L", "L;4"),
@@ -70,7 +70,7 @@
(2, 3): ("P", "P;2"),
(4, 3): ("P", "P;4"),
(8, 3): ("P", "P"),
- # Greyscale with alpha
+ # Grayscale with alpha
(8, 4): ("LA", "LA"),
(16, 4): ("RGBA", "LA;16B"), # LA;16B->LA not yet available
# Truecolour with alpha
diff --git a/src/libImaging/Convert.c b/src/libImaging/Convert.c
index b08519d3045..99d2a4ada70 100644
--- a/src/libImaging/Convert.c
+++ b/src/libImaging/Convert.c
@@ -1013,7 +1013,7 @@ static struct {
static void
p2bit(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
int x;
- /* FIXME: precalculate greyscale palette? */
+ /* FIXME: precalculate grayscale palette? */
for (x = 0; x < xsize; x++) {
*out++ = (L(&palette->palette[in[x] * 4]) >= 128000) ? 255 : 0;
}
@@ -1022,7 +1022,7 @@ p2bit(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
static void
pa2bit(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
int x;
- /* FIXME: precalculate greyscale palette? */
+ /* FIXME: precalculate grayscale palette? */
for (x = 0; x < xsize; x++, in += 4) {
*out++ = (L(&palette->palette[in[0] * 4]) >= 128000) ? 255 : 0;
}
@@ -1031,7 +1031,7 @@ pa2bit(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
static void
p2l(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
int x;
- /* FIXME: precalculate greyscale palette? */
+ /* FIXME: precalculate grayscale palette? */
for (x = 0; x < xsize; x++) {
*out++ = L24(&palette->palette[in[x] * 4]) >> 16;
}
@@ -1040,7 +1040,7 @@ p2l(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
static void
pa2l(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
int x;
- /* FIXME: precalculate greyscale palette? */
+ /* FIXME: precalculate grayscale palette? */
for (x = 0; x < xsize; x++, in += 4) {
*out++ = L24(&palette->palette[in[0] * 4]) >> 16;
}
@@ -1070,7 +1070,7 @@ p2pa(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
static void
p2la(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
int x;
- /* FIXME: precalculate greyscale palette? */
+ /* FIXME: precalculate grayscale palette? */
for (x = 0; x < xsize; x++, out += 4) {
const UINT8 *rgba = &palette->palette[*in++ * 4];
out[0] = out[1] = out[2] = L24(rgba) >> 16;
@@ -1081,7 +1081,7 @@ p2la(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
static void
pa2la(UINT8 *out, const UINT8 *in, int xsize, ImagingPalette palette) {
int x;
- /* FIXME: precalculate greyscale palette? */
+ /* FIXME: precalculate grayscale palette? */
for (x = 0; x < xsize; x++, in += 4, out += 4) {
out[0] = out[1] = out[2] = L24(&palette->palette[in[0] * 4]) >> 16;
out[3] = in[3];
@@ -1335,9 +1335,9 @@ topalette(
imOut->palette = ImagingPaletteDuplicate(palette);
if (imIn->bands == 1) {
- /* greyscale image */
+ /* grayscale image */
- /* Greyscale palette: copy data as is */
+ /* Grayscale palette: copy data as is */
ImagingSectionEnter(&cookie);
for (y = 0; y < imIn->ysize; y++) {
if (alpha) {
diff --git a/src/libImaging/Dib.c b/src/libImaging/Dib.c
index f8a2901b8c7..1b5bfe1324e 100644
--- a/src/libImaging/Dib.c
+++ b/src/libImaging/Dib.c
@@ -142,9 +142,9 @@ ImagingNewDIB(const char *mode, int xsize, int ysize) {
GetSystemPaletteEntries(dib->dc, 0, 256, pal->palPalEntry);
if (strcmp(mode, "L") == 0) {
- /* Greyscale DIB. Fill all 236 slots with a greyscale ramp
+ /* Grayscale DIB. Fill all 236 slots with a grayscale ramp
* (this is usually overkill on Windows since VGA only offers
- * 6 bits greyscale resolution). Ignore the slots already
+ * 6 bits grayscale resolution). Ignore the slots already
* allocated by Windows */
i = 10;
@@ -160,7 +160,7 @@ ImagingNewDIB(const char *mode, int xsize, int ysize) {
#ifdef CUBE216
/* Colour DIB. Create a 6x6x6 colour cube (216 entries) and
- * add 20 extra greylevels for best result with greyscale
+ * add 20 extra graylevels for best result with grayscale
* images. */
i = 10;
diff --git a/src/libImaging/Pack.c b/src/libImaging/Pack.c
index 14c8f1461aa..d47344245cc 100644
--- a/src/libImaging/Pack.c
+++ b/src/libImaging/Pack.c
@@ -549,16 +549,16 @@ static struct {
{"1", "1;IR", 1, pack1IR},
{"1", "L", 8, pack1L},
- /* greyscale */
+ /* grayscale */
{"L", "L", 8, copy1},
{"L", "L;16", 16, packL16},
{"L", "L;16B", 16, packL16B},
- /* greyscale w. alpha */
+ /* grayscale w. alpha */
{"LA", "LA", 16, packLA},
{"LA", "LA;L", 16, packLAL},
- /* greyscale w. alpha premultiplied */
+ /* grayscale w. alpha premultiplied */
{"La", "La", 16, packLA},
/* palette */
diff --git a/src/libImaging/Palette.c b/src/libImaging/Palette.c
index 059d7b72aca..78916bca52b 100644
--- a/src/libImaging/Palette.c
+++ b/src/libImaging/Palette.c
@@ -75,7 +75,7 @@ ImagingPaletteNewBrowser(void) {
}
palette->size = i;
- /* FIXME: add 30-level greyscale wedge here? */
+ /* FIXME: add 30-level grayscale wedge here? */
return palette;
}
diff --git a/src/libImaging/Quant.c b/src/libImaging/Quant.c
index c84acb99889..398fbf6db57 100644
--- a/src/libImaging/Quant.c
+++ b/src/libImaging/Quant.c
@@ -1697,7 +1697,7 @@ ImagingQuantize(Imaging im, int colors, int mode, int kmeans) {
image data? */
if (!strcmp(im->mode, "L")) {
- /* greyscale */
+ /* grayscale */
/* FIXME: converting a "L" image to "P" with 256 colors
should be done by a simple copy... */
diff --git a/src/libImaging/Storage.c b/src/libImaging/Storage.c
index 128595f6547..b1b03c515ad 100644
--- a/src/libImaging/Storage.c
+++ b/src/libImaging/Storage.c
@@ -80,18 +80,18 @@ ImagingNewPrologueSubtype(const char *mode, int xsize, int ysize, int size) {
im->palette = ImagingPaletteNew("RGB");
} else if (strcmp(mode, "L") == 0) {
- /* 8-bit greyscale (luminance) images */
+ /* 8-bit grayscale (luminance) images */
im->bands = im->pixelsize = 1;
im->linesize = xsize;
} else if (strcmp(mode, "LA") == 0) {
- /* 8-bit greyscale (luminance) with alpha */
+ /* 8-bit grayscale (luminance) with alpha */
im->bands = 2;
im->pixelsize = 4; /* store in image32 memory */
im->linesize = xsize * 4;
} else if (strcmp(mode, "La") == 0) {
- /* 8-bit greyscale (luminance) with premultiplied alpha */
+ /* 8-bit grayscale (luminance) with premultiplied alpha */
im->bands = 2;
im->pixelsize = 4; /* store in image32 memory */
im->linesize = xsize * 4;
diff --git a/src/libImaging/Unpack.c b/src/libImaging/Unpack.c
index 279bdcdc8ad..6c7d52f58d1 100644
--- a/src/libImaging/Unpack.c
+++ b/src/libImaging/Unpack.c
@@ -819,7 +819,7 @@ ImagingUnpackXBGR(UINT8 *_out, const UINT8 *in, int pixels) {
static void
unpackRGBALA(UINT8 *_out, const UINT8 *in, int pixels) {
int i;
- /* greyscale with alpha */
+ /* grayscale with alpha */
for (i = 0; i < pixels; i++) {
UINT32 iv = MAKE_UINT32(in[0], in[0], in[0], in[1]);
memcpy(_out, &iv, sizeof(iv));
@@ -831,7 +831,7 @@ unpackRGBALA(UINT8 *_out, const UINT8 *in, int pixels) {
static void
unpackRGBALA16B(UINT8 *_out, const UINT8 *in, int pixels) {
int i;
- /* 16-bit greyscale with alpha, big-endian */
+ /* 16-bit grayscale with alpha, big-endian */
for (i = 0; i < pixels; i++) {
UINT32 iv = MAKE_UINT32(in[0], in[0], in[0], in[2]);
memcpy(_out, &iv, sizeof(iv));
@@ -1108,7 +1108,7 @@ unpackCMYKI(UINT8 *_out, const UINT8 *in, int pixels) {
/* There are two representations of LAB images for whatever precision:
L: Uint (in PS, it's 0-100)
A: Int (in ps, -128 .. 128, or elsewhere 0..255, with 128 as middle.
- Channels in PS display a 0 value as middle grey,
+ Channels in PS display a 0 value as middle gray,
LCMS appears to use 128 as the 0 value for these channels)
B: Int (as above)
@@ -1172,7 +1172,7 @@ unpackI16R_I16(UINT8 *out, const UINT8 *in, int pixels) {
static void
unpackI12_I16(UINT8 *out, const UINT8 *in, int pixels) {
- /* Fillorder 1/MSB -> LittleEndian, for 12bit integer greyscale tiffs.
+ /* Fillorder 1/MSB -> LittleEndian, for 12bit integer grayscale tiffs.
According to the TIFF spec:
@@ -1527,7 +1527,7 @@ static struct {
{"1", "1;IR", 1, unpack1IR},
{"1", "1;8", 8, unpack18},
- /* greyscale */
+ /* grayscale */
{"L", "L;2", 2, unpackL2},
{"L", "L;2I", 2, unpackL2I},
{"L", "L;2R", 2, unpackL2R},
@@ -1544,11 +1544,11 @@ static struct {
{"L", "L;16", 16, unpackL16},
{"L", "L;16B", 16, unpackL16B},
- /* greyscale w. alpha */
+ /* grayscale w. alpha */
{"LA", "LA", 16, unpackLA},
{"LA", "LA;L", 16, unpackLAL},
- /* greyscale w. alpha premultiplied */
+ /* grayscale w. alpha premultiplied */
{"La", "La", 16, unpackLA},
/* palette */
| diff --git a/Tests/test_file_apng.py b/Tests/test_file_apng.py
index 57928880882..fffbc54caf5 100644
--- a/Tests/test_file_apng.py
+++ b/Tests/test_file_apng.py
@@ -231,13 +231,13 @@ def test_apng_mode():
assert im.getpixel((0, 0)) == (0, 0, 128, 191)
assert im.getpixel((64, 32)) == (0, 0, 128, 191)
- with Image.open("Tests/images/apng/mode_greyscale.png") as im:
+ with Image.open("Tests/images/apng/mode_grayscale.png") as im:
assert im.mode == "L"
im.seek(im.n_frames - 1)
assert im.getpixel((0, 0)) == 128
assert im.getpixel((64, 32)) == 255
- with Image.open("Tests/images/apng/mode_greyscale_alpha.png") as im:
+ with Image.open("Tests/images/apng/mode_grayscale_alpha.png") as im:
assert im.mode == "LA"
im.seek(im.n_frames - 1)
assert im.getpixel((0, 0)) == (128, 191)
diff --git a/Tests/test_file_bmp.py b/Tests/test_file_bmp.py
index 9e79937e9f5..58a45aa0b8a 100644
--- a/Tests/test_file_bmp.py
+++ b/Tests/test_file_bmp.py
@@ -159,7 +159,7 @@ def test_rle8():
with Image.open("Tests/images/hopper_rle8.bmp") as im:
assert_image_similar_tofile(im.convert("RGB"), "Tests/images/hopper.bmp", 12)
- with Image.open("Tests/images/hopper_rle8_greyscale.bmp") as im:
+ with Image.open("Tests/images/hopper_rle8_grayscale.bmp") as im:
assert_image_equal_tofile(im, "Tests/images/bw_gradient.png")
# This test image has been manually hexedited
diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index 3c2e96356c4..fa5d54febf8 100644
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -590,7 +590,7 @@ def test_save_dispose(tmp_path):
def test_dispose2_palette(tmp_path):
out = str(tmp_path / "temp.gif")
- # Four colors: white, grey, black, red
+ # Four colors: white, gray, black, red
circles = [(255, 255, 255), (153, 153, 153), (0, 0, 0), (255, 0, 0)]
im_list = []
diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py
index 40fc595ad52..b8f48140851 100644
--- a/Tests/test_file_png.py
+++ b/Tests/test_file_png.py
@@ -297,7 +297,7 @@ def test_save_p_transparent_black(self, tmp_path):
assert_image(im, "RGBA", (10, 10))
assert im.getcolors() == [(100, (0, 0, 0, 0))]
- def test_save_greyscale_transparency(self, tmp_path):
+ def test_save_grayscale_transparency(self, tmp_path):
for mode, num_transparent in {"1": 1994, "L": 559, "I": 559}.items():
in_file = "Tests/images/" + mode.lower() + "_trns.png"
with Image.open(in_file) as im:
diff --git a/Tests/test_imagechops.py b/Tests/test_imagechops.py
index d0fea385433..e7687cc1b76 100644
--- a/Tests/test_imagechops.py
+++ b/Tests/test_imagechops.py
@@ -10,7 +10,7 @@
ORANGE = (255, 128, 0)
WHITE = (255, 255, 255)
-GREY = 128
+GRAY = 128
def test_sanity():
@@ -121,12 +121,12 @@ def test_constant():
im = Image.new("RGB", (20, 10))
# Act
- new = ImageChops.constant(im, GREY)
+ new = ImageChops.constant(im, GRAY)
# Assert
assert new.size == im.size
- assert new.getpixel((0, 0)) == GREY
- assert new.getpixel((19, 9)) == GREY
+ assert new.getpixel((0, 0)) == GRAY
+ assert new.getpixel((19, 9)) == GRAY
def test_darker_image():
diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py
index f2b7dedf0ac..db0df047f77 100644
--- a/Tests/test_imagefont.py
+++ b/Tests/test_imagefont.py
@@ -303,8 +303,8 @@ def test_multiline_spacing(font):
"orientation", (Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_270)
)
def test_rotated_transposed_font(font, orientation):
- img_grey = Image.new("L", (100, 100))
- draw = ImageDraw.Draw(img_grey)
+ img_gray = Image.new("L", (100, 100))
+ draw = ImageDraw.Draw(img_gray)
word = "testing"
transposed_font = ImageFont.TransposedFont(font, orientation=orientation)
@@ -344,8 +344,8 @@ def test_rotated_transposed_font(font, orientation):
),
)
def test_unrotated_transposed_font(font, orientation):
- img_grey = Image.new("L", (100, 100))
- draw = ImageDraw.Draw(img_grey)
+ img_gray = Image.new("L", (100, 100))
+ draw = ImageDraw.Draw(img_gray)
word = "testing"
transposed_font = ImageFont.TransposedFont(font, orientation=orientation)
| Mix use of grayscale/greyscale in document and code
<!--
Thank you for reporting an issue.
Follow these guidelines to ensure your issue is handled properly.
If you have a ...
1. General question: consider asking the question on Stack Overflow
with the python-imaging-library tag:
* https://stackoverflow.com/questions/tagged/python-imaging-library
Do not ask a question in both places.
If you think you have found a bug or have an unexplained exception
then file a bug report here.
2. Bug report: include a self-contained, copy-pastable example that
generates the issue if possible. Be concise with code posted.
Guidelines on how to provide a good bug report:
* https://stackoverflow.com/help/mcve
Bug reports which follow these guidelines are easier to diagnose,
and are often handled much more quickly.
3. Feature request: do a quick search of existing issues
to make sure this has not been asked before.
We know asking good questions takes effort, and we appreciate your time.
Thank you.
-->
### What did you do?
I've been searching in the document and found it use "grayscale" in some places and "greyscale" in some other places, describing same type of images in Pillow. I also viewed those parts of code and found out they are mostly consistent with corresponding documents.
### What did you expect to happen?
It should be using the same word across the whole document and code.
### What actually happened?
Mix use of slightly different spelling words across multiple places.
### What are your OS, Python and Pillow versions?
Not related to the issue. The mix use of both words seems to have been the case for a very long time, at least since Pillow 3.x, which makes me a bit confused.
### Examples
#### Examples of grayscale:
* `L` (8-bit pixels, grayscale) [[Modes](https://pillow.readthedocs.io/en/stable/handbook/concepts.html#concept-modes)]
* GIF files are initially read as grayscale (L) or palette mode (P) images. [[GIF](https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#gif)]
* [[`PIL.ImageOps.grayscale(image)`](https://pillow.readthedocs.io/en/stable/reference/ImageOps.html#PIL.ImageOps.grayscale)]
#### Examples of greyscale:
* When translating a color image to greyscale (mode “L”) [[`Image.convert(mode=None, matrix=None, dither=None, palette=Palette.WEB, colors=256)`](https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.convert)]
* A bilevel image (mode “1”) is treated as a greyscale (“L”) image by this method. [[`Image.histogram(mask=None, extrema=None)`](https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.histogram),[`Image.entropy(mask=None, extrema=None)`](https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.entropy)]
* Parameters: threshold – All pixels above this greyscale level are inverted. [[`PIL.ImageOps.solarize(image, threshold=128)`](https://pillow.readthedocs.io/en/stable/reference/ImageOps.html#PIL.ImageOps.solarize)]
| 2023-10-19T08:19:08Z | 2023-10-20T05:52:47Z | ["Tests/test_file_png.py::TestFilePng::test_broken", "Tests/test_imagechops.py::test_subtract", "Tests/test_file_png.py::TestFilePng::test_specify_bits", "Tests/test_file_gif.py::test_seek_info", "Tests/test_file_gif.py::test_append_images", "Tests/test_file_gif.py::test_dispose_previous", "Tests/test_file_gif.py::test_number_of_loops", "Tests/test_file_png.py::TestFilePng::test_load_transparent_rgb", "Tests/test_file_gif.py::test_seek", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat_chunk.png]", "Tests/test_imagechops.py::test_hard_light", "Tests/test_imagechops.py::test_multiply_green", "Tests/test_file_bmp.py::test_save_float_dpi", "Tests/test_file_gif.py::test_dispose_background", "Tests/test_file_png.py::TestFilePng::test_interlace", "Tests/test_file_gif.py::test_palette_save_all_P", "Tests/test_imagechops.py::test_soft_light", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_gap.png]", "Tests/test_file_apng.py::test_seek_after_close", "Tests/test_file_apng.py::test_apng_delay", "Tests/test_file_gif.py::test_no_change", "Tests/test_file_gif.py::test_optimize_correctness[4-513-256]", "Tests/test_file_apng.py::test_apng_dispose", "Tests/test_file_png.py::TestFilePng::test_verify_ignores_crc_error", "Tests/test_file_png.py::TestFilePng::test_repr_png_error_returns_none", "Tests/test_file_png.py::TestFilePng::test_roundtrip_private_chunk", "Tests/test_imagechops.py::test_offset", "Tests/test_imagechops.py::test_overlay", "Tests/test_file_apng.py::test_apng_save_disposal", "Tests/test_file_gif.py::test_palette_save_duplicate_entries", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_start.png]", "Tests/test_file_apng.py::test_apng_dispose_region", "Tests/test_file_apng.py::test_apng_save", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-RGBA]", "Tests/test_file_apng.py::test_apng_basic", "Tests/test_file_gif.py::test_transparent_dispose[1-expected_colors1]", "Tests/test_file_gif.py::test_invalid_file", "Tests/test_file_bmp.py::test_invalid_file", "Tests/test_file_bmp.py::test_fallback_if_mmap_errors", "Tests/test_file_png.py::TestFilePng::test_padded_idat", "Tests/test_file_gif.py::test_palette_not_needed_for_second_frame", "Tests/test_file_png.py::TestFilePng::test_getchunks", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_palette", "Tests/test_file_gif.py::test_l_mode_transparency", "Tests/test_file_png.py::TestFilePng::test_bad_ztxt", "Tests/test_file_gif.py::test_rgb_transparency", "Tests/test_file_png.py::TestFilePng::test_roundtrip_text", "Tests/test_imagechops.py::test_duplicate", "Tests/test_file_gif.py::test_loop_none", "Tests/test_file_apng.py::test_apng_blend", "Tests/test_file_png.py::TestFilePng::test_save_rgb_single_transparency", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat_zero_chunk.png]", "Tests/test_file_png.py::TestFilePng::test_plte_length", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/bmp/g/pal8rle.bmp-1064]", "Tests/test_imagechops.py::test_subtract_modulo", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration1]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_itxt", "Tests/test_file_png.py::TestFilePng::test_invalid_file", "Tests/test_file_gif.py::test_palette_save_ImagePalette", "Tests/test_file_png.py::TestFilePng::test_exif_save", "Tests/test_file_bmp.py::test_save_to_bytes", "Tests/test_file_gif.py::test_getdata", "Tests/test_file_png.py::TestFilePng::test_save_stdout[False]", "Tests/test_imagechops.py::test_invert", "Tests/test_file_png.py::TestFilePng::test_trns_null", "Tests/test_file_bmp.py::test_save_bmp_with_dpi", "Tests/test_file_gif.py::test_context_manager", "Tests/test_file_apng.py::test_apng_save_disposal_previous", "Tests/test_file_png.py::TestFilePng::test_trns_rgb", "Tests/test_file_png.py::TestFilePng::test_textual_chunks_after_idat", "Tests/test_file_gif.py::test_lzw_bits", "Tests/test_file_gif.py::test_save_dispose", "Tests/test_file_apng.py::test_apng_save_duration_loop", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_repeat.png]", "Tests/test_file_gif.py::test_n_frames[Tests/images/hopper.gif-1]", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fcTL]", "Tests/test_file_gif.py::test_eoferror", "Tests/test_imagechops.py::test_logical", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[IHDR]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-P]", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/bmp/q/pal8rletrns.bmp-3670]", "Tests/test_file_png.py::TestFilePng::test_discard_icc_profile", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[8500]", "Tests/test_file_apng.py::test_apng_syntax_errors", "Tests/test_file_apng.py::test_apng_chunk_order", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd.gif-RGB]", "Tests/test_file_gif.py::test_extents", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[fdAT]", "Tests/test_imagechops.py::test_subtract_scale_offset", "Tests/test_file_png.py::TestFilePng::test_bad_text", "Tests/test_file_png.py::TestFilePng::test_scary", "Tests/test_file_bmp.py::test_rle8_eof[Tests/images/hopper_rle8.bmp-1078]", "Tests/test_file_gif.py::test_read_multiple_comment_blocks", "Tests/test_file_apng.py::test_apng_num_plays", "Tests/test_file_apng.py::test_apng_fdat[Tests/images/apng/split_fdat.png]", "Tests/test_file_gif.py::test_roundtrip_info_duration_combined", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-P]", "Tests/test_file_gif.py::test_n_frames[Tests/images/comment_after_last_frame.gif-2]", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-RGBA]", "Tests/test_file_png.py::TestFilePng::test_read_private_chunks", "Tests/test_file_gif.py::test_optimize_full_l", "Tests/test_file_gif.py::test_roundtrip_info_duration", "Tests/test_file_png.py::TestFilePng::test_getxmp", "Tests/test_file_gif.py::test_optimize_if_palette_can_be_reduced_by_half", "Tests/test_file_apng.py::test_apng_save_duplicate_duration", "Tests/test_file_gif.py::test_n_frames[Tests/images/iss634.gif-42]", "Tests/test_imagechops.py::test_blend", "Tests/test_file_gif.py::test_palette_save_L", "Tests/test_file_gif.py::test_zero_comment_subblocks", "Tests/test_file_png.py::TestFilePng::test_save_icc_profile", "Tests/test_file_png.py::TestFilePng::test_chunk_order", "Tests/test_imagechops.py::test_add_clip", "Tests/test_file_gif.py::test_roundtrip_save_all_1", "Tests/test_file_gif.py::test_seek_after_close", "Tests/test_file_gif.py::test_identical_frames_to_single_frame[duration0]", "Tests/test_imagechops.py::test_lighter_pixel", "Tests/test_file_gif.py::test_rgba_transparency", "Tests/test_file_gif.py::test_remapped_transparency", "Tests/test_file_gif.py::test_headers_saving_for_animated_gifs", "Tests/test_file_gif.py::test_bbox", "Tests/test_file_apng.py::test_apng_save_alpha", "Tests/test_file_gif.py::test_dispose2_diff", "Tests/test_file_gif.py::test_dispose_none", "Tests/test_file_png.py::TestFilePng::test_exif_argument", "Tests/test_file_gif.py::test_transparency_in_second_frame", "Tests/test_file_png.py::TestFilePng::test_roundtrip_dpi", "Tests/test_file_gif.py::test_transparent_dispose[0-expected_colors0]", "Tests/test_file_bmp.py::test_load_dib", "Tests/test_file_gif.py::test_seek_rewind", "Tests/test_file_gif.py::test_version", "Tests/test_file_apng.py::test_apng_dispose_op_previous_frame", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[sRGB]", "Tests/test_file_png.py::TestFilePng::test_trns_p", "Tests/test_imagechops.py::test_darker_pixel", "Tests/test_file_gif.py::test_sanity", "Tests/test_imagechops.py::test_add_modulo", "Tests/test_file_gif.py::test_dispose2_palette", "Tests/test_file_gif.py::test_optimize_correctness[128-513-256]", "Tests/test_file_png.py::TestFilePng::test_exif", "Tests/test_file_gif.py::test_identical_frames", "Tests/test_file_png.py::TestFilePng::test_load_transparent_p", "Tests/test_file_gif.py::test_roundtrip_save_all", "Tests/test_file_gif.py::test_optimize_correctness[128-511-128]", "Tests/test_file_png.py::TestFilePng::test_unicode_text", "Tests/test_file_gif.py::test_dispose_background_transparency", "Tests/test_file_gif.py::test_optimize_correctness[255-511-255]", "Tests/test_file_gif.py::test_optimize_correctness[256-511-256]", "Tests/test_file_gif.py::test_comment", "Tests/test_file_bmp.py::test_save_too_large", "Tests/test_file_png.py::TestFilePng::test_seek", "Tests/test_file_png.py::TestFilePng::test_save_p_single_transparency", "Tests/test_file_gif.py::test_previous_frame_loaded", "Tests/test_file_apng.py::test_apng_chunk_errors", "Tests/test_file_apng.py::test_different_modes_in_later_frames[True-RGB]", "Tests/test_imagechops.py::test_multiply_white", "Tests/test_file_bmp.py::test_sanity", "Tests/test_file_gif.py::test_removed_transparency", "Tests/test_file_gif.py::test_optimize_correctness[64-511-64]", "Tests/test_imagechops.py::test_add_modulo_no_clip", "Tests/test_file_gif.py::test_save_I", "Tests/test_file_png.py::TestFilePng::test_sanity", "Tests/test_file_gif.py::test_optimize_correctness[64-513-256]", "Tests/test_file_gif.py::test_transparent_optimize", "Tests/test_imagechops.py::test_multiply_black", "Tests/test_imagechops.py::test_lighter_image", "Tests/test_file_gif.py::test_unclosed_file", "Tests/test_file_gif.py::test_optimize_correctness[4-511-4]", "Tests/test_file_png.py::TestFilePng::test_nonunicode_text", "Tests/test_file_gif.py::test_retain_comment_in_subsequent_frames", "Tests/test_file_gif.py::test_first_frame_transparency", "Tests/test_file_gif.py::test_duration", "Tests/test_file_gif.py::test_palette_434", "Tests/test_file_gif.py::test_palette_save_P", "Tests/test_file_gif.py::test_loading_multiple_palettes[Tests/images/dispose_bgnd_rgba.gif-RGBA]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder.png]", "Tests/test_file_gif.py::test_roundtrip", "Tests/test_file_gif.py::test_saving_rgba", "Tests/test_file_gif.py::test_strategy", "Tests/test_file_gif.py::test_bbox_alpha", "Tests/test_file_gif.py::test_optimize", "Tests/test_file_apng.py::test_different_modes_in_later_frames[False-RGB]", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_fdat_fctl.png]", "Tests/test_file_png.py::TestFilePng::test_save_grayscale_transparency", "Tests/test_file_gif.py::test_dispose_none_load_end", "Tests/test_file_png.py::TestFilePng::test_load_float_dpi", "Tests/test_file_apng.py::test_apng_dispose_op_background_p_mode", "Tests/test_file_apng.py::test_apng_save_blend", "Tests/test_imagechops.py::test_subtract_modulo_no_clip", "Tests/test_file_bmp.py::test_offset", "Tests/test_file_png.py::TestFilePng::test_verify_not_ignores_crc_error_in_required_chunk", "Tests/test_file_png.py::TestFilePng::test_verify_struct_error", "Tests/test_file_gif.py::test_l_mode_after_rgb", "Tests/test_file_png.py::TestFilePng::test_save_stdout[True]", "Tests/test_file_gif.py::test_background", "Tests/test_file_png.py::TestFilePng::test_tell", "Tests/test_imagechops.py::test_constant", "Tests/test_file_gif.py::test_missing_background", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[pHYs]", "Tests/test_file_gif.py::test_webp_background", "Tests/test_file_png.py::TestFilePng::test_load_verify", "Tests/test_imagechops.py::test_sanity", "Tests/test_file_png.py::TestFilePng::test_save_p_transparent_black", "Tests/test_file_gif.py::test_optimize_correctness[129-511-129]", "Tests/test_file_bmp.py::test_rgba_bitfields", "Tests/test_imagechops.py::test_screen", "Tests/test_imagechops.py::test_add_scale_offset", "Tests/test_imagechops.py::test_subtract_clip", "Tests/test_file_gif.py::test_palette_handling", "Tests/test_imagechops.py::test_add", "Tests/test_file_png.py::TestTruncatedPngPLeaks::test_leak_load", "Tests/test_file_gif.py::test_multiple_duration", "Tests/test_file_png.py::TestFilePng::test_roundtrip_no_icc_profile", "Tests/test_file_png.py::TestFilePng::test_repr_png", "Tests/test_file_apng.py::test_apng_blend_transparency", "Tests/test_file_gif.py::test_empty_string_comment", "Tests/test_file_apng.py::test_apng_save_split_fdat", "Tests/test_file_gif.py::test_no_transparency_in_second_frame", "Tests/test_file_png.py::TestFilePng::test_truncated_chunks[acTL]", "Tests/test_file_bmp.py::test_dpi", "Tests/test_file_gif.py::test_comment_over_255", "Tests/test_file_bmp.py::test_small_palette", "Tests/test_imagechops.py::test_darker_image", "Tests/test_file_gif.py::test_dispose_previous_first_frame", "Tests/test_file_apng.py::test_apng_sequence_errors[sequence_reorder_chunk.png]", "Tests/test_file_png.py::TestFilePng::test_roundtrip_icc_profile", "Tests/test_file_png.py::TestFilePng::test_bad_itxt", "Tests/test_file_gif.py::test_closed_file", "Tests/test_file_gif.py::test_dispose2_background", "Tests/test_file_png.py::TestFilePng::test_exif_from_jpg", "Tests/test_file_gif.py::test_roundtrip2", "Tests/test_file_gif.py::test_dispose2_background_frame", "Tests/test_file_bmp.py::test_rle4", "Tests/test_file_bmp.py::test_save_dib", "Tests/test_imagechops.py::test_difference", "Tests/test_imagechops.py::test_difference_pixel"] | [] | ["Tests/test_file_apng.py::test_apng_mode", "Tests/test_file_bmp.py::test_rle8"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nbuild-backend = \"backend\"\nrequires = [\n \"setuptools>=67.8\",\n]\nbackend-path = [\n \"_custom_build\",\n]\n\n[project]\nname = \"pillow\"\ndescription = \"Python Imaging Library (Fork)\"\nreadme = \"README.md\"\nkeywords = [\n \"Imaging\",\n]\nlicense = { text = \"MIT-CMU\" }\nauthors = [\n { name = \"Jeffrey A. Clark\", email = \"[email protected]\" },\n]\nrequires-python = \">=3.9\"\nclassifiers = [\n \"Development Status :: 6 - Mature\",\n \"License :: OSI Approved :: CMU License (MIT-CMU)\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3.13\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Multimedia :: Graphics\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera\",\n \"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture\",\n \"Topic :: Multimedia :: Graphics :: Graphics Conversion\",\n \"Topic :: Multimedia :: Graphics :: Viewers\",\n \"Typing :: Typed\",\n]\ndynamic = [\n \"version\",\n]\noptional-dependencies.docs = [\n \"furo\",\n \"olefile\",\n \"sphinx>=8.1\",\n \"sphinx-copybutton\",\n \"sphinx-inline-tabs\",\n \"sphinxext-opengraph\",\n]\noptional-dependencies.fpx = [\n \"olefile\",\n]\noptional-dependencies.mic = [\n \"olefile\",\n]\noptional-dependencies.tests = [\n \"check-manifest\",\n \"coverage>=7.4.2\",\n \"defusedxml\",\n \"markdown2\",\n \"olefile\",\n \"packaging\",\n \"pyroma\",\n \"pytest\",\n \"pytest-cov\",\n \"pytest-timeout\",\n \"trove-classifiers>=2024.10.12\",\n]\noptional-dependencies.typing = [\n \"typing-extensions; python_version<'3.10'\",\n]\noptional-dependencies.xmp = [\n \"defusedxml\",\n]\nurls.Changelog = \"https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst\"\nurls.Documentation = \"https://pillow.readthedocs.io\"\nurls.Funding = \"https://tidelift.com/subscription/pkg/pypi-pillow?utm_source=pypi-pillow&utm_medium=pypi\"\nurls.Homepage = \"https://python-pillow.org\"\nurls.Mastodon = \"https://fosstodon.org/@pillow\"\nurls.\"Release notes\" = \"https://pillow.readthedocs.io/en/stable/releasenotes/index.html\"\nurls.Source = \"https://github.com/python-pillow/Pillow\"\n\n[tool.setuptools]\npackages = [\n \"PIL\",\n]\ninclude-package-data = true\npackage-dir = { \"\" = \"src\" }\n\n[tool.setuptools.dynamic]\nversion = { attr = \"PIL.__version__\" }\n\n[tool.cibuildwheel]\nbefore-all = \".github/workflows/wheels-dependencies.sh\"\nbuild-verbosity = 1\n\nconfig-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable\"\n# Disable platform guessing on macOS\nmacos.config-settings = \"raqm=enable raqm=vendor fribidi=vendor imagequant=disable platform-guessing=disable\"\n\ntest-command = \"cd {project} \\n .github/workflows/wheels-test.sh\"\ntest-extras = \"tests\"\n\n[tool.cibuildwheel.macos.environment]\nPATH = \"$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin\"\n\n[tool.black]\nexclude = \"wheels/multibuild\"\n\n[tool.ruff]\nexclude = [ \"wheels/multibuild\" ]\n\nfix = true\nlint.select = [\n \"C4\", # flake8-comprehensions\n \"E\", # pycodestyle errors\n \"EM\", # flake8-errmsg\n \"F\", # pyflakes errors\n \"I\", # isort\n \"ISC\", # flake8-implicit-str-concat\n \"LOG\", # flake8-logging\n \"PGH\", # pygrep-hooks\n \"PT\", # flake8-pytest-style\n \"PYI\", # flake8-pyi\n \"RUF100\", # unused noqa (yesqa)\n \"UP\", # pyupgrade\n \"W\", # pycodestyle warnings\n \"YTT\", # flake8-2020\n]\nlint.ignore = [\n \"E203\", # Whitespace before ':'\n \"E221\", # Multiple spaces before operator\n \"E226\", # Missing whitespace around arithmetic operator\n \"E241\", # Multiple spaces after ','\n \"PT001\", # pytest-fixture-incorrect-parentheses-style\n \"PT007\", # pytest-parametrize-values-wrong-type\n \"PT011\", # pytest-raises-too-broad\n \"PT012\", # pytest-raises-with-multiple-statements\n \"PT017\", # pytest-assert-in-except\n \"PYI026\", # flake8-pyi: typing.TypeAlias added in Python 3.10\n \"PYI034\", # flake8-pyi: typing.Self added in Python 3.11\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_font.py\" = [\n \"I002\",\n]\nlint.per-file-ignores.\"Tests/oss-fuzz/fuzz_pillow.py\" = [\n \"I002\",\n]\nlint.flake8-pytest-style.parametrize-names-type = \"csv\"\nlint.isort.known-first-party = [\n \"PIL\",\n]\nlint.isort.required-imports = [\n \"from __future__ import annotations\",\n]\n\n[tool.pyproject-fmt]\nmax_supported_python = \"3.13\"\n\n[tool.pytest.ini_options]\naddopts = \"-ra --color=yes\"\ntestpaths = [\n \"Tests\",\n]\n\n[tool.mypy]\npython_version = \"3.9\"\npretty = true\ndisallow_any_generics = true\nenable_error_code = \"ignore-without-code\"\nextra_checks = true\nfollow_imports = \"silent\"\nwarn_redundant_casts = true\nwarn_unreachable = true\nwarn_unused_ignores = true\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nrequires =\n tox>=4.2\nenv_list =\n lint\n py{py3, 313, 312, 311, 310, 39}\n\n[testenv]\ndeps =\n numpy\nextras =\n tests\ncommands =\n make clean\n {envpython} -m pip install .\n {envpython} selftest.py\n {envpython} -m pytest --color=no -rA --tb=no -p no:cacheprovider -W always {posargs}\nallowlist_externals =\n make\n\n[testenv:lint]\nskip_install = true\ndeps =\n check-manifest\n pre-commit\npass_env =\n PRE_COMMIT_COLOR\ncommands =\n pre-commit run --all-files --show-diff-on-failure\n check-manifest\n\n[testenv:mypy]\nskip_install = true\ndeps =\n -r .ci/requirements-mypy.txt\nextras =\n typing\ncommands =\n mypy conftest.py selftest.py setup.py docs src winbuild Tests {posargs}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["cachetools==5.3.1", "chardet==5.2.0", "colorama==0.4.6", "coverage==7.3.2", "distlib==0.3.7", "filelock==3.12.4", "iniconfig==2.0.0", "packaging==23.2", "platformdirs==3.11.0", "pluggy==1.3.0", "pyproject-api==1.6.1", "pytest==7.4.2", "pytest-cov==4.1.0", "setuptools==75.1.0", "tox==4.11.3", "virtualenv==20.24.5", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
AtsushiSakai/PythonRobotics | AtsushiSakai__PythonRobotics-812 | 5093342d35b914c125f1a857d254083887574444 | diff --git a/PathPlanning/RRTStar/rrt_star.py b/PathPlanning/RRTStar/rrt_star.py
index f875d3a76d..b2884fe21b 100644
--- a/PathPlanning/RRTStar/rrt_star.py
+++ b/PathPlanning/RRTStar/rrt_star.py
@@ -225,13 +225,11 @@ def rewire(self, new_node, near_inds):
improved_cost = near_node.cost > edge_node.cost
if no_collision and improved_cost:
- near_node.x = edge_node.x
- near_node.y = edge_node.y
- near_node.cost = edge_node.cost
- near_node.path_x = edge_node.path_x
- near_node.path_y = edge_node.path_y
- near_node.parent = edge_node.parent
- self.propagate_cost_to_leaves(new_node)
+ for node in self.node_list:
+ if node.parent == self.node_list[i]:
+ node.parent = edge_node
+ self.node_list[i] = edge_node
+ self.propagate_cost_to_leaves(self.node_list[i])
def calc_new_cost(self, from_node, to_node):
d, _ = self.calc_distance_and_angle(from_node, to_node)
diff --git a/PathPlanning/RRTStarReedsShepp/rrt_star_reeds_shepp.py b/PathPlanning/RRTStarReedsShepp/rrt_star_reeds_shepp.py
index 66185017a0..c4c3e7c8a8 100644
--- a/PathPlanning/RRTStarReedsShepp/rrt_star_reeds_shepp.py
+++ b/PathPlanning/RRTStarReedsShepp/rrt_star_reeds_shepp.py
@@ -36,7 +36,7 @@ def __init__(self, x, y, yaw):
self.path_yaw = []
def __init__(self, start, goal, obstacle_list, rand_area,
- max_iter=200,
+ max_iter=200, step_size=0.2,
connect_circle_dist=50.0,
robot_radius=0.0
):
@@ -55,6 +55,7 @@ def __init__(self, start, goal, obstacle_list, rand_area,
self.min_rand = rand_area[0]
self.max_rand = rand_area[1]
self.max_iter = max_iter
+ self.step_size = step_size
self.obstacle_list = obstacle_list
self.connect_circle_dist = connect_circle_dist
self.robot_radius = robot_radius
@@ -63,6 +64,9 @@ def __init__(self, start, goal, obstacle_list, rand_area,
self.goal_yaw_th = np.deg2rad(1.0)
self.goal_xy_th = 0.5
+ def set_random_seed(self, seed):
+ random.seed(seed)
+
def planning(self, animation=True, search_until_max_iter=True):
"""
planning
@@ -147,8 +151,8 @@ def plot_start_goal_arrow(self):
def steer(self, from_node, to_node):
px, py, pyaw, mode, course_lengths = reeds_shepp_path_planning.reeds_shepp_path_planning(
- from_node.x, from_node.y, from_node.yaw,
- to_node.x, to_node.y, to_node.yaw, self.curvature)
+ from_node.x, from_node.y, from_node.yaw, to_node.x,
+ to_node.y, to_node.yaw, self.curvature, self.step_size)
if not px:
return None
@@ -169,8 +173,8 @@ def steer(self, from_node, to_node):
def calc_new_cost(self, from_node, to_node):
_, _, _, _, course_lengths = reeds_shepp_path_planning.reeds_shepp_path_planning(
- from_node.x, from_node.y, from_node.yaw,
- to_node.x, to_node.y, to_node.yaw, self.curvature)
+ from_node.x, from_node.y, from_node.yaw, to_node.x,
+ to_node.y, to_node.yaw, self.curvature, self.step_size)
if not course_lengths:
return float("inf")
diff --git a/PathPlanning/ReedsSheppPath/reeds_shepp_path_planning.py b/PathPlanning/ReedsSheppPath/reeds_shepp_path_planning.py
index 1577d048d3..c55d2629e5 100644
--- a/PathPlanning/ReedsSheppPath/reeds_shepp_path_planning.py
+++ b/PathPlanning/ReedsSheppPath/reeds_shepp_path_planning.py
@@ -53,17 +53,14 @@ def mod2pi(x):
def straight_left_straight(x, y, phi):
phi = mod2pi(phi)
- if y > 0.0 and 0.0 < phi < math.pi * 0.99:
+ # only take phi in (0.01*math.pi, 0.99*math.pi) for the sake of speed.
+ # phi in (0, 0.01*math.pi) will make test2() in test_rrt_star_reeds_shepp.py
+ # extremely time-consuming, since the value of xd, t will be very large.
+ if math.pi * 0.01 < phi < math.pi * 0.99 and y != 0:
xd = - y / math.tan(phi) + x
t = xd - math.tan(phi / 2.0)
u = phi
- v = math.hypot(x - xd, y) - math.tan(phi / 2.0)
- return True, t, u, v
- elif y < 0.0 < phi < math.pi * 0.99:
- xd = - y / math.tan(phi) + x
- t = xd - math.tan(phi / 2.0)
- u = phi
- v = -math.hypot(x - xd, y) - math.tan(phi / 2.0)
+ v = np.sign(y) * math.hypot(x - xd, y) - math.tan(phi / 2.0)
return True, t, u, v
return False, 0.0, 0.0, 0.0
| diff --git a/tests/test_rrt_star_reeds_shepp.py b/tests/test_rrt_star_reeds_shepp.py
index cb6b586b33..20d4916f96 100644
--- a/tests/test_rrt_star_reeds_shepp.py
+++ b/tests/test_rrt_star_reeds_shepp.py
@@ -6,6 +6,43 @@ def test1():
m.show_animation = False
m.main(max_iter=5)
+obstacleList = [
+ (5, 5, 1),
+ (4, 6, 1),
+ (4, 8, 1),
+ (4, 10, 1),
+ (6, 5, 1),
+ (7, 5, 1),
+ (8, 6, 1),
+ (8, 8, 1),
+ (8, 10, 1)
+] # [x,y,size(radius)]
+
+start = [0.0, 0.0, m.np.deg2rad(0.0)]
+goal = [6.0, 7.0, m.np.deg2rad(90.0)]
+
+def test2():
+ step_size = 0.2
+ rrt_star_reeds_shepp = m.RRTStarReedsShepp(start, goal,
+ obstacleList, [-2.0, 15.0],
+ max_iter=100, step_size=step_size)
+ rrt_star_reeds_shepp.set_random_seed(seed=8)
+ path = rrt_star_reeds_shepp.planning(animation=False)
+ for i in range(len(path)-1):
+ # + 0.00000000000001 for acceptable errors arising from the planning process
+ assert m.math.dist(path[i][0:2], path[i+1][0:2]) < step_size + 0.00000000000001
+
+def test3():
+ step_size = 20
+ rrt_star_reeds_shepp = m.RRTStarReedsShepp(start, goal,
+ obstacleList, [-2.0, 15.0],
+ max_iter=100, step_size=step_size)
+ rrt_star_reeds_shepp.set_random_seed(seed=8)
+ path = rrt_star_reeds_shepp.planning(animation=False)
+ for i in range(len(path)-1):
+ # + 0.00000000000001 for acceptable errors arising from the planning process
+ assert m.math.dist(path[i][0:2], path[i+1][0:2]) < step_size + 0.00000000000001
+
if __name__ == '__main__':
conftest.run_this_test(__file__)
| RRT* with reeds-sheep seems to produce illegal paths
**Describe the bug**
Sometimes the path produced by RRT* with reeds-sheep script rrt_star_reeds_shepp.py seems not allowed: there are sharp corners in the path.
**Expected behavior**
allowed path
**Screenshots**


**Desktop (please complete the following information):**
- Python version 3.8.10
| Thank you. Can you share your code to reproduce the issue?
the code is rrt_star_reeds_shepp.py unmodified. However, this issue does not always appears, given the randomness of RRT, so I have to see if I manage to put a seed to the randomness to reproduce the problem. I'll let you know if I manage to do this.
so I managed to reproduce the issue using the script rrt_star_reeds_shepp.py and setting seed 8 after random import:
```
import random
random.seed(8)
```
I get this:

a detail

if you find a way to fix it let me know, thanks!
Please let me take this issue as part of my course project on SUSTech EEE5058.
I found that the direct reason for this unexpected result is the difference between the length of the node's x_list and yaw_list. So when you zip() lists with different lengths, the longer parts of the longer lists was discarded.
Noticed that in this random.seed(8) case, RRTStarReedsShepp.planning() gives 101 nodes (in self.node_list), and 21 of these nodes have different lengths on the node.x_list (or y_list) and the node.yaw_list. Some of these nodes' yaw_lists are longer than the corresponding x_lists, and in this case, it's fine since all the x and y can be zipped and plotted correctly. However, when the yaw_lists are shorter than the x_lists, some x and y are discarded by zip() so some points on the curve are missed in the final plot.
A simple way to get a good figure is to add elements to the yaw_list to make it as long as the x and y lists.
<img width="1027" alt="Snipaste_2023-04-01_17-29-33" src="https://user-images.githubusercontent.com/39330401/229278795-7367266f-ffcd-486b-8595-d7b27b62717c.png">
<img width="557" alt="Snipaste_2023-04-01_17-38-51" src="https://user-images.githubusercontent.com/39330401/229278911-bbd484b2-0c05-47d5-bd67-219f6a9f191a.png">
Now I'm working on what makes the lengths of these lists different, and I will fix it soon.
Thank you. Your PR is welcome. | 2023-04-03T17:03:08Z | 2023-04-27T14:04:39Z | [] | [] | ["tests/test_rrt_star_reeds_shepp.py::test1", "tests/test_rrt_star_reeds_shepp.py::test3", "tests/test_rrt_star_reeds_shepp.py::test2"] | [] | {"install": [], "pre_install": [], "python": "3.11", "pip_packages": ["attrs==23.1.0", "contourpy==1.0.7", "cvxpy==1.3.1", "cycler==0.11.0", "ecos==2.0.12", "execnet==1.9.0", "fonttools==4.39.3", "iniconfig==2.0.0", "kiwisolver==1.4.4", "matplotlib==3.7.1", "mypy==1.1.1", "mypy-extensions==1.0.0", "numpy==1.24.2", "osqp==0.6.2.post9", "packaging==23.1", "pillow==9.5.0", "pluggy==1.0.0", "pyparsing==3.0.9", "pytest==7.2.2", "pytest-xdist==3.2.1", "python-dateutil==2.8.2", "qdldl==0.1.7", "ruff==0.0.259", "scipy==1.10.1", "scs==3.2.3", "setuptools==75.1.0", "six==1.16.0", "typing-extensions==4.5.0", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
AtsushiSakai/PythonRobotics | AtsushiSakai__PythonRobotics-638 | 1d8c252fef3798d502dc3187e0c9a360a26fa1df | diff --git a/PathPlanning/ClothoidPath/clothoid_path_planner.py b/PathPlanning/ClothoidPath/clothoid_path_planner.py
new file mode 100644
index 0000000000..5e5fc6e9a3
--- /dev/null
+++ b/PathPlanning/ClothoidPath/clothoid_path_planner.py
@@ -0,0 +1,192 @@
+"""
+Clothoid Path Planner
+Author: Daniel Ingram (daniel-s-ingram)
+ Atsushi Sakai (AtsushiSakai)
+Reference paper: Fast and accurate G1 fitting of clothoid curves
+https://www.researchgate.net/publication/237062806
+"""
+
+from collections import namedtuple
+import matplotlib.pyplot as plt
+import numpy as np
+import scipy.integrate as integrate
+from scipy.optimize import fsolve
+from math import atan2, cos, hypot, pi, sin
+from matplotlib import animation
+
+Point = namedtuple("Point", ["x", "y"])
+
+show_animation = True
+
+
+def generate_clothoid_paths(start_point, start_yaw_list,
+ goal_point, goal_yaw_list,
+ n_path_points):
+ """
+ Generate clothoid path list. This function generate multiple clothoid paths
+ from multiple orientations(yaw) at start points to multiple orientations
+ (yaw) at goal point.
+
+ :param start_point: Start point of the path
+ :param start_yaw_list: Orientation list at start point in radian
+ :param goal_point: Goal point of the path
+ :param goal_yaw_list: Orientation list at goal point in radian
+ :param n_path_points: number of path points
+ :return: clothoid path list
+ """
+ clothoids = []
+ for start_yaw in start_yaw_list:
+ for goal_yaw in goal_yaw_list:
+ clothoid = generate_clothoid_path(start_point, start_yaw,
+ goal_point, goal_yaw,
+ n_path_points)
+ clothoids.append(clothoid)
+ return clothoids
+
+
+def generate_clothoid_path(start_point, start_yaw,
+ goal_point, goal_yaw, n_path_points):
+ """
+ Generate a clothoid path list.
+
+ :param start_point: Start point of the path
+ :param start_yaw: Orientation at start point in radian
+ :param goal_point: Goal point of the path
+ :param goal_yaw: Orientation at goal point in radian
+ :param n_path_points: number of path points
+ :return: a clothoid path
+ """
+ dx = goal_point.x - start_point.x
+ dy = goal_point.y - start_point.y
+ r = hypot(dx, dy)
+
+ phi = atan2(dy, dx)
+ phi1 = normalize_angle(start_yaw - phi)
+ phi2 = normalize_angle(goal_yaw - phi)
+ delta = phi2 - phi1
+
+ try:
+ # Step1: Solve g function
+ A = solve_g_for_root(phi1, phi2, delta)
+
+ # Step2: Calculate path parameters
+ L = compute_path_length(r, phi1, delta, A)
+ curvature = compute_curvature(delta, A, L)
+ curvature_rate = compute_curvature_rate(A, L)
+ except Exception as e:
+ print(f"Failed to generate clothoid points: {e}")
+ return None
+
+ # Step3: Construct a path with Fresnel integral
+ points = []
+ for s in np.linspace(0, L, n_path_points):
+ try:
+ x = start_point.x + s * X(curvature_rate * s ** 2, curvature * s,
+ start_yaw)
+ y = start_point.y + s * Y(curvature_rate * s ** 2, curvature * s,
+ start_yaw)
+ points.append(Point(x, y))
+ except Exception as e:
+ print(f"Skipping failed clothoid point: {e}")
+
+ return points
+
+
+def X(a, b, c):
+ return integrate.quad(lambda t: cos((a/2)*t**2 + b*t + c), 0, 1)[0]
+
+
+def Y(a, b, c):
+ return integrate.quad(lambda t: sin((a/2)*t**2 + b*t + c), 0, 1)[0]
+
+
+def solve_g_for_root(theta1, theta2, delta):
+ initial_guess = 3*(theta1 + theta2)
+ return fsolve(lambda A: Y(2*A, delta - A, theta1), [initial_guess])
+
+
+def compute_path_length(r, theta1, delta, A):
+ return r / X(2*A, delta - A, theta1)
+
+
+def compute_curvature(delta, A, L):
+ return (delta - A) / L
+
+
+def compute_curvature_rate(A, L):
+ return 2 * A / (L**2)
+
+
+def normalize_angle(angle_rad):
+ return (angle_rad + pi) % (2 * pi) - pi
+
+
+def get_axes_limits(clothoids):
+ x_vals = [p.x for clothoid in clothoids for p in clothoid]
+ y_vals = [p.y for clothoid in clothoids for p in clothoid]
+
+ x_min = min(x_vals)
+ x_max = max(x_vals)
+ y_min = min(y_vals)
+ y_max = max(y_vals)
+
+ x_offset = 0.1*(x_max - x_min)
+ y_offset = 0.1*(y_max - y_min)
+
+ x_min = x_min - x_offset
+ x_max = x_max + x_offset
+ y_min = y_min - y_offset
+ y_max = y_max + y_offset
+
+ return x_min, x_max, y_min, y_max
+
+
+def draw_clothoids(start, goal, num_steps, clothoidal_paths,
+ save_animation=False):
+
+ fig = plt.figure(figsize=(10, 10))
+ x_min, x_max, y_min, y_max = get_axes_limits(clothoidal_paths)
+ axes = plt.axes(xlim=(x_min, x_max), ylim=(y_min, y_max))
+
+ axes.plot(start.x, start.y, 'ro')
+ axes.plot(goal.x, goal.y, 'ro')
+ lines = [axes.plot([], [], 'b-')[0] for _ in range(len(clothoidal_paths))]
+
+ def animate(i):
+ for line, clothoid_path in zip(lines, clothoidal_paths):
+ x = [p.x for p in clothoid_path[:i]]
+ y = [p.y for p in clothoid_path[:i]]
+ line.set_data(x, y)
+
+ return lines
+
+ anim = animation.FuncAnimation(
+ fig,
+ animate,
+ frames=num_steps,
+ interval=25,
+ blit=True
+ )
+ if save_animation:
+ anim.save('clothoid.gif', fps=30, writer="imagemagick")
+ plt.show()
+
+
+def main():
+ start_point = Point(0, 0)
+ start_orientation_list = [0.0]
+ goal_point = Point(10, 0)
+ goal_orientation_list = np.linspace(-pi, pi, 75)
+ num_path_points = 100
+ clothoid_paths = generate_clothoid_paths(
+ start_point, start_orientation_list,
+ goal_point, goal_orientation_list,
+ num_path_points)
+ if show_animation:
+ draw_clothoids(start_point, goal_point,
+ num_path_points, clothoid_paths,
+ save_animation=False)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/PathPlanning/ClothoidalPaths/clothoidal_paths.py b/PathPlanning/ClothoidalPaths/clothoidal_paths.py
deleted file mode 100644
index 6fbf46ed2a..0000000000
--- a/PathPlanning/ClothoidalPaths/clothoidal_paths.py
+++ /dev/null
@@ -1,144 +0,0 @@
-"""
-Clothoidal Path Planner
-Author: Daniel Ingram (daniel-s-ingram)
-Reference paper: https://www.researchgate.net/publication/237062806
-"""
-
-import matplotlib.pyplot as plt
-import numpy as np
-import scipy.integrate as integrate
-from collections import namedtuple
-from scipy.optimize import fsolve
-from math import atan2, cos, hypot, pi, sin
-from matplotlib import animation
-
-Point = namedtuple("Point", ["x", "y"])
-
-
-def draw_clothoids(
- theta1_vals,
- theta2_vals,
- num_clothoids=75,
- num_steps=100,
- save_animation=False
-):
- p1 = Point(0, 0)
- p2 = Point(10, 0)
- clothoids = []
- for theta1 in theta1_vals:
- for theta2 in theta2_vals:
- clothoid = get_clothoid_points(p1, p2, theta1, theta2, num_steps)
- clothoids.append(clothoid)
-
- fig = plt.figure(figsize=(10, 10))
- x_min, x_max, y_min, y_max = get_axes_limits(clothoids)
- axes = plt.axes(xlim=(x_min, x_max), ylim=(y_min, y_max))
-
- axes.plot(p1.x, p1.y, 'ro')
- axes.plot(p2.x, p2.y, 'ro')
- lines = [axes.plot([], [], 'b-')[0] for _ in range(len(clothoids))]
-
- def animate(i):
- for line, clothoid in zip(lines, clothoids):
- x = [p.x for p in clothoid[:i]]
- y = [p.y for p in clothoid[:i]]
- line.set_data(x, y)
-
- return lines
-
- anim = animation.FuncAnimation(
- fig,
- animate,
- frames=num_steps,
- interval=25,
- blit=True
- )
- if save_animation:
- anim.save('clothoid.gif', fps=30, writer="imagemagick")
- plt.show()
-
-
-def get_clothoid_points(p1, p2, theta1, theta2, num_steps=100):
- dx = p2.x - p1.x
- dy = p2.y - p1.y
- r = hypot(dx, dy)
-
- phi = atan2(dy, dx)
- phi1 = normalize_angle(theta1 - phi)
- phi2 = normalize_angle(theta2 - phi)
- delta = phi2 - phi1
-
- try:
- A = solve_for_root(phi1, phi2, delta)
- L = compute_length(r, phi1, delta, A)
- curv = compute_curvature(delta, A, L)
- curv_rate = compute_curvature_rate(A, L)
- except Exception as e:
- print(f"Failed to generate clothoid points: {e}")
- return None
-
- points = []
- for s in np.linspace(0, L, num_steps):
- try:
- x = p1.x + s*X(curv_rate*s**2, curv*s, theta1)
- y = p1.y + s*Y(curv_rate*s**2, curv*s, theta1)
- points.append(Point(x, y))
- except Exception as e:
- print(f"Skipping failed clothoid point: {e}")
-
- return points
-
-
-def X(a, b, c):
- return integrate.quad(lambda t: cos((a/2)*t**2 + b*t + c), 0, 1)[0]
-
-
-def Y(a, b, c):
- return integrate.quad(lambda t: sin((a/2)*t**2 + b*t + c), 0, 1)[0]
-
-
-def solve_for_root(theta1, theta2, delta):
- initial_guess = 3*(theta1 + theta2)
- return fsolve(lambda x: Y(2*x, delta - x, theta1), [initial_guess])
-
-
-def compute_length(r, theta1, delta, A):
- return r / X(2*A, delta - A, theta1)
-
-
-def compute_curvature(delta, A, L):
- return (delta - A) / L
-
-
-def compute_curvature_rate(A, L):
- return 2 * A / (L**2)
-
-
-def normalize_angle(angle_rad):
- return (angle_rad + pi) % (2 * pi) - pi
-
-
-def get_axes_limits(clothoids):
- x_vals = [p.x for clothoid in clothoids for p in clothoid]
- y_vals = [p.y for clothoid in clothoids for p in clothoid]
-
- x_min = min(x_vals)
- x_max = max(x_vals)
- y_min = min(y_vals)
- y_max = max(y_vals)
-
- x_offset = 0.1*(x_max - x_min)
- y_offset = 0.1*(y_max - y_min)
-
- x_min = x_min - x_offset
- x_max = x_max + x_offset
- y_min = y_min - y_offset
- y_max = y_max + y_offset
-
- return x_min, x_max, y_min, y_max
-
-
-if __name__ == "__main__":
- theta1_vals = [0]
- theta2_vals = np.linspace(-pi, pi, 75)
- draw_clothoids(theta1_vals, theta2_vals, save_animation=False)
diff --git a/docs/modules/control/inverted_pendulum_control/inverted_pendulum_control.rst b/docs/modules/control/inverted_pendulum_control/inverted_pendulum_control.rst
index 5a447f7cd4..4c1f672ba0 100644
--- a/docs/modules/control/inverted_pendulum_control/inverted_pendulum_control.rst
+++ b/docs/modules/control/inverted_pendulum_control/inverted_pendulum_control.rst
@@ -34,7 +34,7 @@ So
& \ddot{\theta} = \frac{g(M + m)sin{\theta} - \dot{\theta}^2lmsin{\theta}cos{\theta} + ucos{\theta}}{l(M + m - mcos^2{\theta})}
-Linearlied model when :math:`\theta` small, :math:`cos{\theta} \approx 1`, :math:`sin{\theta} \approx \theta`, :math:`\dot{\theta}^2 \approx 0`.
+Linearized model when :math:`\theta` small, :math:`cos{\theta} \approx 1`, :math:`sin{\theta} \approx \theta`, :math:`\dot{\theta}^2 \approx 0`.
.. math::
& \ddot{x} = \frac{gm}{M}\theta + \frac{1}{M}u\\
@@ -68,16 +68,20 @@ If control x and \theta
LQR control
~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The LQR cotroller minimize this cost function defined as:
+The LQR controller minimize this cost function defined as:
.. math:: J = x^T Q x + u^T R u
+
the feedback control law that minimizes the value of the cost is:
.. math:: u = -K x
+
where:
.. math:: K = (B^T P B + R)^{-1} B^T P A
-and :math:`P` is the unique positive definite solution to the discrete time `algebraic Riccati equation <https://en.wikipedia.org/wiki/Inverted_pendulum#From_Lagrange's_equations>`__ (DARE):
+
+and :math:`P` is the unique positive definite solution to the discrete time
+`algebraic Riccati equation <https://en.wikipedia.org/wiki/Inverted_pendulum#From_Lagrange's_equations>`__ (DARE):
.. math:: P = A^T P A - A^T P B ( R + B^T P B )^{-1} B^T P A + Q
@@ -85,13 +89,13 @@ and :math:`P` is the unique positive definite solution to the discrete time `alg
MPC control
~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The MPC cotroller minimize this cost function defined as:
+The MPC controller minimize this cost function defined as:
.. math:: J = x^T Q x + u^T R u
subject to:
-- Linearlied Inverted Pendulum model
+- Linearized Inverted Pendulum model
- Initial state
.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Control/InvertedPendulumCart/animation.gif
diff --git a/docs/modules/path_planning/clothoid_path/clothoid_path.rst b/docs/modules/path_planning/clothoid_path/clothoid_path.rst
new file mode 100644
index 0000000000..1e8cee694a
--- /dev/null
+++ b/docs/modules/path_planning/clothoid_path/clothoid_path.rst
@@ -0,0 +1,80 @@
+.. _clothoid-path-planning:
+
+Clothoid path planning
+--------------------------
+
+.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/ClothoidPath/animation1.gif
+.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/ClothoidPath/animation2.gif
+.. image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/PathPlanning/ClothoidPath/animation3.gif
+
+This is a clothoid path planning sample code.
+
+This can interpolate two 2D pose (x, y, yaw) with a clothoid path,
+which its curvature is linearly continuous.
+In other words, this is G1 Hermite interpolation with a single clothoid segment.
+
+This path planning algorithm as follows:
+
+Step1: Solve g function
+~~~~~~~~~~~~~~~~~~~~~~~
+
+Solve the g(A) function with a nonlinear optimization solver.
+
+.. math::
+
+ g(A):=Y(2A, \delta-A, \phi_{s})
+
+Where
+
+* :math:`\delta`: the orientation difference between start and goal pose.
+* :math:`\phi_{s}`: the orientation of the start pose.
+* :math:`Y`: :math:`Y(a, b, c)=\int_{0}^{1} \sin \left(\frac{a}{2} \tau^{2}+b \tau+c\right) d \tau`
+
+
+Step2: Calculate path parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+We can calculate these path parameters using :math:`A`,
+
+:math:`L`: path length
+
+.. math::
+
+ L=\frac{R}{X\left(2 A, \delta-A, \phi_{s}\right)}
+
+where
+
+* :math:`R`: the distance between start and goal pose
+* :math:`X`: :math:`X(a, b, c)=\int_{0}^{1} \cos \left(\frac{a}{2} \tau^{2}+b \tau+c\right) d \tau`
+
+
+- :math:`\kappa`: curvature
+
+.. math::
+
+ \kappa=(\delta-A) / L
+
+
+- :math:`\kappa'`: curvature rate
+
+.. math::
+
+ \kappa^{\prime}=2 A / L^{2}
+
+
+Step3: Construct a path with Fresnel integral
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The final clothoid path can be calculated with the path parameters and Fresnel integrals.
+
+.. math::
+ \begin{aligned}
+ &x(s)=x_{0}+\int_{0}^{s} \cos \left(\frac{1}{2} \kappa^{\prime} \tau^{2}+\kappa \tau+\vartheta_{0}\right) \mathrm{d} \tau \\
+ &y(s)=y_{0}+\int_{0}^{s} \sin \left(\frac{1}{2} \kappa^{\prime} \tau^{2}+\kappa \tau+\vartheta_{0}\right) \mathrm{d} \tau
+ \end{aligned}
+
+
+References
+~~~~~~~~~~
+
+- `Fast and accurate G1 fitting of clothoid curves <https://www.researchgate.net/publication/237062806>`__
diff --git a/docs/modules/path_planning/path_planning_main.rst b/docs/modules/path_planning/path_planning_main.rst
index c3c5c389ec..5c70592afc 100644
--- a/docs/modules/path_planning/path_planning_main.rst
+++ b/docs/modules/path_planning/path_planning_main.rst
@@ -14,6 +14,7 @@ Path Planning
.. include:: rrt/rrt.rst
.. include:: cubic_spline/cubic_spline.rst
.. include:: bspline_path/bspline_path.rst
+.. include:: clothoid_path/clothoid_path.rst
.. include:: eta3_spline/eta3_spline.rst
.. include:: bezier_path/bezier_path.rst
.. include:: quintic_polynomials_planner/quintic_polynomials_planner.rst
| diff --git a/tests/test_clothoidal_paths.py b/tests/test_clothoidal_paths.py
new file mode 100644
index 0000000000..0b038c0338
--- /dev/null
+++ b/tests/test_clothoidal_paths.py
@@ -0,0 +1,11 @@
+import conftest
+from PathPlanning.ClothoidPath import clothoid_path_planner as m
+
+
+def test_1():
+ m.show_animation = False
+ m.main()
+
+
+if __name__ == '__main__':
+ conftest.run_this_test(__file__)
| Clean up Clothoid path planner
Ref #551
| 2022-02-06T13:30:23Z | 2022-04-10T10:30:31Z | [] | [] | ["tests/test_clothoidal_paths.py::test_1"] | [] | {"install": [], "pre_install": [], "python": "3.10", "pip_packages": ["attrs==21.4.0", "cvxpy==1.1.18", "cycler==0.11.0", "ecos==2.0.10", "execnet==1.9.0", "flake8==4.0.1", "fonttools==4.32.0", "iniconfig==1.1.1", "kiwisolver==1.4.2", "matplotlib==3.5.1", "mccabe==0.6.1", "mypy==0.931", "mypy-extensions==0.4.3", "numpy==1.22.1", "osqp==0.6.2.post5", "packaging==21.3", "pandas==1.4.0", "pillow==9.1.0", "pluggy==1.0.0", "py==1.11.0", "pycodestyle==2.8.0", "pyflakes==2.4.0", "pyparsing==3.0.8", "pytest==6.2.5", "pytest-forked==1.4.0", "pytest-xdist==2.5.0", "python-dateutil==2.8.2", "pytz==2022.1", "qdldl==0.1.5.post2", "scipy==1.7.3", "scs==3.2.0", "setuptools==75.1.0", "six==1.16.0", "toml==0.10.2", "tomli==2.0.1", "typing-extensions==4.1.1", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
sabnzbd/sabnzbd | sabnzbd__sabnzbd-2554 | fde8f9d13370ba19b6b3c7dcc679af2ebdf8fb29 | diff --git a/sabnzbd/api.py b/sabnzbd/api.py
index a5e00555aa3..5c913c33c72 100644
--- a/sabnzbd/api.py
+++ b/sabnzbd/api.py
@@ -50,6 +50,7 @@
KIBI,
MEBI,
GIGI,
+ AddNzbFileResult,
)
import sabnzbd.config as config
import sabnzbd.cfg as cfg
@@ -305,7 +306,7 @@ def _api_addfile(name, kwargs):
nzbname=kwargs.get("nzbname"),
password=kwargs.get("password"),
)
- return report(keyword="", data={"status": res == 0, "nzo_ids": nzo_ids})
+ return report(keyword="", data={"status": res is AddNzbFileResult.OK, "nzo_ids": nzo_ids})
else:
return report(_MSG_NO_VALUE)
@@ -350,7 +351,7 @@ def _api_addlocalfile(name, kwargs):
nzbname=kwargs.get("nzbname"),
password=kwargs.get("password"),
)
- return report(keyword="", data={"status": res == 0, "nzo_ids": nzo_ids})
+ return report(keyword="", data={"status": res is AddNzbFileResult.OK, "nzo_ids": nzo_ids})
else:
logging.info('API-call addlocalfile: "%s" is not a supported file', name)
return report(_MSG_NO_FILE)
diff --git a/sabnzbd/constants.py b/sabnzbd/constants.py
index dd029c66504..0ce8cca2621 100644
--- a/sabnzbd/constants.py
+++ b/sabnzbd/constants.py
@@ -162,3 +162,10 @@ class Status:
VERIFYING = "Verifying" # PP: Job is being verified (by par2)
DELETED = "Deleted" # Q: Job has been deleted (and is almost gone)
PROP = "Propagating" # Q: Delayed download
+
+
+class AddNzbFileResult:
+ RETRY = "Retry" # File could not be read
+ ERROR = "Error" # Rejected as duplicate, by pre-queue script or other failure to process file
+ OK = "OK" # Added to queue
+ NO_FILES_FOUND = "No files found" # Malformed or might not be an NZB file
diff --git a/sabnzbd/dirscanner.py b/sabnzbd/dirscanner.py
index 89f41c2d837..31951b68404 100644
--- a/sabnzbd/dirscanner.py
+++ b/sabnzbd/dirscanner.py
@@ -26,7 +26,7 @@
from typing import Generator, Set, Optional, Tuple
import sabnzbd
-from sabnzbd.constants import SCAN_FILE_NAME, VALID_ARCHIVES, VALID_NZB_FILES
+from sabnzbd.constants import SCAN_FILE_NAME, VALID_ARCHIVES, VALID_NZB_FILES, AddNzbFileResult
import sabnzbd.filesystem as filesystem
import sabnzbd.config as config
import sabnzbd.cfg as cfg
@@ -205,10 +205,10 @@ async def when_stable_add_nzbfile(self, path: str, catdir: Optional[str], stat_t
# Add the NZB's
res, _ = sabnzbd.nzbparser.add_nzbfile(path, catdir=catdir, keep=False)
- if res < 0:
+ if res is AddNzbFileResult.RETRY or res is AddNzbFileResult.ERROR:
# Retry later, for example when we can't read the file
self.suspected[path] = stat_tuple
- elif res == 0:
+ elif res is AddNzbFileResult.OK:
self.error_reported = False
else:
self.ignored[path] = 1
diff --git a/sabnzbd/nzbparser.py b/sabnzbd/nzbparser.py
index 618a0660e14..b1339cef73d 100644
--- a/sabnzbd/nzbparser.py
+++ b/sabnzbd/nzbparser.py
@@ -28,6 +28,7 @@
import datetime
import zipfile
import tempfile
+
import cherrypy._cpreqbody
from typing import Optional, Dict, Any, Union, List, Tuple
@@ -43,7 +44,7 @@
remove_data,
)
from sabnzbd.misc import name_to_cat
-from sabnzbd.constants import DEFAULT_PRIORITY, VALID_ARCHIVES
+from sabnzbd.constants import DEFAULT_PRIORITY, VALID_ARCHIVES, AddNzbFileResult
from sabnzbd.utils import rarfile
@@ -158,11 +159,9 @@ def process_nzb_archive_file(
url: Optional[str] = None,
password: Optional[str] = None,
nzo_id: Optional[str] = None,
-) -> Tuple[int, List[str]]:
+) -> Tuple[AddNzbFileResult, List[str]]:
"""Analyse archive and create job(s).
Accepts archive files with ONLY nzb/nfo/folder files in it.
- returns (status, nzo_ids)
- status: -2==Error/retry, -1==Error, 0==OK, 1==No files found
"""
nzo_ids = []
if catdir is None:
@@ -178,21 +177,21 @@ def process_nzb_archive_file(
zf = sabnzbd.newsunpack.SevenZip(path)
else:
logging.info("File %s is not a supported archive!", filename)
- return -1, []
+ return AddNzbFileResult.ERROR, []
except:
logging.info(T("Cannot read %s"), path, exc_info=True)
- return -2, []
+ return AddNzbFileResult.RETRY, []
- status = 1
+ status: AddNzbFileResult = AddNzbFileResult.NO_FILES_FOUND
names = zf.namelist()
nzbcount = 0
for name in names:
name = name.lower()
if name.endswith(".nzb"):
- status = 0
+ status = AddNzbFileResult.OK
nzbcount += 1
- if status == 0:
+ if status == AddNzbFileResult.OK:
if nzbcount != 1:
nzbname = None
for name in names:
@@ -202,7 +201,7 @@ def process_nzb_archive_file(
except OSError:
logging.error(T("Cannot read %s"), name, exc_info=True)
zf.close()
- return -1, []
+ return AddNzbFileResult.ERROR, []
name = get_filename(name)
if datap:
nzo = None
@@ -254,7 +253,7 @@ def process_nzb_archive_file(
# If all were rejected/empty/etc, update status
if not nzo_ids:
- status = 1
+ status = AddNzbFileResult.NO_FILES_FOUND
return status, nzo_ids
@@ -275,11 +274,9 @@ def process_single_nzb(
url: Optional[str] = None,
password: Optional[str] = None,
nzo_id: Optional[str] = None,
-) -> Tuple[int, List[str]]:
+) -> Tuple[AddNzbFileResult, List[str]]:
"""Analyze file and create a job from it
Supports NZB, NZB.BZ2, NZB.GZ and GZ.NZB-in-disguise
- returns (status, nzo_ids)
- status: -2==Error/retry, -1==Error, 0==OK
"""
if catdir is None:
catdir = cat
@@ -302,7 +299,7 @@ def process_single_nzb(
except OSError:
logging.warning(T("Cannot read %s"), clip_path(path))
logging.info("Traceback: ", exc_info=True)
- return -2, []
+ return AddNzbFileResult.RETRY, []
if filename:
filename, cat = name_to_cat(filename, catdir)
@@ -312,7 +309,7 @@ def process_single_nzb(
nzbname = get_filename(filename)
# Parse the data
- result = 0
+ result: AddNzbFileResult = AddNzbFileResult.OK
nzo = None
nzo_ids = []
try:
@@ -332,17 +329,19 @@ def process_single_nzb(
)
if not nzo.password:
nzo.password = password
- except (sabnzbd.nzbstuff.NzbEmpty, sabnzbd.nzbstuff.NzbRejected):
- # Empty or fully rejected
- result = -1
- pass
+ except sabnzbd.nzbstuff.NzbEmpty:
+ # Malformed or might not be an NZB file
+ result = AddNzbFileResult.NO_FILES_FOUND
+ except sabnzbd.nzbstuff.NzbRejected:
+ # Rejected as duplicate or by pre-queue script
+ result = AddNzbFileResult.ERROR
except sabnzbd.nzbstuff.NzbRejectedToHistory as err:
# Duplicate or unwanted extension that was failed to history
nzo_ids.append(err.nzo_id)
except:
# Something else is wrong, show error
logging.error(T("Error while adding %s, removing"), filename, exc_info=True)
- result = -1
+ result = AddNzbFileResult.ERROR
finally:
nzb_fp.close()
@@ -350,7 +349,7 @@ def process_single_nzb(
nzo_ids.append(sabnzbd.NzbQueue.add(nzo, quiet=bool(reuse)))
try:
- if not keep:
+ if not keep and result in {AddNzbFileResult.ERROR, AddNzbFileResult.OK}:
remove_file(path)
except OSError:
# Job was still added to the queue, so throw error but don't report failed add
diff --git a/sabnzbd/urlgrabber.py b/sabnzbd/urlgrabber.py
index ba124bd6386..d34be003542 100644
--- a/sabnzbd/urlgrabber.py
+++ b/sabnzbd/urlgrabber.py
@@ -40,6 +40,7 @@
import sabnzbd.emailer as emailer
import sabnzbd.notifier as notifier
from sabnzbd.encoding import ubtou, utob
+from sabnzbd.nzbparser import AddNzbFileResult
from sabnzbd.nzbstuff import NzbObject
@@ -255,14 +256,13 @@ def run(self):
password=future_nzo.password,
nzo_id=future_nzo.nzo_id,
)
- # -2==Error/retry, -1==Error, 0==OK, 1==Empty
- if res == -2:
+ if res is AddNzbFileResult.RETRY:
logging.info("Incomplete NZB, retry after 5 min %s", url)
self.add(url, future_nzo, when=300)
- elif res == -1:
+ elif res is AddNzbFileResult.ERROR:
# Error already thrown
self.fail_to_history(future_nzo, url)
- elif res == 1:
+ elif res is AddNzbFileResult.NO_FILES_FOUND:
# No NZB-files inside archive
self.fail_to_history(future_nzo, url, T("Empty NZB file %s") % filename)
else:
| diff --git a/tests/test_dirscanner.py b/tests/test_dirscanner.py
index 180f3ef29d6..cb22472cf6c 100644
--- a/tests/test_dirscanner.py
+++ b/tests/test_dirscanner.py
@@ -21,6 +21,7 @@
import pyfakefs.fake_filesystem_unittest as ffs
+from sabnzbd.constants import AddNzbFileResult
from tests.testhelper import *
# Set the global uid for fake filesystems to a non-root user;
@@ -70,7 +71,7 @@ class TestDirScanner:
],
)
async def test_adds_valid_nzbs(self, mock_sleep, fs, mocker, path, catdir):
- mocker.patch("sabnzbd.nzbparser.add_nzbfile", return_value=(-1, []))
+ mocker.patch("sabnzbd.nzbparser.add_nzbfile", return_value=(AddNzbFileResult.ERROR, []))
mocker.patch("sabnzbd.config.save_config", return_value=True)
fs.create_file(os.path.join(sabnzbd.cfg.dirscan_dir.get_path(), catdir or "", path), contents="FAKEFILE")
@@ -97,7 +98,7 @@ async def test_adds_valid_nzbs(self, mock_sleep, fs, mocker, path, catdir):
],
)
async def test_ignores_empty_files(self, mock_sleep, fs, mocker, path):
- mocker.patch("sabnzbd.nzbparser.add_nzbfile", return_value=(-1, []))
+ mocker.patch("sabnzbd.nzbparser.add_nzbfile", return_value=(AddNzbFileResult.ERROR, []))
mocker.patch("sabnzbd.config.save_config", return_value=True)
fs.create_file(os.path.join(sabnzbd.cfg.dirscan_dir.get_path(), path))
@@ -118,7 +119,7 @@ async def test_ignores_empty_files(self, mock_sleep, fs, mocker, path):
],
)
async def test_ignores_non_nzbs(self, mock_sleep, fs, mocker, path):
- mocker.patch("sabnzbd.nzbparser.add_nzbfile", return_value=(-1, []))
+ mocker.patch("sabnzbd.nzbparser.add_nzbfile", return_value=(AddNzbFileResult.ERROR, []))
mocker.patch("sabnzbd.config.save_config", return_value=True)
fs.create_file(os.path.join(sabnzbd.cfg.dirscan_dir.get_path(), path), contents="FAKEFILE")
| Files which match a watched extension, but are not valid nzb's, fail to parse and get deleted
SABnzbd version: 4.0.0
OS: Windows 10 22H2
Category: Watched folder handling
I use a simple watch folder on my browser downloads folder for adhoc nzb's, and I'd like to prevent SABnzbd from attempting to parse all *.gz files and instead only parse *.nzb.gz files.
Right now, SABnzbd attempts to parse things like "openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz" which not only fails, but it removes the file from the downloads/watch folder and deletes it - permanently! Which means, when I forget to save non-nzb *.gz files somewhere else, I usually end up having to go download it again if I don't move it quickly enough. Minor issue, sure, but it's a bit annoying.
The watched extensions are listed under ```VALID_NZB_FILES = (".nzb", ".gz", ".bz2")``` in [constants.py](https://github.com/sabnzbd/sabnzbd/blob/develop/sabnzbd/constants.py#LL133C8-L133C8) so one option could be to just make this a configurable parameter instead? Alternatively, it could be made a bit more specific to use .nzb.gz and .nzb.bz2? I guess it comes down to how common are gzipped nzb files that are not *.nzb.gz ?
At the least, I'd prefer if it just left files alone that are unable to be parsed, which might be a contradiction of #2188 😄
Here's an example error from the log parsing not-an-nzb.gz file which then also gets deleted:
```
2023-05-01 22:10:36,474::INFO::[dirscanner:188] Trying to import ***\downloads\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz
2023-05-01 22:10:37,493::INFO::[nzbparser:84] Attempting to add openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz [***\downloads\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz]
2023-05-01 22:10:37,496::INFO::[filesystem:710] Creating directories: ***\NZBs\incomplete\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz
2023-05-01 22:10:37,497::INFO::[filesystem:710] Creating directories: ***\NZBs\incomplete\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz\__ADMIN__
2023-05-01 22:10:37,497::INFO::[filesystem:1242] Saving ***\NZBs\incomplete\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz\__ADMIN__\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz.nzb.gz
2023-05-01 22:10:38,384::INFO::[notifier:123] Sending notification: Error - Saving ***\NZBs\incomplete\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz\__ADMIN__\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz.nzb.gz failed (type=error, job_cat=None)
2023-05-01 22:10:38,384::ERROR::[filesystem:1250] Saving ***\NZBs\incomplete\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz\__ADMIN__\openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz.nzb.gz failed
2023-05-01 22:10:38,384::INFO::[filesystem:1251] Traceback:
Traceback (most recent call last):
File "sabnzbd\filesystem.py", line 1248, in save_compressed
File "shutil.py", line 197, in copyfileobj
File "gzip.py", line 301, in read
File "_compression.py", line 68, in readinto
File "gzip.py", line 499, in read
File "gzip.py", line 468, in _read_gzip_header
File "gzip.py", line 428, in _read_gzip_header
gzip.BadGzipFile: Not a gzipped file (b'# ')
2023-05-01 22:10:38,389::INFO::[notifier:123] Sending notification: Warning - Invalid NZB file openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz, skipping (error: not well-formed (invalid token): line 1, column 0) (type=warning, job_cat=None)
2023-05-01 22:10:38,389::WARNING::[nzbstuff:781] Invalid NZB file openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz, skipping (error: not well-formed (invalid token): line 1, column 0)
2023-05-01 22:10:38,389::INFO::[nzbstuff:782] Traceback:
Traceback (most recent call last):
File "sabnzbd\nzbstuff.py", line 778, in __init__
File "sabnzbd\nzbparser.py", line 380, in nzbfile_parser
File "xml\etree\ElementTree.py", line 1249, in iterator
File "xml\etree\ElementTree.py", line 1320, in read_events
File "xml\etree\ElementTree.py", line 1292, in feed
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0
2023-05-01 22:10:38,390::INFO::[nzbstuff:1836] [N/A] Purging data for job openwrt-22.03.5-x86-64-generic-ext4-combined.img.gz (delete_all_data=True)
```
| why not just set your watch folder to a clean folder where you really only in fact place things you want sab to watch?
Looking at current code we will pickup `.nzb, .gz, .bz2, .zip, .rar, .7z`
For .zip/rar/.7z we extract those and look for a .nzb to add.
For .nzb/.gz/.bz2 we assume its a single nzb.
While *.gz isnt treated like a normal archival format. We do auto check if a .gz/.bz2 is compress and auto unzip and fixup the name to drop the suffix. `.nzb.gz` -> `.nzb` and `.nzb.bz2` -> `.nzb` when adding.
Not all ".gz" are named .nzb.gz so it would remove some functionality to limit to just that naming scheme.
But I'll poke around and see what most sites are doing when you grab the nzb.
**update** pretty much every site (raw search sites / newznab / nzedb) just serves up .nzb (or can merge multiple nzb into one .nzb). Or gives you a .zip with .nzb inside. So far havent found anyone doing .nzb.gz or any of the other formats. Also tried nzb360 and it just downloads .nzb as well.
So at this time it may not be a bad idea to limit .gz/.bz2 to the multi-extension .nzb.gz/.nzb/bz2 - thoughts?
All of the recent sources of nzb's I've seen, although admittedly not a whole lot, just use .nzb for single or .zip for multiple. I'm sure I got .nzb.gz from somewhere before, that's why I suggested it, but now I can't actually recall where that was from (or if it's still around).
Whether the watched extensions are changed or not, my main issue was the unexpected deletion of the files and the mismatch between the config screen and what it does. At the least, there should be a consistency alignment between the dirscanner and the settings UI which actually says ".tar.gz", not .gz and nothing about .bz2:

Aside from simply editing the static list that's already there, another alternative would be to create a new entry in sabnzbd.ini which is a list of extensions to watch for meaning users could tailor it as needed. There are a few other extension list config items, so this should be straightforward?
As for deleting non-nzb .gz files, I think that's more just a bug (even if it's deliberate) because .zip files don't get deleted from the watch folder if they don't contain nzb content, so why do .gz files?
I do agree that the match should probably be `.nzb.gz` and the same for bz2
Alternatively since users do set the watched folder to their default download location, I think it should not delete if couldn't decode it into an nzb file.
i.e. the process_single_nzb path it could return 1=='No files found' like the archive one so that dirscanner knows to ignore it in the future.
Also the returns values might make more sense as enums.
@mnightingale Agreed. Want to submit a PR for the changes?
Which approach do you prefer? or both?
What about enums, they would make the logic a bit easier to follow but would add more noise to a PR.
Both indeed, the enums would be a nice bonus.
For now I already updated the text in the interface to include the actually supported list of file extensions. | 2023-05-08T22:17:51Z | 2023-05-15T12:28:50Z | [] | [] | ["tests/test_dirscanner.py::TestDirScanner::test_ignores_empty_files[file.zip]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.rar-tv]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.bz2-tv]", "tests/test_dirscanner.py::TestDirScanner::test_ignores_empty_files[file.7z]", "tests/test_dirscanner.py::TestDirScanner::test_ignores_empty_files[file.bz2]", "tests/test_dirscanner.py::TestDirScanner::test_ignores_empty_files[file.nzb]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.bz2-None]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.zip-None]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.7z-None]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.gz-None]", "tests/test_dirscanner.py::TestDirScanner::test_ignores_non_nzbs[file.doc]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.7z-audio]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.nzb-software]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.rar-None]", "tests/test_dirscanner.py::TestDirScanner::test_ignores_non_nzbs[filenzb]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.nzb-None]", "tests/test_dirscanner.py::TestDirScanner::test_ignores_empty_files[file.gz]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.gz-movies]", "tests/test_dirscanner.py::TestDirScanner::test_adds_valid_nzbs[file.zip-movies]", "tests/test_dirscanner.py::TestDirScanner::test_ignores_empty_files[file.rar]"] | [] | {"install": [], "pre_install": [], "python": "3.11", "pip_packages": ["async-generator==1.10", "attrs==23.1.0", "babelfish==0.6.0", "black==23.3.0", "blinker==1.6.2", "brotlipy==0.7.0", "certifi==2023.5.7", "cffi==1.15.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "cheetah3==3.2.6.post1", "cheroot==9.0.0", "cherrypy==18.8.0", "click==8.1.3", "configobj==5.0.8", "cryptography==40.0.2", "decorator==5.1.1", "docopt==0.6.2", "exceptiongroup==1.1.1", "feedparser==6.0.10", "flaky==3.7.0", "flask==2.1.3", "guessit==3.7.1", "h11==0.14.0", "httpbin==0.7.0", "idna==3.4", "importlib-metadata==6.6.0", "iniconfig==2.0.0", "itsdangerous==2.1.2", "jaraco-classes==3.2.3", "jaraco-collections==4.1.0", "jaraco-context==4.3.0", "jaraco-functools==3.6.0", "jaraco-text==3.8.1", "jinja2==3.1.2", "jmespath==1.0.1", "jsonschema==4.17.3", "lxml==4.9.2", "markupsafe==2.1.2", "more-itertools==9.1.0", "mypy-extensions==1.0.0", "notify2==0.3.1", "outcome==1.2.0", "packaging==23.1", "paho-mqtt==1.6.1", "pathspec==0.11.1", "pbr==5.11.1", "platformdirs==3.5.1", "pluggy==1.0.0", "portend==3.1.0", "puremagic==1.15", "pycparser==2.21", "pyfakefs==5.2.2", "pyjwt==2.7.0", "pykwalify==1.8.0", "pyrsistent==0.19.3", "pysocks==1.7.1", "pytest==7.3.1", "pytest-asyncio==0.21.0", "pytest-httpbin==2.0.0", "pytest-httpserver==1.0.6", "pytest-mock==3.10.0", "python-box==6.1.0", "python-dateutil==2.8.2", "pytz==2023.3", "pyyaml==6.0", "raven==6.10.0", "rebulk==3.2.0", "requests==2.30.0", "ruamel-yaml==0.17.26", "ruamel-yaml-clib==0.2.7", "sabctools==7.0.2", "selenium==4.9.1", "setuptools==67.7.2", "sgmllib3k==1.0.0", "six==1.16.0", "sniffio==1.3.0", "sortedcontainers==2.4.0", "stevedore==4.1.1", "tavalidate==0.0.6", "tavern==2.0.6", "tempora==5.2.2", "trio==0.22.0", "trio-websocket==0.10.2", "ujson==5.7.0", "urllib3==2.0.2", "werkzeug==2.0.3", "wheel==0.44.0", "wsproto==1.2.0", "xmltodict==0.13.0", "zc-lockfile==3.0.post1", "zipp==3.15.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
sabnzbd/sabnzbd | sabnzbd__sabnzbd-2463 | 9129b681dc372509a1927df320974efe8c643694 | diff --git a/sabnzbd/filesystem.py b/sabnzbd/filesystem.py
index 7e53fc501ed..62abeb73fa0 100644
--- a/sabnzbd/filesystem.py
+++ b/sabnzbd/filesystem.py
@@ -184,10 +184,13 @@ def has_win_device(filename: str) -> bool:
return False
-CH_ILLEGAL = "/"
-CH_LEGAL = "+"
-CH_ILLEGAL_WIN = '\\/<>?*|"\t:'
-CH_LEGAL_WIN = "++{}!@#'+-"
+CH_ILLEGAL = "\0/"
+CH_LEGAL = "_+"
+CH_ILLEGAL_WIN = '\\/<>?*|":'
+CH_LEGAL_WIN = "++{}!@#'-"
+for i in range(1, 32):
+ CH_ILLEGAL_WIN += chr(i)
+ CH_LEGAL_WIN += "_"
def sanitize_filename(name: str) -> str:
| diff --git a/tests/test_filesystem.py b/tests/test_filesystem.py
index b78959572c0..e54c0428a5b 100644
--- a/tests/test_filesystem.py
+++ b/tests/test_filesystem.py
@@ -89,6 +89,23 @@ def test_win_devices_not_win(self):
assert filesystem.sanitize_filename("$mft") == "$mft"
assert filesystem.sanitize_filename("a$mft") == "a$mft"
+ @set_platform("win32")
+ def test_file_illegal_chars_win32(self):
+ assert filesystem.sanitize_filename("test" + filesystem.CH_ILLEGAL_WIN + "aftertest") == (
+ "test" + filesystem.CH_LEGAL_WIN + "aftertest"
+ )
+ assert (
+ filesystem.sanitize_filename("test" + chr(0) + chr(1) + chr(15) + chr(31) + "aftertest")
+ == "test____aftertest"
+ )
+
+ @set_platform("win32")
+ def test_folder_illegal_chars_win32(self):
+ assert (
+ filesystem.sanitize_foldername("test" + chr(0) + chr(9) + chr(13) + chr(31) + "aftertest")
+ == "test____aftertest"
+ )
+
@set_platform("linux")
def test_file_illegal_chars_linux(self):
assert filesystem.sanitize_filename("test/aftertest") == "test+aftertest"
| 3.7.2 - traceback on extracting job with unicode ? in filename
discord user reported issue with sab 3.7.2 not handling a download on windows:
```
2023-02-17 22:06:07,992::DEBUG::[assembler:85] Decoding part of \\?\D:\Cache\In-Progress\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta 02 (BD 1080p 10bit AAC) [7ACD4B5A].mkv
2023-02-17 22:06:07,993::INFO::[notifier:123] Sending notification: Error - Disk error on creating file D:\Cache\In-Progress\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta 02 (BD 1080p 10bit AAC) [7ACD4B5A].mkv (type=error, job_cat=None)
2023-02-17 22:06:07,993::ERROR::[assembler:113] Disk error on creating file D:\Cache\In-Progress\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta 02 (BD 1080p 10bit AAC) [7ACD4B5A].mkv
2023-02-17 22:06:07,994::INFO::[assembler:116] Winerror: None - 0xc0000033
2023-02-17 22:06:07,994::INFO::[assembler:121] Traceback:
Traceback (most recent call last):
File "sabnzbd\assembler.py", line 86, in run
File "sabnzbd\assembler.py", line 178, in assemble
OSError: [Errno 22] Invalid argument: '\\\\?\\D:\\Cache\\In-Progress\\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta\x1f 02 (BD 1080p 10bit AAC) [7ACD4B5A].mkv'
2023-02-17 22:06:07,994::INFO::[downloader:395] Pausing
```
looking it looks to be the unicode character in the yenc/filename that causes it to puke. assemble dies at the start for it.
we of course filter out illegal stuff by default on windows.. but looks like we might need to add this one to the list
https://github.com/sabnzbd/sabnzbd/blob/develop/sabnzbd/filesystem.py#L203
sending nzb to ya via email
| trying nzb out with newsbin, it extracts and replaces the unicode ! with _ in the final name

while the nzb completes and works just fine in newsbin, trying it in sab develop latest it says articles arent there and aborts the job... which i know is incorrect because i can use something other than sab and load the nzb and it works fine.
```
2023-02-17 17:25:59,885::INFO::[nzbstuff:232] Article JzAkLsZxPoRkCnZsUeTpOxOy-1483555129956@nyuu unavailable on all servers, discarding
2023-02-17 17:25:59,885::DEBUG::[nzbstuff:1510] Availability ratio=105.05, bad articles=0, total bytes=1560736426, missing bytes=736544, par2 bytes=75796569
2023-02-17 17:25:59,886::INFO::[nzbstuff:232] Article JpPfYuHkEaPsPxMsCcDePkBz-1483555394849@nyuu unavailable on all servers, discarding
2023-02-17 17:25:59,886::DEBUG::[nzbstuff:1510] Availability ratio=105.00, bad articles=1, total bytes=1560736426, missing bytes=1476800, par2 bytes=75796569
2023-02-17 17:25:59,886::INFO::[nzbstuff:232] Article ZbKyVfGmCzOwEuIpVtGtSbOa-1483555390878@nyuu unavailable on all servers, discarding
2023-02-17 17:25:59,887::DEBUG::[nzbstuff:1510] Availability ratio=104.96, bad articles=2, total bytes=1560736426, missing bytes=2217119, par2 bytes=75796569
...
2023-02-17 17:26:05,068::INFO::[nzbqueue:791] [sabnzbd.nzbqueue.register_article] Ending job GS.Netoge.no.Yome.wa.Onnanoko.ja.Nai.to.Omotta.02.BD.1080p.10bit.AAC.7ACD4B5A
2023-02-17 17:26:05,068::INFO::[nzbstuff:232] Article CwNvUuEyXkIhQxMxGaDzIkDa-1483555141072@nyuu unavailable on all servers, discarding
2023-02-17 17:26:05,068::INFO::[nzbqueue:392] [sabnzbd.assembler.run] Removing job GS.Netoge.no.Yome.wa.Onnanoko.ja.Nai.to.Omotta.02.BD.1080p.10bit.AAC.7ACD4B5A
2023-02-17 17:26:05,068::DEBUG::[nzbstuff:1510] Availability ratio=100.12, bad articles=100, total bytes=1560736426, missing bytes=74044485, par2 bytes=75796569
2023-02-17 17:26:05,069::INFO::[nzbqueue:233] Saving queue
2023-02-17 17:26:05,069::DEBUG::[nzbstuff:1221] Abort job "GS.Netoge.no.Yome.wa.Onnanoko.ja.Nai.to.Omotta.02.BD.1080p.10bit.AAC.7ACD4B5A", due to impossibility to complete it
```
trying in nzbget, also fails immediately but at least there it gives me a clue why:
```
Article [GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\[7ACD4B5A].mkv [146/2008] @ UNS-US (news-us.usenetserver.com) failed: out of server retention (file age: 2235, configured retention: 1500)
```
bumping retention, restarting nzbget. now it works. and result is same as newsbin where the unicode `!` gets replaced to `_` in filename:
```
Moving file [GS] Netoge no Yome wa Onnanoko ja Nai to Omotta_ 02 (BD 1080p 10bit AAC) [7ACD4B5A].mkv to C:\ProgramData\NZBGet\complete\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]
```
so going back to sab develop, increased server retention to 3500 and trying nzb again. seeing it hang at 1% because assembler crashing.
```
2023-02-17 17:54:12,683::DEBUG::[deobfuscate_filenames:148] Not obfuscated: upperchars >= 2 and lowerchars >= 2 and spacesdots >= 1
2023-02-17 17:54:12,684::DEBUG::[assembler:79] Decoding part of \\?\C:\sab\downloads\incomplete\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\.vol31+20.par2
2023-02-17 17:54:12,728::DEBUG::[assembler:79] Decoding part of \\?\C:\sab\downloads\incomplete\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta 02 (BD 1080p 10bit AAC) [7ACD4B5A].mkv
...
2023-02-17 17:48:02,283::ERROR::[assembler:107] Disk error on creating file C:\sab\downloads\incomplete\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta 02 (BD 1080p 10bit AAC) [7ACD4B5A].mkv
2023-02-17 17:48:02,285::INFO::[assembler:110] Winerror: None - 0xc0000033
2023-02-17 17:48:02,285::INFO::[assembler:115] Traceback:
Traceback (most recent call last):
File "C:\Program Files\sabnzbd-dev\sabnzbd\assembler.py", line 80, in run
self.assemble(nzo, nzf, file_done)
File "C:\Program Files\sabnzbd-dev\sabnzbd\assembler.py", line 169, in assemble
with open(nzf.filepath, "ab", buffering=0) as fout:
OSError: [Errno 22] Invalid argument: '\\\\?\\C:\\sab\\downloads\\incomplete\\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta! 02 (BD 1080p 10bit AAC) [7ACD4B5A]\\[GS] Netoge no Yome wa Onnanoko ja Nai to Omotta\x1f 02 (BD 1080p 10bit AAC) [7ACD4B5A].mkv'
```
and to note, sab did have some files in the incomplete folder for the job, notice the main .par2 has yet a different character than expected for the character after Omotta.
```
.vol00+01.par2
.vol03+04.par2
.vol07+08.par2
.vol15+16.par2
.vol31+20.par2
[GS] Netoge no Yome wa Onnanoko ja Nai to Omottaï¼ 02 (BD 1080p 10bit AAC) [7ACD4B5A].par2
```
Seems like it has ascii value 31 (hex 1f) which is not valid. Everything below 32 should be converted.
@puzzledsab if you jump on sab discord ( https://discord.gg/KQzDe7fvNU ) i can share nzb with ya, or if you want you can pull it down from geek if you have that indexer.
to rule out it being some 3rd party app/nzb handling I went and grabbed the nzb directly from the indexer.
show has several episodes, tried ep01 and was surprised to see that it worked just fine.
end result does include the unicode ? and all is good:

tried ep02, same problem as user. comparing ep01+02 nzb they are basically identical.
tried ep03, same problem as ep02, assembler pukes on it.
No problem with that "7ACD4B5A" NZB on Linux: ext4 FS can handle it.
I'll create a post with 0x1f in the resulting filename, so it's easier to test
EDIT: NZB for testing: https://raw.githubusercontent.com/sanderjo/NZBs/master/reftestnzb_weird_0x1f_in_filename_4fdcb05d2b4f.nzb
On Linux with ext4, it goes well:
```
total 15372
drwxrwxr-x 2 sander sander 4096 feb 18 08:42 ./
drwxrwxr-x 28 sander sander 4096 feb 18 08:42 ../
-rw-rw-r-- 1 sander sander 5242880 feb 18 08:32 'All OK Nothing Wrong.bin'
-rw-rw-r-- 1 sander sander 10485760 feb 18 08:32 'Hello Some Ugly '$'\037'' Char 2023.bin'
-rw-rw-r-- 1 sander sander 326 feb 18 08:35 readme.txt
```
trying out sander's nzb which is a little different. original issue the file is not in a rarset.
with sanders rarset, its got a different outcome as the assembler is fine with the rarset but then the stuff breaks directunpacker due to unrar doing the "Cannot create" warning..
```
2023-02-18 01:57:54,447::INFO::[directunpacker:220] Error in DirectUnpack of weird_char: Cannot create \\?\C:\sab\downloads\complete\raw\_UNPACK_reftestnzb.weird.0x1f.in.filename.4fdcb05d2b4f\Hello Some Ugly Char 2023.bin
2023-02-18 01:57:54,447::INFO::[directunpacker:454] Aborting DirectUnpack for weird_char
2023-02-18 01:57:54,863::DEBUG::[filesystem:941] Removing dir recursively \\?\C:\sab\downloads\complete\raw\_UNPACK_reftestnzb.weird.0x1f.in.filename.4fdcb05d2b4f
2023-02-18 01:57:54,865::DEBUG::[directunpacker:334] DirectUnpack Unrar output
UNRAR 6.20 x64 freeware Copyright (c) 1993-2023 Alexander Roshal
Extracting from \\?\C:\sab\downloads\incomplete\reftestnzb_weird_0x1f_in_filename_4fdcb05d2b4f\weird_char.part1.rar
Extracting \\?\C:\sab\downloads\complete\raw\_UNPACK_reftestnzb.weird.0x1f.in.filename.4fdcb05d2b4f\All OK Nothing Wrong.bin OK
Cannot create \\?\C:\sab\downloads\complete\raw\_UNPACK_reftestnzb.weird.0x1f.in.filename.4fdcb05d2b4f\Hello Some Ugly Char 2023.bin
2023-02-18 01:57:55,667::INFO::[downloader:437] Waiting for post-processing to finish
```
full log: https://gist.github.com/thezoggy/3fa48538f2a18fd5ed52d2debaf092c0
and doing it manually from cli, can confirm that while unrar show the warning, we could continue this one and would have been fine as unrar makes the substitution:
```
PS C:\sab\Downloads\incomplete\reftestnzb_weird_0x1f_in_filename_4fdcb05d2b4f> & 'C:\Program Files\sabnzbd-dev\win\unrar\x64\UnRAR.exe' e -vp -idp -scf -o+ -ai -p- weird_char.part1.rar .
UNRAR 6.20 x64 freeware Copyright (c) 1993-2023 Alexander Roshal
Extracting from weird_char.part1.rar
Extracting .\All OK Nothing Wrong.bin OK
Cannot create .\Hello Some Ugly ▼ Char 2023.bin
The filename, directory name, or volume label syntax is incorrect.
WARNING: Attempting to correct the invalid file or directory name
Renaming .\Hello Some Ugly ▼ Char 2023.bin to .\Hello Some Ugly _ Char 2023.bin
Extracting .\Hello Some Ugly _ Char 2023.bin
Insert disk with weird_char.part2.rar [C]ontinue, [Q]uit C
Extracting from weird_char.part2.rar
... Hello Some Ugly ▼ Char 2023.bin
Insert disk with weird_char.part3.rar [C]ontinue, [Q]uit C
Extracting from weird_char.part3.rar
... Hello Some Ugly ▼ Char 2023.bin OK
Extracting .\readme.txt OK
Total errors: 1
PS C:\sab\Downloads\incomplete\reftestnzb_weird_0x1f_in_filename_4fdcb05d2b4f> ls
Directory: C:\sab\Downloads\incomplete\reftestnzb_weird_0x1f_in_filename_4fdcb05d2b4f
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2/18/2023 1:57 AM __ADMIN__
-a---- 2/18/2023 1:32 AM 5242880 All OK Nothing Wrong.bin
-a---- 2/18/2023 1:32 AM 10485760 Hello Some Ugly _ Char 2023.bin
-a---- 2/18/2023 1:35 AM 326 readme.txt
-a---- 2/18/2023 1:57 AM 6291456 weird_char.part1.rar
-a---- 2/18/2023 1:57 AM 6291456 weird_char.part2.rar
-a---- 2/18/2023 1:57 AM 3146897 weird_char.part3.rar
``` | 2023-02-18T09:26:50Z | 2023-02-18T21:48:00Z | ["tests/test_filesystem.py::TestCheckMountWin::test_dir_nonexistent_win", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_foldername_empty_result", "tests/test_filesystem.py::TestClipLongPath::test_nothing_to_clip_win", "tests/test_filesystem.py::TestSameFile::test_same", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_filename_empty_result", "tests/test_filesystem.py::TestListdirFullWin::test_exception_appledouble", "tests/test_filesystem.py::TestUnwantedExtensions::test_has_unwanted_extension_empty_whitelist", "tests/test_filesystem.py::TestListdirFull::test_exception_dsstore", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_win_devices_not_win", "tests/test_filesystem.py::TestRenamer::test_renamer", "tests/test_filesystem.py::TestSanitizeFiles::test_sanitize_files_input", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_colon_handling_macos", "tests/test_filesystem.py::TestGetUniqueDirFilename::test_creating_dir", "tests/test_filesystem.py::TestGetUniqueDirFilename::test_nonexistent_dir", "tests/test_filesystem.py::TestCheckMountWin::test_existing_dir_win", "tests/test_filesystem.py::TestListdirFullWin::test_exception_dsstore", "tests/test_filesystem.py::TestListdirFull::test_no_exceptions", "tests/test_filesystem.py::TestCheckMountLinux::test_dir_outsider_linux", "tests/test_filesystem.py::TestSetPermissionsWin::test_win32", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_sanitize_safe_linux", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_char_collections", "tests/test_filesystem.py::TestSameFile::test_nothing_in_common_unix_paths", "tests/test_filesystem.py::TestSetPermissions::test_dir1755_permissions4755_setting", "tests/test_filesystem.py::TestCheckMountWin::test_bare_mountpoint_win", "tests/test_filesystem.py::TestClipLongPath::test_nothing_to_lenghten_win", "tests/test_filesystem.py::TestSetPermissions::test_dir0450_permissions0617_setting", "tests/test_filesystem.py::TestSetPermissions::test_dir0777_permissions0760_setting", "tests/test_filesystem.py::TestCheckMountWin::test_dir_outsider_win", "tests/test_filesystem.py::TestGetUniqueDirFilename::test_existing_file_without_extension", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_win_devices_on_win", "tests/test_filesystem.py::TestCheckMountMacOS::test_dir_outsider_macos", "tests/test_filesystem.py::TestSameFile::test_capitalization", "tests/test_filesystem.py::TestCheckMountMacOS::test_dir_nonexistent_macos", "tests/test_filesystem.py::TestGetUniqueDirFilename::test_nonexistent_file", "tests/test_filesystem.py::TestCreateAllDirsWin::test_create_all_dirs", "tests/test_filesystem.py::TestListdirFull::test_invalid_file_argument", "tests/test_filesystem.py::TestCreateAllDirs::test_basic_folder_creation", "tests/test_filesystem.py::TestClipLongPath::test_clip_path_win", "tests/test_filesystem.py::TestClipLongPath::test_long_path_win", "tests/test_filesystem.py::TestUnwantedExtensions::test_has_unwanted_extension_blacklist_mode", "tests/test_filesystem.py::TestListdirFull::test_exception_appledouble", "tests/test_filesystem.py::TestCheckMountMacOS::test_existing_dir_macos", "tests/test_filesystem.py::TestUnwantedExtensions::test_has_unwanted_extension_empty_blacklist", "tests/test_filesystem.py::TestListdirFullWin::test_invalid_file_argument", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_filename_too_long", "tests/test_filesystem.py::TestListdirFullWin::test_no_exceptions", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_colon_handling_other", "tests/test_filesystem.py::TestCheckMountMacOS::test_bare_mountpoint_macos", "tests/test_filesystem.py::TestCheckMountLinux::test_dir_nonexistent_linux", "tests/test_filesystem.py::TestClipLongPath::test_empty", "tests/test_filesystem.py::TestSameFile::test_nothing_in_common_win_paths", "tests/test_filesystem.py::TestDirectoryWriting::test_directory_is_writable", "tests/test_filesystem.py::TestUnwantedExtensions::test_has_unwanted_extension_whitelist_mode", "tests/test_filesystem.py::TestSetPermissions::test_empty_permissions_setting", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_filename_dot", "tests/test_filesystem.py::TestCreateAllDirs::test_no_permissions", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_foldername_dot", "tests/test_filesystem.py::TestClipLongPath::test_long_path_non_win", "tests/test_filesystem.py::TestSameFile::test_posix_fun", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_empty", "tests/test_filesystem.py::TestSetPermissions::test_dir0444_permissions2455_setting", "tests/test_filesystem.py::TestCheckMountLinux::test_existing_dir_linux", "tests/test_filesystem.py::TestSameFile::test_capitalization_linux", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_colon_handling_windows", "tests/test_filesystem.py::TestSanitizeFiles::test_sanitize_files", "tests/test_filesystem.py::TestListdirFull::test_nonexistent_dir", "tests/test_filesystem.py::TestGetUniqueDirFilename::test_existing_file", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_folder_illegal_chars_linux", "tests/test_filesystem.py::TestCheckMountLinux::test_bare_mountpoint_linux", "tests/test_filesystem.py::TestClipLongPath::test_clip_path_non_win", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_long_foldername", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_legal_chars_linux", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_file_illegal_chars_linux", "tests/test_filesystem.py::TestCheckMountWin::test_dir_on_nonexistent_drive_win", "tests/test_filesystem.py::TestListdirFullWin::test_nonexistent_dir", "tests/test_filesystem.py::TestSameFile::test_subfolder"] | [] | ["tests/test_filesystem.py::TestFileFolderNameSanitizer::test_folder_illegal_chars_win32", "tests/test_filesystem.py::TestCreateAllDirs::test_permissions_770", "tests/test_filesystem.py::TestCreateAllDirs::test_permissions_600", "tests/test_filesystem.py::TestFileFolderNameSanitizer::test_file_illegal_chars_win32", "tests/test_filesystem.py::TestCreateAllDirs::test_permissions_777"] | ["tests", "tests/test_filesystem.py::TestCreateAllDirs::test_permissions_450 - Fa..."] | {"install": [], "pre_install": [], "python": "3.11", "pip_packages": ["async-generator==1.10", "attrs==21.4.0", "babelfish==0.6.0", "black==23.1.0", "blinker==1.5", "brotlipy==0.7.0", "certifi==2022.12.7", "cffi==1.15.1", "chardet==5.1.0", "charset-normalizer==3.0.1", "cheetah3==3.2.6.post1", "cheroot==9.0.0", "cherrypy==18.8.0", "click==8.1.3", "configobj==5.0.8", "cryptography==39.0.1", "decorator==5.1.1", "docopt==0.6.2", "feedparser==6.0.10", "flaky==3.7.0", "flask==2.1.3", "guessit==3.5.0", "h11==0.14.0", "httpbin==0.7.0", "idna==3.4", "importlib-metadata==6.0.0", "iniconfig==2.0.0", "itsdangerous==2.1.2", "jaraco-classes==3.2.3", "jaraco-collections==3.8.0", "jaraco-context==4.3.0", "jaraco-functools==3.5.2", "jaraco-text==3.8.1", "jinja2==3.1.2", "jmespath==0.10.0", "jsonschema==3.2.0", "lxml==4.9.2", "markupsafe==2.1.2", "more-itertools==9.0.0", "mypy-extensions==1.0.0", "notify2==0.3.1", "outcome==1.2.0", "packaging==23.0", "paho-mqtt==1.5.1", "pathspec==0.11.0", "pbr==5.11.1", "pkginfo==1.9.6", "platformdirs==3.0.0", "pluggy==1.0.0", "portend==3.1.0", "puremagic==1.14", "pycparser==2.21", "pyfakefs==5.1.0", "pyjwt==2.6.0", "pykwalify==1.8.0", "pyrsistent==0.19.3", "pysocks==1.7.1", "pytest==7.2.1", "pytest-asyncio==0.20.3", "pytest-httpbin==1.0.2", "pytest-httpserver==1.0.6", "pytest-mock==3.10.0", "python-box==5.4.1", "python-dateutil==2.8.2", "pytz==2022.7.1", "pyyaml==6.0", "raven==6.10.0", "rebulk==3.1.0", "requests==2.28.2", "ruamel-yaml==0.17.21", "sabctools==6.0.0", "selenium==4.8.2", "setuptools==67.3.2", "sgmllib3k==1.0.0", "six==1.16.0", "sniffio==1.3.0", "sortedcontainers==2.4.0", "stevedore==3.3.3", "tavalidate==0.0.6", "tavern==1.25.2", "tempora==5.2.1", "trio==0.22.0", "trio-websocket==0.9.2", "ujson==5.7.0", "urllib3==1.26.14", "werkzeug==2.0.3", "wheel==0.44.0", "wsproto==1.2.0", "xmltodict==0.13.0", "zc-lockfile==2.0", "zipp==3.14.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
sabnzbd/sabnzbd | sabnzbd__sabnzbd-2253 | 4b42b1f55d857a9a21cb9162f4f1b5145d8e2a3e | diff --git a/sabnzbd/cfg.py b/sabnzbd/cfg.py
index fb4dd437c33..fcfa46d5233 100644
--- a/sabnzbd/cfg.py
+++ b/sabnzbd/cfg.py
@@ -22,6 +22,8 @@
import logging
import re
import argparse
+import socket
+import ipaddress
from typing import List, Tuple
import sabnzbd
@@ -147,6 +149,48 @@ def validate_server(value):
return None, value
+def validate_host(value):
+ """Check if host is valid: an IP address, or a name/FQDN that resolves to an IP address"""
+
+ # easy: value is a plain IPv4 or IPv6 address:
+ try:
+ ipaddress.ip_address(value)
+ # valid host, so return it
+ return None, value
+ except:
+ pass
+
+ # we don't want a plain number. As socket.getaddrinfo("100", ...) allows that, we have to pre-check
+ try:
+ int(value)
+ # plain int as input, which is not allowed
+ return T("Invalid server address."), None
+ except:
+ pass
+
+ # not a plain IPv4 nor IPv6 address, so let's check if it's a name that resolves to IPv4
+ try:
+ socket.getaddrinfo(value, None, socket.AF_INET)
+ # all good
+ logging.debug("Valid host name")
+ return None, value
+ except:
+ pass
+
+ # ... and if not: does it resolve to IPv6 ... ?
+ try:
+ socket.getaddrinfo(value, None, socket.AF_INET6)
+ # all good
+ logging.debug("Valid host name")
+ return None, value
+ except:
+ logging.debug("No valid host name")
+ pass
+
+ # if we get here, it is not valid host, so return None
+ return T("Invalid server address."), None
+
+
def validate_script(value):
"""Check if value is a valid script"""
if not sabnzbd.__INITIALIZED__ or (value and sabnzbd.filesystem.is_valid_script(value)):
@@ -226,7 +270,7 @@ def validate_notempty(root, value, default):
autobrowser = OptionBool("misc", "auto_browser", True)
language = OptionStr("misc", "language", "en")
enable_https_verification = OptionBool("misc", "enable_https_verification", True)
-cherryhost = OptionStr("misc", "host", DEF_HOST)
+cherryhost = OptionStr("misc", "host", DEF_HOST, validation=validate_host)
cherryport = OptionStr("misc", "port", DEF_PORT)
https_port = OptionStr("misc", "https_port")
username = OptionStr("misc", "username")
| diff --git a/tests/test_cfg.py b/tests/test_cfg.py
index 9a5891fe423..4ce5aa2fc79 100644
--- a/tests/test_cfg.py
+++ b/tests/test_cfg.py
@@ -19,6 +19,7 @@
tests.test_cfg - Testing functions in cfg.py
"""
import sabnzbd.cfg as cfg
+import socket
class TestValidators:
@@ -97,3 +98,19 @@ def test_lower_case_ext(self):
assert cfg.lower_case_ext(".Bla") == (None, "bla")
assert cfg.lower_case_ext([".foo", ".bar"]) == (None, ["foo", "bar"])
assert cfg.lower_case_ext([".foo ", " .bar"]) == (None, ["foo", "bar"])
+
+ def test_validate_host(self):
+
+ # valid input
+ assert cfg.validate_host("127.0.0.1") == (None, "127.0.0.1")
+ assert cfg.validate_host("0.0.0.0") == (None, "0.0.0.0")
+ assert cfg.validate_host("1.1.1.1") == (None, "1.1.1.1")
+ assert cfg.validate_host("::1") == (None, "::1")
+ assert cfg.validate_host("::") == (None, "::")
+ assert cfg.validate_host("www.example.com")[1]
+ assert cfg.validate_host(socket.gethostname())[1] # resolves to something
+
+ # non-valid input. Should return None as second parameter
+ assert not cfg.validate_host("0.0.0.0.")[1] # Trailing dot
+ assert not cfg.validate_host("kajkdjflkjasd")[1] # does not resolve
+ assert not cfg.validate_host("100")[1] # just a number
| SABnzbd's GUI accepts non-valid IP address or name as input for Config -> General -> SABnzbd Host
Triggered by https://forums.sabnzbd.org/viewtopic.php?p=127870#p127870
SAB's GUI accepts `0.0.0.0.` (note the trailing dot) and other incorrect as input, but then refuses startup.
I'll come up with a solution, probably a `validation=` in https://github.com/sabnzbd/sabnzbd/blob/develop/sabnzbd/cfg.py , with help of `socket.getaddrinfo('::', None, socket.AF_INET)` and `socket.getaddrinfo('::', None, socket.AF_INET6)`
Looks useful for the newsservers names too.
| 2022-07-27T09:47:21Z | 2022-08-12T14:43:41Z | ["tests/test_cfg.py::TestValidators::test_clean_nice_ionice_parameters_blocked", "tests/test_cfg.py::TestValidators::test_validate_single_tag", "tests/test_cfg.py::TestValidators::test_clean_nice_ionice_parameters_allowed"] | [] | ["tests/test_cfg.py::TestValidators::test_validate_host", "tests/test_cfg.py::TestValidators::test_lower_case_ext"] | [] | {"install": [], "pre_install": [], "python": "3.10", "pip_packages": ["async-generator==1.10", "attrs==22.1.0", "babelfish==0.6.0", "black==22.6.0", "blinker==1.5", "brotlipy==0.7.0", "certifi==2022.6.15", "cffi==1.15.1", "chardet==5.0.0", "charset-normalizer==2.1.0", "cheetah3==3.2.6", "cheroot==8.6.0", "cherrypy==18.8.0", "click==8.1.3", "configobj==5.0.6", "cryptography==37.0.4", "decorator==5.1.1", "docopt==0.6.2", "feedparser==6.0.10", "flaky==3.7.0", "flask==2.1.3", "guessit==3.4.3", "h11==0.13.0", "httpbin==0.7.0", "idna==3.3", "iniconfig==1.1.1", "itsdangerous==2.1.2", "jaraco-classes==3.2.2", "jaraco-collections==3.5.2", "jaraco-context==4.1.2", "jaraco-functools==3.5.1", "jaraco-text==3.8.1", "jinja2==3.1.2", "jmespath==0.10.0", "lxml==4.9.1", "markupsafe==2.1.1", "more-itertools==8.13.0", "mypy-extensions==0.4.3", "notify2==0.3.1", "outcome==1.2.0", "packaging==21.3", "paho-mqtt==1.5.1", "pathspec==0.9.0", "pbr==5.10.0", "pkginfo==1.8.3", "platformdirs==2.5.2", "pluggy==1.0.0", "portend==3.1.0", "puremagic==1.14", "py==1.11.0", "pycparser==2.21", "pyfakefs==4.6.3", "pyjwt==2.4.0", "pykwalify==1.8.0", "pyopenssl==22.0.0", "pyparsing==3.0.9", "pysocks==1.7.1", "pytest==7.1.2", "pytest-httpbin==1.0.2", "pytest-httpserver==1.0.5", "python-box==5.4.1", "python-dateutil==2.8.2", "pytz==2022.1", "pyyaml==6.0", "raven==6.10.0", "rebulk==3.1.0", "requests==2.28.1", "ruamel-yaml==0.17.21", "ruamel-yaml-clib==0.2.6", "sabyenc3==5.4.3", "selenium==4.2.0", "setuptools==64.0.3", "sgmllib3k==1.0.0", "six==1.16.0", "sniffio==1.2.0", "sortedcontainers==2.4.0", "stevedore==4.0.0", "tavalidate==0.0.6", "tavern==1.23.3", "tempora==5.0.2", "tomli==2.0.1", "trio==0.21.0", "trio-websocket==0.9.2", "ujson==5.4.0", "urllib3==1.26.11", "werkzeug==2.0.3", "wheel==0.44.0", "wsproto==1.1.0", "xmltodict==0.13.0", "zc-lockfile==2.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
sabnzbd/sabnzbd | sabnzbd__sabnzbd-1794 | c7b54856c5fd4182263133dc3e03827471ca981e | diff --git a/interfaces/Config/templates/config_sorting.tmpl b/interfaces/Config/templates/config_sorting.tmpl
index 2fdd0caa766..322a0a155f4 100644
--- a/interfaces/Config/templates/config_sorting.tmpl
+++ b/interfaces/Config/templates/config_sorting.tmpl
@@ -130,6 +130,11 @@
<td>%e_n</td>
<td>$T('ep-us-name')</td>
</tr>
+ <tr>
+ <td class="align-right"><b>$T('Resolution'):</b></td>
+ <td>%r</td>
+ <td>1080p</td>
+ </tr>
<tr>
<td class="align-right"><b>$T('fileExt'):</b></td>
<td>%ext</td>
@@ -245,6 +250,11 @@
<td>%y</td>
<td>2009</td>
</tr>
+ <tr>
+ <td class="align-right"><b>$T('Resolution'):</b></td>
+ <td>%r</td>
+ <td>1080p</td>
+ </tr>
<tr>
<td class="align-right"><b>$T('extension'):</b></td>
<td>%ext</td>
@@ -407,6 +417,11 @@
<td>%0decade</td>
<td>2000</td>
</tr>
+ <tr>
+ <td class="align-right"><b>$T('Resolution'):</b></td>
+ <td>%r</td>
+ <td>1080p</td>
+ </tr>
<tr>
<td class="align-right"><b>$T('orgFilename'):</b></td>
<td>%fn</td>
diff --git a/sabnzbd/constants.py b/sabnzbd/constants.py
index eab736a5634..0eb2c8085e2 100644
--- a/sabnzbd/constants.py
+++ b/sabnzbd/constants.py
@@ -141,6 +141,8 @@
sample_match = r"((^|[\W_])(sample|proof))" # something-sample or something-proof
+resolution_match = r"(^|[\W_])((240|360|480|540|576|720|900|1080|1440|2160|4320)[piP])([\W_]|$)" # 576i, 720p, 1080P
+
class Status:
COMPLETED = "Completed" # PP: Job is finished
diff --git a/sabnzbd/sorting.py b/sabnzbd/sorting.py
index 908fb052b67..294bf0f5f1f 100644
--- a/sabnzbd/sorting.py
+++ b/sabnzbd/sorting.py
@@ -38,7 +38,7 @@
sanitize_foldername,
clip_path,
)
-from sabnzbd.constants import series_match, date_match, year_match, sample_match
+from sabnzbd.constants import series_match, date_match, year_match, sample_match, resolution_match
import sabnzbd.cfg as cfg
from sabnzbd.nzbstuff import NzbObject
@@ -359,6 +359,9 @@ def get_showdescriptions(self):
self.nzo, self.match_obj, self.original_job_name
)
+ def get_show_resolution(self):
+ self.show_info["resolution"] = get_resolution(self.original_job_name)
+
def get_values(self):
""" Collect and construct all the values needed for path replacement """
try:
@@ -374,6 +377,9 @@ def get_values(self):
# - Episode Name
self.get_showdescriptions()
+ # - Resolution
+ self.get_show_resolution()
+
return True
except:
@@ -422,6 +428,9 @@ def construct_path(self):
mapping.append(("%e", self.show_info["episode_num"]))
mapping.append(("%0e", self.show_info["episode_num_alt"]))
+ # Replace resolution
+ mapping.append(("%r", self.show_info["resolution"]))
+
# Make sure unsupported %desc is removed
mapping.append(("%desc", ""))
@@ -635,6 +644,9 @@ def get_values(self):
year = ""
self.movie_info["year"] = year
+ # Get resolution
+ self.movie_info["resolution"] = get_resolution(self.original_job_name)
+
# - Get Decades
self.movie_info["decade"], self.movie_info["decade_two"] = get_decades(year)
@@ -680,6 +692,9 @@ def construct_path(self):
# Replace year
mapping.append(("%y", self.movie_info["year"]))
+ # Replace resolution
+ mapping.append(("%r", self.movie_info["resolution"]))
+
# Replace decades
mapping.append(("%decade", self.movie_info["decade"]))
mapping.append(("%0decade", self.movie_info["decade_two"]))
@@ -854,6 +869,9 @@ def get_values(self):
# - Get Decades
self.date_info["decade"], self.date_info["decade_two"] = get_decades(self.date_info["year"])
+ # - Get resolution
+ self.date_info["resolution"] = get_resolution(self.original_job_name)
+
# - Get Title
self.date_info["ttitle"], self.date_info["ttitle_two"], self.date_info["ttitle_three"] = get_titles(
self.nzo, self.match_obj, self.original_job_name, True
@@ -899,6 +917,9 @@ def construct_path(self):
mapping.append(("%year", self.date_info["year"]))
mapping.append(("%y", self.date_info["year"]))
+ # Replace resolution
+ mapping.append(("%r", self.date_info["resolution"]))
+
if self.date_info["ep_name"]:
mapping.append(("%desc", self.date_info["ep_name"]))
mapping.append(("%.desc", self.date_info["ep_name_two"]))
@@ -1129,6 +1150,16 @@ def get_decades(year):
return decade, decade2
+def get_resolution(job_name):
+ try:
+ RE_RESOLUTION = re.compile(resolution_match)
+ # Use the last match, lowercased
+ resolution = RE_RESOLUTION.findall(job_name)[-1][1].lower()
+ except Exception:
+ resolution = ""
+ return resolution
+
+
def check_for_folder(path):
""" Return True if any folder is found in the tree at 'path' """
for _root, dirs, _files in os.walk(path):
| diff --git a/tests/test_sorting.py b/tests/test_sorting.py
new file mode 100644
index 00000000000..a5086c97fc7
--- /dev/null
+++ b/tests/test_sorting.py
@@ -0,0 +1,46 @@
+#!/usr/bin/python3 -OO
+# Copyright 2007-2021 The SABnzbd-Team <[email protected]>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+"""
+tests.test_sorting - Testing functions in sorting.py
+"""
+
+from sabnzbd import sorting
+from tests.testhelper import *
+
+
+class TestSorting:
+ @pytest.mark.parametrize(
+ "job_name, result",
+ [
+ ("Ubuntu.optimized.for.1080p.Screens-Canonical", "1080p"),
+ ("Debian_for_240i_Scientific_Calculators-FTPMasters", "240i"),
+ ("OpenBSD Streaming Edition 4320P", "4320p"), # Lower-case result
+ ("Surely.1080p.is.better.than.720p", "720p"), # Last hit wins
+ ("2160p.Campaign.Video", "2160p"), # Resolution at the start
+ ("Some.Linux.Iso.1234p", ""), # Non-standard resolution
+ ("No.Resolution.Anywhere", ""),
+ ("not.keeping.its1080p.distance", ""), # No separation
+ ("not_keeping_1440idistance_either", ""),
+ ("240 is a semiperfect and highly composite number", ""), # Number only
+ (480, ""),
+ (None, ""),
+ ("", ""),
+ ],
+ )
+ def test_get_resolution(self, job_name, result):
+ assert sorting.get_resolution(job_name) == result
| Movie Sorting - Please add resolution under Pattern key
Here's my sort string. I want resolution (720p/1080p depending on the movie) in my folder name currently not available in the pattern key. %.title.%y/%.title.%y.%ext
Example result.
Movie.Name.2009.720p or 1080p\Movie.Name.2009 CD1.mkv
| 2021-02-10T10:17:54Z | 2021-02-10T13:12:06Z | [] | [] | ["tests/test_sorting.py::TestSorting::test_get_resolution[not_keeping_1440idistance_either-]", "tests/test_sorting.py::TestSorting::test_get_resolution[None-]", "tests/test_sorting.py::TestSorting::test_get_resolution[-]", "tests/test_sorting.py::TestSorting::test_get_resolution[480-]", "tests/test_sorting.py::TestSorting::test_get_resolution[Some.Linux.Iso.1234p-]", "tests/test_sorting.py::TestSorting::test_get_resolution[240 is a semiperfect and highly composite number-]", "tests/test_sorting.py::TestSorting::test_get_resolution[not.keeping.its1080p.distance-]", "tests/test_sorting.py::TestSorting::test_get_resolution[Surely.1080p.is.better.than.720p-720p]", "tests/test_sorting.py::TestSorting::test_get_resolution[Ubuntu.optimized.for.1080p.Screens-Canonical-1080p]", "tests/test_sorting.py::TestSorting::test_get_resolution[Debian_for_240i_Scientific_Calculators-FTPMasters-240i]", "tests/test_sorting.py::TestSorting::test_get_resolution[No.Resolution.Anywhere-]", "tests/test_sorting.py::TestSorting::test_get_resolution[2160p.Campaign.Video-2160p]", "tests/test_sorting.py::TestSorting::test_get_resolution[OpenBSD Streaming Edition 4320P-4320p]"] | [] | {"install": [], "pre_install": [], "python": "3.9", "pip_packages": ["attrs==20.3.0", "blinker==1.4", "brotlipy==0.7.0", "certifi==2020.12.5", "cffi==1.14.4", "chardet==4.0.0", "cheetah3==3.2.6", "cheroot==8.5.2", "cherrypy==18.6.0", "click==7.1.2", "configobj==5.0.6", "cryptography==3.4.4", "decorator==4.4.2", "docopt==0.6.2", "feedparser==6.0.2", "flaky==3.7.0", "flask==1.1.2", "httpbin==0.7.0", "idna==2.10", "iniconfig==1.1.1", "itsdangerous==1.1.0", "jaraco-classes==3.2.0", "jaraco-collections==3.1.0", "jaraco-functools==3.2.0", "jaraco-text==3.4.0", "jinja2==2.11.3", "jmespath==0.10.0", "lxml==4.6.2", "markupsafe==1.1.1", "more-itertools==8.7.0", "notify2==0.3.1", "packaging==20.9", "paho-mqtt==1.5.1", "pbr==5.5.1", "pluggy==0.13.1", "portend==2.7.0", "py==1.10.0", "pycparser==2.20", "pyfakefs==4.3.3", "pyjwt==1.7.1", "pykwalify==1.7.0", "pyparsing==2.4.7", "pytest==6.2.2", "pytest-httpbin==1.0.0", "pytest-httpserver==0.3.7", "python-box==5.2.0", "python-dateutil==2.8.1", "pytz==2021.1", "pyyaml==5.4.1", "raven==6.10.0", "requests==2.25.1", "sabyenc3==4.0.2", "selenium==3.141.0", "setuptools==53.0.0", "sgmllib3k==1.0.0", "six==1.15.0", "stevedore==3.3.0", "tavalidate==0.0.6", "tavern==1.13.1", "tempora==4.0.1", "toml==0.10.2", "urllib3==1.26.3", "werkzeug==1.0.1", "wheel==0.44.0", "xmltodict==0.12.0", "zc-lockfile==2.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
mkdocs/mkdocs | mkdocs__mkdocs-3700 | 30e8142315127bcc2b05ee14ff99f300a7126a87 | diff --git a/mkdocs/theme.py b/mkdocs/theme.py
index bf5872015e..b45f107920 100644
--- a/mkdocs/theme.py
+++ b/mkdocs/theme.py
@@ -138,6 +138,9 @@ def _load_theme_config(self, name: str) -> None:
f"Please upgrade to a current version of the theme."
)
+ if theme_config is None:
+ theme_config = {}
+
log.debug(f"Loaded theme configuration for '{name}' from '{file_path}': {theme_config}")
if parent_theme := theme_config.pop('extends', None):
| diff --git a/mkdocs/tests/theme_tests.py b/mkdocs/tests/theme_tests.py
index f9989fb3f4..ddc526bfed 100644
--- a/mkdocs/tests/theme_tests.py
+++ b/mkdocs/tests/theme_tests.py
@@ -104,3 +104,22 @@ def test_inherited_theme(self):
],
)
self.assertEqual(theme.static_templates, {'sitemap.xml', 'child.html', 'parent.html'})
+
+ def test_empty_config_file(self):
+ # Test for themes with *empty* mkdocs_theme.yml.
+ # See https://github.com/mkdocs/mkdocs/issues/3699
+ m = mock.Mock(
+ # yaml.load returns "None" for an empty file
+ side_effect=[None]
+ )
+ with mock.patch('yaml.load', m) as m:
+ theme = Theme(name='mkdocs')
+ # Should only have the default name and locale __vars set in
+ # Theme.__init__()
+ self.assertEqual(
+ dict(theme),
+ {
+ 'name': 'mkdocs',
+ 'locale': parse_locale('en'),
+ },
+ )
| Empty mkdocs_theme.yml breaks build
Hello! In the docs its [stated](https://www.mkdocs.org/dev-guide/themes/#theme-configuration) that a theme **can** have an empty `mkdocs_theme.yml` file:
> However, if the theme offers no configuration options, the file is still required and can be left blank.
Unfortunately this seems to have changed recently and now themes with empty `mkdocs_theme.yml` files are causing an exception when building:
```shell
> mkdocs build --verbose
DEBUG - Loading configuration file: ./mkdocs.yml
DEBUG - Loaded theme configuration for 'custom_theme' from
'./venv/lib/python3.12/site-packages/custom_theme/mkdocs_theme.yml':
None
Traceback (most recent call last):
[...]
File "./venv/lib/python3.12/site-packages/mkdocs/config/config_options.py", line 868, in run_validation
return theme.Theme(**theme_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "./venv/lib/python3.12/site-packages/mkdocs/theme.py", line 61, in __init__
self._load_theme_config(name)
File "./venv/lib/python3.12/site-packages/mkdocs/theme.py", line 143, in _load_theme_config
if parent_theme := theme_config.pop('extends', None):
^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'pop'
```
| 2024-05-09T14:28:04Z | 2024-05-10T08:31:09Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_page_title_from_markdown_with_email (tests.structure.page_tests.PageTests.test_page_title_from_markdown_with_email)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_anchor_warning_for_footnote (tests.build_tests.BuildTests.test_anchor_warning_for_footnote)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_get_themes_warning (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_warning)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_absolute_link_with_validation (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_page_title_from_markdown_strip_comments (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_comments)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_copy_file_from_content (tests.structure.file_tests.TestFiles.test_copy_file_from_content)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_empty_config_file (tests.theme_tests.ThemeTests.test_empty_config_file)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_get_themes (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_page_edit_url_custom_from_file (tests.structure.page_tests.PageTests.test_page_edit_url_custom_from_file)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_markdown_strip_footnoteref (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_footnoteref)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_get_theme_dir_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_error)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_absolute_anchor_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_anchor_link_with_validation_and_suggestion)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_file_overwrite_attrs (tests.structure.file_tests.TestFiles.test_file_overwrite_attrs)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_draft_pages_with_invalid_links (tests.build_tests.BuildTests.test_draft_pages_with_invalid_links)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_anchor_warning_and_query (tests.build_tests.BuildTests.test_anchor_warning_and_query)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_get_theme_dir_importerror (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_importerror)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_generated_file (tests.structure.file_tests.TestFiles.test_generated_file)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_anchor_no_warning (tests.build_tests.BuildTests.test_anchor_no_warning)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_file_sort_key (tests.structure.file_tests.TestFiles.test_file_sort_key)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_get_theme_dir (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_absolute_anchor_link_with_validation (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_anchor_link_with_validation)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_page_title_from_markdown_html_entity (tests.structure.page_tests.PageTests.test_page_title_from_markdown_html_entity)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_absolute_self_anchor_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_self_anchor_link_with_validation_and_suggestion)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_absolute_link_preserved_and_warned (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_preserved_and_warned)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_page_title_from_markdown_strip_image (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_image)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_anchor_no_warning_with_html (tests.build_tests.BuildTests.test_anchor_no_warning_with_html)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_files_move_to_end (tests.structure.file_tests.TestFiles.test_files_move_to_end)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_nav_absolute_links_with_validation (tests.structure.nav_tests.SiteNavigationTests.test_nav_absolute_links_with_validation)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_generated_file_constructor (tests.structure.file_tests.TestFiles.test_generated_file_constructor)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_page_title_from_markdown_strip_raw_html (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_raw_html)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_absolute_link_with_validation_just_slash (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation_just_slash)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_get_themes_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_error)", "test_absolute_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation_and_suggestion)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_absolute_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_self_anchor_link_with_suggestion)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_anchor_warning (tests.build_tests.BuildTests.test_anchor_warning)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.3.6\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.4; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"mkdocs-get-deps >=0.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.3.6\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.4; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"mkdocs-get-deps ==0.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\",\n]\n\n[tool.hatch.env]\nrequires = [\"hatch-mkdocs\", \"hatch-pip-compile\"]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.env.collectors.mkdocs.integration]\npath = \"mkdocs.yml\"\n[tool.hatch.envs.integration]\ndetached = false\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ntype = \"pip-compile\"\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs {args}\"\n]\nfix = [\n \"lint --fix\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js -S \"*.map\"'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n\n[tool.hatch.env.collectors.mkdocs.docs]\npath = \"mkdocs.yml\"\n[tool.hatch.envs.docs]\ntype = \"pip-compile\"\ndetached = false\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.3.0", "build==1.2.1", "certifi==2024.2.2", "cffi==1.16.0", "click==8.1.7", "colorama==0.4.6", "cryptography==42.0.7", "distlib==0.3.8", "filelock==3.14.0", "ghp-import==2.1.0", "griffe==0.38.0", "h11==0.14.0", "hatch==1.10.0", "hatchling==1.24.2", "httpcore==1.0.5", "httpx==0.27.0", "hyperlink==21.0.0", "idna==3.7", "jaraco-classes==3.4.0", "jaraco-context==5.3.0", "jaraco-functools==4.0.1", "jeepney==0.8.0", "jinja2==3.1.2", "keyring==25.2.0", "markdown==3.5.1", "markdown-callouts==0.3.0", "markdown-it-py==3.0.0", "markupsafe==2.1.3", "mdurl==0.1.2", "mdx-gh-links==0.3.1", "mergedeep==1.3.4", "mkdocs==1.5.3", "mkdocs-autorefs==0.5.0", "mkdocs-click==0.8.1", "mkdocs-get-deps==0.2.0", "mkdocs-literate-nav==0.6.1", "mkdocs-redirects==1.2.1", "mkdocstrings==0.24.0", "mkdocstrings-python==1.7.5", "more-itertools==10.2.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.9.0", "platformdirs==4.0.0", "pluggy==1.5.0", "ptyprocess==0.7.0", "pycparser==2.22", "pygments==2.18.0", "pymdown-extensions==10.4", "pyproject-hooks==1.1.0", "python-dateutil==2.8.2", "pyyaml==6.0.1", "pyyaml-env-tag==0.1", "rich==13.7.1", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "six==1.16.0", "sniffio==1.3.1", "tomli-w==1.0.0", "tomlkit==0.12.5", "trove-classifiers==2024.4.10", "userpath==1.9.2", "uv==0.1.42", "virtualenv==20.26.1", "watchdog==3.0.0", "wheel==0.44.0", "zstandard==0.22.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
|
mkdocs/mkdocs | mkdocs__mkdocs-3451 | 8833edcc947698949803457c9131e55330607519 | diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
index 3a09a0146c..f111bcdc05 100644
--- a/mkdocs/commands/build.py
+++ b/mkdocs/commands/build.py
@@ -131,8 +131,7 @@ def _build_extra_template(template_name: str, files: Files, config: MkDocsConfig
return
try:
- with open(file.abs_src_path, encoding='utf-8', errors='strict') as f:
- template = jinja2.Template(f.read())
+ template = jinja2.Template(file.content_string)
except Exception as e:
log.warning(f"Error reading template '{template_name}': {e}")
return
@@ -292,7 +291,7 @@ def build(config: MkDocsConfig, *, serve_url: str | None = None, dirty: bool = F
# Run `files` plugin events.
files = config.plugins.on_files(files, config=config)
# If plugins have added files but haven't set their inclusion level, calculate it again.
- set_exclusions(files._files, config)
+ set_exclusions(files, config)
nav = get_navigation(files, config)
diff --git a/mkdocs/plugins.py b/mkdocs/plugins.py
index aaf3b203d7..1992cbe66b 100644
--- a/mkdocs/plugins.py
+++ b/mkdocs/plugins.py
@@ -323,6 +323,8 @@ def on_pre_page(self, page: Page, /, *, config: MkDocsConfig, files: Files) -> P
def on_page_read_source(self, /, *, page: Page, config: MkDocsConfig) -> str | None:
"""
+ Deprecated: Since MkDocs 1.6, instead set `content_bytes`/`content_string` of a `File`.
+
The `on_page_read_source` event can replace the default mechanism to read
the contents of a page's source from the filesystem.
@@ -493,6 +495,8 @@ class PluginCollection(dict, MutableMapping[str, BasePlugin]):
by calling `run_event`.
"""
+ _current_plugin: str | None
+
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
self.events: dict[str, list[Callable]] = {k: [] for k in EVENTS}
@@ -551,9 +555,9 @@ def run_event(self, name: str, item=None, **kwargs):
"""
pass_item = item is not None
for method in self.events[name]:
+ self._current_plugin = self._event_origins.get(method, '<unknown>')
if log.getEffectiveLevel() <= logging.DEBUG:
- plugin_name = self._event_origins.get(method, '<unknown>')
- log.debug(f"Running `{name}` event from plugin '{plugin_name}'")
+ log.debug(f"Running `{name}` event from plugin '{self._current_plugin}'")
if pass_item:
result = method(item, **kwargs)
else:
@@ -561,6 +565,7 @@ def run_event(self, name: str, item=None, **kwargs):
# keep item if method returned `None`
if result is not None:
item = result
+ self._current_plugin = None
return item
def on_startup(self, *, command: Literal['build', 'gh-deploy', 'serve'], dirty: bool) -> None:
diff --git a/mkdocs/structure/files.py b/mkdocs/structure/files.py
index 9dfdf588e4..6bc4bfb189 100644
--- a/mkdocs/structure/files.py
+++ b/mkdocs/structure/files.py
@@ -7,8 +7,9 @@
import posixpath
import shutil
import warnings
-from pathlib import PurePath
-from typing import TYPE_CHECKING, Callable, Iterable, Iterator, Sequence
+from functools import cached_property
+from pathlib import PurePath, PurePosixPath
+from typing import TYPE_CHECKING, Callable, Iterable, Iterator, Mapping, Sequence, overload
from urllib.parse import quote as urlquote
import pathspec
@@ -61,50 +62,53 @@ def is_not_in_nav(self):
class Files:
"""A collection of [File][mkdocs.structure.files.File] objects."""
- def __init__(self, files: list[File]) -> None:
- self._files = files
- self._src_uris: dict[str, File] | None = None
+ def __init__(self, files: Iterable[File]) -> None:
+ self._src_uris = {f.src_uri: f for f in files}
def __iter__(self) -> Iterator[File]:
"""Iterate over the files within."""
- return iter(self._files)
+ return iter(self._src_uris.values())
def __len__(self) -> int:
"""The number of files within."""
- return len(self._files)
+ return len(self._src_uris)
def __contains__(self, path: str) -> bool:
- """Whether the file with this `src_uri` is in the collection."""
- return PurePath(path).as_posix() in self.src_uris
+ """Soft-deprecated, prefer `get_file_from_path(path) is not None`."""
+ return PurePath(path).as_posix() in self._src_uris
@property
def src_paths(self) -> dict[str, File]:
"""Soft-deprecated, prefer `src_uris`."""
- return {file.src_path: file for file in self._files}
+ return {file.src_path: file for file in self}
@property
- def src_uris(self) -> dict[str, File]:
+ def src_uris(self) -> Mapping[str, File]:
"""
A mapping containing every file, with the keys being their
[`src_uri`][mkdocs.structure.files.File.src_uri].
"""
- if self._src_uris is None:
- self._src_uris = {file.src_uri: file for file in self._files}
return self._src_uris
def get_file_from_path(self, path: str) -> File | None:
"""Return a File instance with File.src_uri equal to path."""
- return self.src_uris.get(PurePath(path).as_posix())
+ return self._src_uris.get(PurePath(path).as_posix())
def append(self, file: File) -> None:
- """Append file to Files collection."""
- self._src_uris = None
- self._files.append(file)
+ """Add file to the Files collection."""
+ if file.src_uri in self._src_uris:
+ warnings.warn(
+ "To replace an existing file, call `remove` before `append`.", DeprecationWarning
+ )
+ del self._src_uris[file.src_uri]
+ self._src_uris[file.src_uri] = file
def remove(self, file: File) -> None:
"""Remove file from Files collection."""
- self._src_uris = None
- self._files.remove(file)
+ try:
+ del self._src_uris[file.src_uri]
+ except KeyError:
+ raise ValueError(f'{file.src_uri!r} not in collection')
def copy_static_files(
self,
@@ -156,58 +160,99 @@ def filter(name):
for path in env.list_templates(filter_func=filter):
# Theme files do not override docs_dir files
- path = PurePath(path).as_posix()
- if path not in self.src_uris:
+ if self.get_file_from_path(path) is None:
for dir in config.theme.dirs:
# Find the first theme dir which contains path
if os.path.isfile(os.path.join(dir, path)):
self.append(File(path, dir, config.site_dir, config.use_directory_urls))
break
+ @property
+ def _files(self) -> Iterable[File]:
+ warnings.warn("Do not access Files._files.", DeprecationWarning)
+ return self
+
+ @_files.setter
+ def _files(self, value: Iterable[File]):
+ warnings.warn("Do not access Files._files.", DeprecationWarning)
+ self._src_uris = {f.src_uri: f for f in value}
+
class File:
"""
A MkDocs File object.
- Points to the source and destination locations of a file.
+ It represents how the contents of one file should be populated in the destination site.
+
+ A file always has its `abs_dest_path` (obtained by joining `dest_dir` and `dest_path`),
+ where the `dest_dir` is understood to be the *site* directory.
+
+ `content_bytes`/`content_string` (new in MkDocs 1.6) can always be used to obtain the file's
+ content. But it may be backed by one of the two sources:
+
+ * A physical source file at `abs_src_path` (by default obtained by joining `src_dir` and
+ `src_uri`). `src_dir` is understood to be the *docs* directory.
+
+ Then `content_bytes`/`content_string` will read the file at `abs_src_path`.
+
+ `src_dir` *should* be populated for real files and should be `None` for generated files.
- The `path` argument must be a path that exists relative to `src_dir`.
+ * Since MkDocs 1.6 a file may alternatively be stored in memory - `content_string`/`content_bytes`.
- The `src_dir` and `dest_dir` must be absolute paths on the local file system.
+ Then `src_dir` and `abs_src_path` will remain `None`. `content_bytes`/`content_string` need
+ to be written to, or populated through the `content` argument in the constructor.
- The `use_directory_urls` argument controls how destination paths are generated. If `False`, a Markdown file is
- mapped to an HTML file of the same name (the file extension is changed to `.html`). If True, a Markdown file is
- mapped to an HTML index file (`index.html`) nested in a directory using the "name" of the file in `path`. The
- `use_directory_urls` argument has no effect on non-Markdown files.
+ But `src_uri` is still populated for such files as well! The virtual file pretends as if it
+ originated from that path in the `docs` directory, and other values are derived.
- File objects have the following properties, which are Unicode strings:
+ For static files the file is just copied to the destination, and `dest_uri` equals `src_uri`.
+
+ For Markdown files (determined by the file extension in `src_uri`) the destination content
+ will be the rendered content, and `dest_uri` will have the `.html` extension and some
+ additional transformations to the path, based on `use_directory_urls`.
"""
src_uri: str
"""The pure path (always '/'-separated) of the source file relative to the source directory."""
- abs_src_path: str
- """The absolute concrete path of the source file. Will use backslashes on Windows."""
+ use_directory_urls: bool
+ """Whether directory URLs ('foo/') should be used or not ('foo.html').
- dest_uri: str
- """The pure path (always '/'-separated) of the destination file relative to the destination directory."""
+ If `False`, a Markdown file is mapped to an HTML file of the same name (the file extension is
+ changed to `.html`). If True, a Markdown file is mapped to an HTML index file (`index.html`)
+ nested in a directory using the "name" of the file in `path`. Non-Markdown files retain their
+ original path.
+ """
- abs_dest_path: str
- """The absolute concrete path of the destination file. Will use backslashes on Windows."""
+ src_dir: str | None
+ """The OS path of the top-level directory that the source file originates from.
- url: str
- """The URI of the destination file relative to the destination directory as a string."""
+ Assumed to be the *docs_dir*; not populated for generated files."""
+
+ dest_dir: str
+ """The OS path of the destination directory (top-level site_dir) that the file should be copied to."""
inclusion: InclusionLevel = InclusionLevel.UNDEFINED
"""Whether the file will be excluded from the built site."""
+ generated_by: str | None = None
+ """If not None, indicates that a plugin generated this file on the fly.
+
+ The value is the plugin's entrypoint name and can be used to find the plugin by key in the PluginCollection."""
+
+ _content: str | bytes | None = None
+ """If set, the file's content will be read from here.
+
+ This logic is handled by `content_bytes`/`content_string`, which should be used instead of
+ accessing this attribute."""
+
@property
def src_path(self) -> str:
"""Same as `src_uri` (and synchronized with it) but will use backslashes on Windows. Discouraged."""
return os.path.normpath(self.src_uri)
@src_path.setter
- def src_path(self, value):
+ def src_path(self, value: str):
self.src_uri = PurePath(value).as_posix()
@property
@@ -216,48 +261,116 @@ def dest_path(self) -> str:
return os.path.normpath(self.dest_uri)
@dest_path.setter
- def dest_path(self, value):
+ def dest_path(self, value: str):
self.dest_uri = PurePath(value).as_posix()
- page: Page | None
+ page: Page | None = None
+
+ @overload
+ @classmethod
+ def generated(
+ cls,
+ config: MkDocsConfig,
+ src_uri: str,
+ *,
+ content: str | bytes,
+ inclusion: InclusionLevel = InclusionLevel.UNDEFINED,
+ ) -> File:
+ """
+ Create a virtual file backed by in-memory content.
+
+ It will pretend to be a file in the docs dir at `src_uri`.
+ """
+
+ @overload
+ @classmethod
+ def generated(
+ cls,
+ config: MkDocsConfig,
+ src_uri: str,
+ *,
+ abs_src_path: str,
+ inclusion: InclusionLevel = InclusionLevel.UNDEFINED,
+ ) -> File:
+ """
+ Create a virtual file backed by a physical temporary file at `abs_src_path`.
+
+ It will pretend to be a file in the docs dir at `src_uri`.
+ """
+
+ @classmethod
+ def generated(
+ cls,
+ config: MkDocsConfig,
+ src_uri: str,
+ *,
+ content: str | bytes | None = None,
+ abs_src_path: str | None = None,
+ inclusion: InclusionLevel = InclusionLevel.UNDEFINED,
+ ) -> File:
+ """
+ Create a virtual file, backed either by in-memory `content` or by a file at `abs_src_path`.
+
+ It will pretend to be a file in the docs dir at `src_uri`.
+ """
+ if (content is None) == (abs_src_path is None):
+ raise TypeError("File must have exactly one of 'content' or 'abs_src_path'")
+ f = cls(
+ src_uri,
+ src_dir=None,
+ dest_dir=config.site_dir,
+ use_directory_urls=config.use_directory_urls,
+ inclusion=inclusion,
+ )
+ f.generated_by = config.plugins._current_plugin or '<unknown>'
+ f.abs_src_path = abs_src_path
+ f._content = content
+ return f
def __init__(
self,
path: str,
- src_dir: str,
+ src_dir: str | None,
dest_dir: str,
use_directory_urls: bool,
*,
dest_uri: str | None = None,
inclusion: InclusionLevel = InclusionLevel.UNDEFINED,
) -> None:
- self.page = None
self.src_path = path
- self.name = self._get_stem()
- if dest_uri is None:
- dest_uri = self._get_dest_path(use_directory_urls)
- self.dest_uri = dest_uri
- self.url = self._get_url(use_directory_urls)
- self.abs_src_path = os.path.normpath(os.path.join(src_dir, self.src_uri))
- self.abs_dest_path = os.path.normpath(os.path.join(dest_dir, self.dest_uri))
+ self.src_dir = src_dir
+ self.dest_dir = dest_dir
+ self.use_directory_urls = use_directory_urls
+ if dest_uri is not None:
+ self.dest_uri = dest_uri
self.inclusion = inclusion
def __repr__(self):
return (
- f"File(src_uri='{self.src_uri}', dest_uri='{self.dest_uri}',"
- f" name='{self.name}', url='{self.url}')"
+ f"{type(self).__name__}({self.src_uri!r}, src_dir={self.src_dir!r}, "
+ f"dest_dir={self.dest_dir!r}, use_directory_urls={self.use_directory_urls!r}, "
+ f"dest_uri={self.dest_uri!r}, inclusion={self.inclusion})"
)
+ @utils.weak_property
+ def edit_uri(self) -> str | None:
+ return self.src_uri if self.generated_by is None else None
+
def _get_stem(self) -> str:
- """Return the name of the file without its extension."""
+ """Soft-deprecated, do not use."""
filename = posixpath.basename(self.src_uri)
stem, ext = posixpath.splitext(filename)
return 'index' if stem == 'README' else stem
- def _get_dest_path(self, use_directory_urls: bool) -> str:
- """Return destination path based on source path."""
+ name = cached_property(_get_stem)
+ """Return the name of the file without its extension."""
+
+ def _get_dest_path(self, use_directory_urls: bool | None = None) -> str:
+ """Soft-deprecated, do not use."""
if self.is_documentation_page():
parent, filename = posixpath.split(self.src_uri)
+ if use_directory_urls is None:
+ use_directory_urls = self.use_directory_urls
if not use_directory_urls or self.name == 'index':
# index.md or README.md => index.html
# foo.md => foo.html
@@ -267,30 +380,116 @@ def _get_dest_path(self, use_directory_urls: bool) -> str:
return posixpath.join(parent, self.name, 'index.html')
return self.src_uri
- def _get_url(self, use_directory_urls: bool) -> str:
- """Return url based in destination path."""
+ dest_uri = cached_property(_get_dest_path)
+ """The pure path (always '/'-separated) of the destination file relative to the destination directory."""
+
+ def _get_url(self, use_directory_urls: bool | None = None) -> str:
+ """Soft-deprecated, do not use."""
url = self.dest_uri
dirname, filename = posixpath.split(url)
+ if use_directory_urls is None:
+ use_directory_urls = self.use_directory_urls
if use_directory_urls and filename == 'index.html':
url = (dirname or '.') + '/'
return urlquote(url)
+ url = cached_property(_get_url)
+ """The URI of the destination file relative to the destination directory as a string."""
+
+ @cached_property
+ def abs_src_path(self) -> str | None:
+ """
+ The absolute concrete path of the source file. Will use backslashes on Windows.
+
+ Note: do not use this path to read the file, prefer `content_bytes`/`content_string`.
+ """
+ if self.src_dir is None:
+ return None
+ return os.path.normpath(os.path.join(self.src_dir, self.src_uri))
+
+ @cached_property
+ def abs_dest_path(self) -> str:
+ """The absolute concrete path of the destination file. Will use backslashes on Windows."""
+ return os.path.normpath(os.path.join(self.dest_dir, self.dest_uri))
+
def url_relative_to(self, other: File | str) -> str:
"""Return url for file relative to other file."""
return utils.get_relative_url(self.url, other.url if isinstance(other, File) else other)
+ @property
+ def content_bytes(self) -> bytes:
+ """
+ Get the content of this file as a bytestring.
+
+ May raise if backed by a real file (`abs_src_path`) if it cannot be read.
+
+ If used as a setter, it defines the content of the file, and `abs_src_path` becomes unset.
+ """
+ content = self._content
+ if content is None:
+ assert self.abs_src_path is not None
+ with open(self.abs_src_path, 'rb') as f:
+ return f.read()
+ if not isinstance(content, bytes):
+ content = content.encode()
+ return content
+
+ @content_bytes.setter
+ def content_bytes(self, value: bytes):
+ assert isinstance(value, bytes)
+ self._content = value
+ self.abs_src_path = None
+
+ @property
+ def content_string(self) -> str:
+ """
+ Get the content of this file as a string. Assumes UTF-8 encoding, may raise.
+
+ May also raise if backed by a real file (`abs_src_path`) if it cannot be read.
+
+ If used as a setter, it defines the content of the file, and `abs_src_path` becomes unset.
+ """
+ content = self._content
+ if content is None:
+ assert self.abs_src_path is not None
+ with open(self.abs_src_path, encoding='utf-8-sig', errors='strict') as f:
+ return f.read()
+ if not isinstance(content, str):
+ content = content.decode('utf-8-sig', errors='strict')
+ return content
+
+ @content_string.setter
+ def content_string(self, value: str):
+ assert isinstance(value, str)
+ self._content = value
+ self.abs_src_path = None
+
def copy_file(self, dirty: bool = False) -> None:
"""Copy source file to destination, ensuring parent directories exist."""
if dirty and not self.is_modified():
log.debug(f"Skip copying unmodified file: '{self.src_uri}'")
- else:
- log.debug(f"Copying media file: '{self.src_uri}'")
+ return
+ log.debug(f"Copying media file: '{self.src_uri}'")
+ output_path = self.abs_dest_path
+ os.makedirs(os.path.dirname(output_path), exist_ok=True)
+ content = self._content
+ if content is None:
+ assert self.abs_src_path is not None
try:
- utils.copy_file(self.abs_src_path, self.abs_dest_path)
+ utils.copy_file(self.abs_src_path, output_path)
except shutil.SameFileError:
pass # Let plugins write directly into site_dir.
+ elif isinstance(content, str):
+ with open(output_path, 'w', encoding='utf-8') as output_file:
+ output_file.write(content)
+ else:
+ with open(output_path, 'wb') as output_file:
+ output_file.write(content)
def is_modified(self) -> bool:
+ if self._content is not None:
+ return True
+ assert self.abs_src_path is not None
if os.path.isfile(self.abs_dest_path):
return os.path.getmtime(self.abs_dest_path) < os.path.getmtime(self.abs_src_path)
return True
@@ -383,12 +582,25 @@ def get_files(config: MkDocsConfig) -> Files:
return Files(files)
+def file_sort_key(f: File, /):
+ """
+ Replicates the sort order how `get_files` produces it - index first, directories last.
+
+ To sort a list of `File`, pass as the `key` argument to `sort`.
+ """
+ parts = PurePosixPath(f.src_uri).parts
+ if not parts:
+ return ()
+ return (parts[:-1], f.name != "index", parts[-1])
+
+
def _file_sort_key(f: str):
- """Always sort `index` or `README` as first filename in list."""
+ """Always sort `index` or `README` as first filename in list. This works only on basenames of files."""
return (os.path.splitext(f)[0] not in ('index', 'README'), f)
def _sort_files(filenames: Iterable[str]) -> list[str]:
+ """Soft-deprecated, do not use."""
return sorted(filenames, key=_file_sort_key)
diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
index 2c39fa2085..21815fe612 100644
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -6,6 +6,7 @@
from mkdocs.exceptions import BuildError
from mkdocs.structure import StructureItem
+from mkdocs.structure.files import file_sort_key
from mkdocs.structure.pages import Page, _AbsoluteLinksValidationValue
from mkdocs.utils import nest_paths
@@ -129,9 +130,10 @@ def __repr__(self):
def get_navigation(files: Files, config: MkDocsConfig) -> Navigation:
"""Build site navigation from config and files."""
documentation_pages = files.documentation_pages()
- nav_config = config['nav'] or nest_paths(
- f.src_uri for f in documentation_pages if f.inclusion.is_in_nav()
- )
+ nav_config = config['nav']
+ if nav_config is None:
+ documentation_pages = sorted(documentation_pages, key=file_sort_key)
+ nav_config = nest_paths(f.src_uri for f in documentation_pages if f.inclusion.is_in_nav())
items = _data_to_navigation(nav_config, files, config)
if not isinstance(items, list):
items = [items]
diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index 55a0ed3db2..b7e949cb3d 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -173,38 +173,42 @@ def _set_edit_url(
edit_uri: str | None = None,
edit_uri_template: str | None = None,
) -> None:
- if edit_uri or edit_uri_template:
- src_uri = self.file.src_uri
- if edit_uri_template:
- noext = posixpath.splitext(src_uri)[0]
- edit_uri = edit_uri_template.format(path=src_uri, path_noext=noext)
- else:
- assert edit_uri is not None and edit_uri.endswith('/')
- edit_uri += src_uri
- if repo_url:
- # Ensure urljoin behavior is correct
- if not edit_uri.startswith(('?', '#')) and not repo_url.endswith('/'):
- repo_url += '/'
- else:
- try:
- parsed_url = urlsplit(edit_uri)
- if not parsed_url.scheme or not parsed_url.netloc:
- log.warning(
- f"edit_uri: {edit_uri!r} is not a valid URL, it should include the http:// (scheme)"
- )
- except ValueError as e:
- log.warning(f"edit_uri: {edit_uri!r} is not a valid URL: {e}")
-
- self.edit_url = urljoin(repo_url or '', edit_uri)
- else:
+ if not edit_uri_template and not edit_uri:
self.edit_url = None
+ return
+ src_uri = self.file.edit_uri
+ if src_uri is None:
+ self.edit_url = None
+ return
+
+ if edit_uri_template:
+ noext = posixpath.splitext(src_uri)[0]
+ file_edit_uri = edit_uri_template.format(path=src_uri, path_noext=noext)
+ else:
+ assert edit_uri is not None and edit_uri.endswith('/')
+ file_edit_uri = edit_uri + src_uri
+
+ if repo_url:
+ # Ensure urljoin behavior is correct
+ if not file_edit_uri.startswith(('?', '#')) and not repo_url.endswith('/'):
+ repo_url += '/'
+ else:
+ try:
+ parsed_url = urlsplit(file_edit_uri)
+ if not parsed_url.scheme or not parsed_url.netloc:
+ log.warning(
+ f"edit_uri: {file_edit_uri!r} is not a valid URL, it should include the http:// (scheme)"
+ )
+ except ValueError as e:
+ log.warning(f"edit_uri: {file_edit_uri!r} is not a valid URL: {e}")
+
+ self.edit_url = urljoin(repo_url or '', file_edit_uri)
def read_source(self, config: MkDocsConfig) -> None:
source = config.plugins.on_page_read_source(page=self, config=config)
if source is None:
try:
- with open(self.file.abs_src_path, encoding='utf-8-sig', errors='strict') as f:
- source = f.read()
+ source = self.file.content_string
except OSError:
log.error(f'File not found: {self.file.src_path}')
raise
| diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 9e9d6c0ae4..2ad9353200 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -274,14 +274,14 @@ def test_skip_theme_template_empty_output(self, mock_build_template, mock_write_
# Test build._build_extra_template
@tempdir()
- @mock.patch('mkdocs.commands.build.open', mock.mock_open(read_data='template content'))
+ @mock.patch('mkdocs.structure.files.open', mock.mock_open(read_data='template content'))
def test_build_extra_template(self, site_dir):
cfg = load_config(site_dir=site_dir)
fs = [File('foo.html', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
build._build_extra_template('foo.html', files, cfg, mock.Mock())
- @mock.patch('mkdocs.commands.build.open', mock.mock_open(read_data='template content'))
+ @mock.patch('mkdocs.structure.files.open', mock.mock_open(read_data='template content'))
def test_skip_missing_extra_template(self):
cfg = load_config()
fs = [File('foo.html', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
@@ -293,7 +293,7 @@ def test_skip_missing_extra_template(self):
"WARNING:mkdocs.commands.build:Template skipped: 'missing.html' not found in docs_dir.",
)
- @mock.patch('mkdocs.commands.build.open', mock.Mock(side_effect=OSError('Error message.')))
+ @mock.patch('mkdocs.structure.files.open', mock.Mock(side_effect=OSError('Error message.')))
def test_skip_ioerror_extra_template(self):
cfg = load_config()
fs = [File('foo.html', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
@@ -305,7 +305,7 @@ def test_skip_ioerror_extra_template(self):
"WARNING:mkdocs.commands.build:Error reading template 'foo.html': Error message.",
)
- @mock.patch('mkdocs.commands.build.open', mock.mock_open(read_data=''))
+ @mock.patch('mkdocs.structure.files.open', mock.mock_open(read_data=''))
def test_skip_extra_template_empty_output(self):
cfg = load_config()
fs = [File('foo.html', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
@@ -350,7 +350,7 @@ def test_populate_page_dirty_not_modified(self, site_dir, docs_dir):
self.assertEqual(page.content, None)
@tempdir(files={'index.md': 'new page content'})
- @mock.patch('mkdocs.structure.pages.open', side_effect=OSError('Error message.'))
+ @mock.patch('mkdocs.structure.files.open', side_effect=OSError('Error message.'))
def test_populate_page_read_error(self, docs_dir, mock_open):
cfg = load_config(docs_dir=docs_dir)
file = File('missing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
@@ -763,7 +763,7 @@ def on_files_2(files: Files, config: MkDocsConfig) -> None:
# Plugin 2 reads that file and uses it to configure the nav.
f = files.get_file_from_path('SUMMARY.md')
assert f is not None
- config.nav = Path(f.abs_src_path).read_text().splitlines()
+ config.nav = f.content_string.splitlines()
for serve_url in None, 'http://localhost:123/':
for exclude in 'full', 'drafts', 'nav', None:
diff --git a/mkdocs/tests/structure/file_tests.py b/mkdocs/tests/structure/file_tests.py
index a646593c8d..fe3c4143f6 100644
--- a/mkdocs/tests/structure/file_tests.py
+++ b/mkdocs/tests/structure/file_tests.py
@@ -3,7 +3,7 @@
import unittest
from unittest import mock
-from mkdocs.structure.files import File, Files, _sort_files, get_files
+from mkdocs.structure.files import File, Files, _sort_files, file_sort_key, get_files
from mkdocs.tests.base import PathAssertionMixin, load_config, tempdir
@@ -57,6 +57,16 @@ def test_sort_files(self):
['README.md', 'A.md', 'B.md'],
)
+ def test_file_sort_key(self):
+ for case in [
+ ["a/b.md", "b/index.md", "b/a.md"],
+ ["SUMMARY.md", "foo/z.md", "foo/bar/README.md", "foo/bar/index.md", "foo/bar/a.md"],
+ ]:
+ with self.subTest(case):
+ files = [File(f, "", "", use_directory_urls=True) for f in case]
+ for a, b in zip(files, files[1:]):
+ self.assertLess(file_sort_key(a), file_sort_key(b))
+
def test_md_file(self):
for use_directory_urls in True, False:
with self.subTest(use_directory_urls=use_directory_urls):
@@ -249,6 +259,67 @@ def test_file_name_with_custom_dest_uri(self):
self.assertEqual(f.url, 'stuff/1-foo/index.html')
self.assertEqual(f.name, 'foo')
+ def test_file_overwrite_attrs(self):
+ f = File('foo.md', '/path/to/docs', '/path/to/site', use_directory_urls=False)
+ self.assertEqual(f.src_uri, 'foo.md')
+
+ self.assertPathsEqual(f.abs_src_path, '/path/to/docs/foo.md')
+ f.abs_src_path = '/tmp/foo.md'
+ self.assertPathsEqual(f.abs_src_path, '/tmp/foo.md')
+ del f.abs_src_path
+ self.assertPathsEqual(f.abs_src_path, '/path/to/docs/foo.md')
+
+ f.dest_uri = 'a.html'
+ self.assertPathsEqual(f.abs_dest_path, '/path/to/site/a.html')
+ self.assertEqual(f.url, 'a.html')
+ f.abs_dest_path = '/path/to/site/b.html'
+ self.assertPathsEqual(f.abs_dest_path, '/path/to/site/b.html')
+ self.assertEqual(f.url, 'a.html')
+ del f.url
+ del f.dest_uri
+ del f.abs_dest_path
+ self.assertPathsEqual(f.abs_dest_path, '/path/to/site/foo.html')
+
+ self.assertTrue(f.is_documentation_page())
+ f.src_uri = 'foo.html'
+ del f.name
+ self.assertFalse(f.is_documentation_page())
+
+ def test_generated_file(self):
+ f = File(
+ 'foo/bar.md',
+ src_dir=None,
+ dest_dir='/path/to/site',
+ use_directory_urls=False,
+ )
+ f.content_string = 'вміст'
+ f.generated_by = 'some-plugin'
+ self.assertEqual(f.generated_by, 'some-plugin')
+ self.assertEqual(f.src_uri, 'foo/bar.md')
+ self.assertIsNone(f.abs_src_path)
+ self.assertIsNone(f.src_dir)
+ self.assertEqual(f.dest_uri, 'foo/bar.html')
+ self.assertPathsEqual(f.abs_dest_path, '/path/to/site/foo/bar.html')
+ self.assertEqual(f.content_string, 'вміст')
+ self.assertEqual(f.edit_uri, None)
+
+ @tempdir(files={'x.md': 'вміст'})
+ def test_generated_file_constructor(self, tdir) -> None:
+ config = load_config(site_dir='/path/to/site', use_directory_urls=False)
+ config.plugins._current_plugin = 'foo'
+ for f in [
+ File.generated(config, 'foo/bar.md', content='вміст'),
+ File.generated(config, 'foo/bar.md', content='вміст'.encode()),
+ File.generated(config, 'foo/bar.md', abs_src_path=os.path.join(tdir, 'x.md')),
+ ]:
+ self.assertEqual(f.src_uri, 'foo/bar.md')
+ self.assertIsNone(f.src_dir)
+ self.assertEqual(f.dest_uri, 'foo/bar.html')
+ self.assertPathsEqual(f.abs_dest_path, os.path.abspath('/path/to/site/foo/bar.html'))
+ self.assertEqual(f.content_string, 'вміст')
+ self.assertEqual(f.content_bytes, 'вміст'.encode())
+ self.assertEqual(f.edit_uri, None)
+
def test_files(self):
fs = [
File('index.md', '/path/to/docs', '/path/to/site', use_directory_urls=True),
@@ -584,6 +655,8 @@ def test_copy_file_same_file(self, dest_dir):
@tempdir(files={'test.txt': 'source content'})
def test_copy_file_clean_modified(self, src_dir, dest_dir):
file = File('test.txt', src_dir, dest_dir, use_directory_urls=False)
+ self.assertEqual(file.content_string, 'source content')
+ self.assertEqual(file.content_bytes, b'source content')
file.is_modified = mock.Mock(return_value=True)
dest_path = os.path.join(dest_dir, 'test.txt')
file.copy_file(dirty=False)
@@ -613,6 +686,28 @@ def test_copy_file_dirty_not_modified(self, src_dir, dest_dir):
with open(dest_path, encoding='utf-8') as f:
self.assertEqual(f.read(), 'destination content')
+ @tempdir()
+ def test_copy_file_from_content(self, dest_dir):
+ file = File('test.txt', src_dir='unused', dest_dir=dest_dir, use_directory_urls=False)
+ file.content_string = 'ö'
+ self.assertIsNone(file.abs_src_path)
+ dest_path = os.path.join(dest_dir, 'test.txt')
+
+ file.copy_file()
+ self.assertPathIsFile(dest_path)
+ with open(dest_path, encoding='utf-8') as f:
+ self.assertEqual(f.read(), 'ö')
+
+ file.content_bytes = b'\x01\x02\x03'
+ file.copy_file()
+ with open(dest_path, 'rb') as f:
+ self.assertEqual(f.read(), b'\x01\x02\x03')
+
+ file.content_bytes = b'\xc3\xb6'
+ file.copy_file()
+ with open(dest_path, encoding='utf-8') as f:
+ self.assertEqual(f.read(), 'ö')
+
def test_files_append_remove_src_paths(self):
fs = [
File('index.md', '/path/to/docs', '/path/to/site', use_directory_urls=True),
@@ -635,3 +730,17 @@ def test_files_append_remove_src_paths(self):
self.assertEqual(len(files), 6)
self.assertEqual(len(files.src_uris), 6)
self.assertFalse(extra_file.src_uri in files.src_uris)
+
+ def test_files_move_to_end(self):
+ fs = [
+ File('a.md', '/path/to/docs', '/path/to/site', use_directory_urls=True),
+ File('b.jpg', '/path/to/docs', '/path/to/site', use_directory_urls=True),
+ ]
+ files = Files(fs)
+ self.assertEqual(len(files), 2)
+ self.assertEqual(list(files)[0].src_uri, 'a.md')
+ with self.assertWarns(DeprecationWarning):
+ files.append(fs[0])
+ self.assertEqual(len(files), 2)
+ self.assertEqual(list(files)[0].src_uri, 'b.jpg')
+ self.assertEqual(list(files)[1].src_uri, 'a.md')
diff --git a/mkdocs/tests/structure/page_tests.py b/mkdocs/tests/structure/page_tests.py
index 22b46941c4..ee6aa159ee 100644
--- a/mkdocs/tests/structure/page_tests.py
+++ b/mkdocs/tests/structure/page_tests.py
@@ -677,6 +677,26 @@ def test_page_edit_url_warning(self):
self.assertEqual(pg.edit_url, case['edit_url'])
self.assertEqual(cm.output, [case['warning']])
+ def test_page_edit_url_custom_from_file(self):
+ for case in [
+ dict(
+ edit_uri='hooks.py',
+ expected_edit_url='https://github.com/mkdocs/mkdocs/edit/master/docs/hooks.py',
+ ),
+ dict(
+ edit_uri='../scripts/hooks.py',
+ expected_edit_url='https://github.com/mkdocs/mkdocs/edit/master/scripts/hooks.py',
+ ),
+ dict(edit_uri=None, expected_edit_url=None),
+ ]:
+ with self.subTest(case['edit_uri']):
+ cfg = load_config(repo_url='https://github.com/mkdocs/mkdocs')
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
+ fl.edit_uri = case['edit_uri']
+ pg = Page('Foo', fl, cfg)
+ self.assertEqual(pg.url, 'testing/')
+ self.assertEqual(pg.edit_url, case['expected_edit_url'])
+
def test_page_render(self):
cfg = load_config()
fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
@@ -737,7 +757,7 @@ def get_rendered_result(
fs = [File(f, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls) for f in files]
pg = Page('Foo', fs[0], cfg)
- with mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data=content)):
+ with mock.patch('mkdocs.structure.files.open', mock.mock_open(read_data=content)):
pg.read_source(cfg)
if logs:
with self.assertLogs('mkdocs.structure.pages') as cm:
| POC: demonstrate mkdocs generated_by detection wrt #3344
With regards to my [comment](https://github.com/mkdocs/mkdocs/pull/3344#issuecomment-1689841586) in #3344
Sample result:
```bash
$ hatch -e docs shell
$ mkdocs build
INFO - Cleaning site directory
INFO - Building documentation to directory: /home/alexys/github/forks/mkdocs/site
WARNING - files_added_by_plugin={'this_file_was_generated.md'}
WARNING - File(src_uri='this_file_was_generated.md', dest_uri='this_file_was_generated/index.html', name='this_file_was_generated', url='this_file_was_generated/',
generated_by='docs/hooks.py')
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- this_file_was_generated.md
INFO - Documentation built in 0.98 seconds
```
| 2023-10-30T00:51:25Z | 2024-01-26T20:01:51Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_anchor_warning_for_footnote (tests.build_tests.BuildTests.test_anchor_warning_for_footnote)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_get_themes_warning (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_warning)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_absolute_link_with_validation (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_copy_file_from_content (tests.structure.file_tests.TestFiles.test_copy_file_from_content)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_get_themes (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_page_edit_url_custom_from_file (tests.structure.page_tests.PageTests.test_page_edit_url_custom_from_file)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_get_theme_dir_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_error)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_absolute_anchor_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_anchor_link_with_validation_and_suggestion)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_file_overwrite_attrs (tests.structure.file_tests.TestFiles.test_file_overwrite_attrs)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_draft_pages_with_invalid_links (tests.build_tests.BuildTests.test_draft_pages_with_invalid_links)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_anchor_warning_and_query (tests.build_tests.BuildTests.test_anchor_warning_and_query)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_get_theme_dir_importerror (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_importerror)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_generated_file (tests.structure.file_tests.TestFiles.test_generated_file)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_anchor_no_warning (tests.build_tests.BuildTests.test_anchor_no_warning)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_file_sort_key (tests.structure.file_tests.TestFiles.test_file_sort_key)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_get_theme_dir (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_absolute_anchor_link_with_validation (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_anchor_link_with_validation)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_absolute_self_anchor_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_self_anchor_link_with_validation_and_suggestion)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_absolute_link_preserved_and_warned (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_preserved_and_warned)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_anchor_no_warning_with_html (tests.build_tests.BuildTests.test_anchor_no_warning_with_html)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_files_move_to_end (tests.structure.file_tests.TestFiles.test_files_move_to_end)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_nav_absolute_links_with_validation (tests.structure.nav_tests.SiteNavigationTests.test_nav_absolute_links_with_validation)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_generated_file_constructor (tests.structure.file_tests.TestFiles.test_generated_file_constructor)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_absolute_link_with_validation_just_slash (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation_just_slash)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_get_themes_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_error)", "test_absolute_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation_and_suggestion)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_absolute_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_self_anchor_link_with_suggestion)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_anchor_warning (tests.build_tests.BuildTests.test_anchor_warning)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.3.6\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.4; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"mkdocs-get-deps >=0.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.3.6\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.4; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"mkdocs-get-deps ==0.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\",\n]\n\n[tool.hatch.env]\nrequires = [\"hatch-mkdocs\", \"hatch-pip-compile\"]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.env.collectors.mkdocs.integration]\npath = \"mkdocs.yml\"\n[tool.hatch.envs.integration]\ndetached = false\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ntype = \"pip-compile\"\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs {args}\"\n]\nfix = [\n \"lint --fix\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js -S \"*.map\"'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n\n[tool.hatch.env.collectors.mkdocs.docs]\npath = \"mkdocs.yml\"\n[tool.hatch.envs.docs]\ntype = \"pip-compile\"\ndetached = false\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.2.0", "build==1.0.3", "certifi==2023.11.17", "cffi==1.16.0", "click==8.1.7", "colorama==0.4.6", "cryptography==42.0.1", "distlib==0.3.8", "editables==0.5", "filelock==3.13.1", "ghp-import==2.1.0", "griffe==0.38.0", "h11==0.14.0", "hatch==1.9.3", "hatchling==1.21.1", "httpcore==1.0.2", "httpx==0.26.0", "hyperlink==21.0.0", "idna==3.6", "jaraco-classes==3.3.0", "jeepney==0.8.0", "jinja2==3.1.2", "keyring==24.3.0", "markdown==3.5.1", "markdown-callouts==0.3.0", "markdown-it-py==3.0.0", "markupsafe==2.1.3", "mdurl==0.1.2", "mdx-gh-links==0.3.1", "mergedeep==1.3.4", "mkdocs==1.5.3", "mkdocs-autorefs==0.5.0", "mkdocs-click==0.8.1", "mkdocs-get-deps==0.2.0", "mkdocs-literate-nav==0.6.1", "mkdocs-redirects==1.2.1", "mkdocstrings==0.24.0", "mkdocstrings-python==1.7.5", "more-itertools==10.2.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.9.0", "platformdirs==4.0.0", "pluggy==1.4.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.17.2", "pymdown-extensions==10.4", "pyproject-hooks==1.0.0", "python-dateutil==2.8.2", "pyyaml==6.0.1", "pyyaml-env-tag==0.1", "rich==13.7.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "six==1.16.0", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.3", "trove-classifiers==2024.1.8", "userpath==1.9.1", "virtualenv==20.25.0", "watchdog==3.0.0", "wheel==0.44.0", "zstandard==0.22.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
|
mkdocs/mkdocs | mkdocs__mkdocs-3485 | 9e443d212058306984e20ef6daf6939ca402d6bc | diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index b6267beed4..680987e24b 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -382,7 +382,9 @@ Configure the strictness of MkDocs' diagnostic messages when validating links to
This is a tree of configs, and for each one the value can be one of the three: `warn`, `info`, `ignore`. Which cause a logging message of the corresponding severity to be produced. The `warn` level is, of course, intended for use with `mkdocs build --strict` (where it becomes an error), which you can employ in continuous testing.
-> EXAMPLE: **Defaults of this config as of MkDocs 1.6:**
+The config `validation.links.absolute_links` additionally has a special value `relative_to_docs`, for [validation of absolute links](#validation-of-absolute-links).
+
+>? EXAMPLE: **Defaults of this config as of MkDocs 1.6:**
>
> ```yaml
> validation:
@@ -415,7 +417,7 @@ The defaults of some of the behaviors already differ from MkDocs 1.4 and below -
> ```yaml
> validation:
> omitted_files: warn
-> absolute_links: warn
+> absolute_links: warn # Or 'relative_to_docs' - new in MkDocs 1.6
> unrecognized_links: warn
> anchors: warn # New in MkDocs 1.6
> ```
@@ -425,24 +427,46 @@ Note how in the above examples we omitted the 'nav' and 'links' keys. Here `abso
Full list of values and examples of log messages that they can hide or make more prominent:
* `validation.nav.omitted_files`
- * "The following pages exist in the docs directory, but are not included in the "nav" configuration: ..."
+ * > The following pages exist in the docs directory, but are not included in the "nav" configuration: ...
* `validation.nav.not_found`
- * "A relative path to 'foo/bar.md' is included in the 'nav' configuration, which is not found in the documentation files."
- * "A reference to 'foo/bar.md' is included in the 'nav' configuration, but this file is excluded from the built site."
+ * > A reference to 'foo/bar.md' is included in the 'nav' configuration, which is not found in the documentation files.
+ * > A reference to 'foo/bar.md' is included in the 'nav' configuration, but this file is excluded from the built site.
* `validation.nav.absolute_links`
- * "An absolute path to '/foo/bar.html' is included in the 'nav' configuration, which presumably points to an external resource."
+ * > An absolute path to '/foo/bar.html' is included in the 'nav' configuration, which presumably points to an external resource.
<!-- -->
* `validation.links.not_found`
- * "Doc file 'example.md' contains a link '../foo/bar.md', but the target is not found among documentation files."
- * "Doc file 'example.md' contains a link to 'foo/bar.md' which is excluded from the built site."
+ * > Doc file 'example.md' contains a link '../foo/bar.md', but the target is not found among documentation files.
+ * > Doc file 'example.md' contains a link to 'foo/bar.md' which is excluded from the built site.
* `validation.links.anchors`
- * "Doc file 'example.md' contains a link '../foo/bar.md#some-heading', but the doc 'foo/bar.md' does not contain an anchor '#some-heading'."
- * "Doc file 'example.md' contains a link '#some-heading', but there is no such anchor on this page."
+ * > Doc file 'example.md' contains a link '../foo/bar.md#some-heading', but the doc 'foo/bar.md' does not contain an anchor '#some-heading'.
+ * > Doc file 'example.md' contains a link '#some-heading', but there is no such anchor on this page.
* `validation.links.absolute_links`
- * "Doc file 'example.md' contains an absolute link '/foo/bar.html', it was left as is. Did you mean 'foo/bar.md'?"
+ * > Doc file 'example.md' contains an absolute link '/foo/bar.html', it was left as is. Did you mean 'foo/bar.md'?
* `validation.links.unrecognized_links`
- * "Doc file 'example.md' contains an unrecognized relative link '../foo/bar/', it was left as is. Did you mean 'foo/bar.md'?"
- * "Doc file 'example.md' contains an unrecognized relative link 'mail\@example.com', it was left as is. Did you mean 'mailto:mail\@example.com'?"
+ * > Doc file 'example.md' contains an unrecognized relative link '../foo/bar/', it was left as is. Did you mean 'foo/bar.md'?
+ * > Doc file 'example.md' contains an unrecognized relative link 'mail\@example.com', it was left as is. Did you mean 'mailto:mail\@example.com'?
+
+#### Validation of absolute links
+
+NEW: **New in version 1.6.**
+
+> Historically, within Markdown, MkDocs only recognized **relative** links that lead to another physical `*.md` document (or media file). This is a good convention to follow because then the source pages are also freely browsable without MkDocs, for example on GitHub. Whereas absolute links were left unmodified (making them often not work as expected) or, more recently, warned against. If you dislike having to always use relative links, now you can opt into absolute links and have them work correctly.
+
+If you set the setting `validation.links.absolute_links` to the new value `relative_to_docs`, all Markdown links starting with `/` will be understood as being relative to the `docs_dir` root. The links will then be validated for correctness according to all the other rules that were already working for relative links in prior versions of MkDocs. For the HTML output, these links will still be turned relative so that the site still works reliably.
+
+So, now any document (e.g. "dir1/foo.md") can link to the document "dir2/bar.md" as `[link](/dir2/bar.md)`, in addition to the previously only correct way `[link](../dir2/bar.md)`.
+
+You have to enable the setting, though. The default is still to just skip the link.
+
+> EXAMPLE: **Settings to recognize absolute links and validate them:**
+>
+> ```yaml
+> validation:
+> links:
+> absolute_links: relative_to_docs
+> anchors: warn
+> unrecognized_links: warn
+> ```
## Build directories
diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index 9b16e3025c..3025045f55 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -1227,19 +1227,3 @@ def run_validation(self, value: object) -> pathspec.gitignore.GitIgnoreSpec:
return pathspec.gitignore.GitIgnoreSpec.from_lines(lines=value.splitlines())
except ValueError as e:
raise ValidationError(str(e))
-
-
-class _LogLevel(OptionallyRequired[int]):
- levels: Mapping[str, int] = {
- "warn": logging.WARNING,
- "info": logging.INFO,
- "ignore": logging.DEBUG,
- }
-
- def run_validation(self, value: object) -> int:
- if not isinstance(value, str):
- raise ValidationError(f'Expected a string, but a {type(value)} was given.')
- try:
- return self.levels[value]
- except KeyError:
- raise ValidationError(f'Expected one of {list(self.levels)}, got {value!r}')
diff --git a/mkdocs/config/defaults.py b/mkdocs/config/defaults.py
index 6f1da3db73..68ebf3a8d8 100644
--- a/mkdocs/config/defaults.py
+++ b/mkdocs/config/defaults.py
@@ -1,13 +1,35 @@
from __future__ import annotations
-from typing import IO, TYPE_CHECKING, Dict
+import logging
+from typing import IO, Dict, Mapping
from mkdocs.config import base
from mkdocs.config import config_options as c
+from mkdocs.structure.pages import Page, _AbsoluteLinksValidationValue
from mkdocs.utils.yaml import get_yaml_loader, yaml_load
-if TYPE_CHECKING:
- import mkdocs.structure.pages
+
+class _LogLevel(c.OptionallyRequired[int]):
+ levels: Mapping[str, int] = {
+ "warn": logging.WARNING,
+ "info": logging.INFO,
+ "ignore": logging.DEBUG,
+ }
+
+ def run_validation(self, value: object) -> int:
+ if not isinstance(value, str):
+ raise base.ValidationError(f"Expected a string, but a {type(value)} was given.")
+ try:
+ return self.levels[value]
+ except KeyError:
+ raise base.ValidationError(f"Expected one of {list(self.levels)}, got {value!r}")
+
+
+class _AbsoluteLinksValidation(_LogLevel):
+ levels: Mapping[str, int] = {
+ **_LogLevel.levels,
+ "relative_to_docs": _AbsoluteLinksValidationValue.RELATIVE_TO_DOCS,
+ }
# NOTE: The order here is important. During validation some config options
@@ -146,37 +168,37 @@ class MkDocsConfig(base.Config):
class Validation(base.Config):
class NavValidation(base.Config):
- omitted_files = c._LogLevel(default='info')
+ omitted_files = _LogLevel(default='info')
"""Warning level for when a doc file is never mentioned in the navigation.
For granular configuration, see `not_in_nav`."""
- not_found = c._LogLevel(default='warn')
+ not_found = _LogLevel(default='warn')
"""Warning level for when the navigation links to a relative path that isn't an existing page on the site."""
- absolute_links = c._LogLevel(default='info')
+ absolute_links = _AbsoluteLinksValidation(default='info')
"""Warning level for when the navigation links to an absolute path (starting with `/`)."""
nav = c.SubConfig(NavValidation)
class LinksValidation(base.Config):
- not_found = c._LogLevel(default='warn')
+ not_found = _LogLevel(default='warn')
"""Warning level for when a Markdown doc links to a relative path that isn't an existing document on the site."""
- absolute_links = c._LogLevel(default='info')
+ absolute_links = _AbsoluteLinksValidation(default='info')
"""Warning level for when a Markdown doc links to an absolute path (starting with `/`)."""
- unrecognized_links = c._LogLevel(default='info')
+ unrecognized_links = _LogLevel(default='info')
"""Warning level for when a Markdown doc links to a relative path that doesn't look like
it could be a valid internal link. For example, if the link ends with `/`."""
- anchors = c._LogLevel(default='info')
+ anchors = _LogLevel(default='info')
"""Warning level for when a Markdown doc links to an anchor that's not present on the target page."""
links = c.SubConfig(LinksValidation)
validation = c.PropagatingSubConfig[Validation]()
- _current_page: mkdocs.structure.pages.Page | None = None
+ _current_page: Page | None = None
"""The currently rendered page. Please do not access this and instead
rely on the `page` argument to event handlers."""
diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
index d122c8219b..2c39fa2085 100644
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -6,7 +6,7 @@
from mkdocs.exceptions import BuildError
from mkdocs.structure import StructureItem
-from mkdocs.structure.pages import Page
+from mkdocs.structure.pages import Page, _AbsoluteLinksValidationValue
from mkdocs.utils import nest_paths
if TYPE_CHECKING:
@@ -164,7 +164,11 @@ def get_navigation(files: Files, config: MkDocsConfig) -> Navigation:
scheme, netloc, path, query, fragment = urlsplit(link.url)
if scheme or netloc:
log.debug(f"An external link to '{link.url}' is included in the 'nav' configuration.")
- elif link.url.startswith('/'):
+ elif (
+ link.url.startswith('/')
+ and config.validation.nav.absolute_links
+ is not _AbsoluteLinksValidationValue.RELATIVE_TO_DOCS
+ ):
log.log(
config.validation.nav.absolute_links,
f"An absolute path to '{link.url}' is included in the 'nav' "
@@ -173,7 +177,7 @@ def get_navigation(files: Files, config: MkDocsConfig) -> Navigation:
else:
log.log(
config.validation.nav.not_found,
- f"A relative path to '{link.url}' is included in the 'nav' "
+ f"A reference to '{link.url}' is included in the 'nav' "
"configuration, which is not found in the documentation files.",
)
return Navigation(items, pages)
@@ -195,7 +199,13 @@ def _data_to_navigation(data, files: Files, config: MkDocsConfig):
for item in data
]
title, path = data if isinstance(data, tuple) else (None, data)
- if file := files.get_file_from_path(path):
+ lookup_path = path
+ if (
+ lookup_path.startswith('/')
+ and config.validation.nav.absolute_links is _AbsoluteLinksValidationValue.RELATIVE_TO_DOCS
+ ):
+ lookup_path = lookup_path.lstrip('/')
+ if file := files.get_file_from_path(lookup_path):
if file.inclusion.is_excluded():
log.log(
min(logging.INFO, config.validation.nav.not_found),
diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index 317892ac8c..55a0ed3db2 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -1,6 +1,7 @@
from __future__ import annotations
import copy
+import enum
import logging
import posixpath
import warnings
@@ -358,7 +359,7 @@ def _target_uri(cls, src_path: str, dest_path: str) -> str:
@classmethod
def _possible_target_uris(
- cls, file: File, path: str, use_directory_urls: bool
+ cls, file: File, path: str, use_directory_urls: bool, suggest_absolute: bool = False
) -> Iterator[str]:
"""First yields the resolved file uri for the link, then proceeds to yield guesses for possible mistakes."""
target_uri = cls._target_uri(file.src_uri, path)
@@ -397,14 +398,17 @@ def _possible_target_uris(
def path_to_url(self, url: str) -> str:
scheme, netloc, path, query, anchor = urlsplit(url)
+ absolute_link = None
warning_level, warning = 0, ''
# Ignore URLs unless they are a relative link to a source file.
if scheme or netloc: # External link.
return url
elif url.startswith(('/', '\\')): # Absolute link.
- warning_level = self.config.validation.links.absolute_links
- warning = f"Doc file '{self.file.src_uri}' contains an absolute link '{url}', it was left as is."
+ absolute_link = self.config.validation.links.absolute_links
+ if absolute_link is not _AbsoluteLinksValidationValue.RELATIVE_TO_DOCS:
+ warning_level = absolute_link
+ warning = f"Doc file '{self.file.src_uri}' contains an absolute link '{url}', it was left as is."
elif AMP_SUBSTITUTE in url: # AMP_SUBSTITUTE is used internally by Markdown only for email.
return url
elif not path: # Self-link containing only query or anchor.
@@ -430,7 +434,7 @@ def path_to_url(self, url: str) -> str:
if target_file is None and not warning:
# Primary lookup path had no match, definitely produce a warning, just choose which one.
- if not posixpath.splitext(path)[-1]:
+ if not posixpath.splitext(path)[-1] and absolute_link is None:
# No '.' in the last part of a path indicates path does not point to a file.
warning_level = self.config.validation.links.unrecognized_links
warning = (
@@ -438,7 +442,7 @@ def path_to_url(self, url: str) -> str:
f"it was left as is."
)
else:
- target = f" '{target_uri}'" if target_uri != url else ""
+ target = f" '{target_uri}'" if target_uri != url.lstrip('/') else ""
warning_level = self.config.validation.links.not_found
warning = (
f"Doc file '{self.file.src_uri}' contains a link '{url}', "
@@ -456,6 +460,8 @@ def path_to_url(self, url: str) -> str:
if self.files.get_file_from_path(path) is not None:
if anchor and path == self.file.src_uri:
path = ''
+ elif absolute_link is _AbsoluteLinksValidationValue.RELATIVE_TO_DOCS:
+ path = '/' + path
else:
path = utils.get_relative_url(path, self.file.src_uri)
suggest_url = urlunsplit(('', '', path, query, anchor))
@@ -545,3 +551,7 @@ def run(self, root: etree.Element) -> etree.Element:
def _register(self, md: markdown.Markdown) -> None:
self.postprocessors = tuple(md.postprocessors)
md.treeprocessors.register(self, "mkdocs_extract_title", priority=-1) # After the end.
+
+
+class _AbsoluteLinksValidationValue(enum.IntEnum):
+ RELATIVE_TO_DOCS = -1
| diff --git a/mkdocs/tests/structure/nav_tests.py b/mkdocs/tests/structure/nav_tests.py
index 04846111ae..11b7464f16 100644
--- a/mkdocs/tests/structure/nav_tests.py
+++ b/mkdocs/tests/structure/nav_tests.py
@@ -131,6 +131,44 @@ def test_nav_external_links(self):
self.assertEqual(len(site_navigation.items), 3)
self.assertEqual(len(site_navigation.pages), 1)
+ def test_nav_absolute_links_with_validation(self):
+ nav_cfg = [
+ {'Home': 'index.md'},
+ {'Local page': '/foo/bar.md'},
+ {'Local link': '/local.md'},
+ {'External': 'http://example.com/external.html'},
+ ]
+ expected = dedent(
+ """
+ Page(title='Home', url='/')
+ Page(title='Local page', url='/foo/bar/')
+ Link(title='Local link', url='/local.md')
+ Link(title='External', url='http://example.com/external.html')
+ """
+ )
+ cfg = load_config(
+ nav=nav_cfg,
+ site_url='http://example.com/',
+ validation=dict(nav=dict(absolute_links='relative_to_docs')),
+ )
+ fs = [
+ File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ File('foo/bar.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ ]
+ files = Files(fs)
+ with self.assertLogs('mkdocs', level='DEBUG') as cm:
+ site_navigation = get_navigation(files, cfg)
+ self.assertEqual(
+ cm.output,
+ [
+ "WARNING:mkdocs.structure.nav:A reference to '/local.md' is included in the 'nav' configuration, which is not found in the documentation files.",
+ "DEBUG:mkdocs.structure.nav:An external link to 'http://example.com/external.html' is included in the 'nav' configuration.",
+ ],
+ )
+ self.assertEqual(str(site_navigation).strip(), expected)
+ self.assertEqual(len(site_navigation.items), 4)
+ self.assertEqual(len(site_navigation.pages), 2)
+
def test_nav_bad_links(self):
nav_cfg = [
{'Home': 'index.md'},
@@ -152,8 +190,8 @@ def test_nav_bad_links(self):
self.assertEqual(
cm.output,
[
- "WARNING:mkdocs.structure.nav:A relative path to 'missing.html' is included in the 'nav' configuration, which is not found in the documentation files.",
- "WARNING:mkdocs.structure.nav:A relative path to 'example.com' is included in the 'nav' configuration, which is not found in the documentation files.",
+ "WARNING:mkdocs.structure.nav:A reference to 'missing.html' is included in the 'nav' configuration, which is not found in the documentation files.",
+ "WARNING:mkdocs.structure.nav:A reference to 'example.com' is included in the 'nav' configuration, which is not found in the documentation files.",
],
)
self.assertEqual(str(site_navigation).strip(), expected)
diff --git a/mkdocs/tests/structure/page_tests.py b/mkdocs/tests/structure/page_tests.py
index f24078bdd0..22b46941c4 100644
--- a/mkdocs/tests/structure/page_tests.py
+++ b/mkdocs/tests/structure/page_tests.py
@@ -1003,6 +1003,48 @@ def test_self_anchor_link_with_suggestion(self):
'<a href="./#test">link</a>',
)
+ def test_absolute_self_anchor_link_with_suggestion(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ content='[link](/index#test)',
+ files=['index.md'],
+ logs="INFO:Doc file 'index.md' contains an absolute link '/index#test', it was left as is. Did you mean '#test'?",
+ ),
+ '<a href="/index#test">link</a>',
+ )
+
+ def test_absolute_self_anchor_link_with_validation_and_suggestion(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='relative_to_docs')),
+ content='[link](/index#test)',
+ files=['index.md'],
+ logs="WARNING:Doc file 'index.md' contains a link '/index#test', but the target 'index' is not found among documentation files. Did you mean '#test'?",
+ ),
+ '<a href="/index#test">link</a>',
+ )
+
+ def test_absolute_anchor_link_with_validation(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='relative_to_docs')),
+ content='[link](/foo/bar.md#test)',
+ files=['index.md', 'foo/bar.md'],
+ ),
+ '<a href="foo/bar/#test">link</a>',
+ )
+
+ def test_absolute_anchor_link_with_validation_and_suggestion(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='relative_to_docs')),
+ content='[link](/foo/bar#test)',
+ files=['zoo/index.md', 'foo/bar.md'],
+ logs="WARNING:Doc file 'zoo/index.md' contains a link '/foo/bar#test', but the target 'foo/bar' is not found among documentation files. Did you mean '/foo/bar.md#test'?",
+ ),
+ '<a href="/foo/bar#test">link</a>',
+ )
+
def test_external_link(self):
self.assertEqual(
self.get_rendered_result(
@@ -1038,7 +1080,58 @@ def test_absolute_link_with_suggestion(self):
'<a href="/path/to/file">absolute link</a>',
)
- def test_absolute_link(self):
+ def test_absolute_link_with_validation(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='relative_to_docs')),
+ content='[absolute link](/path/to/file.md)',
+ files=['index.md', 'path/to/file.md'],
+ ),
+ '<a href="path/to/file/">absolute link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='relative_to_docs')),
+ use_directory_urls=False,
+ content='[absolute link](/path/to/file.md)',
+ files=['path/index.md', 'path/to/file.md'],
+ ),
+ '<a href="to/file.html">absolute link</a>',
+ )
+
+ def test_absolute_link_with_validation_and_suggestion(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='relative_to_docs')),
+ use_directory_urls=False,
+ content='[absolute link](/path/to/file/)',
+ files=['path/index.md', 'path/to/file.md'],
+ logs="WARNING:Doc file 'path/index.md' contains a link '/path/to/file/', but the target 'path/to/file' is not found among documentation files.",
+ ),
+ '<a href="/path/to/file/">absolute link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='relative_to_docs')),
+ content='[absolute link](/path/to/file)',
+ files=['path/index.md', 'path/to/file.md'],
+ logs="WARNING:Doc file 'path/index.md' contains a link '/path/to/file', but the target is not found among documentation files. Did you mean '/path/to/file.md'?",
+ ),
+ '<a href="/path/to/file">absolute link</a>',
+ )
+
+ def test_absolute_link_with_validation_just_slash(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='relative_to_docs')),
+ content='[absolute link](/)',
+ files=['path/to/file.md', 'index.md'],
+ logs="WARNING:Doc file 'path/to/file.md' contains a link '/', but the target '.' is not found among documentation files. Did you mean '/index.md'?",
+ ),
+ '<a href="/">absolute link</a>',
+ )
+
+ def test_absolute_link_preserved_and_warned(self):
self.assertEqual(
self.get_rendered_result(
validation=dict(links=dict(absolute_links='warn')),
| Option to prefix absolute links with sub-page or turn them relative.
## Problem
Using absolute URLs may not work, if the final page is on a sub-page. For example, if a page is hosted on `https://example.com/blog` will an absolute URL such as `/foo/bar` result in a link pointing to `https://example.com/foo/bar`, breaking sites.
## The idea
An option should be added which would do either one of two things:
- Prepend the sub-page to the absolute URLs, so that `/foo/bar` turns into `/blog/foo/bar`
- Turn the absolute path into a relative path, meaning that the link `/foo/bar` located in `/docs/example/index.md` becomes `../foo/bar`
## Why?
The usage of relative URLs can be tedious. While text editors such as VSCode may offer QoL stuff such as displaying folders and files when creating a relative path, is that feature not available for everyone obviously.
In addition can a relative URL also cause issues when you move pages around, as it would then require to edit any relative URL in all moved pages to match the new path (or edit relative paths pointing to the moved pages/files).
With having MkDocs deal with it, I could simply provide `/assets/img/cat.png` and no matter where I move the page, the link would properly resolve to the right relative path (or absolute path if the prepending option is used) reducing headaches when trying to resolve relative paths...
| Hi, @oprypin I would be happy to take a crack at a PR for this feature if no one is working on it yet.
I prefer to use absolute paths in my documentation to make it easier to move things around, and I think having namespaced prefixes like in a Flask Blueprint but just for internal URL resolution would be helpful for versioning docs or just organizing large sites.
I think the specifics of how to achieve this without a lot of extra config or breaking relative links as mentioned in #1592 will need to be ironed out, so I can take a look at the related source code after work and put together a quick design proposal if that would help.
Let me know if I'm good to proceed. Thanks!
Hi @GrammAcc thanks for your interest. Hmm most likely I'll prefer to write this myself, I have all the context and an idea in mind.
> Hi @GrammAcc thanks for your interest. Hmm most likely I'll prefer to write this myself, I have all the context and an idea in mind.
No problem. Thanks for confirming! | 2023-11-25T17:25:24Z | 2023-12-15T10:57:31Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_anchor_warning_for_footnote (tests.build_tests.BuildTests.test_anchor_warning_for_footnote)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_get_themes_warning (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_warning)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_absolute_link_with_validation (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_get_themes (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_get_theme_dir_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_error)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_absolute_anchor_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_anchor_link_with_validation_and_suggestion)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_draft_pages_with_invalid_links (tests.build_tests.BuildTests.test_draft_pages_with_invalid_links)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_anchor_warning_and_query (tests.build_tests.BuildTests.test_anchor_warning_and_query)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_get_theme_dir_importerror (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_importerror)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_anchor_no_warning (tests.build_tests.BuildTests.test_anchor_no_warning)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_get_theme_dir (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_absolute_anchor_link_with_validation (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_anchor_link_with_validation)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_absolute_self_anchor_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_self_anchor_link_with_validation_and_suggestion)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_absolute_link_preserved_and_warned (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_preserved_and_warned)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_anchor_no_warning_with_html (tests.build_tests.BuildTests.test_anchor_no_warning_with_html)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_nav_absolute_links_with_validation (tests.structure.nav_tests.SiteNavigationTests.test_nav_absolute_links_with_validation)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_absolute_link_with_validation_just_slash (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation_just_slash)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_get_themes_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_error)", "test_absolute_link_with_validation_and_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_validation_and_suggestion)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_absolute_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_self_anchor_link_with_suggestion)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_anchor_warning (tests.build_tests.BuildTests.test_anchor_warning)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.3.6\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.4; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"mkdocs-get-deps >=0.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.3.6\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.4; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"mkdocs-get-deps ==0.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\",\n]\n\n[tool.hatch.env]\nrequires = [\"hatch-mkdocs\", \"hatch-pip-compile\"]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.env.collectors.mkdocs.integration]\npath = \"mkdocs.yml\"\n[tool.hatch.envs.integration]\ndetached = false\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ntype = \"pip-compile\"\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs {args}\"\n]\nfix = [\n \"lint --fix\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js -S \"*.map\"'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n\n[tool.hatch.env.collectors.mkdocs.docs]\npath = \"mkdocs.yml\"\n[tool.hatch.envs.docs]\ntype = \"pip-compile\"\ndetached = false\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.1.0", "build==1.0.3", "certifi==2023.11.17", "cffi==1.16.0", "click==8.1.7", "colorama==0.4.6", "cryptography==41.0.7", "distlib==0.3.8", "editables==0.5", "filelock==3.13.1", "ghp-import==2.1.0", "griffe==0.38.0", "h11==0.14.0", "hatch==1.8.1", "hatchling==1.20.0", "httpcore==1.0.2", "httpx==0.25.2", "hyperlink==21.0.0", "idna==3.6", "jaraco-classes==3.3.0", "jeepney==0.8.0", "jinja2==3.1.2", "keyring==24.3.0", "markdown==3.5.1", "markdown-callouts==0.3.0", "markdown-it-py==3.0.0", "markupsafe==2.1.3", "mdurl==0.1.2", "mdx-gh-links==0.3.1", "mergedeep==1.3.4", "mkdocs==1.5.3", "mkdocs-autorefs==0.5.0", "mkdocs-click==0.8.1", "mkdocs-literate-nav==0.6.1", "mkdocs-redirects==1.2.1", "mkdocstrings==0.24.0", "mkdocstrings-python==1.7.5", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.9.0", "platformdirs==4.0.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.17.2", "pymdown-extensions==10.4", "pyproject-hooks==1.0.0", "python-dateutil==2.8.2", "pyyaml==6.0.1", "pyyaml-env-tag==0.1", "rich==13.7.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "six==1.16.0", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.3", "trove-classifiers==2023.11.29", "userpath==1.9.1", "virtualenv==20.25.0", "watchdog==3.0.0", "wheel==0.44.0", "zstandard==0.22.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3463 | dc45916aa1cc4b4d4796dd45656bd1ff60d4ce44 | diff --git a/.markdownlintrc b/.markdownlintrc
index aa9fc26c74..c0e8a9b353 100644
--- a/.markdownlintrc
+++ b/.markdownlintrc
@@ -20,5 +20,8 @@
"MD024": { "siblings_only": true },
// Allow inline HTML
- "MD033": false
+ "MD033": false,
+
+ // Disable named references validation
+ "MD052": false
}
diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md
index 3eab10e730..e048c1fd61 100644
--- a/docs/about/release-notes.md
+++ b/docs/about/release-notes.md
@@ -1262,7 +1262,7 @@ Users can review the [configuration options][search config] available and theme
authors should review how [search and themes] interact.
[search config]: ../user-guide/configuration.md#search
-[search and themes]: ../dev-guide/themes.md#search_and_themes
+[search and themes]: ../dev-guide/themes.md#search-and-themes
#### `theme_dir` Configuration Option fully Deprecated
@@ -1406,25 +1406,18 @@ version 1.0.
Any of the following old page variables should be updated to the new ones in
user created and third-party templates:
-| Old Variable Name | New Variable Name |
-| ----------------- | ------------------- |
-| current_page | [page] |
-| page_title | [page.title] |
-| content | [page.content] |
-| toc | [page.toc] |
-| meta | [page.meta] |
-| canonical_url | [page.canonical_url]|
-| previous_page | [page.previous_page]|
-| next_page | [page.next_page] |
+| Old Variable Name | New Variable Name |
+| ----------------- | ----------------- |
+| current_page | page |
+| page_title | page.title |
+| content | page.content |
+| toc | page.toc |
+| meta | page.meta |
+| canonical_url | page.canonical_url|
+| previous_page | page.previous_page|
+| next_page | page.next_page |
[page]: ../dev-guide/themes.md#page
-[page.title]: ../dev-guide/themes.md#pagetitle
-[page.content]: ../dev-guide/themes.md#pagecontent
-[page.toc]: ../dev-guide/themes.md#pagetoc
-[page.meta]: ../dev-guide/themes.md#pagemeta
-[page.canonical_url]: ../dev-guide/themes.md#pagecanonical_url
-[page.previous_page]: ../dev-guide/themes.md#pageprevious_page
-[page.next_page]: ../dev-guide/themes.md#pagenext_page
Additionally, a number of global variables have been altered and/or removed
and user created and third-party templates should be updated as outlined below:
@@ -1793,12 +1786,11 @@ no configuration is needed to enable it.
#### Change the pages configuration
-Provide a [new way] to define pages, and specifically [nested pages], in the
+Provide a [new way] to define pages, and specifically nested pages, in the
mkdocs.yml file and deprecate the existing approach, support will be removed
with MkDocs 1.0.
[new way]: ../user-guide/writing-your-docs.md#configure-pages-and-navigation
-[nested pages]: ../user-guide/writing-your-docs.md#multilevel-documentation
#### Warn users about the removal of builtin themes
diff --git a/docs/dev-guide/plugins.md b/docs/dev-guide/plugins.md
index 8d4a8c63f5..118bae24c0 100644
--- a/docs/dev-guide/plugins.md
+++ b/docs/dev-guide/plugins.md
@@ -473,7 +473,7 @@ class MyPlugin(BasePlugin):
# some code that could throw a KeyError
...
except KeyError as error:
- raise PluginError(str(error))
+ raise PluginError(f"Failed to find the item by key: '{error}'")
def on_build_error(self, error, **kwargs):
# some code to clean things up
@@ -482,10 +482,31 @@ class MyPlugin(BasePlugin):
### Logging in plugins
-MkDocs provides a `get_plugin_logger` function which returns
-a logger that can be used to log messages.
+To ensure that your plugins' log messages adhere with MkDocs' formatting and `--verbose`/`--debug` flags, please write the logs to a logger under the `mkdocs.plugins.` namespace.
-#### ::: mkdocs.plugins.get_plugin_logger
+> EXAMPLE:
+>
+> ```python
+> import logging
+>
+> log = logging.getLogger(f"mkdocs.plugins.{__name__}")
+>
+> log.warning("File '%s' not found. Breaks the build if --strict is passed", my_file_name)
+> log.info("Shown normally")
+> log.debug("Shown only with `--verbose`")
+>
+> if log.getEffectiveLevel() <= logging.DEBUG:
+> log.debug("Very expensive calculation only for debugging: %s", get_my_diagnostics())
+> ```
+
+`log.error()` is another logging level that is differentiated by its look, but in all other ways it functions the same as `warning`, so it's strange to use it. If your plugin encounters an actual error, it is best to just interrupt the build by raising [`mkdocs.exceptions.PluginError`][] (which will also log an ERROR message).
+
+<!-- -->
+> NEW: New in MkDocs 1.5
+>
+> MkDocs now provides a `get_plugin_logger()` convenience function that returns a logger like the above that is also prefixed with the plugin's name.
+>
+> #### ::: mkdocs.plugins.get_plugin_logger
### Entry Point
diff --git a/docs/dev-guide/themes.md b/docs/dev-guide/themes.md
index 51290b66e4..ea4b99111b 100644
--- a/docs/dev-guide/themes.md
+++ b/docs/dev-guide/themes.md
@@ -245,7 +245,6 @@ used options include:
* [config.repo_url](../user-guide/configuration.md#repo_url)
* [config.repo_name](../user-guide/configuration.md#repo_name)
* [config.copyright](../user-guide/configuration.md#copyright)
-* [config.google_analytics](../user-guide/configuration.md#google_analytics)
#### nav
diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index 8353b0cf6a..60c50a3f4a 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -364,7 +364,7 @@ Configure the strictness of MkDocs' diagnostic messages when validating links to
This is a tree of configs, and for each one the value can be one of the three: `warn`, `info`, `ignore`. Which cause a logging message of the corresponding severity to be produced. The `warn` level is, of course, intended for use with `mkdocs build --strict` (where it becomes an error), which you can employ in continuous testing.
-> EXAMPLE: **Defaults of this config as of MkDocs 1.5:**
+> EXAMPLE: **Defaults of this config as of MkDocs 1.6:**
>
> ```yaml
> validation:
@@ -374,6 +374,7 @@ This is a tree of configs, and for each one the value can be one of the three: `
> absolute_links: info
> links:
> not_found: warn
+> anchors: ignore
> absolute_links: info
> unrecognized_links: info
> ```
@@ -382,7 +383,7 @@ This is a tree of configs, and for each one the value can be one of the three: `
The defaults of some of the behaviors already differ from MkDocs 1.4 and below - they were ignored before.
->? EXAMPLE: **Configure MkDocs 1.5 to behave like MkDocs 1.4 and below (reduce strictness):**
+>? EXAMPLE: **Configure MkDocs 1.6 to behave like MkDocs 1.4 and below (reduce strictness):**
>
> ```yaml
> validation:
@@ -397,23 +398,27 @@ The defaults of some of the behaviors already differ from MkDocs 1.4 and below -
> omitted_files: warn
> absolute_links: warn
> unrecognized_links: warn
+> anchors: warn # New in MkDocs 1.6
> ```
Note how in the above examples we omitted the 'nav' and 'links' keys. Here `absolute_links:` means setting both `nav: absolute_links:` and `links: absolute_links:`.
Full list of values and examples of log messages that they can hide or make more prominent:
-* `validation.nav.omitted_files`
+* `validation.nav.omitted_files`
* "The following pages exist in the docs directory, but are not included in the "nav" configuration: ..."
-* `validation.nav.not_found`
+* `validation.nav.not_found`
* "A relative path to 'foo/bar.md' is included in the 'nav' configuration, which is not found in the documentation files."
* "A reference to 'foo/bar.md' is included in the 'nav' configuration, but this file is excluded from the built site."
-* `validation.nav.absolute_links`
+* `validation.nav.absolute_links`
* "An absolute path to '/foo/bar.html' is included in the 'nav' configuration, which presumably points to an external resource."
<!-- -->
-* `validation.links.not_found`
- * "Doc file 'example.md' contains a relative link '../foo/bar.md', but the target is not found among documentation files."
+* `validation.links.not_found`
+ * "Doc file 'example.md' contains a link '../foo/bar.md', but the target is not found among documentation files."
* "Doc file 'example.md' contains a link to 'foo/bar.md' which is excluded from the built site."
+* `validation.links.anchors`
+ * "Doc file 'example.md' contains a link '../foo/bar.md#some-heading', but the doc 'foo/bar.md' does not contain an anchor '#some-heading'."
+ * "Doc file 'example.md' contains a link '#some-heading', but there is no such anchor on this page."
* `validation.links.absolute_links`
* "Doc file 'example.md' contains an absolute link '/foo/bar.html', it was left as is. Did you mean 'foo/bar.md'?"
* `validation.links.unrecognized_links`
@@ -1188,7 +1193,7 @@ echo '{INHERIT: mkdocs.yml, site_name: "Renamed site"}' | mkdocs build -f -
[Python-Markdown wiki]: https://github.com/Python-Markdown/markdown/wiki/Third-Party-Extensions
[catalog]: https://github.com/mkdocs/catalog
[configuring pages and navigation]: writing-your-docs.md#configure-pages-and-navigation
-[theme_dir]: customizing-your-theme.md#using-the-theme_dir
+[theme_dir]: customizing-your-theme.md#using-the-theme-custom_dir
[choosing your theme]: choosing-your-theme.md
[Localizing your theme]: localizing-your-theme.md
[extra_css]: #extra_css
diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py
index baf67adc21..1f8d1f49d5 100644
--- a/mkdocs/__main__.py
+++ b/mkdocs/__main__.py
@@ -89,13 +89,11 @@ class State:
def __init__(self, log_name='mkdocs', level=logging.INFO):
self.logger = logging.getLogger(log_name)
- # Don't restrict level on logger; use handler
- self.logger.setLevel(1)
+ self.logger.setLevel(level)
self.logger.propagate = False
self.stream = logging.StreamHandler()
self.stream.setFormatter(ColorFormatter())
- self.stream.setLevel(level)
self.stream.name = 'MkDocsStreamHandler'
self.logger.addHandler(self.stream)
@@ -161,7 +159,7 @@ def verbose_option(f):
def callback(ctx, param, value):
state = ctx.ensure_object(State)
if value:
- state.stream.setLevel(logging.DEBUG)
+ state.logger.setLevel(logging.DEBUG)
return click.option(
'-v',
@@ -177,7 +175,7 @@ def quiet_option(f):
def callback(ctx, param, value):
state = ctx.ensure_object(State)
if value:
- state.stream.setLevel(logging.ERROR)
+ state.logger.setLevel(logging.ERROR)
return click.option(
'-q',
diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
index 4a21a3da70..52eca42bd6 100644
--- a/mkdocs/commands/build.py
+++ b/mkdocs/commands/build.py
@@ -341,6 +341,11 @@ def build(
file.page, config, doc_files, nav, env, dirty, excluded=file.inclusion.is_excluded()
)
+ log_level = config.validation.links.anchors
+ for file in doc_files:
+ assert file.page is not None
+ file.page.validate_anchor_links(files=files, log_level=log_level)
+
# Run `post_build` plugin events.
config.plugins.on_post_build(config=config)
diff --git a/mkdocs/config/defaults.py b/mkdocs/config/defaults.py
index a6f2871b9a..2ce42bb8dd 100644
--- a/mkdocs/config/defaults.py
+++ b/mkdocs/config/defaults.py
@@ -166,6 +166,9 @@ class LinksValidation(base.Config):
"""Warning level for when a Markdown doc links to a relative path that doesn't look like
it could be a valid internal link. For example, if the link ends with `/`."""
+ anchors = c._LogLevel(default='ignore')
+ """Warning level for when a Markdown doc links to an anchor that's not present on the target page."""
+
links = c.SubConfig(LinksValidation)
validation = c.PropagatingSubConfig[Validation]()
diff --git a/mkdocs/structure/files.py b/mkdocs/structure/files.py
index 01d2f63983..7d0417baf2 100644
--- a/mkdocs/structure/files.py
+++ b/mkdocs/structure/files.py
@@ -237,14 +237,6 @@ def __init__(
self.abs_dest_path = os.path.normpath(os.path.join(dest_dir, self.dest_uri))
self.inclusion = inclusion
- def __eq__(self, other) -> bool:
- return (
- isinstance(other, self.__class__)
- and self.src_uri == other.src_uri
- and self.abs_src_path == other.abs_src_path
- and self.url == other.url
- )
-
def __repr__(self):
return (
f"File(src_uri='{self.src_uri}', dest_uri='{self.dest_uri}',"
diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index 84c1430f1e..07e1737a1a 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -73,7 +73,9 @@ def __repr__(self):
"""The original Markdown content from the file."""
content: str | None
- """The rendered Markdown as HTML, this is the contents of the documentation."""
+ """The rendered Markdown as HTML, this is the contents of the documentation.
+
+ Populated after `.render()`."""
toc: TableOfContents
"""An iterable object representing the Table of contents for a page. Each item in
@@ -269,6 +271,42 @@ def render(self, config: MkDocsConfig, files: Files) -> None:
self.content = md.convert(self.markdown)
self.toc = get_toc(getattr(md, 'toc_tokens', []))
self._title_from_render = extract_title_ext.title
+ self.present_anchor_ids = relative_path_ext.present_anchor_ids
+ if log.getEffectiveLevel() > logging.DEBUG:
+ self.links_to_anchors = relative_path_ext.links_to_anchors
+
+ present_anchor_ids: set[str] | None = None
+ """Anchor IDs that this page contains (can be linked to in this page)."""
+
+ links_to_anchors: dict[File, dict[str, str]] | None = None
+ """Links to anchors in other files that this page contains.
+
+ The structure is: `{file_that_is_linked_to: {'anchor': 'original_link/to/some_file.md#anchor'}}`.
+ Populated after `.render()`. Populated only if `validation: {anchors: info}` (or greater) is set"""
+
+ def validate_anchor_links(self, *, files: Files, log_level: int) -> None:
+ if not self.links_to_anchors:
+ return
+ for to_file, links in self.links_to_anchors.items():
+ for anchor, original_link in links.items():
+ page = to_file.page
+ if page is None:
+ continue
+ if page.present_anchor_ids is None: # Page was somehow not rendered.
+ continue
+ if anchor in page.present_anchor_ids:
+ continue
+ context = ""
+ if to_file == self.file:
+ problem = "there is no such anchor on this page"
+ if anchor.startswith('fnref:'):
+ context = " This seems to be a footnote that is never referenced."
+ else:
+ problem = f"the doc '{to_file.src_uri}' does not contain an anchor '#{anchor}'"
+ log.log(
+ log_level,
+ f"Doc file '{self.file.src_uri}' contains a link '{original_link}', but {problem}.{context}",
+ )
class _RelativePathTreeprocessor(markdown.treeprocessors.Treeprocessor):
@@ -276,6 +314,8 @@ def __init__(self, file: File, files: Files, config: MkDocsConfig) -> None:
self.file = file
self.files = files
self.config = config
+ self.links_to_anchors: dict[File, dict[str, str]] = {}
+ self.present_anchor_ids: set[str] = set()
def run(self, root: etree.Element) -> etree.Element:
"""
@@ -285,6 +325,8 @@ def run(self, root: etree.Element) -> etree.Element:
tags and then makes them relative based on the site navigation
"""
for element in root.iter():
+ if anchor := element.get('id'):
+ self.present_anchor_ids.add(anchor)
if element.tag == 'a':
key = 'href'
elif element.tag == 'img':
@@ -300,7 +342,7 @@ def run(self, root: etree.Element) -> etree.Element:
return root
@classmethod
- def _target_uri(cls, src_path: str, dest_path: str):
+ def _target_uri(cls, src_path: str, dest_path: str) -> str:
return posixpath.normpath(
posixpath.join(posixpath.dirname(src_path), dest_path).lstrip('/')
)
@@ -344,7 +386,7 @@ def _possible_target_uris(
tried.add(guess)
def path_to_url(self, url: str) -> str:
- scheme, netloc, path, query, fragment = urlsplit(url)
+ scheme, netloc, path, query, anchor = urlsplit(url)
warning_level, warning = 0, ''
@@ -356,7 +398,10 @@ def path_to_url(self, url: str) -> str:
warning = f"Doc file '{self.file.src_uri}' contains an absolute link '{url}', it was left as is."
elif AMP_SUBSTITUTE in url: # AMP_SUBSTITUTE is used internally by Markdown only for email.
return url
- elif not path: # Self-link containing only query or fragment.
+ elif not path: # Self-link containing only query or anchor.
+ if anchor:
+ # Register that the page links to itself with an anchor.
+ self.links_to_anchors.setdefault(self.file, {}).setdefault(anchor, url)
return url
path = urlunquote(path)
@@ -387,7 +432,7 @@ def path_to_url(self, url: str) -> str:
target = f" '{target_uri}'" if target_uri != url else ""
warning_level = self.config.validation.links.not_found
warning = (
- f"Doc file '{self.file.src_uri}' contains a relative link '{url}', "
+ f"Doc file '{self.file.src_uri}' contains a link '{url}', "
f"but the target{target} is not found among documentation files."
)
@@ -400,11 +445,11 @@ def path_to_url(self, url: str) -> str:
suggest_url = ''
for path in possible_target_uris:
if self.files.get_file_from_path(path) is not None:
- if fragment and path == self.file.src_uri:
+ if anchor and path == self.file.src_uri:
path = ''
else:
path = utils.get_relative_url(path, self.file.src_uri)
- suggest_url = urlunsplit(('', '', path, query, fragment))
+ suggest_url = urlunsplit(('', '', path, query, anchor))
break
else:
if '@' in url and '.' in url and '/' not in url:
@@ -416,6 +461,11 @@ def path_to_url(self, url: str) -> str:
assert target_uri is not None
assert target_file is not None
+
+ if anchor:
+ # Register that this page links to the target file with an anchor.
+ self.links_to_anchors.setdefault(target_file, {}).setdefault(anchor, url)
+
if target_file.inclusion.is_excluded():
if self.file.inclusion.is_excluded():
warning_level = logging.DEBUG
@@ -427,7 +477,7 @@ def path_to_url(self, url: str) -> str:
)
log.log(warning_level, warning)
path = utils.get_relative_url(target_file.url, self.file.url)
- return urlunsplit(('', '', path, query, fragment))
+ return urlunsplit(('', '', path, query, anchor))
def _register(self, md: markdown.Markdown) -> None:
md.treeprocessors.register(self, "relpath", 0)
| diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 275aad3709..4dc85c77a2 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -609,7 +609,7 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
server = testing_server(site_dir, mount_path='/documentation/')
with self.subTest(live_server=server):
expected_logs = '''
- INFO:Doc file 'test/bar.md' contains a relative link 'nonexistent.md', but the target 'test/nonexistent.md' is not found among documentation files.
+ INFO:Doc file 'test/bar.md' contains a link 'nonexistent.md', but the target 'test/nonexistent.md' is not found among documentation files.
INFO:Doc file 'test/foo.md' contains a link to 'test/bar.md' which is excluded from the built site.
INFO:The following pages are being built only for the preview but will be excluded from `mkdocs build` per `exclude_docs`:
- http://localhost:123/documentation/.zoo.html
@@ -672,6 +672,88 @@ def test_exclude_readme_and_index(self, site_dir, docs_dir):
self.assertPathIsFile(index_path)
self.assertRegex(index_path.read_text(), r'page1 content')
+ @tempdir(
+ files={
+ 'test/foo.md': '## page1 heading\n\n[bar](bar.md#page1-heading)',
+ 'test/bar.md': '## page2 heading\n\n[aaa](#a)',
+ }
+ )
+ @tempdir()
+ def test_anchor_warning(self, site_dir, docs_dir):
+ cfg = load_config(docs_dir=docs_dir, site_dir=site_dir, validation={'anchors': 'warn'})
+
+ expected_logs = '''
+ WARNING:Doc file 'test/bar.md' contains a link '#a', but there is no such anchor on this page.
+ WARNING:Doc file 'test/foo.md' contains a link 'bar.md#page1-heading', but the doc 'test/bar.md' does not contain an anchor '#page1-heading'.
+ '''
+ with self._assert_build_logs(expected_logs):
+ build.build(cfg)
+
+ @tempdir(
+ files={
+ 'test/foo.md': '[bar](bar.md#heading1)',
+ 'test/bar.md': '## heading1',
+ }
+ )
+ @tempdir()
+ def test_anchor_no_warning(self, site_dir, docs_dir):
+ cfg = load_config(docs_dir=docs_dir, site_dir=site_dir, validation={'anchors': 'warn'})
+ build.build(cfg)
+
+ @unittest.skip("The implementation is not good enough to understand this yet.") # TODO
+ @tempdir(
+ files={
+ 'test/foo.md': '[bar](bar.md#heading2)',
+ 'test/bar.md': '## heading1\n\n<a id="heading2">hi</a>',
+ }
+ )
+ @tempdir()
+ def test_anchor_no_warning_with_html(self, site_dir, docs_dir):
+ cfg = load_config(
+ docs_dir=docs_dir,
+ site_dir=site_dir,
+ validation={'anchors': 'warn'},
+ markdown_extensions=['md_in_html'],
+ )
+ build.build(cfg)
+
+ @tempdir(
+ files={
+ 'test/foo.md': '[bar1](bar.md?test#heading1), [bar2](bar.md?test#headingno), [bar3](bar.md?test), [self4](?test), [self5](?test#hi)',
+ 'test/bar.md': '## heading1',
+ }
+ )
+ @tempdir()
+ def test_anchor_warning_and_query(self, site_dir, docs_dir):
+ cfg = load_config(docs_dir=docs_dir, site_dir=site_dir, validation={'anchors': 'info'})
+
+ expected_logs = '''
+ INFO:Doc file 'test/foo.md' contains a link 'bar.md?test#headingno', but the doc 'test/bar.md' does not contain an anchor '#headingno'.
+ INFO:Doc file 'test/foo.md' contains a link '?test#hi', but there is no such anchor on this page.
+ '''
+ with self._assert_build_logs(expected_logs):
+ build.build(cfg)
+
+ @tempdir(
+ files={
+ 'test/foo.md': 'test[^1]\n\n[^1]: footnote1\n[^2]: footnote2',
+ }
+ )
+ @tempdir()
+ def test_anchor_warning_for_footnote(self, site_dir, docs_dir):
+ cfg = load_config(
+ docs_dir=docs_dir,
+ site_dir=site_dir,
+ validation={'anchors': 'info'},
+ markdown_extensions=['footnotes'],
+ )
+
+ expected_logs = '''
+ INFO:Doc file 'test/foo.md' contains a link '#fnref:2', but there is no such anchor on this page. This seems to be a footnote that is never referenced.
+ '''
+ with self._assert_build_logs(expected_logs):
+ build.build(cfg)
+
@tempdir(
files={
'foo.md': 'page1 content',
diff --git a/mkdocs/tests/cli_tests.py b/mkdocs/tests/cli_tests.py
index 6ce03db109..d8f9732235 100644
--- a/mkdocs/tests/cli_tests.py
+++ b/mkdocs/tests/cli_tests.py
@@ -222,8 +222,8 @@ def test_build_defaults(self, mock_build, mock_load_config):
use_directory_urls=None,
site_dir=None,
)
- handler = logging._handlers.get('MkDocsStreamHandler')
- self.assertEqual(handler.level, logging.INFO)
+ for log_name in 'mkdocs', 'mkdocs.structure.pages', 'mkdocs.plugins.foo':
+ self.assertEqual(logging.getLogger(log_name).getEffectiveLevel(), logging.INFO)
@mock.patch('mkdocs.config.load_config', autospec=True)
@mock.patch('mkdocs.commands.build.build', autospec=True)
@@ -352,8 +352,8 @@ def test_build_verbose(self, mock_build, mock_load_config):
self.assertEqual(result.exit_code, 0)
self.assertEqual(mock_build.call_count, 1)
- handler = logging._handlers.get('MkDocsStreamHandler')
- self.assertEqual(handler.level, logging.DEBUG)
+ for log_name in 'mkdocs', 'mkdocs.structure.pages', 'mkdocs.plugins.foo':
+ self.assertEqual(logging.getLogger(log_name).getEffectiveLevel(), logging.DEBUG)
@mock.patch('mkdocs.config.load_config', autospec=True)
@mock.patch('mkdocs.commands.build.build', autospec=True)
@@ -362,8 +362,8 @@ def test_build_quiet(self, mock_build, mock_load_config):
self.assertEqual(result.exit_code, 0)
self.assertEqual(mock_build.call_count, 1)
- handler = logging._handlers.get('MkDocsStreamHandler')
- self.assertEqual(handler.level, logging.ERROR)
+ for log_name in 'mkdocs', 'mkdocs.structure.pages', 'mkdocs.plugins.foo':
+ self.assertEqual(logging.getLogger(log_name).getEffectiveLevel(), logging.ERROR)
@mock.patch('mkdocs.commands.new.new', autospec=True)
def test_new(self, mock_new):
diff --git a/mkdocs/tests/config/config_options_tests.py b/mkdocs/tests/config/config_options_tests.py
index ecab870798..9d8592f951 100644
--- a/mkdocs/tests/config/config_options_tests.py
+++ b/mkdocs/tests/config/config_options_tests.py
@@ -1586,6 +1586,7 @@ def defaults(self):
'not_found': logging.WARNING,
'absolute_links': logging.INFO,
'unrecognized_links': logging.INFO,
+ 'anchors': logging.DEBUG,
},
}
diff --git a/mkdocs/tests/structure/file_tests.py b/mkdocs/tests/structure/file_tests.py
index 200efd73a2..a646593c8d 100644
--- a/mkdocs/tests/structure/file_tests.py
+++ b/mkdocs/tests/structure/file_tests.py
@@ -8,27 +8,6 @@
class TestFiles(PathAssertionMixin, unittest.TestCase):
- def test_file_eq(self):
- file = File('a.md', '/path/to/docs', '/path/to/site', use_directory_urls=False)
- self.assertTrue(
- file == File('a.md', '/path/to/docs', '/path/to/site', use_directory_urls=False)
- )
-
- def test_file_ne(self):
- file = File('a.md', '/path/to/docs', '/path/to/site', use_directory_urls=False)
- # Different filename
- self.assertTrue(
- file != File('b.md', '/path/to/docs', '/path/to/site', use_directory_urls=False)
- )
- # Different src_path
- self.assertTrue(
- file != File('a.md', '/path/to/other', '/path/to/site', use_directory_urls=False)
- )
- # Different URL
- self.assertTrue(
- file != File('a.md', '/path/to/docs', '/path/to/site', use_directory_urls=True)
- )
-
@unittest.skipUnless(sys.platform.startswith("win"), "requires Windows")
def test_src_path_windows(self):
f = File('foo\\a.md', '/path/to/docs', '/path/to/site', use_directory_urls=False)
diff --git a/mkdocs/tests/structure/page_tests.py b/mkdocs/tests/structure/page_tests.py
index 3620f5668b..f24078bdd0 100644
--- a/mkdocs/tests/structure/page_tests.py
+++ b/mkdocs/tests/structure/page_tests.py
@@ -960,7 +960,7 @@ def test_bad_relative_doc_link(self):
self.get_rendered_result(
content='[link](non-existent.md)',
files=['index.md'],
- logs="WARNING:Doc file 'index.md' contains a relative link 'non-existent.md', but the target is not found among documentation files.",
+ logs="WARNING:Doc file 'index.md' contains a link 'non-existent.md', but the target is not found among documentation files.",
),
'<a href="non-existent.md">link</a>',
)
@@ -969,7 +969,7 @@ def test_bad_relative_doc_link(self):
validation=dict(links=dict(not_found='info')),
content='[link](../non-existent.md)',
files=['sub/index.md'],
- logs="INFO:Doc file 'sub/index.md' contains a relative link '../non-existent.md', but the target 'non-existent.md' is not found among documentation files.",
+ logs="INFO:Doc file 'sub/index.md' contains a link '../non-existent.md', but the target 'non-existent.md' is not found among documentation files.",
),
'<a href="../non-existent.md">link</a>',
)
@@ -1062,7 +1062,7 @@ def test_image_link_with_suggestion(self):
self.get_rendered_result(
content='',
files=['foo/bar.md', 'foo/image.png'],
- logs="WARNING:Doc file 'foo/bar.md' contains a relative link '../image.png', but the target 'image.png' is not found among documentation files. Did you mean 'image.png'?",
+ logs="WARNING:Doc file 'foo/bar.md' contains a link '../image.png', but the target 'image.png' is not found among documentation files. Did you mean 'image.png'?",
),
'<img alt="image" src="../image.png" />',
)
@@ -1102,7 +1102,7 @@ def test_invalid_email_link(self):
self.get_rendered_result(
content='[contact]([email protected])',
files=['index.md'],
- logs="WARNING:Doc file 'index.md' contains a relative link '[email protected]', but the target is not found among documentation files. Did you mean 'mailto:[email protected]'?",
+ logs="WARNING:Doc file 'index.md' contains a link '[email protected]', but the target is not found among documentation files. Did you mean 'mailto:[email protected]'?",
),
'<a href="[email protected]">contact</a>',
)
| Validate links to anchors on Markdown documents
We do a reasonable job of checking that links to local markdown files are valid. However, the standard pattern for linking to sections is to use anchors in headers. This doesn't work well if the title is moved or renamed.
With the TOC code, we should be able to keep a set of valid anchors for each page and verify it with that.
| :+1: Was going to submit an issue for this.
Should take into account if a user is using a custom slugify function. Don't think this should be an issue if you continue to parse the `toc` output from markdown.
True, that is one advantage of parsing the HTML output, which is otherwise pretty hacky :)
Its not clear how this feature could be implemented. We validate links when rendering the Markdown to HTML. Of course, we do so for one page at a time. If a later page links to an earlier page, sure, it would be possible to validate the anchor. But if an earlier page links to a later page, no validation could happen without first processing the Markdown of the later page.
I see two possible solutions:
1. Run some sort of validator across all pages after all pages have been rendered to HTML. And that would require every page be run through an HTML parser and checked against all other pages.
2. As we parse each Markdown document, build a collection of all anchors and a collection of all links to an anchor. Then after all pages are processed, loop through the collection of links and check that any linked anchors exist in the collection of anchors.
Either way, seems like a lot of work for not much gain. I'm inclined to leave this as something for a plugin to handle and remove it from the 1.0 milestone. We can always come back to it later.
Would be wonderful if this could be implemented.
Especially since the links to local md files is so good, it's too easy to blithely assume the same will hold for anchor/hash links.
Another complicating factor which makes this more important is the way section titles are slugified, it's not always trivial to work out what anchor will be, thus checking links would be very useful.
> Its not clear how this feature could be implemented.
This kind of validation could happen after all HTML is generated.
For each document keep a list of internal links and anchors.
Validate everything in the end.
@joaoe that sounds like a great candidate for a third-party plugin. Use an [on_page_content][1] event to collect all links and anchors and an [on_post_build][2] event to compare them all.
[1]: https://www.mkdocs.org/user-guide/plugins/#on_page_content
[2]: https://www.mkdocs.org/user-guide/plugins/#on_post_build
Thanks for the tip :)
Did a third-party plugin ever get created for this? This seems like a really important feature.
Having moved from Sphinx, not being able to validate that the `#title` portion of links is valid adds a lot of uncertainty to keeping docs correct.
@johnthagen see https://github.com/manuzhang/mkdocs-htmlproofer-plugin 🙂
@pawamoy Thanks for the link. When I tried it though, the `htmlproofer` plugin didn't catch an invalid anchor link: https://github.com/manuzhang/mkdocs-htmlproofer-plugin/issues/13
I think this is because it is checking the return code from the browser and invalid anchor still return a 200 okay, they just do not position the browser on the page correctly.
https://github.com/mkdocstrings/autorefs has a link syntax that ends up being turned into anchors, and linking to non-existent anchors *that* way happens to fail validation. So,
1. If you're OK with the different linking syntax, you can just use that.
2. This proves that a plugin doing just anchor validation is possible.
I'm not sure if such a plugin exists, but I had it on my radar to make a plugin to validate anchors and absolute links.
Anchor validation has been released into [`mkdocs-htmlproofer-plugin` version 0.5.0](https://github.com/manuzhang/mkdocs-htmlproofer-plugin/releases/tag/v0.5.0). | 2023-11-11T15:09:51Z | 2023-12-09T17:08:16Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_get_theme_dir (tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_empty_config (tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_anchor_warning_for_footnote (tests.build_tests.BuildTests.test_anchor_warning_for_footnote)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_with_locale (tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_just_search (tests.get_deps_tests.TestGetDeps.test_just_search)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_exclude_pages_with_invalid_links (tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_get_theme_dir_keyerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_theme_precedence (tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_absolute_link (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_get_theme_dir_importerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_dict_keys_and_ignores_env (tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_multi_theme (tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_anchor_warning_and_query (tests.build_tests.BuildTests.test_anchor_warning_and_query)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_anchor_no_warning (tests.build_tests.BuildTests.test_anchor_no_warning)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_get_themes (tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_nonexistent (tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_load_missing_required (tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_get_themes_warning (tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_mkdocs_config (tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_get_themes_error (tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_git_and_shadowed (tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_anchor_warning (tests.build_tests.BuildTests.test_anchor_warning)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.1.0", "certifi==2023.11.17", "cffi==1.16.0", "click==8.1.7", "cryptography==41.0.7", "distlib==0.3.7", "editables==0.5", "filelock==3.13.1", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==1.0.2", "httpx==0.25.2", "hyperlink==21.0.0", "idna==3.6", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.3.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.12.0", "pexpect==4.9.0", "platformdirs==4.1.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.17.2", "pyperclip==1.8.2", "rich==13.7.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.3", "trove-classifiers==2023.11.29", "userpath==1.9.1", "virtualenv==20.25.0", "wheel==0.44.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3503 | df2dffd8a62f312e98987998af3114f3e1e552fb | diff --git a/mkdocs/plugins.py b/mkdocs/plugins.py
index 98a99f38d7..aaf3b203d7 100644
--- a/mkdocs/plugins.py
+++ b/mkdocs/plugins.py
@@ -506,9 +506,15 @@ def _register_event(
for sub in method.methods:
self._register_event(event_name, sub, plugin_name=plugin_name)
else:
- utils.insort(
- self.events[event_name], method, key=lambda m: -getattr(m, 'mkdocs_priority', 0)
- )
+ events = self.events[event_name]
+ if event_name == 'page_read_source' and len(events) == 1:
+ plugin1 = self._event_origins.get(next(iter(events)), '<unknown>')
+ plugin2 = plugin_name or '<unknown>'
+ log.warning(
+ "Multiple 'on_page_read_source' handlers can't work "
+ f"(both plugins '{plugin1}' and '{plugin2}' registered one)."
+ )
+ utils.insort(events, method, key=lambda m: -getattr(m, 'mkdocs_priority', 0))
if plugin_name:
try:
self._event_origins[method] = plugin_name
| diff --git a/mkdocs/tests/plugin_tests.py b/mkdocs/tests/plugin_tests.py
index 8c09cf4f2c..7f32146f00 100644
--- a/mkdocs/tests/plugin_tests.py
+++ b/mkdocs/tests/plugin_tests.py
@@ -159,7 +159,13 @@ def on_post_build(self, **kwargs) -> None:
collection = plugins.PluginCollection()
collection['dummy'] = dummy = DummyPlugin()
- collection['prio'] = prio = PrioPlugin()
+ with self.assertLogs('mkdocs', level='WARNING') as cm:
+ collection['prio'] = prio = PrioPlugin()
+ self.assertEqual(
+ '\n'.join(cm.output),
+ "WARNING:mkdocs.plugins:Multiple 'on_page_read_source' handlers can't work (both plugins 'dummy' and 'prio' registered one).",
+ )
+
self.assertEqual(
collection.events['page_content'],
[prio.on_page_content, dummy.on_page_content],
@@ -188,7 +194,12 @@ def test_set_multiple_plugins_on_collection(self):
plugin1 = DummyPlugin()
collection['foo'] = plugin1
plugin2 = DummyPlugin()
- collection['bar'] = plugin2
+ with self.assertLogs('mkdocs', level='WARNING') as cm:
+ collection['bar'] = plugin2
+ self.assertEqual(
+ '\n'.join(cm.output),
+ "WARNING:mkdocs.plugins:Multiple 'on_page_read_source' handlers can't work (both plugins 'foo' and 'bar' registered one).",
+ )
self.assertEqual(list(collection.items()), [('foo', plugin1), ('bar', plugin2)])
def test_run_event_on_collection(self):
@@ -208,7 +219,12 @@ def test_run_event_twice_on_collection(self):
collection['foo'] = plugin1
plugin2 = DummyPlugin()
plugin2.load_config({'foo': 'second'})
- collection['bar'] = plugin2
+ with self.assertLogs('mkdocs', level='WARNING') as cm:
+ collection['bar'] = plugin2
+ self.assertEqual(
+ '\n'.join(cm.output),
+ "WARNING:mkdocs.plugins:Multiple 'on_page_read_source' handlers can't work (both plugins 'foo' and 'bar' registered one).",
+ )
self.assertEqual(
collection.on_page_content('page content', page=None, config={}, files=[]),
'second new page content',
| Allow multiple hook files
When there are multiple hook files, only one instance of a type of plugin can be used. For example, I had a hook file that defined `on_page_read_source` and when I added a second that defined the same, only the hook that came last executed which by sheer luck I discovered while debugging something else.
| There are many options for this:
* Just do the 2 actions in 1 function
* Use multiple files (wait, are you saying that multiple hooks files have a problem?)
* Use this upcoming feature, though I should double-check whether it actually works for hooks
https://github.com/mkdocs/mkdocs/pull/3448
Or actually I know what it is - it's about `on_page_read_source` specifically. I think this event type is fundamentally broken, actually? The definition is "replace the default mechanism to read the contents of a page's source from the filesystem" - so yeah if you replace the mechanism once and read the original source file, and then replace the mechanism another time and read the original source file, that's exactly what will happen?
I was just looking through your hooks yesterday and saw that your usage would be much simpler served by `on_page_markdown`, that's definitely what you should switch to at the moment, and it would not have this problem at all.
Oh okay, that makes sense that I was using the wrong plugin type. My bad! Before I close this can you take a look at the PR that I merged to fix this? It works fine but I'm wondering what you think.
The actionable thing for me is one of these:
* Deprecate `on_page_read_source` event type because I think there are better alternatives to it in every case
* Show an error if multiple handlers for it are added (it's the only event type that is incompatible with having multiple handlers)
So it's helpful that you brought this up
> look at the PR that I merged to fix this
Commented there-
yeah you can revert https://github.com/pypa/hatch/pull/1065 and, in the previous state of the code, change each `on_page_read_source` to `on_page_markdown` and it's the same except you get the source directly instead of messing with abs_src_path. And, well, it will actually work | 2023-12-03T21:52:25Z | 2023-12-08T20:42:42Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_get_themes_warning (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_warning)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_file_ne (tests.structure.file_tests.TestFiles.test_file_ne)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_exclude_pages_with_invalid_links (tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_get_themes (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_absolute_link (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_get_theme_dir_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_error)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_get_theme_dir_importerror (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_importerror)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_file_eq (tests.structure.file_tests.TestFiles.test_file_eq)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_get_theme_dir (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_load_missing_required (tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_get_themes_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_error)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.1.0", "certifi==2023.11.17", "cffi==1.16.0", "click==8.1.7", "cryptography==41.0.7", "distlib==0.3.7", "editables==0.5", "filelock==3.13.1", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==1.0.2", "httpx==0.25.2", "hyperlink==21.0.0", "idna==3.6", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.3.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.9.0", "platformdirs==4.1.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.17.2", "pyperclip==1.8.2", "rich==13.7.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.3", "trove-classifiers==2023.11.29", "userpath==1.9.1", "virtualenv==20.25.0", "wheel==0.44.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3500 | 646987da4502becf346bfaabb6ba40934307399b | diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py
index 0df2069be8..41377cf56c 100644
--- a/mkdocs/__main__.py
+++ b/mkdocs/__main__.py
@@ -110,6 +110,7 @@ def __del__(self):
"Provide a specific MkDocs config. This can be a file name, or '-' to read from stdin."
)
dev_addr_help = "IP address and port to serve documentation locally (default: localhost:8000)"
+serve_open_help = "Open the website in a Web browser after the initial build finishes."
strict_help = "Enable strict mode. This will cause MkDocs to abort the build on any warnings."
theme_help = "The theme to use when building your documentation."
theme_choices = sorted(utils.get_theme_names())
@@ -249,6 +250,7 @@ def cli():
@cli.command(name="serve")
@click.option('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')
[email protected]('-o', '--open', 'open_in_browser', help=serve_open_help, is_flag=True)
@click.option('--no-livereload', 'livereload', flag_value=False, help=no_reload_help)
@click.option('--livereload', 'livereload', flag_value=True, default=True, hidden=True)
@click.option('--dirtyreload', 'build_type', flag_value='dirty', hidden=True)
diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py
index dc472a66cb..72a46aab77 100644
--- a/mkdocs/commands/serve.py
+++ b/mkdocs/commands/serve.py
@@ -23,6 +23,8 @@ def serve(
build_type: str | None = None,
watch_theme: bool = False,
watch: list[str] = [],
+ *,
+ open_in_browser: bool = False,
**kwargs,
) -> None:
"""
@@ -99,7 +101,7 @@ def error_handler(code) -> bytes | None:
server.watch(item)
try:
- server.serve()
+ server.serve(open_in_browser=open_in_browser)
except KeyboardInterrupt:
log.info("Shutting down...")
finally:
diff --git a/mkdocs/livereload/__init__.py b/mkdocs/livereload/__init__.py
index f98da658a9..1520855a40 100644
--- a/mkdocs/livereload/__init__.py
+++ b/mkdocs/livereload/__init__.py
@@ -18,6 +18,7 @@
import time
import traceback
import urllib.parse
+import webbrowser
import wsgiref.simple_server
import wsgiref.util
from typing import Any, BinaryIO, Callable, Iterable
@@ -161,7 +162,7 @@ def unwatch(self, path: str) -> None:
self._watched_paths.pop(path)
self.observer.unschedule(self._watch_refs.pop(path))
- def serve(self):
+ def serve(self, *, open_in_browser=False):
self.server_bind()
self.server_activate()
@@ -171,8 +172,13 @@ def serve(self):
paths_str = ", ".join(f"'{_try_relativize_path(path)}'" for path in self._watched_paths)
log.info(f"Watching paths for changes: {paths_str}")
- log.info(f"Serving on {self.url}")
+ if open_in_browser:
+ log.info(f"Serving on {self.url} and opening it in a browser")
+ else:
+ log.info(f"Serving on {self.url}")
self.serve_thread.start()
+ if open_in_browser:
+ webbrowser.open(self.url)
self._build_loop()
| diff --git a/mkdocs/tests/cli_tests.py b/mkdocs/tests/cli_tests.py
index 6ce03db109..abd1286e5d 100644
--- a/mkdocs/tests/cli_tests.py
+++ b/mkdocs/tests/cli_tests.py
@@ -21,6 +21,7 @@ def test_serve_default(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=True,
build_type=None,
config_file=None,
@@ -53,6 +54,7 @@ def test_serve_dev_addr(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr='0.0.0.0:80',
+ open_in_browser=False,
livereload=True,
build_type=None,
config_file=None,
@@ -70,6 +72,7 @@ def test_serve_strict(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=True,
build_type=None,
config_file=None,
@@ -89,6 +92,7 @@ def test_serve_theme(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=True,
build_type=None,
config_file=None,
@@ -108,6 +112,7 @@ def test_serve_use_directory_urls(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=True,
build_type=None,
config_file=None,
@@ -127,6 +132,7 @@ def test_serve_no_directory_urls(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=True,
build_type=None,
config_file=None,
@@ -144,6 +150,7 @@ def test_serve_livereload(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=True,
build_type=None,
config_file=None,
@@ -161,6 +168,7 @@ def test_serve_no_livereload(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=False,
build_type=None,
config_file=None,
@@ -178,6 +186,7 @@ def test_serve_dirtyreload(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=True,
build_type='dirty',
config_file=None,
@@ -195,6 +204,7 @@ def test_serve_watch_theme(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
+ open_in_browser=False,
livereload=True,
build_type=None,
config_file=None,
| Start the default browser, when starting the `mkdocs serve` command?
See discussion in #3494
It would be good to open the page in the default browser, when typing `mkdocs serve` (as happens when running the `jupyter notebook` command.
### Various points
1. This should be done once, not every time a change is detected.
2. Make it work by command-line option and config file : opt-in (initially) and then opt-out (if successful).
3. I have experimented with code, and one of the problems I met was with async: the time it might take for the page to load on the browser, versus the time it takes for the server to start.
| I'll implement this :+1:
See also @pawamoy's comment:
> If it can detect that the URL is already open in a tab, then that would be best.
OK let's say the URL is already open in a tab, what should it do then? Just not open the browser? I think that's worse than opening the browser even if the tab will be duplicated. Unfortunately there's no implementation for "focus an existing tab if possible".
It makes a sense: a duplicated tab should not be a big deal.
> one of the problems I met was with async: the time it might take for the page to load on the browser, versus the time it takes for the server to start.
Hmm for me it worked reliably. Could you try my pull request and see if you run into such issues with it?
> I think that's worse than opening the browser even if the tab will be duplicated.
Yeah that's what other tools do anyway. We can discard my comment about detecting the tab. | 2023-12-03T10:26:37Z | 2023-12-03T21:00:13Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_get_themes_warning (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_warning)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_file_ne (tests.structure.file_tests.TestFiles.test_file_ne)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_exclude_pages_with_invalid_links (tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_get_themes (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_absolute_link (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_get_theme_dir_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_error)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_get_theme_dir_importerror (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_importerror)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_file_eq (tests.structure.file_tests.TestFiles.test_file_eq)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_get_theme_dir (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_load_missing_required (tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_get_themes_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_error)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.1.0", "certifi==2023.11.17", "cffi==1.16.0", "click==8.1.7", "cryptography==41.0.7", "distlib==0.3.7", "editables==0.5", "filelock==3.13.1", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==1.0.2", "httpx==0.25.2", "hyperlink==21.0.0", "idna==3.6", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.3.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.9.0", "platformdirs==4.0.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.17.2", "pyperclip==1.8.2", "rich==13.7.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.3", "trove-classifiers==2023.11.29", "userpath==1.9.1", "virtualenv==20.25.0", "wheel==0.44.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3501 | 646987da4502becf346bfaabb6ba40934307399b | diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
index 4a21a3da70..2c9e97931d 100644
--- a/mkdocs/commands/build.py
+++ b/mkdocs/commands/build.py
@@ -22,8 +22,6 @@
if TYPE_CHECKING:
from mkdocs.config.defaults import MkDocsConfig
-if TYPE_CHECKING:
- from mkdocs.livereload import LiveReloadServer
log = logging.getLogger(__name__)
@@ -247,9 +245,7 @@ def _build_page(
config._current_page = None
-def build(
- config: MkDocsConfig, live_server: LiveReloadServer | None = None, dirty: bool = False
-) -> None:
+def build(config: MkDocsConfig, *, serve_url: str | None = None, dirty: bool = False) -> None:
"""Perform a full site build."""
logger = logging.getLogger('mkdocs')
@@ -259,7 +255,7 @@ def build(
if config.strict:
logging.getLogger('mkdocs').addHandler(warning_counter)
- inclusion = InclusionLevel.all if live_server else InclusionLevel.is_included
+ inclusion = InclusionLevel.all if serve_url else InclusionLevel.is_included
try:
start = time.monotonic()
@@ -280,7 +276,7 @@ def build(
" links within your site. This option is designed for site development purposes only."
)
- if not live_server: # pragma: no cover
+ if not serve_url: # pragma: no cover
log.info(f"Building documentation to directory: {config.site_dir}")
if dirty and site_directory_contains_stale_files(config.site_dir):
log.info("The directory contains stale files. Use --clean to remove them.")
@@ -306,8 +302,8 @@ def build(
for file in files.documentation_pages(inclusion=inclusion):
log.debug(f"Reading: {file.src_uri}")
if file.page is None and file.inclusion.is_not_in_nav():
- if live_server and file.inclusion.is_excluded():
- excluded.append(urljoin(live_server.url, file.url))
+ if serve_url and file.inclusion.is_excluded():
+ excluded.append(urljoin(serve_url, file.url))
Page(None, file, config)
assert file.page is not None
_populate_page(file.page, config, files, dirty)
diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py
index dc472a66cb..d6e73b1675 100644
--- a/mkdocs/commands/serve.py
+++ b/mkdocs/commands/serve.py
@@ -9,7 +9,7 @@
from mkdocs.commands.build import build
from mkdocs.config import load_config
-from mkdocs.livereload import LiveReloadServer
+from mkdocs.livereload import LiveReloadServer, _serve_url
if TYPE_CHECKING:
from mkdocs.config.defaults import MkDocsConfig
@@ -37,9 +37,6 @@ def serve(
# string is returned. And it makes MkDocs temp dirs easier to identify.
site_dir = tempfile.mkdtemp(prefix='mkdocs_')
- def mount_path(config: MkDocsConfig):
- return urlsplit(config.site_url or '/').path
-
def get_config():
config = load_config(
config_file=config_file,
@@ -47,7 +44,6 @@ def get_config():
**kwargs,
)
config.watch.extend(watch)
- config.site_url = f'http://{config.dev_addr}{mount_path(config)}'
return config
is_clean = build_type == 'clean'
@@ -56,16 +52,20 @@ def get_config():
config = get_config()
config.plugins.on_startup(command=('build' if is_clean else 'serve'), dirty=is_dirty)
+ host, port = config.dev_addr
+ mount_path = urlsplit(config.site_url or '/').path
+ config.site_url = serve_url = _serve_url(host, port, mount_path)
+
def builder(config: MkDocsConfig | None = None):
log.info("Building documentation...")
if config is None:
config = get_config()
+ config.site_url = serve_url
- build(config, live_server=None if is_clean else server, dirty=is_dirty)
+ build(config, serve_url=None if is_clean else serve_url, dirty=is_dirty)
- host, port = config.dev_addr
server = LiveReloadServer(
- builder=builder, host=host, port=port, root=site_dir, mount_path=mount_path(config)
+ builder=builder, host=host, port=port, root=site_dir, mount_path=mount_path
)
def error_handler(code) -> bytes | None:
diff --git a/mkdocs/livereload/__init__.py b/mkdocs/livereload/__init__.py
index f98da658a9..e1d7db313f 100644
--- a/mkdocs/livereload/__init__.py
+++ b/mkdocs/livereload/__init__.py
@@ -81,6 +81,15 @@ def process(self, msg: str, kwargs: dict) -> tuple[str, dict]: # type: ignore[o
log = _LoggerAdapter(logging.getLogger(__name__), {})
+def _normalize_mount_path(mount_path: str) -> str:
+ """Ensure the mount path starts and ends with a slash."""
+ return ("/" + mount_path.lstrip("/")).rstrip("/") + "/"
+
+
+def _serve_url(host: str, port: int, path: str) -> str:
+ return f"http://{host}:{port}{_normalize_mount_path(path)}"
+
+
class LiveReloadServer(socketserver.ThreadingMixIn, wsgiref.simple_server.WSGIServer):
daemon_threads = True
poll_response_timeout = 60
@@ -96,16 +105,14 @@ def __init__(
shutdown_delay: float = 0.25,
) -> None:
self.builder = builder
- self.server_name = host
- self.server_port = port
try:
if isinstance(ipaddress.ip_address(host), ipaddress.IPv6Address):
self.address_family = socket.AF_INET6
except Exception:
pass
self.root = os.path.abspath(root)
- self.mount_path = ("/" + mount_path.lstrip("/")).rstrip("/") + "/"
- self.url = f"http://{self.server_name}:{self.server_port}{self.mount_path}"
+ self.mount_path = _normalize_mount_path(mount_path)
+ self.url = _serve_url(host, port, mount_path)
self.build_delay = 0.1
self.shutdown_delay = shutdown_delay
# To allow custom error pages.
| diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 4b7596bf5c..951452988d 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -16,7 +16,6 @@
from mkdocs.commands import build
from mkdocs.config import base
from mkdocs.exceptions import PluginError
-from mkdocs.livereload import LiveReloadServer
from mkdocs.structure.files import File, Files
from mkdocs.structure.nav import get_navigation
from mkdocs.structure.pages import Page
@@ -36,13 +35,6 @@ def build_page(title, path, config, md_src=''):
return page, files
-def testing_server(root, builder=lambda: None, mount_path="/"):
- with mock.patch("socket.socket"):
- return LiveReloadServer(
- builder, host="localhost", port=123, root=root, mount_path=mount_path
- )
-
-
class BuildTests(PathAssertionMixin, unittest.TestCase):
def _get_env_with_null_translations(self, config):
env = config.theme.get_env()
@@ -596,7 +588,7 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
exclude_docs='ba*.md',
)
- with self.subTest(live_server=None):
+ with self.subTest(serve_url=None):
expected_logs = '''
INFO:Doc file 'test/foo.md' contains a link to 'test/bar.md' which is excluded from the built site.
'''
@@ -606,8 +598,8 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
self.assertPathNotExists(site_dir, 'test', 'baz.html')
self.assertPathNotExists(site_dir, '.zoo.html')
- server = testing_server(site_dir, mount_path='/documentation/')
- with self.subTest(live_server=server):
+ serve_url = 'http://localhost:123/documentation/'
+ with self.subTest(serve_url=serve_url):
expected_logs = '''
INFO:Doc file 'test/bar.md' contains a relative link 'nonexistent.md', but the target 'test/nonexistent.md' is not found among documentation files.
INFO:Doc file 'test/foo.md' contains a link to 'test/bar.md' which is excluded from the built site.
@@ -617,7 +609,7 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
- http://localhost:123/documentation/test/baz.html
'''
with self._assert_build_logs(expected_logs):
- build.build(cfg, live_server=server)
+ build.build(cfg, serve_url=serve_url)
foo_path = Path(site_dir, 'test', 'foo.html')
self.assertTrue(foo_path.is_file())
@@ -639,13 +631,13 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
def test_conflicting_readme_and_index(self, site_dir, docs_dir):
cfg = load_config(docs_dir=docs_dir, site_dir=site_dir, use_directory_urls=False)
- for server in None, testing_server(site_dir):
- with self.subTest(live_server=server):
+ for serve_url in None, 'http://localhost:123/':
+ with self.subTest(serve_url=serve_url):
expected_logs = '''
WARNING:Excluding 'foo/README.md' from the site because it conflicts with 'foo/index.md'.
'''
with self._assert_build_logs(expected_logs):
- build.build(cfg, live_server=server)
+ build.build(cfg, serve_url=serve_url)
index_path = Path(site_dir, 'foo', 'index.html')
self.assertPathIsFile(index_path)
@@ -663,10 +655,10 @@ def test_exclude_readme_and_index(self, site_dir, docs_dir):
docs_dir=docs_dir, site_dir=site_dir, use_directory_urls=False, exclude_docs='index.md'
)
- for server in None, testing_server(site_dir):
- with self.subTest(live_server=server):
+ for serve_url in None, 'http://localhost:123/':
+ with self.subTest(serve_url=serve_url):
with self._assert_build_logs(''):
- build.build(cfg, live_server=server)
+ build.build(cfg, serve_url=serve_url)
index_path = Path(site_dir, 'foo', 'index.html')
self.assertPathIsFile(index_path)
@@ -693,9 +685,9 @@ def on_files_2(files: Files, config: MkDocsConfig) -> None:
assert f is not None
config.nav = Path(f.abs_src_path).read_text().splitlines()
- for server in None, testing_server(site_dir):
+ for serve_url in None, 'http://localhost:123/':
for exclude in 'full', 'nav', None:
- with self.subTest(live_server=server, exclude=exclude):
+ with self.subTest(serve_url=serve_url, exclude=exclude):
cfg = load_config(
docs_dir=docs_dir,
site_dir=site_dir,
@@ -711,13 +703,13 @@ def on_files_2(files: Files, config: MkDocsConfig) -> None:
INFO:The following pages exist in the docs directory, but are not included in the "nav" configuration:
- SUMMARY.md
'''
- if exclude == 'full' and server:
+ if exclude == 'full' and serve_url:
expected_logs = '''
INFO:The following pages are being built only for the preview but will be excluded from `mkdocs build` per `exclude_docs`:
- http://localhost:123/SUMMARY.html
'''
with self._assert_build_logs(expected_logs):
- build.build(cfg, live_server=server)
+ build.build(cfg, serve_url=serve_url)
foo_path = Path(site_dir, 'foo.html')
self.assertPathIsFile(foo_path)
@@ -727,7 +719,7 @@ def on_files_2(files: Files, config: MkDocsConfig) -> None:
)
summary_path = Path(site_dir, 'SUMMARY.html')
- if exclude == 'full' and not server:
+ if exclude == 'full' and not serve_url:
self.assertPathNotExists(summary_path)
else:
self.assertPathExists(summary_path)
diff --git a/mkdocs/tests/livereload_tests.py b/mkdocs/tests/livereload_tests.py
index 6a7a0c9f99..b19009a329 100644
--- a/mkdocs/tests/livereload_tests.py
+++ b/mkdocs/tests/livereload_tests.py
@@ -39,6 +39,8 @@ def testing_server(root, builder=lambda: None, mount_path="/"):
mount_path=mount_path,
polling_interval=0.2,
)
+ server.server_name = "localhost"
+ server.server_port = 0
server.setup_environ()
server.observer.start()
thread = threading.Thread(target=server._build_loop, daemon=True)
| refactor: only pass server url to build function
Small refactor, dont pass the whole Live server instance to the build function.
Right now, the builder method knows about the live server and the live server knows about the build method.
(see https://github.com/mkdocs/mkdocs/compare/master...phil65:mkdocs:untangle_build_and_serve?expand=1#diff-6ce1f9285defedc650e776dc5832321bc5297c681ac941dac31982ee237c7589L67 and https://github.com/mkdocs/mkdocs/compare/master...phil65:mkdocs:untangle_build_and_serve?expand=1#diff-6ce1f9285defedc650e776dc5832321bc5297c681ac941dac31982ee237c7589L70
This untangles this so that the build method only needs the server url.
| 2023-12-03T10:37:10Z | 2023-12-03T20:59:47Z | [] | [] | ["test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_get_themes (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_load_missing_required (tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_get_themes_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_error)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_absolute_link (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_new (tests.new_tests.NewTests.test_new)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_get_theme_dir (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_get_themes_warning (tests.utils.utils_tests.ThemeUtilsTests.test_get_themes_warning)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_file_ne (tests.structure.file_tests.TestFiles.test_file_ne)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_exclude_pages_with_invalid_links (tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_load_default_file_with_yaml (tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_new (tests.cli_tests.CLITests.test_new)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_get_theme_dir_importerror (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_importerror)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_file_eq (tests.structure.file_tests.TestFiles.test_file_eq)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_get_theme_dir_error (tests.utils.utils_tests.ThemeUtilsTests.test_get_theme_dir_error)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.1.0", "certifi==2023.11.17", "cffi==1.16.0", "click==8.1.7", "cryptography==41.0.7", "distlib==0.3.7", "editables==0.5", "filelock==3.13.1", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==1.0.2", "httpx==0.25.2", "hyperlink==21.0.0", "idna==3.6", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.3.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.9.0", "platformdirs==4.0.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.17.2", "pyperclip==1.8.2", "rich==13.7.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.3", "trove-classifiers==2023.11.29", "userpath==1.9.1", "virtualenv==20.25.0", "wheel==0.44.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
|
mkdocs/mkdocs | mkdocs__mkdocs-3466 | dc45916aa1cc4b4d4796dd45656bd1ff60d4ce44 | diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index aacff40347..9b16e3025c 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -10,6 +10,7 @@
import types
import warnings
from collections import Counter, UserString
+from types import SimpleNamespace
from typing import (
Any,
Callable,
@@ -993,6 +994,12 @@ def validate_ext_cfg(self, ext: object, cfg: object) -> None:
raise ValidationError(f"Invalid config options for Markdown Extension '{ext}'.")
self.configdata[ext] = cfg
+ def pre_validation(self, config, key_name):
+ # To appease validation in case it involves the `!relative` tag.
+ config._current_page = current_page = SimpleNamespace() # type: ignore[attr-defined]
+ current_page.file = SimpleNamespace()
+ current_page.file.src_path = ''
+
def run_validation(self, value: object) -> list[str]:
self.configdata: dict[str, dict] = {}
if not isinstance(value, (list, tuple, dict)):
@@ -1037,6 +1044,7 @@ def run_validation(self, value: object) -> list[str]:
return extensions
def post_validation(self, config: Config, key_name: str):
+ config._current_page = None # type: ignore[attr-defined]
config[self.configkey] = self.configdata
diff --git a/mkdocs/utils/yaml.py b/mkdocs/utils/yaml.py
index b0c0e7ad6d..46745eecd3 100644
--- a/mkdocs/utils/yaml.py
+++ b/mkdocs/utils/yaml.py
@@ -97,12 +97,13 @@ def __init__(self, config: MkDocsConfig, suffix: str = ''):
super().__init__(config, suffix)
def value(self) -> str:
- if self.config._current_page is None:
+ current_page = self.config._current_page
+ if current_page is None:
raise exceptions.ConfigurationError(
"The current file is not set for the '!relative' tag. "
"It cannot be used in this context; the intended usage is within `markdown_extensions`."
)
- return os.path.dirname(self.config._current_page.file.abs_src_path)
+ return os.path.dirname(os.path.join(self.config.docs_dir, current_page.file.src_path))
def get_yaml_loader(loader=yaml.Loader, config: MkDocsConfig | None = None):
| diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 275aad3709..4b7596bf5c 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -814,7 +814,7 @@ def run(self, lines: list[str]) -> list[str]:
class _TestExtension(markdown.extensions.Extension):
def __init__(self, base_path: str) -> None:
- self.base_path = base_path
+ self.base_path = str(base_path)
def extendMarkdown(self, md: markdown.Markdown) -> None:
md.preprocessors.register(_TestPreprocessor(self.base_path), "mkdocs_test", priority=32)
| Wrong example for `!relative` option
The Configuration page lists an example using `pymdownx.snippets` for the `!relative` YAML tag.
The issue with this example is, that the `base_path` option of snippets is expecting a list and not a single String, which breaks the configuration itself.
In fact, the relative option cannot be used by snippets at all it seems.
This error in the documentation should be fixed, as it will otherwise give people the idea, that it can be used with snippets like that...
Or IF it can be used, there should be more clarification on this.
Below is a collection of stacktraces thrown by MkDocs when using `!relative` in different setups:
```yaml
markdown_extensions:
# ...
- pymdownx.snippets:
base_path: !relative
```
<details><summary>Stacktrace</summary>
<p>
```
ERROR - Config value 'markdown_extensions': Failed to load extension 'pymdownx.snippets'.
File "C:\Users\Andreas\AppData\Local\Programs\Python\Python311\Lib\site-packages\mkdocs\config\config_options.py", line 1021, in run_validation
md.registerExtensions((ext,), self.configdata)
File "C:\Users\Andreas\AppData\Local\Programs\Python\Python311\Lib\site-packages\markdown\core.py", line 115, in registerExtensions
ext.extendMarkdown(self)
File "C:\Users\Andreas\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymdownx\snippets.py", line 402, in extendMarkdown
snippet = SnippetPreprocessor(config, md)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Andreas\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymdownx\snippets.py", line 85, in __init__
self.base_path = [os.path.abspath(b) for b in base]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'RelativeDirPlaceholder' object is not iterable
Aborted with 1 configuration errors!
ERROR - [21:51:48] An error happened during the rebuild. The server will appear stuck until build errors are resolved.
```
</p>
</details>
```yaml
markdown_extensions:
# ...
- pymdownx.snippets:
base_path:
- !relative
```
<details><summary>Stacktrace</summary>
<p>
```
ERROR - Config value 'markdown_extensions': Failed to load extension 'pymdownx.snippets'.
File "C:\Users\Andreas\AppData\Local\Programs\Python\Python311\Lib\site-packages\mkdocs\utils\yaml.py", line 52, in __fspath__
return os.path.join(self.value(), self.suffix)
^^^^^^^^^^^^
File "C:\Users\Andreas\AppData\Local\Programs\Python\Python311\Lib\site-packages\mkdocs\utils\yaml.py", line 98, in value
raise exceptions.ConfigurationError(
ConfigurationError: The current file is not set for the '!relative' tag. It cannot be used in this context; the intended usage is within `markdown_extensions`.
Aborted with 1 configuration errors!
ERROR - [21:52:36] An error happened during the rebuild. The server will appear stuck until build errors are resolved.
```
</p>
</details>
| Yes that is true. There's currently a problem with both examples. I actually ran into it just yesterday.
The 1st example has a bug that is fixed in https://github.com/facelessuser/pymdown-extensions/pull/2206 but not released yet. But then it will run into the same bug as the 2nd example.
The 2nd example runs into a validation bug. Back when I was developing this, this line wasn't there yet: https://github.com/facelessuser/pymdown-extensions/blame/f4a66a6f06aa8e6f72f25fe6c579781f12e5636e/pymdownx/snippets.py#L85
Because this line is executed at load time and because mkdocs tries to validate the extension at load time, this fails.
https://github.com/mkdocs/mkdocs/blob/8909ab3f6dcd0556a8266a8cd6980f89810d1855/mkdocs/config/config_options.py#L1020
Note that with the 2nd example only `!relative` is broken, `!relative $config_dir` still works.
> Note that with the 2nd example only `!relative` is broken, `!relative $config_dir` still works.
Okay. Sadly, this wouldn't be of use for me personally, as the `!relative` option would be most useful for me for translatable docs as I could have the snippet in the same relative position to the docs page instead of having X variants in the same folder...
Guess I'll have to wait for pymdown extensions to update.
There seems to still be some issues with this option, even after 10.4 was released, which should fix it.
I mention this here, because I saw oprypin contributing the possible fix for this to the extension, so maybe he has further input on this.
Info on the issue, including currend markdown_extensions settings, is found here: https://github.com/facelessuser/pymdown-extensions/discussions/2236
Yes I was saying there are 2 problems and only 1 is fixed. | 2023-11-12T17:02:57Z | 2023-11-14T17:35:30Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_get_theme_dir (tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_empty_config (tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_with_locale (tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_file_ne (tests.structure.file_tests.TestFiles.test_file_ne)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_just_search (tests.get_deps_tests.TestGetDeps.test_just_search)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_exclude_pages_with_invalid_links (tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_get_theme_dir_keyerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_theme_precedence (tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_absolute_link (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_get_theme_dir_importerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_dict_keys_and_ignores_env (tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_multi_theme (tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_get_themes (tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_file_eq (tests.structure.file_tests.TestFiles.test_file_eq)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_nonexistent (tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_load_missing_required (tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_get_themes_warning (tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_mkdocs_config (tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_get_themes_error (tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_git_and_shadowed (tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.0.0", "certifi==2023.7.22", "cffi==1.16.0", "click==8.1.7", "cryptography==41.0.5", "distlib==0.3.7", "editables==0.5", "filelock==3.13.1", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==1.0.2", "httpx==0.25.1", "hyperlink==21.0.0", "idna==3.4", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.3.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.8.0", "platformdirs==3.11.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.16.1", "pyperclip==1.8.2", "rich==13.6.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.2", "trove-classifiers==2023.11.14", "userpath==1.9.1", "virtualenv==20.24.6", "wheel==0.44.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3449 | 994ffff114e59dfcb5c955db373c2a4448f69cac | diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index b7204b94ef..84c1430f1e 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -392,6 +392,9 @@ def path_to_url(self, url: str) -> str:
)
if warning:
+ if self.file.inclusion.is_excluded():
+ warning_level = min(logging.INFO, warning_level)
+
# There was no match, so try to guess what other file could've been intended.
if warning_level > logging.DEBUG:
suggest_url = ''
@@ -414,7 +417,10 @@ def path_to_url(self, url: str) -> str:
assert target_uri is not None
assert target_file is not None
if target_file.inclusion.is_excluded():
- warning_level = min(logging.INFO, self.config.validation.links.not_found)
+ if self.file.inclusion.is_excluded():
+ warning_level = logging.DEBUG
+ else:
+ warning_level = min(logging.INFO, self.config.validation.links.not_found)
warning = (
f"Doc file '{self.file.src_uri}' contains a link to "
f"'{target_uri}' which is excluded from the built site."
| diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index f668f369c5..275aad3709 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -582,7 +582,7 @@ def _assert_build_logs(self, expected):
@tempdir(
files={
'test/foo.md': 'page1 content, [bar](bar.md)',
- 'test/bar.md': 'page2 content, [baz](baz.md)',
+ 'test/bar.md': 'page2 content, [baz](baz.md), [nonexistent](nonexistent.md)',
'test/baz.md': 'page3 content, [foo](foo.md)',
'.zoo.md': 'page4 content',
}
@@ -609,7 +609,7 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
server = testing_server(site_dir, mount_path='/documentation/')
with self.subTest(live_server=server):
expected_logs = '''
- INFO:Doc file 'test/bar.md' contains a link to 'test/baz.md' which is excluded from the built site.
+ INFO:Doc file 'test/bar.md' contains a relative link 'nonexistent.md', but the target 'test/nonexistent.md' is not found among documentation files.
INFO:Doc file 'test/foo.md' contains a link to 'test/bar.md' which is excluded from the built site.
INFO:The following pages are being built only for the preview but will be excluded from `mkdocs build` per `exclude_docs`:
- http://localhost:123/documentation/.zoo.html
| Log excluded links only if referring page is included
I have several excluded folders in my site (via the `exclude_docs` setting). The excluded folders contain pages that refer to images and other files in the same folder. Would you consider not logging INFO messages for excluded targets when the referring page is also excluded?
For example, the three "Doc file ... contains a link" INFO lines below are repeated in the log every time I save a file and the site is rebuilt. These log entries are irrelevant, because the doc files are also excluded.
```
INFO - Building documentation...
INFO - Cleaning site directory
INFO - Doc file 'hw/hw4_draft.md' contains a link to 'hw/hw4_draft/rhody.py' which is excluded from the built site.
INFO - Doc file 'quiz/1a/written_v1.md' contains a link to 'quiz/1a/q1_code.svg' which is excluded from the built site.
INFO - Doc file 'quiz/1a/written_v2.md' contains a link to 'quiz/1a/q1_code.svg' which is excluded from the built site.
INFO - The following pages are being built only for the preview but will be excluded from `mkdocs build` per `exclude_docs`:
- http://127.0.0.1:8000/cs149/hw/hw4_draft/
- http://127.0.0.1:8000/cs149/quiz/1a/written_v1/
- http://127.0.0.1:8000/cs149/quiz/1a/written_v2/
```
| 2023-10-29T13:59:04Z | 2023-10-30T01:04:51Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_md_index_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_get_theme_dir (tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_empty_config (tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_css_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_with_locale (tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_file_ne (tests.structure.file_tests.TestFiles.test_file_ne)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_just_search (tests.get_deps_tests.TestGetDeps.test_just_search)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_exclude_pages_with_invalid_links (tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_get_theme_dir_keyerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_theme_precedence (tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_absolute_link (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_media_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_javascript_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_static_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_get_theme_dir_importerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_md_index_file_nested_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_dict_keys_and_ignores_env (tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_multi_theme (tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_md_readme_index_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_get_themes (tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_file_eq (tests.structure.file_tests.TestFiles.test_file_eq)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_nonexistent (tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_load_missing_required (tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_get_themes_warning (tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_mkdocs_config (tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_get_themes_error (tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_md_file_nested_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_git_and_shadowed (tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_md_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.0.0", "certifi==2023.7.22", "cffi==1.16.0", "click==8.1.7", "cryptography==41.0.5", "distlib==0.3.7", "editables==0.5", "filelock==3.13.1", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.18.0", "httpx==0.25.0", "hyperlink==21.0.0", "idna==3.4", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.2.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.8.0", "platformdirs==3.11.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.16.1", "pyperclip==1.8.2", "rich==13.6.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.1", "trove-classifiers==2023.10.18", "userpath==1.9.1", "virtualenv==20.24.6", "wheel==0.44.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
|
mkdocs/mkdocs | mkdocs__mkdocs-3395 | 994ffff114e59dfcb5c955db373c2a4448f69cac | diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index 9c6eff4ede..db1d01dbc3 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -798,6 +798,8 @@ You might have seen this feature in the [mkdocs-simple-hooks plugin](https://git
A list of plugins (with optional configuration settings) to use when building
the site. See the [Plugins] documentation for full details.
+**default**: `['search']` (the "search" plugin included with MkDocs).
+
If the `plugins` config setting is defined in the `mkdocs.yml` config file, then
any defaults (such as `search`) are ignored and you need to explicitly re-enable
the defaults if you would like to continue using them:
@@ -818,6 +820,30 @@ plugins:
option2: other value
```
+To completely disable all plugins, including any defaults, set the `plugins`
+setting to an empty list:
+
+```yaml
+plugins: []
+```
+
+#### `enabled` option
+
+> NEW: **New in MkDocs 1.6.**
+>
+> Each plugin has its own options keys. However MkDocs also ensures that each plugin has the `enabled` boolean option. This can be used to conditionally enable a particular plugin, as in the following example:
+>
+> ```yaml
+> plugins:
+> - search
+> - code-validator:
+> enabled: !ENV [LINT, false]
+> ```
+>
+> See: [Environment variables](#environment-variables)
+
+#### Alternate syntax
+
In the above examples, each plugin is a list item (starts with a `-`). As an
alternative, key/value pairs can be used instead. However, in that case an empty
value must be provided for plugins for which no options are defined. Therefore,
@@ -834,15 +860,6 @@ plugins:
This alternative syntax is required if you intend to override some options via
[inheritance].
-To completely disable all plugins, including any defaults, set the `plugins`
-setting to an empty list:
-
-```yaml
-plugins: []
-```
-
-**default**: `['search']` (the "search" plugin included with MkDocs).
-
#### Search
A search plugin is provided by default with MkDocs which uses [lunr.js] as a
diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index 434dfd6ae3..aacff40347 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -45,6 +45,8 @@
T = TypeVar('T')
SomeConfig = TypeVar('SomeConfig', bound=Config)
+log = logging.getLogger(__name__)
+
class SubConfig(Generic[SomeConfig], BaseConfigOption[SomeConfig]):
"""
@@ -1137,6 +1139,17 @@ def load_plugin(self, name: str, config) -> plugins.BasePlugin:
"because the plugin doesn't declare `supports_multiple_instances`."
)
+ # Only if the plugin doesn't have its own "enabled" config, apply a generic one.
+ if 'enabled' in config and not any(pair[0] == 'enabled' for pair in plugin.config_scheme):
+ enabled = config.pop('enabled')
+ if not isinstance(enabled, bool):
+ raise ValidationError(
+ f"Plugin '{name}' option 'enabled': Expected boolean but received: {type(enabled)}"
+ )
+ if not enabled:
+ log.debug(f"Plugin '{inst_name}' is disabled in the config, skipping.")
+ return plugin
+
errors, warns = plugin.load_config(
config, self._config.config_file_path if self._config else None
)
| diff --git a/mkdocs/tests/config/config_options_tests.py b/mkdocs/tests/config/config_options_tests.py
index 2c8a33ae88..ecab870798 100644
--- a/mkdocs/tests/config/config_options_tests.py
+++ b/mkdocs/tests/config/config_options_tests.py
@@ -1926,6 +1926,15 @@ class FakePlugin2(BasePlugin[_FakePlugin2Config]):
supports_multiple_instances = True
+class _EnabledPluginConfig(Config):
+ enabled = c.Type(bool, default=True)
+ bar = c.Type(int, default=0)
+
+
+class EnabledPlugin(BasePlugin[_EnabledPluginConfig]):
+ pass
+
+
class ThemePlugin(BasePlugin[_FakePluginConfig]):
pass
@@ -1949,6 +1958,7 @@ def load(self):
return_value=[
FakeEntryPoint('sample', FakePlugin),
FakeEntryPoint('sample2', FakePlugin2),
+ FakeEntryPoint('sample-e', EnabledPlugin),
FakeEntryPoint('readthedocs/sub_plugin', ThemePlugin),
FakeEntryPoint('overridden', FakePlugin2),
FakeEntryPoint('readthedocs/overridden', ThemePlugin2),
@@ -2096,6 +2106,49 @@ class Schema(Config):
self.assertEqual(set(conf.plugins), {'overridden'})
self.assertIsInstance(conf.plugins['overridden'], FakePlugin2)
+ def test_plugin_config_enabled_for_any_plugin(self) -> None:
+ class Schema(Config):
+ theme = c.Theme(default='mkdocs')
+ plugins = c.Plugins(theme_key='theme')
+
+ cfg = {'theme': 'readthedocs', 'plugins': {'sample': {'enabled': False, 'bar': 3}}}
+ conf = self.get_config(Schema, cfg)
+ self.assertEqual(set(conf.plugins), set())
+
+ cfg = {'theme': 'readthedocs', 'plugins': {'sample': {'enabled': True, 'bar': 3}}}
+ conf = self.get_config(Schema, cfg)
+ self.assertEqual(set(conf.plugins), {'sample'})
+ self.assertEqual(conf.plugins['sample'].config.bar, 3)
+
+ cfg = {'theme': 'readthedocs', 'plugins': {'sample': {'enabled': 5}}}
+ with self.expect_error(
+ plugins="Plugin 'sample' option 'enabled': Expected boolean but received: <class 'int'>"
+ ):
+ self.get_config(Schema, cfg)
+
+ def test_plugin_config_enabled_for_plugin_with_setting(self) -> None:
+ class Schema(Config):
+ theme = c.Theme(default='mkdocs')
+ plugins = c.Plugins(theme_key='theme')
+
+ cfg = {'theme': 'readthedocs', 'plugins': {'sample-e': {'enabled': False, 'bar': 3}}}
+ conf = self.get_config(Schema, cfg)
+ self.assertEqual(set(conf.plugins), {'sample-e'})
+ self.assertEqual(conf.plugins['sample-e'].config.enabled, False)
+ self.assertEqual(conf.plugins['sample-e'].config.bar, 3)
+
+ cfg = {'theme': 'readthedocs', 'plugins': {'sample-e': {'enabled': True, 'bar': 3}}}
+ conf = self.get_config(Schema, cfg)
+ self.assertEqual(set(conf.plugins), {'sample-e'})
+ self.assertEqual(conf.plugins['sample-e'].config.enabled, True)
+ self.assertEqual(conf.plugins['sample-e'].config.bar, 3)
+
+ cfg = {'theme': 'readthedocs', 'plugins': {'sample-e': {'enabled': 5}}}
+ with self.expect_error(
+ plugins="Plugin 'sample-e' option 'enabled': Expected type: <class 'bool'> but received: <class 'int'>"
+ ):
+ self.get_config(Schema, cfg)
+
def test_plugin_config_with_multiple_instances(self) -> None:
class Schema(Config):
theme = c.Theme(default='mkdocs')
| `enabled` setting for all plugins
It seems that so many plugins have an `enabled` setting these days that we may as well just add it in MkDocs. It will not run the plugin at all then. But if a plugin already has this setting explicitly, then MkDocs will not do anything, so the plugin can still decide what to do when it's disabled.
| Yep, definitely agree. This will standardize the way to enable/disable plugins, which would be a great thing to have.
Likewise, I think that'd be useful
> But if a plugin already has this setting explicitly, then MkDocs will not do anything, so the plugin can still decide what to do when it's disabled.
Yes, yes, yes. That would be amazing. If this would mean that we can drop the boilerplate we have to write in each and every event handler of each plugin, so the event handlers are not registered in the first place, this would be absolutely amazing:
``` py
def on_files(self, files, *, config):
if not self.config.enabled:
return
# Do stuff
```
In the plugins of Material for MkDocs there are currently 43 occurrences of this pattern 😅 So the only adjustment we'd need in our plugins is to remove the `enabled` setting from the subclass configuration, correct? | 2023-09-14T21:24:18Z | 2023-10-30T00:58:27Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_md_index_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_get_theme_dir (tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_empty_config (tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_enabled_for_plugin_with_setting (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_plugin_with_setting)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_css_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_with_locale (tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_file_ne (tests.structure.file_tests.TestFiles.test_file_ne)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_just_search (tests.get_deps_tests.TestGetDeps.test_just_search)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_exclude_pages_with_invalid_links (tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_get_theme_dir_keyerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_theme_precedence (tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_absolute_link (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_media_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_javascript_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_static_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_get_theme_dir_importerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_md_index_file_nested_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_dict_keys_and_ignores_env (tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_multi_theme (tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_md_readme_index_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_get_themes (tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_file_eq (tests.structure.file_tests.TestFiles.test_file_eq)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_nonexistent (tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_load_missing_required (tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_get_themes_warning (tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_mkdocs_config (tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_get_themes_error (tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_md_file_nested_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_git_and_shadowed (tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_plugin_config_enabled_for_any_plugin (tests.config.config_options_tests.PluginsTest.test_plugin_config_enabled_for_any_plugin)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_md_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.0.0", "certifi==2023.7.22", "cffi==1.16.0", "click==8.1.7", "cryptography==41.0.5", "distlib==0.3.7", "editables==0.5", "filelock==3.13.1", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.18.0", "httpx==0.25.0", "hyperlink==21.0.0", "idna==3.4", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.2.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.8.0", "platformdirs==3.11.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.16.1", "pyperclip==1.8.2", "rich==13.6.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.1", "trove-classifiers==2023.10.18", "userpath==1.9.1", "virtualenv==20.24.6", "wheel==0.44.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3443 | b5250bf9e2a58fae1dc7742d06318aae051a6303 | diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index 9c6eff4ede..eaccea55e3 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -333,7 +333,9 @@ exclude_docs: |
NEW: **New in version 1.5.**
-NOTE: This option does *not* actually exclude anything from the nav.
+> NEW: **New in version 1.6:**
+>
+> If the [`nav`](#nav) config is not specified at all, pages specified in this config will now be excluded from the inferred navigation.
If you want to include some docs into the site but intentionally exclude them from the nav, normally MkDocs warns about this.
diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
index e8af54fbbe..4a21a3da70 100644
--- a/mkdocs/commands/build.py
+++ b/mkdocs/commands/build.py
@@ -13,7 +13,7 @@
import mkdocs
from mkdocs import utils
from mkdocs.exceptions import Abort, BuildError
-from mkdocs.structure.files import File, Files, InclusionLevel, _set_exclusions, get_files
+from mkdocs.structure.files import File, Files, InclusionLevel, get_files, set_exclusions
from mkdocs.structure.nav import Navigation, get_navigation
from mkdocs.structure.pages import Page
from mkdocs.utils import DuplicateFilter # noqa: F401 - legacy re-export
@@ -294,7 +294,7 @@ def build(
# Run `files` plugin events.
files = config.plugins.on_files(files, config=config)
# If plugins have added files but haven't set their inclusion level, calculate it again.
- _set_exclusions(files._files, config)
+ set_exclusions(files._files, config)
nav = get_navigation(files, config)
@@ -305,8 +305,8 @@ def build(
excluded = []
for file in files.documentation_pages(inclusion=inclusion):
log.debug(f"Reading: {file.src_uri}")
- if file.page is None and file.inclusion.is_excluded():
- if live_server:
+ if file.page is None and file.inclusion.is_not_in_nav():
+ if live_server and file.inclusion.is_excluded():
excluded.append(urljoin(live_server.url, file.url))
Page(None, file, config)
assert file.page is not None
diff --git a/mkdocs/structure/files.py b/mkdocs/structure/files.py
index b1c4df5aba..01d2f63983 100644
--- a/mkdocs/structure/files.py
+++ b/mkdocs/structure/files.py
@@ -322,7 +322,7 @@ def is_css(self) -> bool:
_default_exclude = pathspec.gitignore.GitIgnoreSpec.from_lines(['.*', '/templates/'])
-def _set_exclusions(files: Iterable[File], config: MkDocsConfig) -> None:
+def set_exclusions(files: Iterable[File], config: MkDocsConfig) -> None:
"""Re-calculate which files are excluded, based on the patterns in the config."""
exclude: pathspec.gitignore.GitIgnoreSpec | None = config.get('exclude_docs')
exclude = _default_exclude + exclude if exclude else _default_exclude
@@ -362,7 +362,7 @@ def get_files(config: MkDocsConfig) -> Files:
files.append(file)
prev_file = file
- _set_exclusions(files, config)
+ set_exclusions(files, config)
# Skip README.md if an index file also exists in dir (part 2)
for a, b in conflicting_files:
if b.inclusion.is_included():
diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
index 25d3e97bf1..d122c8219b 100644
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -1,10 +1,10 @@
from __future__ import annotations
import logging
-import warnings
from typing import TYPE_CHECKING, Iterator, TypeVar
from urllib.parse import urlsplit
+from mkdocs.exceptions import BuildError
from mkdocs.structure import StructureItem
from mkdocs.structure.pages import Page
from mkdocs.utils import nest_paths
@@ -129,7 +129,9 @@ def __repr__(self):
def get_navigation(files: Files, config: MkDocsConfig) -> Navigation:
"""Build site navigation from config and files."""
documentation_pages = files.documentation_pages()
- nav_config = config['nav'] or nest_paths(f.src_uri for f in documentation_pages)
+ nav_config = config['nav'] or nest_paths(
+ f.src_uri for f in documentation_pages if f.inclusion.is_in_nav()
+ )
items = _data_to_navigation(nav_config, files, config)
if not isinstance(items, list):
items = [items]
@@ -202,20 +204,9 @@ def _data_to_navigation(data, files: Files, config: MkDocsConfig):
)
page = file.page
if page is not None:
- if isinstance(page, Page):
- if type(page) is not Page: # Strict subclass
- return page
- warnings.warn(
- "A plugin has set File.page to an instance of Page and it got overwritten. "
- "The behavior of this will change in MkDocs 1.6.",
- DeprecationWarning,
- )
- else:
- warnings.warn( # type: ignore[unreachable]
- "A plugin has set File.page to a type other than Page. "
- "This will be an error in MkDocs 1.6.",
- DeprecationWarning,
- )
+ if not isinstance(page, Page):
+ raise BuildError("A plugin has set File.page to a type other than Page.")
+ return page
return Page(title, file, config)
return Link(title, path)
| diff --git a/mkdocs/tests/structure/nav_tests.py b/mkdocs/tests/structure/nav_tests.py
index 44ae2adc21..04846111ae 100644
--- a/mkdocs/tests/structure/nav_tests.py
+++ b/mkdocs/tests/structure/nav_tests.py
@@ -3,7 +3,7 @@
import sys
import unittest
-from mkdocs.structure.files import File, Files
+from mkdocs.structure.files import File, Files, set_exclusions
from mkdocs.structure.nav import Section, _get_by_type, get_navigation
from mkdocs.structure.pages import Page
from mkdocs.tests.base import dedent, load_config
@@ -378,6 +378,35 @@ def test_nav_from_nested_files(self):
self.assertEqual(len(site_navigation.pages), 7)
self.assertEqual(repr(site_navigation.homepage), "Page(title=[blank], url='/')")
+ def test_nav_with_exclusion(self):
+ expected = dedent(
+ """
+ Page(title=[blank], url='index.html')
+ Section(title='About')
+ Page(title=[blank], url='about/license.html')
+ Page(title=[blank], url='about/release-notes.html')
+ Section(title='Api guide')
+ Page(title=[blank], url='api-guide/running.html')
+ Page(title=[blank], url='api-guide/testing.html')
+ """
+ )
+ cfg = load_config(use_directory_urls=False, not_in_nav='*ging.md\n/foo.md\n')
+ fs = [
+ 'index.md',
+ 'foo.md',
+ 'about/license.md',
+ 'about/release-notes.md',
+ 'api-guide/debugging.md',
+ 'api-guide/running.md',
+ 'api-guide/testing.md',
+ ]
+ files = Files([File(s, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls) for s in fs])
+ set_exclusions(files, cfg)
+ site_navigation = get_navigation(files, cfg)
+ self.assertEqual(str(site_navigation).strip(), expected)
+ self.assertEqual(len(site_navigation.items), 3)
+ self.assertEqual(len(site_navigation.pages), 5)
+
def test_nav_page_subclass(self):
class PageSubclass(Page):
pass
| Setting `InclusionLevel.NOT_IN_NAV` still adds pages to `nav`
[As discussed on Gitter](https://app.gitter.im/#/room/#mkdocs_community:gitter.im/$MBc6guuJOmcU1MUR2U_H3arjzqK4tXClo_ncOpCo-pI), we should consider excluding pages from auto-populated navigation if they are tagged as `NOT_IN_NAV` within a plugin as part of `on_files`. Currently, only pages tagged with `EXCLUDED` are not considered. The solution that @oprypin suggested was to simply change:
https://github.com/mkdocs/mkdocs/blob/79f17b4b71c73460c304e3281f6ff209788a76bf/mkdocs/structure/nav.py#L128
... to:
``` python
documentation_pages = files.documentation_pages(inclusion = InclusionLevel.is_in_nav)
```
[Current workaround](https://app.gitter.im/#/room/#mkdocs_community:gitter.im/$GaQ_vIed9_hW4OBuqtTdHg4SWhNYMXpDHtRUI11QrNU):
1. Set pages that should not be auto-populated to `InclusionLevel.EXCLUDED` in `on_files`
2. Set pages that were previously excluded to `InclusionLevel.NOT_IN_NAV` in `on_nav` (after population)
| 2023-10-28T15:43:21Z | 2023-10-29T23:56:09Z | [] | [] | ["test_mm_meta_data (tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_redirects_to_unicode_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_doc_dir_in_site_dir (tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_load_default_file_with_yaml (tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_gh_deploy_remote_name (tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_gh_deploy_site_dir (tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_build_page_dirty_not_modified (tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_get_relative_url (tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_copy_file_same_file (tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_md_readme_index_file (tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_mkdocs_newer (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_invalid_address_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_file (tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_duplicates (tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_page_edit_url_warning (tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_parse_locale_language_territory (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_extra_css_path_warning (tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_deprecated_option_with_invalid_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_deploy_error (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_with_unicode (tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_default_address (tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_default_address (tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_redirects_to_directory (tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_empty_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_subconfig_wrong_type (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_optional (tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_relative_html_link_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_hooks_wrong_type (tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_no_translations_found (tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_warns_for_dict (tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_md_index_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_invalid_url (tests.config.config_options_tests.URLTest.test_invalid_url)", "test_serve_no_directory_urls (tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_run_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_file_name_with_space (tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_removed_option (tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_non_list (tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_uninstalled_theme_as_config (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_serve_no_livereload (tests.cli_tests.CLITests.test_serve_no_livereload)", "test_repo_name_github (tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_invalid_config_option (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_missing_config_file (tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_jinja_extension_installed (tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_unknown_key (tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_wrong_type_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_plugin_config_none_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_single_type (tests.config.config_options_tests.TypeTest.test_single_type)", "test_missing_but_required (tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_site_dir_in_docs_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_sets_nested_not_dict (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_get_theme_dir (tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_watches_through_symlinks (tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_missing_site_name (tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_subconfig_invalid_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_empty_config (tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_flat_h2_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_vars (tests.theme_tests.ThemeTests.test_vars)", "test_yaml_inheritance (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_invalid_children_oversized_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_normal_nav (tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_parse_locale_invalid_characters (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_anchor (tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_build_page_custom_template (tests.build_tests.BuildTests.test_build_page_custom_template)", "test_named_address (tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_mixed_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_set_plugin_on_collection (tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_plugins_adding_files_and_interacting (tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_list_default (tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_empty (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_relative_slash_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_invalid_type_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_warns_for_dict (tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_simple_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_build_page_empty (tests.build_tests.BuildTests.test_build_page_empty)", "test_page_canonical_url (tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_build_page_dirty_modified (tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_page_edit_url (tests.structure.page_tests.PageTests.test_page_edit_url)", "test_missing_path (tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_invalid_children_config_none (tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_plugin_config_not_string_or_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_default (tests.config.config_options_tests.SubConfigTest.test_default)", "test_none_without_default (tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_lang (tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_non_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_rebuild_on_edit (tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_required (tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_configkey (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_optional (tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_length (tests.config.config_options_tests.TypeTest.test_length)", "test_serves_directory_index (tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_dict_of_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_missing_without_exists (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_count_debug (tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_lang_no_default_none (tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_error_handler (tests.livereload_tests.BuildTests.test_error_handler)", "test_deploy_no_cname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_required (tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_deprecated_option_message (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_dict_of_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_dict_default (tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_is_markdown_file (tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_invalid_default (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_css_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_invalid_address_missing_port (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_required (tests.config.config_options_tests.ChoiceTest.test_required)", "test_with_locale (tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_build_verbose (tests.cli_tests.CLITests.test_build_verbose)", "test_not_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_missing_but_required (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_event_on_config_defaults (tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_post_validation_locale_none (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_nav_bad_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_deprecated_option_move_invalid (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_invalid_config_option (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_css_file (tests.structure.file_tests.TestFiles.test_css_file)", "test_edit_uri_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_file_ne (tests.structure.file_tests.TestFiles.test_file_ne)", "test_nav_page_subclass (tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)", "test_doc_dir_in_site_dir (tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_serve_use_directory_urls (tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_not_a_dir (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_theme_name_is_none (tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_skip_ioerror_extra_template (tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_sets_only_one_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_just_search (tests.get_deps_tests.TestGetDeps.test_just_search)", "test_serve_livereload (tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_custom (tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_length (tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_gh_deploy_dirty (tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_builtins_config (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_run_undefined_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_empty_item_returns_None (tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_plugin_config_empty_list_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_unsupported_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_deprecated_option_move (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_relative_html_link_sub_index_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_with_unicode (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_plugin_config_as_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_build_theme (tests.cli_tests.CLITests.test_build_theme)", "test_subconfig_unknown_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_optional (tests.config.config_options_tests.URLTest.test_optional)", "test_exclude_pages_with_invalid_links (tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_env_var_in_yaml (tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_build_page (tests.build_tests.BuildTests.test_build_page)", "test_old_format (tests.config.config_options_tests.NavTest.test_old_format)", "test_nav_no_directory_urls (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_invalid_config_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_repo_name_gitlab (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_deprecated_option_with_type_undefined (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_full_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_deprecated_option_with_invalid_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_incorrect_type_error (tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_level (tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_invalid_choice (tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_optional_with_default (tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_page_defaults (tests.structure.page_tests.PageTests.test_page_defaults)", "test_nav_from_nested_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_get_theme_dir_keyerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_required_no_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_context_base_url_relative_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_event_on_config_theme_locale (tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_nav_no_title (tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_custom_dir (tests.theme_tests.ThemeTests.test_custom_dir)", "test_serve_strict (tests.cli_tests.CLITests.test_serve_strict)", "test_repo_name_custom (tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_unknown_locale (tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_watches_through_relative_symlinks (tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_load_from_missing_file (tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_theme (tests.config.config_tests.ConfigTests.test_theme)", "test_new (tests.cli_tests.CLITests.test_new)", "test_active (tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_list_of_optional (tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_defined (tests.config.config_options_tests.PrivateTest.test_defined)", "test_none (tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_lang_bad_type (tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_site_dir_is_config_dir_fails (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_add_files_from_theme (tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_provided_empty (tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_flat_toc (tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_missing_page (tests.structure.page_tests.PageTests.test_missing_page)", "test_pre_validation_error (tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_valid_IPv6_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_uninstalled_theme_as_string (tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_is_cwd_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_post_validation_locale (tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_changes_rebuild_only_once (tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_doc_dir_in_site_dir (tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_invalid_children_config_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_md_index_file (tests.structure.file_tests.TestFiles.test_md_index_file)", "test_nest_paths_native (tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_invalid_leading_zeros (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_rebuild_after_rename (tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_sets_nested_different (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_content_parser_no_sections (tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_multiple_markdown_config_instances (tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_mkdocs_older (tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_repo_name_bitbucket (tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_post_validation_error (tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_post_validation_locale_invalid_type (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_deprecated_option_with_type (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_correct_events_registered (tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_none (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_populate_page_read_plugin_error (tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_relative_doc_link_without_extension (tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_nest_paths (tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_theme_invalid_type (tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_parse_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_plugin_config_not_list (tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_build_quiet (tests.cli_tests.CLITests.test_build_quiet)", "test_theme_precedence (tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_search_indexing_options (tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_inherited_theme (tests.theme_tests.ThemeTests.test_inherited_theme)", "test_javascript_file (tests.structure.file_tests.TestFiles.test_javascript_file)", "test_files (tests.structure.file_tests.TestFiles.test_files)", "test_context_extra_css_js_from_homepage (tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_run_build_error_event (tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_event_on_post_build_single_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_page_title_from_markdown_preserved_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_theme_default (tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_build_clean (tests.cli_tests.CLITests.test_build_clean)", "test_populate_page_dirty_modified (tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_absolute_link (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_subclass (tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_subconfig_normal (tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_multiple_types (tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_invalid_type (tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_relative_url_empty (tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_theme_as_string (tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_get_relative_url_use_directory_urls (tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_custom_dir_only (tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_page_no_directory_url (tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_plugin_config_options_not_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_type_dict (tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_build_theme_template (tests.build_tests.BuildTests.test_build_theme_template)", "test_context_base_url_absolute_nested_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_page_title_from_capitalized_filename (tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_page_canonical_url_nested_no_slash (tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_config_dir_prepended (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_copy_file_dirty_not_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_count_critical (tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_context_base_url_relative_no_page (tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_get_remote_url_http (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serve_theme (tests.cli_tests.CLITests.test_serve_theme)", "test_page_title_from_meta (tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_locale_language_only (tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_get_schema (tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_lang_bad_code (tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_page_render (tests.structure.page_tests.PageTests.test_page_render)", "test_media_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_context_base_url_nested_page (tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_serve_dev_addr (tests.cli_tests.CLITests.test_serve_dev_addr)", "test_context_base_url_absolute_no_page (tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_provided_dict (tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_valid_language_territory (tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_serves_modified_html (tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_invalid_address_format (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_list_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_no_meta_data (tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_repo_name_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_on_post_build_multi_lang (tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_default (tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_relative_html_link_with_unencoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_copying_media (tests.build_tests.BuildTests.test_copying_media)", "test_invalid_address_format (tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_page_title_from_markdown_stripped_anchorlinks (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_translations_found (tests.localization_tests.LocalizationTests.test_translations_found)", "test_bad_relative_doc_link (tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_valid_file (tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_unspecified (tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_copy_file_dirty_modified (tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_change_is_detected_while_building (tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_gh_deploy_ignore_version (tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_valid_url (tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_unknown_extension (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_create_search_index (tests.search_tests.SearchIndexTests.test_create_search_index)", "test_lang_good_and_bad_code (tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_prebuild_index_node (tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_event_on_config_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_html_stripping (tests.search_tests.SearchIndexTests.test_html_stripping)", "test_plugin_config_without_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_repo_name_gitlab (tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_gh_deploy_clean (tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_unrecognised_keys (tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_site_dir_in_docs_dir (tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_edit_uri_bitbucket (tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_not_a_file (tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_javascript_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_parse_locale_unknown_locale (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_deploy_ignore_version (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_static_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_serves_polling_after_event (tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_replace_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_single_type (tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_parse_locale_language_territory_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_edit_uri_template_errors (tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_plugin_config_sub_error (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_context_base_url_homepage (tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_run_unknown_event_on_collection (tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_sets_nested_and_not_nested (tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_event_empty_item (tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_edit_uri_template_ok (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_skip_missing_theme_template (tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_build_page_error (tests.build_tests.BuildTests.test_build_page_error)", "test_context_base_url_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_int_type (tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_simple_list (tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_markdown_extension_with_relative (tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_build_strict (tests.cli_tests.CLITests.test_build_strict)", "test_get_files_exclude_readme_with_index (tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_build_site_dir (tests.cli_tests.CLITests.test_build_site_dir)", "test_nav_from_files (tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_build_config_file (tests.cli_tests.CLITests.test_build_config_file)", "test_theme_default (tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_relative_image_link_from_homepage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_page_canonical_url_nested (tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_static_file (tests.structure.file_tests.TestFiles.test_static_file)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_not_a_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_possible_target_uris (tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_plugin_config_with_options (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_simple_theme (tests.theme_tests.ThemeTests.test_simple_theme)", "test_get_theme_dir_importerror (tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_none (tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_content_parser (tests.search_tests.SearchIndexTests.test_content_parser)", "test_mjs (tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_md_index_file_nested_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_repo_name_custom_and_empty_edit_uri (tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_none_without_default (tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_lang_no_default_str (tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_BOM (tests.structure.page_tests.PageTests.test_BOM)", "test_string_not_a_dict_of_strings (tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_post_validation_error (tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_theme_name_is_none (tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_serves_normal_file (tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_template_ok (tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_mixed_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_valid_url_is_dir (tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_nested_list (tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_gh_deploy_config_file (tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_configkey (tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_plugin_config_multivalue_dict (tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_missing_default (tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_unicode_yaml (tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_dict_keys_and_ignores_env (tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_build_defaults (tests.cli_tests.CLITests.test_build_defaults)", "test_relative_html_link_parent_index (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_invalid_dict_item (tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_post_validation_none_theme_name_and_missing_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_default (tests.config.config_options_tests.ChoiceTest.test_default)", "test_set_multiple_plugins_on_collection (tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_new (tests.new_tests.NewTests.test_new)", "test_list_dicts (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unwatch (tests.livereload_tests.BuildTests.test_unwatch)", "test_image_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_deprecated_option_move_existing (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_page_title_from_filename (tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_relative_image_link_from_subpage (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_multi_theme (tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_gh_deploy_force (tests.cli_tests.CLITests.test_gh_deploy_force)", "test_validation_warnings (tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_int_type (tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_skip_missing_extra_template (tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_post_validation_error (tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_subconfig_wrong_type (tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_dict_of_optional (tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_serves_polling_with_timeout (tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_invalid_locale (tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_non_path (tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_invalid_url (tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_post_validation_inexisting_custom_dir (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_message (tests.cli_tests.CLITests.test_gh_deploy_message)", "test_js_async (tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_invalid_dict_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_config (tests.config.config_tests.ConfigTests.test_invalid_config)", "test_watches_direct_symlinks (tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_invalid_type_int (tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_rebuild_after_delete (tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_plugin_config_none_with_empty_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_nested_ungrouped_nav (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_count_info (tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_run_validation_error (tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_combined_float_type (tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_github (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_multiple_markdown_config_instances (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_plugin_config_defaults (tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_unknown_extension (tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_invalid_children_oversized_dict (tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_md_index_file_nested (tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_serve_watch_theme (tests.cli_tests.CLITests.test_serve_watch_theme)", "test_gh_deploy_strict (tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_serve_config_file (tests.cli_tests.CLITests.test_serve_config_file)", "test_lang_multi_list (tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_prebuild_index_raises_oserror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_site_dir_is_config_dir_fails (tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_named_address (tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_post_validation_locale_invalid_type (tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_invalid_leading_zeros (tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_context_extra_css_js_no_page (tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_invalid_children_empty_dict (tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_absolute_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_uninstalled_theme_as_config (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_build_use_directory_urls (tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_md_readme_index_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_combined_float_type (tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_prebuild_index_python_missing_lunr (tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_nested_index_page (tests.structure.page_tests.PageTests.test_nested_index_page)", "test_config_dir_prepended (tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_subconfig_with_multiple_items (tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_parse_locale_bad_format_sep (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_valid_dir (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_string_not_a_list_of_strings (tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_content_parser_no_id (tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_subconfig_unknown_option (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_deprecated_option_move_complex (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_get_themes (tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_file_eq (tests.structure.file_tests.TestFiles.test_file_eq)", "test_gh_deploy_theme (tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_absolute_win_local_path (tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_parse_locale_bad_format (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_predefined_page_title (tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_prebuild_index_false (tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_dir_bytes (tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_prebuild_index (tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_gh_deploy_use_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_nonexistent (tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_invalid_children_config_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_entityref (tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_subconfig_invalid_option (tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_move (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_theme_as_simple_config (tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_log_level (tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_none_without_default (tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_hooks (tests.config.config_options_tests.HooksTest.test_hooks)", "test_edit_uri_template_warning (tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_range (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_plugin_config_with_deduced_theme_namespace_overridden (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_plugin_config_with_multiple_instances (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_theme_as_complex_config (tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_relative_html_link_sub_page (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_populate_page_read_error (tests.build_tests.BuildTests.test_populate_page_read_error)", "test_multiple_types (tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_count_warning (tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_normalize_url (tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_removed_option (tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_valid_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_relative_html_link_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_valid_plugin_options (tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_gh_deploy_no_directory_urls (tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_theme_as_complex_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_md_file (tests.structure.file_tests.TestFiles.test_md_file)", "test_duplicates (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_edit_uri_gitlab (tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_no_links (tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_invalid_choice (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_plugin_config_prebuild_index (tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_multiple_dirs_can_cause_rebuild (tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_paths_localized_to_config (tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_get_current_sha (tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_insort_key (tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_populate_page (tests.build_tests.BuildTests.test_populate_page)", "test_skip_extra_template_empty_output (tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_copy_file (tests.structure.file_tests.TestFiles.test_copy_file)", "test_normalize_url_windows (tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_deploy_ignore_version_default (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_uninstalled_theme_as_string (tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_page_title_from_markdown_stripped_attr_list (tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_nested_nonindex_page (tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_required (tests.config.config_options_tests.SubConfigTest.test_required)", "test_self_anchor_link_with_suggestion (tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_homepage (tests.structure.page_tests.PageTests.test_homepage)", "test_relative_html_link (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_load_missing_required (tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_external_link (tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_parse_locale_bad_type (tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_deprecated_option_move_existing (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_item_int (tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_is_cwd_not_git_repo (tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_mime_types (tests.livereload_tests.BuildTests.test_mime_types)", "test_incorrect_type_error (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_html_link_with_encoded_space (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_inheritance_missing_parent (tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_context_extra_css_js_from_nested_page_use_directory_urls (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_invalid_address_range (tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_gh_deploy_defaults (tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_item_int (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_serves_from_mount_path (tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_prebuild_index_raises_ioerror (tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_build_no_directory_urls (tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_edit_uri_template_warning (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_lang_missing_and_with_territory (tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_copy (tests.config.config_options_tests.SchemaTest.test_copy)", "test_post_validation_locale_none (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_version_unknown (tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_event_on_post_build_defaults (tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_serves_polling_instantly (tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_list_dicts (tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_page_ne (tests.structure.page_tests.PageTests.test_page_ne)", "test_valid_dir (tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_valid_path (tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_get_themes_warning (tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_invalid_address_type (tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_merge_translations (tests.localization_tests.LocalizationTests.test_merge_translations)", "test_file_name_with_custom_dest_uri (tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_mkdocs_config (tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_relative_html_link_hash_only (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_default (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_required (tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_optional (tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_get_themes_error (tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_simple (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_valid_url_is_dir (tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_mixed_toc (tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_edit_uri_custom (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_provided_dict (tests.config.config_options_tests.NavTest.test_provided_dict)", "test_not_list (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_relative_html_link_sub_page_hash (tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_hooks (tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_plugin_config_empty_list_with_default (tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_valid_url (tests.config.config_options_tests.URLTest.test_valid_url)", "test_invalid_type_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_string_not_a_list_of_strings (tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_indexing (tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_deploy_hostname (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_build_sitemap_template (tests.build_tests.BuildTests.test_build_sitemap_template)", "test_missing_default (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_invalid_address_missing_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_missing_path (tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_md_file_nested_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_all_keys_are_strings (tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_indented_nav (tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_count_multiple (tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_event_on_post_build_search_index_only (tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_plugin_config_sub_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_empty_list (tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_deprecated_option_with_type_undefined (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_address (tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_invalid_config_item (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_no_theme_config (tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_external_links (tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_optional (tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_unsupported_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_with_multiple_instances_and_warning (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_page_title_from_markdown (tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_deprecated_option_simple (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_copy_files (tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_source_date_epoch (tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_not_a_file (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_not_site_dir_contains_stale_files (tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page_no_parent_no_directory_urls (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_event_on_config_lang (tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_redirects_to_mount_path (tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_run_event_twice_on_collection (tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_invalid_address_type (tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_non_list (tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_wrong_key_nested (tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_bad_error_handler (tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_yaml_meta_data (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_build_dirty (tests.cli_tests.CLITests.test_build_dirty)", "test_copy (tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_invalid_children_config_int (tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_exclude_readme_and_index (tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_invalid_item_none (tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_error_on_pages (tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_serves_with_unicode_characters (tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_unsupported_address (tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_builtins (tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_file (tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_recovers_from_build_error (tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_default (tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_lang_str (tests.search_tests.SearchConfigTests.test_lang_str)", "test_count_error (tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_plugin_config_separator (tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_watch_with_broken_symlinks (tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_repo_name_github (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_nested_ungrouped_nav_no_titles (tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_media_file (tests.structure.file_tests.TestFiles.test_media_file)", "test_subconfig_normal (tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_repo_name_custom (tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_builtins (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_optional (tests.config.config_options_tests.ChoiceTest.test_optional)", "test_theme_config_missing_name (tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_page_title_from_markdown_strip_formatting (tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_context_base_url__absolute_no_page_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_md_file_nested (tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_event_priorities (tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_deprecated_option_move_invalid (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_old_format (tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_edit_uri_template_errors (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_defined (tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_provided_empty (tests.config.config_options_tests.NavTest.test_provided_empty)", "test_paths_localized_to_config (tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_invalid_plugin_options (tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_copy_theme_files (tests.build_tests.BuildTests.test_copy_theme_files)", "test_gh_deploy_remote_branch (tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_nested_index_page_no_parent (tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_invalid_address_port (tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_git_and_shadowed (tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_skip_theme_template_empty_output (tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_invalid_type (tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_extra_context (tests.build_tests.BuildTests.test_extra_context)", "test_missing_required (tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_valid_address (tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_post_validation_error (tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_valid_language (tests.localization_tests.LocalizationTests.test_valid_language)", "test_plugin_config_with_deduced_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_int_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_content_parser_content_before_header (tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_mixed_html (tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_files_append_remove_src_paths (tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_relative_image_link_from_sibling (tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_get_files (tests.structure.file_tests.TestFiles.test_get_files)", "test_dir_bytes (tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_copy_files_without_permissions (tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_plugin_config_with_explicit_theme_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_context_extra_css_js_from_nested_page (tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_indented_toc (tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_event_returns_None (tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_lang_list (tests.search_tests.SearchConfigTests.test_lang_list)", "test_get_remote_url_ssh (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_charref (tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_event_on_config_include_search_page (tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_optional (tests.config.config_options_tests.SubConfigTest.test_optional)", "test_lang_no_default_list (tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_page_eq (tests.structure.page_tests.PageTests.test_page_eq)", "test_yaml_meta_data_invalid (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_combined_float_type (tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_script_tag (tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nav_with_exclusion (tests.structure.nav_tests.SiteNavigationTests.test_nav_with_exclusion)", "test_theme_as_simple_config (tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_subconfig_with_multiple_items (tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_simple_nav (tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_page_title_from_homepage_filename (tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_mm_meta_data_blank_first_line (tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_lang_default (tests.search_tests.SearchConfigTests.test_lang_default)", "test_unsupported_address (tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_plugin_config_min_search_length (tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_deprecated_option_message (tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_item_none (tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_get_by_type_nested_sections (tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_deploy (tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_sort_files (tests.structure.file_tests.TestFiles.test_sort_files)", "test_get_remote_url_enterprise (tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_invalid_email_link (tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_insort (tests.utils.utils_tests.UtilsTests.test_insort)", "test_serve_dirtyreload (tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_page_title_from_setext_markdown (tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_nested_list (tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_build_page_plugin_error (tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_wrong_type (tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_get_relative_url (tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_warning (tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_normal_nav (tests.config.config_options_tests.NavTest.test_normal_nav)", "test_edit_uri_bitbucket (tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_serves_polling_with_mount_path (tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_get_files_include_readme_without_index (tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_theme_config_missing_name (tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_edit_uri_github (tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_reduce_list (tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_default_values (tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_valid_full_IPv6_address (tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_conflicting_readme_and_index (tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_build_extra_template (tests.build_tests.BuildTests.test_build_extra_template)", "test_builtins_config (tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_deprecated_option_move_complex (tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_basic_rebuild (tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_context_base_url_homepage_use_directory_urls (tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_invalid_choices (tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_yaml_meta_data_not_dict (tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_nonexistant_config (tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_prebuild_index_returns_error (tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_empty_nav (tests.config.config_tests.ConfigTests.test_empty_nav)", "test_post_validation_locale (tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_invalid_children_empty_dict (tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_serve_default (tests.cli_tests.CLITests.test_serve_default)", "test_copy_file_clean_modified (tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_nav_missing_page (tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_md_file_use_directory_urls (tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_invalid_choices (tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_populate_page_dirty_not_modified (tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_plugin_config_with_explicit_empty_namespace (tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3.12\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.8\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n \"setuptools; python_version >= '3.12'\" # Workaround: babel doesn't declare its dependency\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:fix\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"python -m unittest discover -v -s mkdocs -p \\\"*tests.py\\\"\"\n_coverage = [\n 'coverage run --source=mkdocs --omit \"mkdocs/tests/*\" -m unittest discover -s mkdocs -p \"*tests.py\"',\n \"coverage xml\",\n \"coverage report --show-missing\"\n]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.8\", \"3.9\", \"3.10\", \"3.11\", \"3.12\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"babel\",\n \"types-Markdown\",\n \"types-pytz\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = 'codespell mkdocs docs *.* -S LC_MESSAGES -S \"*.min.js\" -S \"lunr*.js\" -S fontawesome-webfont.svg -S tinyseg.js'\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"DTZ\", \"FA\", \"ISC\", \"PIE\", \"T20\", \"RSE\", \"TCH\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"D200\", \"D201\", \"D202\", \"D204\", \"D207\", \"D208\", \"D209\", \"D210\", \"D211\", \"D213\", \"D214\", \"D300\", \"D301\", \"D400\", \"D402\", \"D403\", \"D405\", \"D412\", \"D414\", \"D415\", \"D416\", \"D417\", \"D419\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"FLY002\",\n \"PLC\", \"PLE\", \"PLR0124\", \"PLR0133\", \"PLR0206\", \"PLR0402\", \"PLR1701\", \"PLR1722\", \"PLW0120\", \"PLW0127\", \"PLW0129\", \"PLW0131\", \"PLW0406\", \"PLW0602\", \"PLW0603\", \"PLW0711\",\n \"RUF001\", \"RUF005\", \"RUF007\", \"RUF010\", \"RUF013\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["anyio==4.0.0", "certifi==2023.7.22", "cffi==1.16.0", "click==8.1.7", "cryptography==41.0.5", "distlib==0.3.7", "editables==0.5", "filelock==3.13.0", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.18.0", "httpx==0.25.0", "hyperlink==21.0.0", "idna==3.4", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.2.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.2", "pathspec==0.11.2", "pexpect==4.8.0", "platformdirs==3.11.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.16.1", "pyperclip==1.8.2", "rich==13.6.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.4", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.1", "trove-classifiers==2023.10.18", "userpath==1.9.1", "virtualenv==20.24.6", "wheel==0.44.0"]} | null | ["hatch run +py=3.12 test:with-coverage"] | null | null | swa-bench:sw.eval |
|
mkdocs/mkdocs | mkdocs__mkdocs-3367 | b0915b4697ffb9b0c538ec8d4b0b8976a28b0e2c | diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
index e674419000..f01d917674 100644
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -1,6 +1,7 @@
from __future__ import annotations
import logging
+import warnings
from typing import TYPE_CHECKING, Iterator, TypeVar
from urllib.parse import urlsplit
@@ -200,6 +201,12 @@ def _data_to_navigation(data, files: Files, config: MkDocsConfig):
f"A reference to '{file.src_path}' is included in the 'nav' "
"configuration, but this file is excluded from the built site.",
)
+ if file.page is not None:
+ if not isinstance(file.page, Page):
+ warnings.warn( # type: ignore[unreachable]
+ "File.page should not be set to any type other than Page", DeprecationWarning
+ )
+ return file.page
return Page(title, file, config)
return Link(title, path)
| diff --git a/mkdocs/tests/structure/nav_tests.py b/mkdocs/tests/structure/nav_tests.py
index 3e4aba5f90..44ae2adc21 100644
--- a/mkdocs/tests/structure/nav_tests.py
+++ b/mkdocs/tests/structure/nav_tests.py
@@ -378,6 +378,34 @@ def test_nav_from_nested_files(self):
self.assertEqual(len(site_navigation.pages), 7)
self.assertEqual(repr(site_navigation.homepage), "Page(title=[blank], url='/')")
+ def test_nav_page_subclass(self):
+ class PageSubclass(Page):
+ pass
+
+ nav_cfg = [
+ {'Home': 'index.md'},
+ {'About': 'about.md'},
+ ]
+ expected = dedent(
+ """
+ PageSubclass(title=[blank], url='/')
+ PageSubclass(title=[blank], url='/about/')
+ """
+ )
+ cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
+ fs = [
+ File(list(item.values())[0], cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
+ for item in nav_cfg
+ ]
+ files = Files(fs)
+ for file in files:
+ PageSubclass(None, file, cfg)
+ site_navigation = get_navigation(files, cfg)
+ self.assertEqual(str(site_navigation).strip(), expected)
+ self.assertEqual(len(site_navigation.items), 2)
+ self.assertEqual(len(site_navigation.pages), 2)
+ self.assertEqual(repr(site_navigation.homepage), "PageSubclass(title=[blank], url='/')")
+
def test_active(self):
nav_cfg = [
{'Home': 'index.md'},
| Allow plugins to override `Page` when populating navigation
Following up on https://github.com/squidfunk/mkdocs-material/issues/5909#issuecomment-1696958973, I'm suggesting to adjust the logic that MkDocs implies to create `Page` objects from/in files, i.e., `File` objects. Currently, [`_data_to_navigation`](https://github.com/mkdocs/mkdocs/blob/master/mkdocs/structure/nav.py#L179) will always create (and thus overwrite) `Page` on everything that doesn't look like a `Link` or `Section`. Excerpt of the comment linked:
> MkDocs will always generate either a [`Link` or a `Page` for a file that is not excluded](https://github.com/mkdocs/mkdocs/blob/94e9f17cd7a69e70c18ae282d55ba2f34f93c542/mkdocs/structure/nav.py#L203-L204). As you've probably noticed, the blog plugin makes use of subclasses for pages of specific types, e.g. [`Post`](https://github.com/squidfunk/mkdocs-material/blob/de0c5b7719deff6d092dc673e82af701c6f36001/src/plugins/blog/structure/__init__.py#L48), [`View`](https://github.com/squidfunk/mkdocs-material/blob/de0c5b7719deff6d092dc673e82af701c6f36001/src/plugins/blog/structure/__init__.py#L204), etc., and relations among different concepts in the plugin are managed inside the instances of those subclasses. The problem is, that __MkDocs will always generate a plain old `Page` instance, overwriting the more specific instance that has been generated by the plugin before__ [after `on_files` and before `on_nav`](https://github.com/mkdocs/mkdocs/blob/94e9f17cd7a69e70c18ae282d55ba2f34f93c542/mkdocs/commands/build.py#L303-L311). We could still solve it by splitting file generation and page instantiation, but this would make things much more complicated and non-linear, because during generation, [we already assign categories to pages and vice versa](https://github.com/squidfunk/mkdocs-material/blob/de0c5b7719deff6d092dc673e82af701c6f36001/src/plugins/blog/plugin.py#L598-L599), etc. We would need to split this into two stages, blowing up the code base of the plugin and also the runtime, as we're doing two passes. This is clearly not favorable from our perspective.
>
> __Moving forward__: I believe that this problem can be mitigated with a very small but important change in MkDocs: if a `File` already defines a dedicated `Page` in `file.page`, MkDocs should just use that instead of creating a new one:
>
> ``` py
> return file.page if isinstance(file.page, Page) else Page(title, file, config)
> ```
>
> It's essentially a single line change in MkDocs that would make things much, much simpler for plugin developers. I've written several plugins now, and I repeatedly had to work around the oddities of this behavior.
Thus, I'm proposing to change [the following line](https://github.com/mkdocs/mkdocs/blob/94e9f17cd7a69e70c18ae282d55ba2f34f93c542/mkdocs/structure/nav.py#L203):
``` py
# Now: always create a page
return Page(title, file, config)
# Better: only create a page when one was not created before
return file.page if isinstance(file.page, Page) else Page(title, file, config)
```
Currently, the only way to work around this limitation is to overwrite `Page.__class__` on the resulting instance in `on_nav`, e.g., like done in [section-index](https://github.com/oprypin/mkdocs-section-index/blob/f5414c0775848cec96f1181f74c622fe3e14985e/mkdocs_section_index/plugin.py#L33-L34), which, AFAIK, does not call `__init__` or initializes instance variables:
``` py
page.__class__ = CustomPage
assert isinstance(page, CustomPage)
```
| 2023-08-31T08:03:19Z | 2023-09-07T20:17:36Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_mkdocs_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_dict_of_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_watch_with_broken_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_script_tag (mkdocs.tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_with_locale (mkdocs.tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_int_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_all_keys_are_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_exclude_pages_with_invalid_links (mkdocs.tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_image_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_possible_target_uris (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_normalize_url_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_git_and_shadowed (mkdocs.tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_invalid_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_self_anchor_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_plugin_config_with_multiple_instances_and_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_file_name_with_custom_dest_uri (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_relative_slash_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_dict_keys_and_ignores_env (mkdocs.tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_plugin_config_with_multiple_instances (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_warning (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_page_title_from_markdown_strip_formatting (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_page_title_from_markdown_stripped_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_recovers_from_build_error (mkdocs.tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_multi_theme (mkdocs.tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)", "test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_sets_only_one_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_empty_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_unknown_key (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_js_async (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_page_title_from_setext_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_bad_relative_doc_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_theme_precedence (mkdocs.tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_wrong_key_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_page_title_from_markdown_stripped_anchorlinks (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_string_not_a_dict_of_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_markdown_extension_with_relative (mkdocs.tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_just_search (mkdocs.tests.get_deps_tests.TestGetDeps.test_just_search)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_plugins_adding_files_and_interacting (mkdocs.tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_sets_nested_and_not_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_mjs (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_wrong_type (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_relative_doc_link_without_extension (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_page_title_from_markdown_preserved_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_unspecified (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_wrong_type_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_absolute_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_none_without_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_sets_nested_different (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_dict_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_conflicting_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_exclude_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_nonexistent (mkdocs.tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_sets_nested_not_dict (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)"] | [] | ["test_nav_page_subclass (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_page_subclass)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==4.0.0", "certifi==2023.7.22", "cffi==1.15.1", "click==8.1.7", "cryptography==41.0.3", "distlib==0.3.7", "editables==0.5", "filelock==3.12.3", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.17.3", "httpx==0.24.1", "hyperlink==21.0.0", "idna==3.4", "importlib-metadata==6.8.0", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.2.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.1.0", "packaging==23.1", "pathspec==0.11.2", "pexpect==4.8.0", "platformdirs==3.10.0", "pluggy==1.3.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.16.1", "pyperclip==1.8.2", "rich==13.5.2", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.3", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.1", "trove-classifiers==2023.8.7", "userpath==1.9.1", "virtualenv==20.24.4", "wheel==0.44.0", "zipp==3.16.2"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
|
mkdocs/mkdocs | mkdocs__mkdocs-3324 | fcb2da399f029bd569b708479a39a5f2c700b5a2 | diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index cb95e74117..c0c827ffa8 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -945,11 +945,18 @@ def __fspath__(self):
return self.path
-class ExtraScript(SubConfig[ExtraScriptValue]):
- def run_validation(self, value: object) -> ExtraScriptValue:
+class ExtraScript(BaseConfigOption[Union[ExtraScriptValue, str]]):
+ def __init__(self):
+ super().__init__()
+ self.option_type = SubConfig[ExtraScriptValue]()
+
+ def run_validation(self, value: object) -> ExtraScriptValue | str:
+ self.option_type.warnings = self.warnings
if isinstance(value, str):
- value = {'path': value, 'type': 'module' if value.endswith('.mjs') else ''}
- return super().run_validation(value)
+ if value.endswith('.mjs'):
+ return self.option_type.run_validation({'path': value, 'type': 'module'})
+ return value
+ return self.option_type.run_validation(value)
class MarkdownExtensions(OptionallyRequired[List[str]]):
| diff --git a/mkdocs/tests/config/config_options_tests.py b/mkdocs/tests/config/config_options_tests.py
index abd7cb201a..6101c2e567 100644
--- a/mkdocs/tests/config/config_options_tests.py
+++ b/mkdocs/tests/config/config_options_tests.py
@@ -9,7 +9,7 @@
import sys
import textwrap
import unittest
-from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypeVar
+from typing import TYPE_CHECKING, Any, Dict, List, Optional, TypeVar, Union
from unittest.mock import patch
if TYPE_CHECKING:
@@ -700,14 +700,14 @@ class Schema(Config):
option = c.ListOfItems(c.ExtraScript(), default=[])
conf = self.get_config(Schema, {'option': ['foo.js', {'path': 'bar.js', 'async': True}]})
- assert_type(conf.option, List[c.ExtraScriptValue])
+ assert_type(conf.option, List[Union[c.ExtraScriptValue, str]])
self.assertEqual(len(conf.option), 2)
- self.assertIsInstance(conf.option[0], c.ExtraScriptValue)
+ self.assertIsInstance(conf.option[1], c.ExtraScriptValue)
self.assertEqual(
- [(x.path, x.type, x.defer, x.async_) for x in conf.option],
+ conf.option,
[
- ('foo.js', '', False, False),
- ('bar.js', '', False, True),
+ 'foo.js',
+ {'path': 'bar.js', 'type': '', 'defer': False, 'async': True},
],
)
@@ -718,14 +718,14 @@ class Schema(Config):
conf = self.get_config(
Schema, {'option': ['foo.mjs', {'path': 'bar.js', 'type': 'module'}]}
)
- assert_type(conf.option, List[c.ExtraScriptValue])
+ assert_type(conf.option, List[Union[c.ExtraScriptValue, str]])
self.assertEqual(len(conf.option), 2)
self.assertIsInstance(conf.option[0], c.ExtraScriptValue)
self.assertEqual(
- [(x.path, x.type, x.defer, x.async_) for x in conf.option],
+ conf.option,
[
- ('foo.mjs', 'module', False, False),
- ('bar.js', 'module', False, False),
+ {'path': 'foo.mjs', 'type': 'module', 'defer': False, 'async': False},
+ {'path': 'bar.js', 'type': 'module', 'defer': False, 'async': False},
],
)
@@ -748,8 +748,8 @@ class Schema(Config):
warnings=dict(option="Sub-option 'foo': Unrecognised configuration name: foo"),
)
self.assertEqual(
- [(x.path, x.type, x.defer, x.async_) for x in conf.option],
- [('foo.js', '', False, False)],
+ conf.option,
+ [{'path': 'foo.js', 'type': '', 'defer': False, 'async': False, 'foo': 'bar'}],
)
| Unhashable type: 'ExtraScriptValue' Error
I have been encountering the following error when I add an extra_javascript to my yml file:
```
INFO - DeprecationWarning: warning_filter doesn't do anything since MkDocs 1.2 and will be removed soon. All messages on the
`mkdocs` logger get counted automatically.
File
"/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs_print_site_plugin/plugin.py",
line 10, in <module>
from mkdocs.utils import write_file, copy_file, get_relative_url, warning_filter
File
"/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/utils/__init__.py",
line 453, in __getattr__
warnings.warn(
INFO - Building documentation...
INFO - Cleaning site directory
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- pages/integration/export.md
Traceback (most recent call last):
File "/home/mouhand/work_projects/service-observatory-backend/env/bin/mkdocs", line 8, in <module>
sys.exit(cli())
^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/__main__.py", line 270, in serve_command
serve.serve(**kwargs)
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/commands/serve.py", line 98, in serve
builder(config)
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/commands/serve.py", line 79, in builder
build(config, live_server=None if is_clean else server, dirty=is_dirty)
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/commands/build.py", line 340, in build
_build_theme_template(template, env, files, config, nav)
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/commands/build.py", line 110, in _build_theme_template
output = _build_template(template_name, template, files, config, nav)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/commands/build.py", line 87, in _build_template
context = config.plugins.on_template_context(context, template_name=name, config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/plugins.py", line 555, in on_template_context
return self.run_event(
^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/plugins.py", line 507, in run_event
result = method(item, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs_print_site_plugin/plugin.py", line 288, in on_template_context
self.context['extra_javascript'] = [get_relative_url(f, self.print_page.file.url) for f in config.get('extra_javascript')]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs_print_site_plugin/plugin.py", line 288, in <listcomp>
self.context['extra_javascript'] = [get_relative_url(f, self.print_page.file.url) for f in config.get('extra_javascript')]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mouhand/work_projects/service-observatory-backend/env/lib/python3.11/site-packages/mkdocs/utils/__init__.py", line 243, in get_relative_url
dest_parts = _norm_parts(url)
^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'ExtraScriptValue'
```
in my mkdocs.yml:
```
extra_javascript:
- javascripts/extra.js
```
| Seems to be an issue with the [mkdocs-print-site-plugin](https://github.com/timvink/mkdocs-print-site-plugin) and the change in MkDocs 1.5 about extra javascript files. Mentioning @timvink, the author. | 2023-08-01T17:29:04Z | 2023-08-02T10:11:53Z | ["test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_unspecified (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_none_without_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_plugins_adding_files_and_interacting (mkdocs.tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_normalize_url_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_markdown_extension_with_relative (mkdocs.tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_page_title_from_markdown_stripped_anchorlinks (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_dict_of_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_exclude_pages_with_invalid_links (mkdocs.tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_bad_relative_doc_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_sets_nested_and_not_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_recovers_from_build_error (mkdocs.tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_image_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_page_title_from_markdown_strip_formatting (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_sets_nested_not_dict (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_page_title_from_markdown_preserved_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_unknown_key (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_just_search (mkdocs.tests.get_deps_tests.TestGetDeps.test_just_search)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_multi_theme (mkdocs.tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_script_tag (mkdocs.tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_nonexistent (mkdocs.tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_slash_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_all_keys_are_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_absolute_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_empty_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_wrong_type_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_conflicting_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_exclude_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_wrong_type (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_dict_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_int_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_plugin_config_with_multiple_instances (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_warning (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_relative_doc_link_without_extension (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_page_title_from_markdown_stripped_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_possible_target_uris (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_mjs (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_self_anchor_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_plugin_config_with_multiple_instances_and_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_wrong_key_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_sets_only_one_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_string_not_a_dict_of_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_invalid_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_file_name_with_custom_dest_uri (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_mkdocs_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_git_and_shadowed (mkdocs.tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_dict_keys_and_ignores_env (mkdocs.tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_theme_precedence (mkdocs.tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_with_locale (mkdocs.tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_sets_nested_different (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_page_title_from_setext_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)"] | [] | ["test_js_async (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_js_async)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==3.7.1", "certifi==2023.7.22", "cffi==1.15.1", "click==8.1.6", "cryptography==41.0.3", "distlib==0.3.7", "editables==0.5", "filelock==3.12.2", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.17.3", "httpx==0.24.1", "hyperlink==21.0.0", "idna==3.4", "importlib-metadata==6.8.0", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.2.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.0.0", "packaging==23.1", "pathspec==0.11.2", "pexpect==4.8.0", "platformdirs==3.10.0", "pluggy==1.2.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.15.1", "pyperclip==1.8.2", "rich==13.5.2", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.0.post1", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.1", "trove-classifiers==2023.7.6", "userpath==1.8.0", "virtualenv==20.24.2", "wheel==0.44.0", "zipp==3.16.2"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3320 | 2865b0fcc4dd9b636963a8fd7e306725e1ac8ab2 | diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py
index bf589b75d6..77618fb29e 100644
--- a/mkdocs/__main__.py
+++ b/mkdocs/__main__.py
@@ -251,8 +251,8 @@ def cli():
@cli.command(name="serve")
@click.option('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')
[email protected]('--livereload', 'livereload', flag_value='livereload', default=True, hidden=True)
[email protected]('--no-livereload', 'livereload', flag_value='no-livereload', help=no_reload_help)
[email protected]('--no-livereload', 'livereload', flag_value=False, help=no_reload_help)
[email protected]('--livereload', 'livereload', flag_value=True, default=True, hidden=True)
@click.option('--dirtyreload', 'build_type', flag_value='dirty', hidden=True)
@click.option('--dirty', 'build_type', flag_value='dirty', help=serve_dirty_help)
@click.option('-c', '--clean', 'build_type', flag_value='clean', help=serve_clean_help)
diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py
index 1797e8153d..c5ae98bf7a 100644
--- a/mkdocs/commands/serve.py
+++ b/mkdocs/commands/serve.py
@@ -1,6 +1,5 @@
from __future__ import annotations
-import functools
import logging
import shutil
import tempfile
@@ -22,17 +21,13 @@
def serve(
- config_file=None,
- dev_addr=None,
- strict=None,
- theme=None,
- theme_dir=None,
- livereload='livereload',
- build_type=None,
- watch_theme=False,
- watch=[],
+ config_file: str | None = None,
+ livereload: bool = True,
+ build_type: str | None = None,
+ watch_theme: bool = False,
+ watch: list[str] = [],
**kwargs,
-):
+) -> None:
"""
Start the MkDocs development server
@@ -48,16 +43,15 @@ def serve(
def mount_path(config: MkDocsConfig):
return urlsplit(config.site_url or '/').path
- get_config = functools.partial(
- load_config,
- config_file=config_file,
- dev_addr=dev_addr,
- strict=strict,
- theme=theme,
- theme_dir=theme_dir,
- site_dir=site_dir,
- **kwargs,
- )
+ def get_config():
+ config = load_config(
+ config_file=config_file,
+ site_dir=site_dir,
+ **kwargs,
+ )
+ config.watch.extend(watch)
+ config.site_url = f'http://{config.dev_addr}{mount_path(config)}'
+ return config
is_clean = build_type == 'clean'
is_dirty = build_type == 'dirty'
@@ -70,12 +64,6 @@ def builder(config: MkDocsConfig | None = None):
if config is None:
config = get_config()
- # combine CLI watch arguments with config file values
- config.watch.extend(watch)
-
- # Override a few config settings after validation
- config.site_url = f'http://{config.dev_addr}{mount_path(config)}'
-
build(config, live_server=None if is_clean else server, dirty=is_dirty)
host, port = config.dev_addr
diff --git a/mkdocs/livereload/__init__.py b/mkdocs/livereload/__init__.py
index 53837ed01f..0bd544b177 100644
--- a/mkdocs/livereload/__init__.py
+++ b/mkdocs/livereload/__init__.py
@@ -155,10 +155,11 @@ def serve(self):
self.server_bind()
self.server_activate()
- self.observer.start()
+ if self._watched_paths:
+ self.observer.start()
- paths_str = ", ".join(f"'{_try_relativize_path(path)}'" for path in self._watched_paths)
- log.info(f"Watching paths for changes: {paths_str}")
+ paths_str = ", ".join(f"'{_try_relativize_path(path)}'" for path in self._watched_paths)
+ log.info(f"Watching paths for changes: {paths_str}")
log.info(f"Serving on {self.url}")
self.serve_thread.start()
| diff --git a/mkdocs/tests/cli_tests.py b/mkdocs/tests/cli_tests.py
index ae60991a05..6ce03db109 100644
--- a/mkdocs/tests/cli_tests.py
+++ b/mkdocs/tests/cli_tests.py
@@ -21,7 +21,7 @@ def test_serve_default(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='livereload',
+ livereload=True,
build_type=None,
config_file=None,
strict=None,
@@ -53,7 +53,7 @@ def test_serve_dev_addr(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr='0.0.0.0:80',
- livereload='livereload',
+ livereload=True,
build_type=None,
config_file=None,
strict=None,
@@ -70,7 +70,7 @@ def test_serve_strict(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='livereload',
+ livereload=True,
build_type=None,
config_file=None,
strict=True,
@@ -89,7 +89,7 @@ def test_serve_theme(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='livereload',
+ livereload=True,
build_type=None,
config_file=None,
strict=None,
@@ -108,7 +108,7 @@ def test_serve_use_directory_urls(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='livereload',
+ livereload=True,
build_type=None,
config_file=None,
strict=None,
@@ -127,7 +127,7 @@ def test_serve_no_directory_urls(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='livereload',
+ livereload=True,
build_type=None,
config_file=None,
strict=None,
@@ -144,7 +144,7 @@ def test_serve_livereload(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='livereload',
+ livereload=True,
build_type=None,
config_file=None,
strict=None,
@@ -161,7 +161,7 @@ def test_serve_no_livereload(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='no-livereload',
+ livereload=False,
build_type=None,
config_file=None,
strict=None,
@@ -178,7 +178,7 @@ def test_serve_dirtyreload(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='livereload',
+ livereload=True,
build_type='dirty',
config_file=None,
strict=None,
@@ -195,7 +195,7 @@ def test_serve_watch_theme(self, mock_serve):
self.assertEqual(result.exit_code, 0)
mock_serve.assert_called_once_with(
dev_addr=None,
- livereload='livereload',
+ livereload=True,
build_type=None,
config_file=None,
strict=None,
| --no-livereload not usable in 1.5
Hello,
the option `--no-livereload` on `mkdocs serve` is no longer usable since version 1.5.
The livereload function is still active.
| That's true, sorry :( | 2023-07-31T17:30:26Z | 2023-08-01T16:57:57Z | ["test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_unspecified (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_none_without_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_plugins_adding_files_and_interacting (mkdocs.tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_normalize_url_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_markdown_extension_with_relative (mkdocs.tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_page_title_from_markdown_stripped_anchorlinks (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_dict_of_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_exclude_pages_with_invalid_links (mkdocs.tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_bad_relative_doc_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_sets_nested_and_not_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_recovers_from_build_error (mkdocs.tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_image_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_page_title_from_markdown_strip_formatting (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_sets_nested_not_dict (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_page_title_from_markdown_preserved_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_js_async (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_unknown_key (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_just_search (mkdocs.tests.get_deps_tests.TestGetDeps.test_just_search)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_multi_theme (mkdocs.tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_script_tag (mkdocs.tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_nonexistent (mkdocs.tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_relative_slash_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_all_keys_are_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_absolute_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_empty_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_wrong_type_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_conflicting_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_exclude_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_wrong_type (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_dict_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_int_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_plugin_config_with_multiple_instances (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_warning (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_relative_doc_link_without_extension (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_doc_link_without_extension)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_page_title_from_markdown_stripped_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_possible_target_uris (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_mjs (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_self_anchor_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_plugin_config_with_multiple_instances_and_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_wrong_key_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_sets_only_one_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_string_not_a_dict_of_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_invalid_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_file_name_with_custom_dest_uri (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_mkdocs_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_git_and_shadowed (mkdocs.tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_dict_keys_and_ignores_env (mkdocs.tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_theme_precedence (mkdocs.tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_with_locale (mkdocs.tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_sets_nested_different (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_page_title_from_setext_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)"] | [] | ["test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==3.7.1", "certifi==2023.7.22", "cffi==1.15.1", "click==8.1.6", "cryptography==41.0.3", "distlib==0.3.7", "editables==0.5", "filelock==3.12.2", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.17.3", "httpx==0.24.1", "hyperlink==21.0.0", "idna==3.4", "importlib-metadata==6.8.0", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.2.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==10.0.0", "packaging==23.1", "pathspec==0.11.2", "pexpect==4.8.0", "platformdirs==3.10.0", "pluggy==1.2.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.15.1", "pyperclip==1.8.2", "rich==13.5.2", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.0.post1", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.12.1", "trove-classifiers==2023.7.6", "userpath==1.8.0", "virtualenv==20.24.2", "wheel==0.44.0", "zipp==3.16.2"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3283 | de0c913fca6da1f192b6cfdc2297dc7d82b26234 | diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index bfb025ead9..25d0216a55 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -343,17 +343,81 @@ Example:
```yaml
nav:
- - Foo: foo.md
- - Bar: bar.md
+ - Foo: foo.md
+ - Bar: bar.md
not_in_nav: |
- /private.md
+ /private.md
```
As the previous option, this follows the .gitignore pattern format.
NOTE: Adding a given file to [`exclude_docs`](#exclude_docs) takes precedence over and implies `not_in_nav`.
+### validation
+
+NEW: **New in version 1.5.**
+
+Configure the strictness of MkDocs' diagnostic messages when validating links to documents.
+
+This is a tree of configs, and for each one the value can be one of the three: `warn`, `info`, `ignore`. Which cause a logging message of the corresponding severity to be produced. The `warn` level is, of course, intended for use with `mkdocs build --strict` (where it becomes an error), which you can employ in continuous testing.
+
+> EXAMPLE: **Defaults of this config as of MkDocs 1.5:**
+>
+> ```yaml
+> validation:
+> nav:
+> omitted_files: info
+> not_found: warn
+> absolute_links: info
+> links:
+> not_found: warn
+> absolute_links: info
+> unrecognized_links: info
+> ```
+>
+> (Note: you shouldn't copy this whole example, because it only duplicates the defaults. Only individual items that differ should be set.)
+
+The defaults of some of the behaviors already differ from MkDocs 1.4 and below - they were ignored before.
+
+>? EXAMPLE: **Configure MkDocs 1.5 to behave like MkDocs 1.4 and below (reduce strictness):**
+>
+> ```yaml
+> validation:
+> absolute_links: ignore
+> unrecognized_links: ignore
+> ```
+<!-- -->
+>! EXAMPLE: **Recommended settings for most sites (maximal strictness):**
+>
+> ```yaml
+> validation:
+> omitted_files: warn
+> absolute_links: warn
+> unrecognized_links: warn
+> ```
+
+Note how in the above examples we omitted the 'nav' and 'links' keys. Here `absolute_links:` means setting both `nav: absolute_links:` and `links: absolute_links:`.
+
+Full list of values and examples of log messages that they can hide or make more prominent:
+
+* `validation.nav.omitted_files`
+ * "The following pages exist in the docs directory, but are not included in the "nav" configuration: ..."
+* `validation.nav.not_found`
+ * "A relative path to 'foo/bar.md' is included in the 'nav' configuration, which is not found in the documentation files."
+ * "A reference to 'foo/bar.md' is included in the 'nav' configuration, but this file is excluded from the built site."
+* `validation.nav.absolute_links`
+ * "An absolute path to '/foo/bar.html' is included in the 'nav' configuration, which presumably points to an external resource."
+<!-- -->
+* `validation.links.not_found`
+ * "Doc file 'example.md' contains a relative link '../foo/bar.md', but the target is not found among documentation files."
+ * "Doc file 'example.md' contains a link to 'foo/bar.md' which is excluded from the built site."
+* `validation.links.absolute_links`
+ * "Doc file 'example.md' contains an absolute link '/foo/bar.html', it was left as is. Did you mean 'foo/bar.md'?"
+* `validation.links.unrecognized_links`
+ * "Doc file 'example.md' contains an unrecognized relative link '../foo/bar/', it was left as is. Did you mean 'foo/bar.md'?"
+ * "Doc file 'example.md' contains an unrecognized relative link 'mail\@example.com', it was left as is. Did you mean 'mailto:mail\@example.com'?"
+
## Build directories
### theme
diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index 05994b03c1..09be435fae 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -2,6 +2,7 @@
import functools
import ipaddress
+import logging
import os
import string
import sys
@@ -118,6 +119,28 @@ def run_validation(self, value: object) -> SomeConfig:
return config
+class PropagatingSubConfig(SubConfig[SomeConfig], Generic[SomeConfig]):
+ """A SubConfig that must consist of SubConfigs with defined schemas.
+
+ Any value set on the top config gets moved to sub-configs with matching keys.
+ """
+
+ def run_validation(self, value: object):
+ if isinstance(value, dict):
+ to_discard = set()
+ for k1, v1 in self.config_class._schema:
+ if isinstance(v1, SubConfig):
+ for k2, _ in v1.config_class._schema:
+ if k2 in value:
+ subdict = value.setdefault(k1, {})
+ if isinstance(subdict, dict):
+ to_discard.add(k2)
+ subdict.setdefault(k2, value[k2])
+ for k in to_discard:
+ del value[k]
+ return super().run_validation(value)
+
+
class OptionallyRequired(Generic[T], BaseConfigOption[T]):
"""
Soft-deprecated, do not use.
@@ -1170,3 +1193,19 @@ def run_validation(self, value: object) -> pathspec.gitignore.GitIgnoreSpec:
return pathspec.gitignore.GitIgnoreSpec.from_lines(lines=value.splitlines())
except ValueError as e:
raise ValidationError(str(e))
+
+
+class _LogLevel(OptionallyRequired[int]):
+ levels: Mapping[str, int] = {
+ "warn": logging.WARNING,
+ "info": logging.INFO,
+ "ignore": logging.DEBUG,
+ }
+
+ def run_validation(self, value: object) -> int:
+ if not isinstance(value, str):
+ raise ValidationError(f'Expected a string, but a {type(value)} was given.')
+ try:
+ return self.levels[value]
+ except KeyError:
+ raise ValidationError(f'Expected one of {list(self.levels)}, got {value!r}')
diff --git a/mkdocs/config/defaults.py b/mkdocs/config/defaults.py
index 1a76f1fa22..3f94eb5447 100644
--- a/mkdocs/config/defaults.py
+++ b/mkdocs/config/defaults.py
@@ -8,10 +8,6 @@
from mkdocs.utils.yaml import get_yaml_loader, yaml_load
-def get_schema() -> base.PlainConfigSchema:
- return MkDocsConfig._schema
-
-
# NOTE: The order here is important. During validation some config options
# depend on others. So, if config option A depends on B, then A should be
# listed higher in the schema.
@@ -32,7 +28,11 @@ class MkDocsConfig(base.Config):
"""Gitignore-like patterns of files (relative to docs dir) to exclude from the site."""
not_in_nav = c.Optional(c.PathSpec())
- """Gitignore-like patterns of files (relative to docs dir) that are not intended to be in the nav."""
+ """Gitignore-like patterns of files (relative to docs dir) that are not intended to be in the nav.
+
+ This marks doc files that are expected not to be in the nav, otherwise they will cause a log message
+ (see also `validation.nav.omitted_files`).
+ """
site_url = c.Optional(c.URL(is_dir=True))
"""The full URL to where the documentation will be hosted."""
@@ -139,6 +139,35 @@ class MkDocsConfig(base.Config):
watch = c.ListOfPaths(default=[])
"""A list of extra paths to watch while running `mkdocs serve`."""
+ class Validation(base.Config):
+ class NavValidation(base.Config):
+ omitted_files = c._LogLevel(default='info')
+ """Warning level for when a doc file is never mentioned in the navigation.
+ For granular configuration, see `not_in_nav`."""
+
+ not_found = c._LogLevel(default='warn')
+ """Warning level for when the navigation links to a relative path that isn't an existing page on the site."""
+
+ absolute_links = c._LogLevel(default='info')
+ """Warning level for when the navigation links to an absolute path (starting with `/`)."""
+
+ nav = c.SubConfig(NavValidation)
+
+ class LinksValidation(base.Config):
+ not_found = c._LogLevel(default='warn')
+ """Warning level for when a Markdown doc links to a relative path that isn't an existing document on the site."""
+
+ absolute_links = c._LogLevel(default='info')
+ """Warning level for when a Markdown doc links to an absolute path (starting with `/`)."""
+
+ unrecognized_links = c._LogLevel(default='info')
+ """Warning level for when a Markdown doc links to a relative path that doesn't look like
+ it could be a valid internal link. For example, if the link ends with `/`."""
+
+ links = c.SubConfig(LinksValidation)
+
+ validation = c.PropagatingSubConfig[Validation]()
+
_current_page: mkdocs.structure.pages.Page | None = None
"""The currently rendered page. Please do not access this and instead
rely on the `page` argument to event handlers."""
@@ -152,3 +181,8 @@ def load_file(self, config_file: IO) -> None:
"""Load config options from the open file descriptor of a YAML file."""
loader = get_yaml_loader(config=self)
self.load_dict(yaml_load(config_file, loader))
+
+
+def get_schema() -> base.PlainConfigSchema:
+ """Soft-deprecated, do not use."""
+ return MkDocsConfig._schema
diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
index 18937cf00b..52eacbe639 100644
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -148,9 +148,10 @@ def get_navigation(files: Files, config: MkDocsConfig) -> Navigation:
if file.inclusion.is_in_nav():
missing_from_config.append(file.src_path)
if missing_from_config:
- log.info(
+ log.log(
+ config.validation.nav.omitted_files,
'The following pages exist in the docs directory, but are not '
- 'included in the "nav" configuration:\n - ' + '\n - '.join(missing_from_config)
+ 'included in the "nav" configuration:\n - ' + '\n - '.join(missing_from_config),
)
links = _get_by_type(items, Link)
@@ -159,14 +160,16 @@ def get_navigation(files: Files, config: MkDocsConfig) -> Navigation:
if scheme or netloc:
log.debug(f"An external link to '{link.url}' is included in the 'nav' configuration.")
elif link.url.startswith('/'):
- log.debug(
+ log.log(
+ config.validation.nav.absolute_links,
f"An absolute path to '{link.url}' is included in the 'nav' "
- "configuration, which presumably points to an external resource."
+ "configuration, which presumably points to an external resource.",
)
else:
- log.warning(
+ log.log(
+ config.validation.nav.not_found,
f"A relative path to '{link.url}' is included in the 'nav' "
- "configuration, which is not found in the documentation files."
+ "configuration, which is not found in the documentation files.",
)
return Navigation(items, pages)
@@ -190,9 +193,10 @@ def _data_to_navigation(data, files: Files, config: MkDocsConfig):
file = files.get_file_from_path(path)
if file:
if file.inclusion.is_excluded():
- log.info(
- f"A relative path to '{file.src_path}' is included in the 'nav' "
- "configuration, but this file is excluded from the built site."
+ log.log(
+ min(logging.INFO, config.validation.nav.not_found),
+ f"A reference to '{file.src_path}' is included in the 'nav' "
+ "configuration, but this file is excluded from the built site.",
)
return Page(title, file, config)
return Link(title, path)
diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index 5f2676af8c..7b84e1fc79 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -2,10 +2,9 @@
import copy
import logging
-import os
import posixpath
import warnings
-from typing import TYPE_CHECKING, Any, Callable, MutableMapping
+from typing import TYPE_CHECKING, Any, Callable, Iterator, MutableMapping
from urllib.parse import unquote as urlunquote
from urllib.parse import urljoin, urlsplit, urlunsplit
@@ -15,9 +14,10 @@
import markdown.treeprocessors
from markdown.util import AMP_SUBSTITUTE
+from mkdocs import utils
from mkdocs.structure import StructureItem
from mkdocs.structure.toc import get_toc
-from mkdocs.utils import get_build_date, get_markdown_title, meta, weak_property
+from mkdocs.utils import _removesuffix, get_build_date, get_markdown_title, meta, weak_property
if TYPE_CHECKING:
from xml.etree import ElementTree as etree
@@ -263,25 +263,27 @@ def render(self, config: MkDocsConfig, files: Files) -> None:
if self.markdown is None:
raise RuntimeError("`markdown` field hasn't been set (via `read_source`)")
- relative_path_extension = _RelativePathExtension(self.file, files)
- extract_title_extension = _ExtractTitleExtension()
md = markdown.Markdown(
- extensions=[
- relative_path_extension,
- extract_title_extension,
- *config['markdown_extensions'],
- ],
+ extensions=config['markdown_extensions'],
extension_configs=config['mdx_configs'] or {},
)
+
+ relative_path_ext = _RelativePathTreeprocessor(self.file, files, config)
+ relative_path_ext._register(md)
+
+ extract_title_ext = _ExtractTitleTreeprocessor()
+ extract_title_ext._register(md)
+
self.content = md.convert(self.markdown)
self.toc = get_toc(getattr(md, 'toc_tokens', []))
- self._title_from_render = extract_title_extension.title
+ self._title_from_render = extract_title_ext.title
class _RelativePathTreeprocessor(markdown.treeprocessors.Treeprocessor):
- def __init__(self, file: File, files: Files) -> None:
+ def __init__(self, file: File, files: Files, config: MkDocsConfig) -> None:
self.file = file
self.files = files
+ self.config = config
def run(self, root: etree.Element) -> etree.Element:
"""
@@ -305,75 +307,136 @@ def run(self, root: etree.Element) -> etree.Element:
return root
- def path_to_url(self, url: str) -> str:
- scheme, netloc, path, query, fragment = urlsplit(url)
+ @classmethod
+ def _target_uri(cls, src_path: str, dest_path: str):
+ return posixpath.normpath(
+ posixpath.join(posixpath.dirname(src_path), dest_path).lstrip('/')
+ )
+ @classmethod
+ def _possible_target_uris(
+ cls, file: File, path: str, use_directory_urls: bool
+ ) -> Iterator[str]:
+ """First yields the resolved file uri for the link, then proceeds to yield guesses for possible mistakes."""
+ target_uri = cls._target_uri(file.src_uri, path)
+ yield target_uri
+
+ if posixpath.normpath(path) == '.':
+ # Explicitly link to current file.
+ yield file.src_uri
+ return
+ tried = {target_uri}
+
+ prefixes = [target_uri, cls._target_uri(file.url, path)]
+ if prefixes[0] == prefixes[1]:
+ prefixes.pop()
+
+ suffixes: list[Callable[[str], str]] = []
+ if use_directory_urls:
+ suffixes.append(lambda p: p)
+ if not posixpath.splitext(target_uri)[-1]:
+ suffixes.append(lambda p: posixpath.join(p, 'index.md'))
+ suffixes.append(lambda p: posixpath.join(p, 'README.md'))
if (
- scheme
- or netloc
- or not path
- or url.startswith('/')
- or url.startswith('\\')
- or AMP_SUBSTITUTE in url
- or '.' not in os.path.split(path)[-1]
+ not target_uri.endswith('.')
+ and not path.endswith('.md')
+ and (use_directory_urls or not path.endswith('/'))
):
- # Ignore URLs unless they are a relative link to a source file.
- # AMP_SUBSTITUTE is used internally by Markdown only for email.
- # No '.' in the last part of a path indicates path does not point to a file.
- return url
+ suffixes.append(lambda p: _removesuffix(p, '.html') + '.md')
- # Determine the filepath of the target.
- target_uri = posixpath.join(posixpath.dirname(self.file.src_uri), urlunquote(path))
- target_uri = posixpath.normpath(target_uri).lstrip('/')
-
- # Validate that the target exists in files collection.
- target_file = self.files.get_file_from_path(target_uri)
- if target_file is None:
- log.warning(
- f"Documentation file '{self.file.src_uri}' contains a link to "
- f"'{target_uri}' which is not found in the documentation files."
- )
- return url
- if target_file.inclusion.is_excluded():
- log.info(
- f"Documentation file '{self.file.src_uri}' contains a link to "
- f"'{target_uri}' which is excluded from the built site."
- )
- path = target_file.url_relative_to(self.file)
- components = (scheme, netloc, path, query, fragment)
- return urlunsplit(components)
+ for pref in prefixes:
+ for suf in suffixes:
+ guess = posixpath.normpath(suf(pref))
+ if guess not in tried and not guess.startswith('../'):
+ yield guess
+ tried.add(guess)
+ def path_to_url(self, url: str) -> str:
+ scheme, netloc, path, query, fragment = urlsplit(url)
-class _RelativePathExtension(markdown.extensions.Extension):
- """
- The Extension class is what we pass to markdown, it then
- registers the Treeprocessor.
- """
+ warning_level, warning = 0, ''
- def __init__(self, file: File, files: Files) -> None:
- self.file = file
- self.files = files
+ # Ignore URLs unless they are a relative link to a source file.
+ if scheme or netloc: # External link.
+ return url
+ elif url.startswith('/') or url.startswith('\\'): # Absolute link.
+ warning_level = self.config.validation.links.absolute_links
+ warning = f"Doc file '{self.file.src_uri}' contains an absolute link '{url}', it was left as is."
+ elif AMP_SUBSTITUTE in url: # AMP_SUBSTITUTE is used internally by Markdown only for email.
+ return url
+ elif not path: # Self-link containing only query or fragment.
+ return url
- def extendMarkdown(self, md: markdown.Markdown) -> None:
- relpath = _RelativePathTreeprocessor(self.file, self.files)
- md.treeprocessors.register(relpath, "relpath", 0)
+ path = urlunquote(path)
+ # Determine the filepath of the target.
+ possible_target_uris = self._possible_target_uris(
+ self.file, path, self.config.use_directory_urls
+ )
+ if warning:
+ # For absolute path (already has a warning), the primary lookup path should be preserved as a tip option.
+ target_uri = url
+ target_file = None
+ else:
+ # Validate that the target exists in files collection.
+ target_uri = next(possible_target_uris)
+ target_file = self.files.get_file_from_path(target_uri)
+
+ if target_file is None and not warning:
+ # Primary lookup path had no match, definitely produce a warning, just choose which one.
+ if not posixpath.splitext(path)[-1]:
+ # No '.' in the last part of a path indicates path does not point to a file.
+ warning_level = self.config.validation.links.unrecognized_links
+ warning = (
+ f"Doc file '{self.file.src_uri}' contains an unrecognized relative link '{url}', "
+ f"it was left as is."
+ )
+ else:
+ target = f" '{target_uri}'" if target_uri != url else ""
+ warning_level = self.config.validation.links.not_found
+ warning = (
+ f"Doc file '{self.file.src_uri}' contains a relative link '{url}', "
+ f"but the target{target} is not found among documentation files."
+ )
+
+ if warning:
+ # There was no match, so try to guess what other file could've been intended.
+ if warning_level > logging.DEBUG:
+ suggest_url = ''
+ for path in possible_target_uris:
+ if self.files.get_file_from_path(path) is not None:
+ if fragment and path == self.file.src_uri:
+ path = ''
+ else:
+ path = utils.get_relative_url(path, self.file.src_uri)
+ suggest_url = urlunsplit(('', '', path, query, fragment))
+ break
+ else:
+ if '@' in url and '.' in url and '/' not in url:
+ suggest_url = f'mailto:{url}'
+ if suggest_url:
+ warning += f" Did you mean '{suggest_url}'?"
+ log.log(warning_level, warning)
+ return url
-class _ExtractTitleExtension(markdown.extensions.Extension):
- def __init__(self) -> None:
- self.title: str | None = None
+ assert target_uri is not None
+ assert target_file is not None
+ if target_file.inclusion.is_excluded():
+ warning_level = min(logging.INFO, self.config.validation.links.not_found)
+ warning = (
+ f"Doc file '{self.file.src_uri}' contains a link to "
+ f"'{target_uri}' which is excluded from the built site."
+ )
+ log.log(warning_level, warning)
+ path = utils.get_relative_url(target_file.url, self.file.url)
+ return urlunsplit(('', '', path, query, fragment))
- def extendMarkdown(self, md: markdown.Markdown) -> None:
- md.treeprocessors.register(
- _ExtractTitleTreeprocessor(self),
- "mkdocs_extract_title",
- priority=1, # Close to the end.
- )
+ def _register(self, md: markdown.Markdown) -> None:
+ md.treeprocessors.register(self, "relpath", 0)
class _ExtractTitleTreeprocessor(markdown.treeprocessors.Treeprocessor):
- def __init__(self, ext: _ExtractTitleExtension) -> None:
- self.ext = ext
+ title: str | None = None
def run(self, root: etree.Element) -> etree.Element:
for el in root:
@@ -383,6 +446,13 @@ def run(self, root: etree.Element) -> etree.Element:
el = copy.copy(el)
del el[-1]
# Extract the text only, recursively.
- self.ext.title = _unescape(''.join(el.itertext()))
+ self.title = _unescape(''.join(el.itertext()))
break
return root
+
+ def _register(self, md: markdown.Markdown) -> None:
+ md.treeprocessors.register(
+ self,
+ "mkdocs_extract_title",
+ priority=1, # Close to the end.
+ )
diff --git a/mkdocs/utils/__init__.py b/mkdocs/utils/__init__.py
index 4787d8ca55..7866bdd638 100644
--- a/mkdocs/utils/__init__.py
+++ b/mkdocs/utils/__init__.py
@@ -92,6 +92,16 @@ def get_build_date() -> str:
return get_build_datetime().strftime('%Y-%m-%d')
+if sys.version_info >= (3, 9):
+ _removesuffix = str.removesuffix
+else:
+
+ def _removesuffix(s: str, suffix: str) -> str:
+ if suffix and s.endswith(suffix):
+ return s[: -len(suffix)]
+ return s
+
+
def reduce_list(data_set: Iterable[T]) -> list[T]:
"""Reduce duplicate items in a list and preserve order"""
return list(dict.fromkeys(data_set))
| diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index 24b2fa6c6a..3ea64d42fd 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -58,9 +58,7 @@ def test_context_base_url_homepage(self):
{'Home': 'index.md'},
]
cfg = load_config(nav=nav_cfg, use_directory_urls=False)
- fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- ]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
context = build.get_context(nav, files, cfg, nav.pages[0])
@@ -71,9 +69,7 @@ def test_context_base_url_homepage_use_directory_urls(self):
{'Home': 'index.md'},
]
cfg = load_config(nav=nav_cfg)
- fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- ]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
context = build.get_context(nav, files, cfg, nav.pages[0])
@@ -86,8 +82,8 @@ def test_context_base_url_nested_page(self):
]
cfg = load_config(nav=nav_cfg, use_directory_urls=False)
fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- File('foo/bar.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
+ File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ File('foo/bar.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
]
files = Files(fs)
nav = get_navigation(files, cfg)
@@ -101,8 +97,8 @@ def test_context_base_url_nested_page_use_directory_urls(self):
]
cfg = load_config(nav=nav_cfg)
fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- File('foo/bar.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
+ File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ File('foo/bar.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
]
files = Files(fs)
nav = get_navigation(files, cfg)
@@ -149,9 +145,7 @@ def test_context_extra_css_js_from_homepage(self):
extra_javascript=['script.js'],
use_directory_urls=False,
)
- fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- ]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
context = build.get_context(nav, files, cfg, nav.pages[0])
@@ -170,8 +164,8 @@ def test_context_extra_css_js_from_nested_page(self):
use_directory_urls=False,
)
fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- File('foo/bar.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
+ File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ File('foo/bar.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
]
files = Files(fs)
nav = get_navigation(files, cfg)
@@ -190,8 +184,8 @@ def test_context_extra_css_js_from_nested_page_use_directory_urls(self):
extra_javascript=['script.js'],
)
fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- File('foo/bar.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
+ File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ File('foo/bar.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
]
files = Files(fs)
nav = get_navigation(files, cfg)
@@ -210,9 +204,7 @@ def test_context_extra_css_path_warning(self):
extra_css=['assets\\style.css'],
use_directory_urls=False,
)
- fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- ]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
with self.assertLogs('mkdocs') as cm:
@@ -241,7 +233,7 @@ def test_extra_context(self):
@mock.patch('mkdocs.commands.build._build_template', return_value='some content')
def test_build_theme_template(self, mock_build_template, mock_write_file):
cfg = load_config()
- env = cfg['theme'].get_env()
+ env = cfg.theme.get_env()
build._build_theme_template('main.html', env, mock.Mock(), cfg, mock.Mock())
mock_write_file.assert_called_once()
mock_build_template.assert_called_once()
@@ -254,7 +246,7 @@ def test_build_sitemap_template(
self, site_dir, mock_gzip_gzipfile, mock_build_template, mock_write_file
):
cfg = load_config(site_dir=site_dir)
- env = cfg['theme'].get_env()
+ env = cfg.theme.get_env()
build._build_theme_template('sitemap.xml', env, mock.Mock(), cfg, mock.Mock())
mock_write_file.assert_called_once()
mock_build_template.assert_called_once()
@@ -264,7 +256,7 @@ def test_build_sitemap_template(
@mock.patch('mkdocs.commands.build._build_template', return_value='')
def test_skip_missing_theme_template(self, mock_build_template, mock_write_file):
cfg = load_config()
- env = cfg['theme'].get_env()
+ env = cfg.theme.get_env()
with self.assertLogs('mkdocs') as cm:
build._build_theme_template('missing.html', env, mock.Mock(), cfg, mock.Mock())
self.assertEqual(
@@ -278,7 +270,7 @@ def test_skip_missing_theme_template(self, mock_build_template, mock_write_file)
@mock.patch('mkdocs.commands.build._build_template', return_value='')
def test_skip_theme_template_empty_output(self, mock_build_template, mock_write_file):
cfg = load_config()
- env = cfg['theme'].get_env()
+ env = cfg.theme.get_env()
with self.assertLogs('mkdocs') as cm:
build._build_theme_template('main.html', env, mock.Mock(), cfg, mock.Mock())
self.assertEqual(
@@ -294,18 +286,14 @@ def test_skip_theme_template_empty_output(self, mock_build_template, mock_write_
@mock.patch('mkdocs.commands.build.open', mock.mock_open(read_data='template content'))
def test_build_extra_template(self, site_dir):
cfg = load_config(site_dir=site_dir)
- fs = [
- File('foo.html', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- ]
+ fs = [File('foo.html', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
build._build_extra_template('foo.html', files, cfg, mock.Mock())
@mock.patch('mkdocs.commands.build.open', mock.mock_open(read_data='template content'))
def test_skip_missing_extra_template(self):
cfg = load_config()
- fs = [
- File('foo.html', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- ]
+ fs = [File('foo.html', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
with self.assertLogs('mkdocs') as cm:
build._build_extra_template('missing.html', files, cfg, mock.Mock())
@@ -317,9 +305,7 @@ def test_skip_missing_extra_template(self):
@mock.patch('mkdocs.commands.build.open', side_effect=OSError('Error message.'))
def test_skip_ioerror_extra_template(self, mock_open):
cfg = load_config()
- fs = [
- File('foo.html', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- ]
+ fs = [File('foo.html', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
with self.assertLogs('mkdocs') as cm:
build._build_extra_template('foo.html', files, cfg, mock.Mock())
@@ -331,9 +317,7 @@ def test_skip_ioerror_extra_template(self, mock_open):
@mock.patch('mkdocs.commands.build.open', mock.mock_open(read_data=''))
def test_skip_extra_template_empty_output(self):
cfg = load_config()
- fs = [
- File('foo.html', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- ]
+ fs = [File('foo.html', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
with self.assertLogs('mkdocs') as cm:
build._build_extra_template('foo.html', files, cfg, mock.Mock())
@@ -347,7 +331,7 @@ def test_skip_extra_template_empty_output(self):
@tempdir(files={'index.md': 'page content'})
def test_populate_page(self, docs_dir):
cfg = load_config(docs_dir=docs_dir)
- file = File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ file = File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
page = Page('Foo', file, cfg)
build._populate_page(page, cfg, Files([file]))
self.assertEqual(page.content, '<p>page content</p>')
@@ -355,7 +339,7 @@ def test_populate_page(self, docs_dir):
@tempdir(files={'testing.html': '<p>page content</p>'})
def test_populate_page_dirty_modified(self, site_dir):
cfg = load_config(site_dir=site_dir)
- file = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ file = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
page = Page('Foo', file, cfg)
build._populate_page(page, cfg, Files([file]), dirty=True)
self.assertTrue(page.markdown.startswith('# Welcome to MkDocs'))
@@ -367,7 +351,7 @@ def test_populate_page_dirty_modified(self, site_dir):
@tempdir(files={'index.html': '<p>page content</p>'})
def test_populate_page_dirty_not_modified(self, site_dir, docs_dir):
cfg = load_config(docs_dir=docs_dir, site_dir=site_dir)
- file = File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ file = File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
page = Page('Foo', file, cfg)
build._populate_page(page, cfg, Files([file]), dirty=True)
# Content is empty as file read was skipped
@@ -378,7 +362,7 @@ def test_populate_page_dirty_not_modified(self, site_dir, docs_dir):
@mock.patch('mkdocs.structure.pages.open', side_effect=OSError('Error message.'))
def test_populate_page_read_error(self, docs_dir, mock_open):
cfg = load_config(docs_dir=docs_dir)
- file = File('missing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ file = File('missing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
page = Page('Foo', file, cfg)
with self.assertLogs('mkdocs') as cm:
with self.assertRaises(OSError):
@@ -400,7 +384,7 @@ def on_page_markdown(*args, **kwargs):
cfg = load_config(docs_dir=docs_dir)
cfg.plugins.events['page_markdown'].append(on_page_markdown)
- file = File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ file = File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
page = Page('Foo', file, cfg)
with self.assertLogs('mkdocs') as cm:
with self.assertRaises(PluginError):
@@ -415,7 +399,7 @@ def on_page_markdown(*args, **kwargs):
@tempdir()
def test_build_page(self, site_dir):
cfg = load_config(site_dir=site_dir, nav=['index.md'])
- fs = [File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
page = files.documentation_pages()[0].page
@@ -430,12 +414,12 @@ def test_build_page(self, site_dir):
@mock.patch('jinja2.environment.Template.render', return_value='')
def test_build_page_empty(self, site_dir, render_mock):
cfg = load_config(site_dir=site_dir, nav=['index.md'])
- fs = [File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
with self.assertLogs('mkdocs') as cm:
build._build_page(
- files.documentation_pages()[0].page, cfg, files, nav, cfg['theme'].get_env()
+ files.documentation_pages()[0].page, cfg, files, nav, cfg.theme.get_env()
)
self.assertEqual(
'\n'.join(cm.output),
@@ -449,7 +433,7 @@ def test_build_page_empty(self, site_dir, render_mock):
@mock.patch('mkdocs.utils.write_file')
def test_build_page_dirty_modified(self, site_dir, docs_dir, mock_write_file):
cfg = load_config(docs_dir=docs_dir, site_dir=site_dir, nav=['index.md'])
- fs = [File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
page = files.documentation_pages()[0].page
@@ -466,7 +450,7 @@ def test_build_page_dirty_modified(self, site_dir, docs_dir, mock_write_file):
@mock.patch('mkdocs.utils.write_file')
def test_build_page_dirty_not_modified(self, site_dir, mock_write_file):
cfg = load_config(site_dir=site_dir, nav=['testing.md'])
- fs = [File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
page = files.documentation_pages()[0].page
@@ -482,7 +466,7 @@ def test_build_page_dirty_not_modified(self, site_dir, mock_write_file):
@tempdir()
def test_build_page_custom_template(self, site_dir):
cfg = load_config(site_dir=site_dir, nav=['index.md'])
- fs = [File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
page = files.documentation_pages()[0].page
@@ -498,7 +482,7 @@ def test_build_page_custom_template(self, site_dir):
@mock.patch('mkdocs.utils.write_file', side_effect=OSError('Error message.'))
def test_build_page_error(self, site_dir, mock_write_file):
cfg = load_config(site_dir=site_dir, nav=['index.md'])
- fs = [File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
page = files.documentation_pages()[0].page
@@ -522,7 +506,7 @@ def on_page_context(*args, **kwargs):
cfg = load_config(site_dir=site_dir, nav=['index.md'])
cfg.plugins.events['page_context'].append(on_page_context)
- fs = [File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
nav = get_navigation(files, cfg)
page = files.documentation_pages()[0].page
@@ -532,7 +516,7 @@ def on_page_context(*args, **kwargs):
page.content = '<p>page content</p>'
with self.assertLogs('mkdocs') as cm:
with self.assertRaises(PluginError):
- build._build_page(page, cfg, files, nav, cfg['theme'].get_env())
+ build._build_page(page, cfg, files, nav, cfg.theme.get_env())
self.assertEqual(
'\n'.join(cm.output),
"ERROR:mkdocs.commands.build:Error building page 'index.md':",
@@ -615,7 +599,7 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
with self.subTest(live_server=None):
expected_logs = '''
- INFO:Documentation file 'test/foo.md' contains a link to 'test/bar.md' which is excluded from the built site.
+ INFO:Doc file 'test/foo.md' contains a link to 'test/bar.md' which is excluded from the built site.
'''
with self._assert_build_logs(expected_logs):
build.build(cfg)
@@ -626,8 +610,8 @@ def test_exclude_pages_with_invalid_links(self, site_dir, docs_dir):
server = testing_server(site_dir, mount_path='/documentation/')
with self.subTest(live_server=server):
expected_logs = '''
- INFO:Documentation file 'test/bar.md' contains a link to 'test/baz.md' which is excluded from the built site.
- INFO:Documentation file 'test/foo.md' contains a link to 'test/bar.md' which is excluded from the built site.
+ INFO:Doc file 'test/bar.md' contains a link to 'test/baz.md' which is excluded from the built site.
+ INFO:Doc file 'test/foo.md' contains a link to 'test/bar.md' which is excluded from the built site.
INFO:The following pages are being built only for the preview but will be excluded from `mkdocs build` per `exclude_docs`:
- http://localhost:123/documentation/.zoo.html
- http://localhost:123/documentation/test/bar.html
diff --git a/mkdocs/tests/config/base_tests.py b/mkdocs/tests/config/base_tests.py
index 1a2a85a3b7..2590b71858 100644
--- a/mkdocs/tests/config/base_tests.py
+++ b/mkdocs/tests/config/base_tests.py
@@ -52,7 +52,7 @@ def test_load_from_file(self, temp_dir):
cfg = base.load_config(config_file=config_file.name)
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
- self.assertEqual(cfg['site_name'], 'MkDocs Test')
+ self.assertEqual(cfg.site_name, 'MkDocs Test')
@tempdir()
def test_load_default_file(self, temp_dir):
@@ -65,7 +65,7 @@ def test_load_default_file(self, temp_dir):
with change_dir(temp_dir):
cfg = base.load_config(config_file=None)
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
- self.assertEqual(cfg['site_name'], 'MkDocs Test')
+ self.assertEqual(cfg.site_name, 'MkDocs Test')
@tempdir
def test_load_default_file_with_yaml(self, temp_dir):
@@ -78,7 +78,7 @@ def test_load_default_file_with_yaml(self, temp_dir):
with change_dir(temp_dir):
cfg = base.load_config(config_file=None)
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
- self.assertEqual(cfg['site_name'], 'MkDocs Test')
+ self.assertEqual(cfg.site_name, 'MkDocs Test')
@tempdir()
def test_load_default_file_prefer_yml(self, temp_dir):
@@ -94,7 +94,7 @@ def test_load_default_file_prefer_yml(self, temp_dir):
with change_dir(temp_dir):
cfg = base.load_config(config_file=None)
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
- self.assertEqual(cfg['site_name'], 'MkDocs Test1')
+ self.assertEqual(cfg.site_name, 'MkDocs Test1')
def test_load_from_missing_file(self):
with self.assertRaisesRegex(
@@ -115,7 +115,7 @@ def test_load_from_open_file(self, temp_path):
cfg = base.load_config(config_file=config_file)
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
- self.assertEqual(cfg['site_name'], 'MkDocs Test')
+ self.assertEqual(cfg.site_name, 'MkDocs Test')
# load_config will always close the file
self.assertTrue(config_file.closed)
@@ -131,7 +131,7 @@ def test_load_from_closed_file(self, temp_dir):
cfg = base.load_config(config_file=config_file)
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
- self.assertEqual(cfg['site_name'], 'MkDocs Test')
+ self.assertEqual(cfg.site_name, 'MkDocs Test')
@tempdir
def test_load_missing_required(self, temp_dir):
@@ -265,8 +265,8 @@ def test_load_from_file_with_relative_paths(self, config_dir):
cfg = base.load_config(config_file=config_file)
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
- self.assertEqual(cfg['site_name'], 'MkDocs Test')
- self.assertEqual(cfg['docs_dir'], docs_dir)
+ self.assertEqual(cfg.site_name, 'MkDocs Test')
+ self.assertEqual(cfg.docs_dir, docs_dir)
self.assertEqual(cfg.config_file_path, config_fname)
self.assertIsInstance(cfg.config_file_path, str)
diff --git a/mkdocs/tests/config/config_options_tests.py b/mkdocs/tests/config/config_options_tests.py
index e13a20cad7..2b9d9af408 100644
--- a/mkdocs/tests/config/config_options_tests.py
+++ b/mkdocs/tests/config/config_options_tests.py
@@ -3,6 +3,7 @@
import contextlib
import copy
import io
+import logging
import os
import re
import sys
@@ -21,6 +22,7 @@ def assert_type(val, typ):
import mkdocs
from mkdocs.config import config_options as c
+from mkdocs.config import defaults
from mkdocs.config.base import Config
from mkdocs.plugins import BasePlugin, PluginCollection
from mkdocs.tests.base import tempdir
@@ -1573,6 +1575,94 @@ class Schema(Config):
self.assertEqual(passed_config_path, config_path)
+class NestedSubConfigTest(TestCase):
+ def defaults(self):
+ return {
+ 'nav': {
+ 'omitted_files': logging.INFO,
+ 'not_found': logging.WARNING,
+ 'absolute_links': logging.INFO,
+ },
+ 'links': {
+ 'not_found': logging.WARNING,
+ 'absolute_links': logging.INFO,
+ 'unrecognized_links': logging.INFO,
+ },
+ }
+
+ class Schema(Config):
+ validation = c.PropagatingSubConfig[defaults.MkDocsConfig.Validation]()
+
+ def test_unspecified(self) -> None:
+ for cfg in {}, {'validation': {}}:
+ with self.subTest(cfg):
+ conf = self.get_config(
+ self.Schema,
+ {},
+ )
+ self.assertEqual(conf.validation, self.defaults())
+
+ def test_sets_nested_and_not_nested(self) -> None:
+ conf = self.get_config(
+ self.Schema,
+ {'validation': {'not_found': 'ignore', 'links': {'absolute_links': 'warn'}}},
+ )
+ expected = self.defaults()
+ expected['nav']['not_found'] = logging.DEBUG
+ expected['links']['not_found'] = logging.DEBUG
+ expected['links']['absolute_links'] = logging.WARNING
+ self.assertEqual(conf.validation, expected)
+
+ def test_sets_nested_different(self) -> None:
+ conf = self.get_config(
+ self.Schema,
+ {'validation': {'not_found': 'ignore', 'links': {'not_found': 'warn'}}},
+ )
+ expected = self.defaults()
+ expected['nav']['not_found'] = logging.DEBUG
+ expected['links']['not_found'] = logging.WARNING
+ self.assertEqual(conf.validation, expected)
+
+ def test_sets_only_one_nested(self) -> None:
+ conf = self.get_config(
+ self.Schema,
+ {'validation': {'omitted_files': 'ignore'}},
+ )
+ expected = self.defaults()
+ expected['nav']['omitted_files'] = logging.DEBUG
+ self.assertEqual(conf.validation, expected)
+
+ def test_sets_nested_not_dict(self) -> None:
+ with self.expect_error(
+ validation="Sub-option 'links': Sub-option 'unrecognized_links': Expected a string, but a <class 'list'> was given."
+ ):
+ self.get_config(
+ self.Schema,
+ {'validation': {'unrecognized_links': [], 'links': {'absolute_links': 'warn'}}},
+ )
+
+ def test_wrong_key_nested(self) -> None:
+ conf = self.get_config(
+ self.Schema,
+ {'validation': {'foo': 'warn', 'not_found': 'warn'}},
+ warnings=dict(validation="Sub-option 'foo': Unrecognised configuration name: foo"),
+ )
+ expected = self.defaults()
+ expected['nav']['not_found'] = logging.WARNING
+ expected['links']['not_found'] = logging.WARNING
+ expected['foo'] = 'warn'
+ self.assertEqual(conf.validation, expected)
+
+ def test_wrong_type_nested(self) -> None:
+ with self.expect_error(
+ validation="Sub-option 'nav': Sub-option 'omitted_files': Expected one of ['warn', 'info', 'ignore'], got 'hi'"
+ ):
+ self.get_config(
+ self.Schema,
+ {'validation': {'omitted_files': 'hi'}},
+ )
+
+
class MarkdownExtensionsTest(TestCase):
@patch('markdown.Markdown')
def test_simple_list(self, mock_md) -> None:
diff --git a/mkdocs/tests/search_tests.py b/mkdocs/tests/search_tests.py
index dd8acb244e..ea176fca5f 100644
--- a/mkdocs/tests/search_tests.py
+++ b/mkdocs/tests/search_tests.py
@@ -354,22 +354,12 @@ def test_create_search_index(self):
pages = [
Page(
'Home',
- File(
- 'index.md',
- base_cfg['docs_dir'],
- base_cfg['site_dir'],
- base_cfg['use_directory_urls'],
- ),
+ File('index.md', base_cfg.docs_dir, base_cfg.site_dir, base_cfg.use_directory_urls),
base_cfg,
),
Page(
'About',
- File(
- 'about.md',
- base_cfg['docs_dir'],
- base_cfg['site_dir'],
- base_cfg['use_directory_urls'],
- ),
+ File('about.md', base_cfg.docs_dir, base_cfg.site_dir, base_cfg.use_directory_urls),
base_cfg,
),
]
diff --git a/mkdocs/tests/structure/nav_tests.py b/mkdocs/tests/structure/nav_tests.py
index 5751429ee6..3e4aba5f90 100644
--- a/mkdocs/tests/structure/nav_tests.py
+++ b/mkdocs/tests/structure/nav_tests.py
@@ -25,9 +25,7 @@ def test_simple_nav(self):
)
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
fs = [
- File(
- list(item.values())[0], cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']
- )
+ File(list(item.values())[0], cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
for item in nav_cfg
]
files = Files(fs)
@@ -50,9 +48,7 @@ def test_nav_no_directory_urls(self):
)
cfg = load_config(nav=nav_cfg, use_directory_urls=False, site_url='http://example.com/')
fs = [
- File(
- list(item.values())[0], cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']
- )
+ File(list(item.values())[0], cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
for item in nav_cfg
]
files = Files(fs)
@@ -73,8 +69,8 @@ def test_nav_missing_page(self):
)
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- File('page_not_in_nav.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
+ File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ File('page_not_in_nav.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
]
files = Files(fs)
site_navigation = get_navigation(files, cfg)
@@ -97,8 +93,8 @@ def test_nav_no_title(self):
)
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
fs = [
- File(nav_cfg[0], cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- File(nav_cfg[1]['About'], cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
+ File(nav_cfg[0], cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ File(nav_cfg[1]['About'], cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
]
files = Files(fs)
site_navigation = get_navigation(files, cfg)
@@ -120,17 +116,15 @@ def test_nav_external_links(self):
"""
)
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
- fs = [File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
with self.assertLogs('mkdocs', level='DEBUG') as cm:
site_navigation = get_navigation(files, cfg)
self.assertEqual(
cm.output,
[
- "DEBUG:mkdocs.structure.nav:An absolute path to '/local.html' is included in the "
- "'nav' configuration, which presumably points to an external resource.",
- "DEBUG:mkdocs.structure.nav:An external link to 'http://example.com/external.html' "
- "is included in the 'nav' configuration.",
+ "INFO:mkdocs.structure.nav:An absolute path to '/local.html' is included in the 'nav' configuration, which presumably points to an external resource.",
+ "DEBUG:mkdocs.structure.nav:An external link to 'http://example.com/external.html' is included in the 'nav' configuration.",
],
)
self.assertEqual(str(site_navigation).strip(), expected)
@@ -151,17 +145,15 @@ def test_nav_bad_links(self):
"""
)
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
- fs = [File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
with self.assertLogs('mkdocs') as cm:
site_navigation = get_navigation(files, cfg)
self.assertEqual(
cm.output,
[
- "WARNING:mkdocs.structure.nav:A relative path to 'missing.html' is included "
- "in the 'nav' configuration, which is not found in the documentation files.",
- "WARNING:mkdocs.structure.nav:A relative path to 'example.com' is included "
- "in the 'nav' configuration, which is not found in the documentation files.",
+ "WARNING:mkdocs.structure.nav:A relative path to 'missing.html' is included in the 'nav' configuration, which is not found in the documentation files.",
+ "WARNING:mkdocs.structure.nav:A relative path to 'example.com' is included in the 'nav' configuration, which is not found in the documentation files.",
],
)
self.assertEqual(str(site_navigation).strip(), expected)
@@ -215,9 +207,7 @@ def test_indented_nav(self):
'api-guide/advanced/part-1.md',
'about/release-notes.md',
]
- files = Files(
- [File(s, cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']) for s in fs]
- )
+ files = Files([File(s, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls) for s in fs])
site_navigation = get_navigation(files, cfg)
self.assertEqual(str(site_navigation).strip(), expected)
self.assertEqual(len(site_navigation.items), 4)
@@ -282,9 +272,7 @@ def test_nested_ungrouped_nav(self):
)
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
fs = [
- File(
- list(item.values())[0], cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']
- )
+ File(list(item.values())[0], cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
for item in nav_cfg
]
files = Files(fs)
@@ -308,10 +296,7 @@ def test_nested_ungrouped_nav_no_titles(self):
)
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
- fs = [
- File(item, cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
- for item in nav_cfg
- ]
+ fs = [File(item, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls) for item in nav_cfg]
files = Files(fs)
site_navigation = get_navigation(files, cfg)
self.assertEqual(str(site_navigation).strip(), expected)
@@ -335,10 +320,7 @@ def test_nested_ungrouped_no_titles_windows(self):
)
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
- fs = [
- File(item, cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
- for item in nav_cfg
- ]
+ fs = [File(item, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls) for item in nav_cfg]
files = Files(fs)
site_navigation = get_navigation(files, cfg)
self.assertEqual(str(site_navigation).strip(), expected)
@@ -354,8 +336,8 @@ def test_nav_from_files(self):
)
cfg = load_config(site_url='http://example.com/')
fs = [
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- File('about.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
+ File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
+ File('about.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls),
]
files = Files(fs)
site_navigation = get_navigation(files, cfg)
@@ -389,9 +371,7 @@ def test_nav_from_nested_files(self):
'api-guide/testing.md',
'api-guide/advanced/part-1.md',
]
- files = Files(
- [File(s, cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']) for s in fs]
- )
+ files = Files([File(s, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls) for s in fs])
site_navigation = get_navigation(files, cfg)
self.assertEqual(str(site_navigation).strip(), expected)
self.assertEqual(len(site_navigation.items), 3)
@@ -430,9 +410,7 @@ def test_active(self):
'about/release-notes.md',
'about/license.md',
]
- files = Files(
- [File(s, cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']) for s in fs]
- )
+ files = Files([File(s, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls) for s in fs])
site_navigation = get_navigation(files, cfg)
# Confirm nothing is active
self.assertTrue(all(page.active is False for page in site_navigation.pages))
@@ -471,7 +449,7 @@ def test_get_by_type_nested_sections(self):
},
]
cfg = load_config(nav=nav_cfg, site_url='http://example.com/')
- fs = [File('page.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])]
+ fs = [File('page.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)]
files = Files(fs)
site_navigation = get_navigation(files, cfg)
self.assertEqual(len(_get_by_type(site_navigation, Section)), 2)
diff --git a/mkdocs/tests/structure/page_tests.py b/mkdocs/tests/structure/page_tests.py
index 30a90f6813..d196cffafa 100644
--- a/mkdocs/tests/structure/page_tests.py
+++ b/mkdocs/tests/structure/page_tests.py
@@ -1,25 +1,40 @@
-import functools
+from __future__ import annotations
+
import os
import sys
+import textwrap
import unittest
from unittest import mock
from mkdocs.config.defaults import MkDocsConfig
from mkdocs.structure.files import File, Files
-from mkdocs.structure.pages import Page
-from mkdocs.tests.base import dedent, load_config, tempdir
+from mkdocs.structure.pages import Page, _RelativePathTreeprocessor
+from mkdocs.tests.base import dedent, tempdir
-load_config = functools.lru_cache(maxsize=None)(load_config)
+DOCS_DIR = os.path.join(
+ os.path.abspath(os.path.dirname(__file__)), '..', 'integration', 'subpages', 'docs'
+)
-class PageTests(unittest.TestCase):
- DOCS_DIR = os.path.join(
- os.path.abspath(os.path.dirname(__file__)), '../integration/subpages/docs'
+def load_config(**cfg) -> MkDocsConfig:
+ cfg.setdefault('site_name', 'Example')
+ cfg.setdefault(
+ 'docs_dir',
+ os.path.join(
+ os.path.abspath(os.path.dirname(__file__)), '..', 'integration', 'minimal', 'docs'
+ ),
)
+ conf = MkDocsConfig()
+ conf.load_dict(cfg)
+ errors_warnings = conf.validate()
+ assert errors_warnings == ([], []), errors_warnings
+ return conf
+
+class PageTests(unittest.TestCase):
def test_homepage(self):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fl = File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR)
+ fl = File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
self.assertIsNone(fl.page)
pg = Page('Foo', fl, cfg)
self.assertEqual(fl.page, pg)
@@ -43,8 +58,8 @@ def test_homepage(self):
self.assertEqual(pg.toc, [])
def test_nested_index_page(self):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fl = File('sub1/index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR)
+ fl = File('sub1/index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
pg.parent = 'foo'
self.assertEqual(pg.url, 'sub1/')
@@ -67,8 +82,8 @@ def test_nested_index_page(self):
self.assertEqual(pg.toc, [])
def test_nested_index_page_no_parent(self):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fl = File('sub1/index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR)
+ fl = File('sub1/index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
pg.parent = None # non-homepage at nav root level; see #1919.
self.assertEqual(pg.url, 'sub1/')
@@ -91,8 +106,8 @@ def test_nested_index_page_no_parent(self):
self.assertEqual(pg.toc, [])
def test_nested_index_page_no_parent_no_directory_urls(self):
- cfg = load_config(docs_dir=self.DOCS_DIR, use_directory_urls=False)
- fl = File('sub1/index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR, use_directory_urls=False)
+ fl = File('sub1/index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
pg.parent = None # non-homepage at nav root level; see #1919.
self.assertEqual(pg.url, 'sub1/index.html')
@@ -115,8 +130,8 @@ def test_nested_index_page_no_parent_no_directory_urls(self):
self.assertEqual(pg.toc, [])
def test_nested_nonindex_page(self):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fl = File('sub1/non-index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR)
+ fl = File('sub1/non-index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
pg.parent = 'foo'
self.assertEqual(pg.url, 'sub1/non-index/')
@@ -140,7 +155,7 @@ def test_nested_nonindex_page(self):
def test_page_defaults(self):
cfg = load_config()
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertRegex(pg.update_date, r'\d{4}-\d{2}-\d{2}')
self.assertEqual(pg.url, 'testing/')
@@ -164,7 +179,7 @@ def test_page_defaults(self):
def test_page_no_directory_url(self):
cfg = load_config(use_directory_urls=False)
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertEqual(pg.url, 'testing.html')
self.assertEqual(pg.abs_url, None)
@@ -187,7 +202,7 @@ def test_page_no_directory_url(self):
def test_page_canonical_url(self):
cfg = load_config(site_url='http://example.com')
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertEqual(pg.url, 'testing/')
self.assertEqual(pg.abs_url, '/testing/')
@@ -210,7 +225,7 @@ def test_page_canonical_url(self):
def test_page_canonical_url_nested(self):
cfg = load_config(site_url='http://example.com/foo/')
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertEqual(pg.url, 'testing/')
self.assertEqual(pg.abs_url, '/foo/testing/')
@@ -233,7 +248,7 @@ def test_page_canonical_url_nested(self):
def test_page_canonical_url_nested_no_slash(self):
cfg = load_config(site_url='http://example.com/foo')
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertEqual(pg.url, 'testing/')
self.assertEqual(pg.abs_url, '/foo/testing/')
@@ -256,7 +271,7 @@ def test_page_canonical_url_nested_no_slash(self):
def test_predefined_page_title(self):
cfg = load_config()
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Page Title', fl, cfg)
pg.read_source(cfg)
self.assertEqual(pg.url, 'testing/')
@@ -280,7 +295,7 @@ def test_predefined_page_title(self):
def test_page_title_from_markdown(self):
cfg = load_config()
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page(None, fl, cfg)
pg.read_source(cfg)
self.assertEqual(pg.url, 'testing/')
@@ -380,8 +395,8 @@ def test_page_title_from_markdown_preserved_attr_list(self, docs_dir):
self.assertEqual(pg.title, 'Welcome to MkDocs Attr { #welcome }')
def test_page_title_from_meta(self):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fl = File('metadata.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR)
+ fl = File('metadata.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page(None, fl, cfg)
pg.read_source(cfg)
self.assertEqual(pg.url, 'metadata/')
@@ -406,8 +421,8 @@ def test_page_title_from_meta(self):
self.assertEqual(pg.title, 'A Page Title')
def test_page_title_from_filename(self):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fl = File('page-title.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR)
+ fl = File('page-title.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page(None, fl, cfg)
pg.read_source(cfg)
self.assertEqual(pg.url, 'page-title/')
@@ -431,8 +446,8 @@ def test_page_title_from_filename(self):
self.assertEqual(pg.title, 'Page title')
def test_page_title_from_capitalized_filename(self):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fl = File('pageTitle.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR)
+ fl = File('pageTitle.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page(None, fl, cfg)
pg.read_source(cfg)
self.assertEqual(pg.url, 'pageTitle/')
@@ -454,8 +469,8 @@ def test_page_title_from_capitalized_filename(self):
self.assertEqual(pg.title, 'pageTitle')
def test_page_title_from_homepage_filename(self):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fl = File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ cfg = load_config(docs_dir=DOCS_DIR)
+ fl = File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page(None, fl, cfg)
pg.read_source(cfg)
self.assertEqual(pg.url, '')
@@ -479,14 +494,14 @@ def test_page_title_from_homepage_filename(self):
def test_page_eq(self):
cfg = load_config()
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertTrue(pg == Page('Foo', fl, cfg))
def test_page_ne(self):
cfg = load_config()
- f1 = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
- f2 = File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ f1 = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
+ f2 = File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', f1, cfg)
# Different Title
self.assertTrue(pg != Page('Bar', f1, cfg))
@@ -497,7 +512,7 @@ def test_page_ne(self):
def test_BOM(self, docs_dir):
md_src = '# An UTF-8 encoded file with a BOM'
cfg = load_config(docs_dir=docs_dir)
- fl = File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('index.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page(None, fl, cfg)
# Create an UTF-8 Encoded file with BOM (as Microsoft editors do). See #1186
with open(fl.abs_src_path, 'w', encoding='utf-8-sig') as f:
@@ -632,7 +647,7 @@ def test_page_edit_url(
edit_url_key = f'edit_url{i}' if i > 1 else 'edit_url'
with self.subTest(case['config'], path=path):
cfg = load_config(**case['config'])
- fl = File(path, cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File(path, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertEqual(pg.url, paths[path])
self.assertEqual(pg.edit_url, case[edit_url_key])
@@ -655,9 +670,7 @@ def test_page_edit_url_warning(self):
with self.subTest(case['config']):
with self.assertLogs('mkdocs') as cm:
cfg = load_config(**case['config'])
- fl = File(
- 'testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']
- )
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertEqual(pg.url, 'testing/')
self.assertEqual(pg.edit_url, case['edit_url'])
@@ -665,7 +678,7 @@ def test_page_edit_url_warning(self):
def test_page_render(self):
cfg = load_config()
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
pg.read_source(cfg)
self.assertEqual(pg.content, None)
@@ -687,7 +700,7 @@ def test_page_render(self):
def test_missing_page(self):
cfg = load_config()
- fl = File('missing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('missing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
with self.assertLogs('mkdocs') as cm:
with self.assertRaises(OSError):
@@ -704,7 +717,7 @@ def setUp(self):
def test_source_date_epoch(self):
cfg = load_config()
- fl = File('testing.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
+ fl = File('testing.md', cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls)
pg = Page('Foo', fl, cfg)
self.assertEqual(pg.update_date, '1970-01-01')
@@ -716,180 +729,503 @@ def tearDown(self):
class RelativePathExtensionTests(unittest.TestCase):
- DOCS_DIR = os.path.join(
- os.path.abspath(os.path.dirname(__file__)), '../integration/subpages/docs'
- )
-
- def get_rendered_result(self, files):
- cfg = load_config(docs_dir=self.DOCS_DIR)
- fs = [File(f, cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']) for f in files]
+ def get_rendered_result(
+ self, *, content: str, files: list[str], logs: str = '', **kwargs
+ ) -> str:
+ cfg = load_config(docs_dir=DOCS_DIR, **kwargs)
+ fs = [File(f, cfg.docs_dir, cfg.site_dir, cfg.use_directory_urls) for f in files]
pg = Page('Foo', fs[0], cfg)
- pg.read_source(cfg)
- pg.render(cfg, Files(fs))
- return pg.content
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](non-index.md)'))
+ with mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data=content)):
+ pg.read_source(cfg)
+ if logs:
+ with self.assertLogs('mkdocs.structure.pages') as cm:
+ pg.render(cfg, Files(fs))
+ msgs = [f'{r.levelname}:{r.message}' for r in cm.records]
+ self.assertEqual('\n'.join(msgs), textwrap.dedent(logs).strip('\n'))
+ elif sys.version_info >= (3, 10):
+ with self.assertNoLogs('mkdocs.structure.pages'):
+ pg.render(cfg, Files(fs))
+ else:
+ pg.render(cfg, Files(fs))
+
+ assert pg.content is not None
+ content = pg.content
+ if content.startswith('<p>') and content.endswith('</p>'):
+ content = content[3:-4]
+ return content
+
def test_relative_html_link(self):
self.assertEqual(
- self.get_rendered_result(['index.md', 'non-index.md']),
- '<p><a href="non-index/">link</a></p>', # No trailing /
+ self.get_rendered_result(
+ content='[link](non-index.md)', files=['index.md', 'non-index.md']
+ ),
+ '<a href="non-index/">link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='[link](non-index.md)',
+ files=['index.md', 'non-index.md'],
+ ),
+ '<a href="non-index.html">link</a>',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](index.md)'))
def test_relative_html_link_index(self):
self.assertEqual(
- self.get_rendered_result(['non-index.md', 'index.md']),
- '<p><a href="../">link</a></p>',
+ self.get_rendered_result(
+ content='[link](index.md)', files=['non-index.md', 'index.md']
+ ),
+ '<a href="../">link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='[link](index.md)',
+ files=['non-index.md', 'index.md'],
+ ),
+ '<a href="index.html">link</a>',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](sub2/index.md)'))
def test_relative_html_link_sub_index(self):
self.assertEqual(
- self.get_rendered_result(['index.md', 'sub2/index.md']),
- '<p><a href="sub2/">link</a></p>', # No trailing /
+ self.get_rendered_result(
+ content='[link](sub2/index.md)', files=['index.md', 'sub2/index.md']
+ ),
+ '<a href="sub2/">link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='[link](sub2/index.md)',
+ files=['index.md', 'sub2/index.md'],
+ ),
+ '<a href="sub2/index.html">link</a>',
)
- @mock.patch(
- 'mkdocs.structure.pages.open', mock.mock_open(read_data='[link](sub2/non-index.md)')
- )
def test_relative_html_link_sub_page(self):
self.assertEqual(
- self.get_rendered_result(['index.md', 'sub2/non-index.md']),
- '<p><a href="sub2/non-index/">link</a></p>', # No trailing /
+ self.get_rendered_result(
+ content='[link](sub2/non-index.md)', files=['index.md', 'sub2/non-index.md']
+ ),
+ '<a href="sub2/non-index/">link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='[link](sub2/non-index.md)',
+ files=['index.md', 'sub2/non-index.md'],
+ ),
+ '<a href="sub2/non-index.html">link</a>',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](file%20name.md)'))
def test_relative_html_link_with_encoded_space(self):
self.assertEqual(
- self.get_rendered_result(['index.md', 'file name.md']),
- '<p><a href="file%20name/">link</a></p>',
+ self.get_rendered_result(
+ content='[link](file%20name.md)', files=['index.md', 'file name.md']
+ ),
+ '<a href="file%20name/">link</a>',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](file name.md)'))
def test_relative_html_link_with_unencoded_space(self):
self.assertEqual(
- self.get_rendered_result(['index.md', 'file name.md']),
- '<p><a href="file%20name/">link</a></p>',
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='[link](file name.md)',
+ files=['index.md', 'file name.md'],
+ ),
+ '<a href="file%20name.html">link</a>',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](../index.md)'))
def test_relative_html_link_parent_index(self):
self.assertEqual(
- self.get_rendered_result(['sub2/non-index.md', 'index.md']),
- '<p><a href="../../">link</a></p>',
+ self.get_rendered_result(
+ content='[link](../index.md)', files=['sub2/non-index.md', 'index.md']
+ ),
+ '<a href="../../">link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='[link](../index.md)',
+ files=['sub2/non-index.md', 'index.md'],
+ ),
+ '<a href="../index.html">link</a>',
)
- @mock.patch(
- 'mkdocs.structure.pages.open', mock.mock_open(read_data='[link](non-index.md#hash)')
- )
def test_relative_html_link_hash(self):
self.assertEqual(
- self.get_rendered_result(['index.md', 'non-index.md']),
- '<p><a href="non-index/#hash">link</a></p>',
+ self.get_rendered_result(
+ content='[link](non-index.md#hash)', files=['index.md', 'non-index.md']
+ ),
+ '<a href="non-index/#hash">link</a>',
)
- @mock.patch(
- 'mkdocs.structure.pages.open', mock.mock_open(read_data='[link](sub2/index.md#hash)')
- )
def test_relative_html_link_sub_index_hash(self):
self.assertEqual(
- self.get_rendered_result(['index.md', 'sub2/index.md']),
- '<p><a href="sub2/#hash">link</a></p>',
+ self.get_rendered_result(
+ content='[link](sub2/index.md#hash)', files=['index.md', 'sub2/index.md']
+ ),
+ '<a href="sub2/#hash">link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='[link](sub2/index.md#hash)',
+ files=['index.md', 'sub2/index.md'],
+ ),
+ '<a href="sub2/index.html#hash">link</a>',
)
- @mock.patch(
- 'mkdocs.structure.pages.open', mock.mock_open(read_data='[link](sub2/non-index.md#hash)')
- )
def test_relative_html_link_sub_page_hash(self):
self.assertEqual(
- self.get_rendered_result(['index.md', 'sub2/non-index.md']),
- '<p><a href="sub2/non-index/#hash">link</a></p>',
+ self.get_rendered_result(
+ content='[link](sub2/non-index.md#hash)', files=['index.md', 'sub2/non-index.md']
+ ),
+ '<a href="sub2/non-index/#hash">link</a>',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](#hash)'))
def test_relative_html_link_hash_only(self):
- self.assertEqual(
- self.get_rendered_result(['index.md']),
- '<p><a href="#hash">link</a></p>',
- )
+ for use_directory_urls in True, False:
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=use_directory_urls,
+ content='[link](#hash)',
+ files=['index.md'],
+ ),
+ '<a href="#hash">link</a>',
+ )
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data=''))
def test_relative_image_link_from_homepage(self):
- self.assertEqual(
- self.get_rendered_result(['index.md', 'image.png']),
- '<p><img alt="image" src="image.png" /></p>', # no opening ./
- )
+ for use_directory_urls in True, False:
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=use_directory_urls,
+ content='',
+ files=['index.md', 'image.png'],
+ ),
+ '<img alt="image" src="image.png" />', # no opening ./
+ )
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data=''))
def test_relative_image_link_from_subpage(self):
self.assertEqual(
- self.get_rendered_result(['sub2/non-index.md', 'image.png']),
- '<p><img alt="image" src="../../image.png" /></p>',
+ self.get_rendered_result(
+ content='', files=['sub2/non-index.md', 'image.png']
+ ),
+ '<img alt="image" src="../../image.png" />',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data=''))
def test_relative_image_link_from_sibling(self):
self.assertEqual(
- self.get_rendered_result(['non-index.md', 'image.png']),
- '<p><img alt="image" src="../image.png" /></p>',
+ self.get_rendered_result(
+ content='', files=['non-index.md', 'image.png']
+ ),
+ '<img alt="image" src="../image.png" />',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='',
+ files=['non-index.md', 'image.png'],
+ ),
+ '<img alt="image" src="image.png" />',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='*__not__ a link*.'))
def test_no_links(self):
self.assertEqual(
- self.get_rendered_result(['index.md']),
- '<p><em><strong>not</strong> a link</em>.</p>',
+ self.get_rendered_result(content='*__not__ a link*.', files=['index.md']),
+ '<em><strong>not</strong> a link</em>.',
)
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](non-existent.md)'))
- def test_bad_relative_html_link(self):
- with self.assertLogs('mkdocs') as cm:
- self.assertEqual(
- self.get_rendered_result(['index.md']),
- '<p><a href="non-existent.md">link</a></p>',
- )
+ def test_bad_relative_doc_link(self):
self.assertEqual(
- '\n'.join(cm.output),
- "WARNING:mkdocs.structure.pages:Documentation file 'index.md' contains a link "
- "to 'non-existent.md' which is not found in the documentation files.",
+ self.get_rendered_result(
+ content='[link](non-existent.md)',
+ files=['index.md'],
+ logs="WARNING:Doc file 'index.md' contains a relative link 'non-existent.md', but the target is not found among documentation files.",
+ ),
+ '<a href="non-existent.md">link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(not_found='info')),
+ content='[link](../non-existent.md)',
+ files=['sub/index.md'],
+ logs="INFO:Doc file 'sub/index.md' contains a relative link '../non-existent.md', but the target 'non-existent.md' is not found among documentation files.",
+ ),
+ '<a href="../non-existent.md">link</a>',
+ )
+
+ def test_relative_slash_link_with_suggestion(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ content='[link](../about/)',
+ files=['foo/index.md', 'about.md'],
+ logs="INFO:Doc file 'foo/index.md' contains an unrecognized relative link '../about/', it was left as is. Did you mean '../about.md'?",
+ ),
+ '<a href="../about/">link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(unrecognized_links='warn')),
+ content='[link](../#example)',
+ files=['foo/bar.md', 'index.md'],
+ logs="WARNING:Doc file 'foo/bar.md' contains an unrecognized relative link '../#example', it was left as is. Did you mean '../index.md#example'?",
+ ),
+ '<a href="../#example">link</a>',
+ )
+
+ def test_self_anchor_link_with_suggestion(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ content='[link](./#test)',
+ files=['index.md'],
+ logs="INFO:Doc file 'index.md' contains an unrecognized relative link './#test', it was left as is. Did you mean '#test'?",
+ ),
+ '<a href="./#test">link</a>',
)
- @mock.patch(
- 'mkdocs.structure.pages.open',
- mock.mock_open(read_data='[external](http://example.com/index.md)'),
- )
def test_external_link(self):
self.assertEqual(
- self.get_rendered_result(['index.md']),
- '<p><a href="http://example.com/index.md">external</a></p>',
+ self.get_rendered_result(
+ content='[external](http://example.com/index.md)', files=['index.md']
+ ),
+ '<a href="http://example.com/index.md">external</a>',
+ )
+
+ def test_absolute_link_with_suggestion(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ content='[absolute link](/path/to/file.md)',
+ files=['index.md', 'path/to/file.md'],
+ logs="INFO:Doc file 'index.md' contains an absolute link '/path/to/file.md', it was left as is. Did you mean 'path/to/file.md'?",
+ ),
+ '<a href="/path/to/file.md">absolute link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=False,
+ content='[absolute link](/path/to/file/)',
+ files=['path/index.md', 'path/to/file.md'],
+ logs="INFO:Doc file 'path/index.md' contains an absolute link '/path/to/file/', it was left as is.",
+ ),
+ '<a href="/path/to/file/">absolute link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ content='[absolute link](/path/to/file)',
+ files=['path/index.md', 'path/to/file.md'],
+ logs="INFO:Doc file 'path/index.md' contains an absolute link '/path/to/file', it was left as is. Did you mean 'to/file.md'?",
+ ),
+ '<a href="/path/to/file">absolute link</a>',
)
- @mock.patch(
- 'mkdocs.structure.pages.open', mock.mock_open(read_data='[absolute link](/path/to/file.md)')
- )
def test_absolute_link(self):
self.assertEqual(
- self.get_rendered_result(['index.md']),
- '<p><a href="/path/to/file.md">absolute link</a></p>',
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='warn')),
+ content='[absolute link](/path/to/file.md)',
+ files=['index.md'],
+ logs="WARNING:Doc file 'index.md' contains an absolute link '/path/to/file.md', it was left as is.",
+ ),
+ '<a href="/path/to/file.md">absolute link</a>',
+ )
+ self.assertEqual(
+ self.get_rendered_result(
+ validation=dict(links=dict(absolute_links='ignore')),
+ content='[absolute link](/path/to/file.md)',
+ files=['index.md'],
+ ),
+ '<a href="/path/to/file.md">absolute link</a>',
)
- @mock.patch(
- 'mkdocs.structure.pages.open',
- mock.mock_open(read_data='[absolute local path](\\image.png)'),
- )
- def test_absolute_win_local_path(self):
+ def test_image_link_with_suggestion(self):
self.assertEqual(
- self.get_rendered_result(['index.md']),
- '<p><a href="\\image.png">absolute local path</a></p>',
+ self.get_rendered_result(
+ content='',
+ files=['foo/bar.md', 'foo/image.png'],
+ logs="WARNING:Doc file 'foo/bar.md' contains a relative link '../image.png', but the target 'image.png' is not found among documentation files. Did you mean 'image.png'?",
+ ),
+ '<img alt="image" src="../image.png" />',
)
+ self.assertEqual(
+ self.get_rendered_result(
+ content='',
+ files=['foo/bar.md', 'image.png'],
+ logs="INFO:Doc file 'foo/bar.md' contains an absolute link '/image.png', it was left as is. Did you mean '../image.png'?",
+ ),
+ '<img alt="image" src="/image.png" />',
+ )
+
+ def test_absolute_win_local_path(self):
+ for use_directory_urls in True, False:
+ self.assertEqual(
+ self.get_rendered_result(
+ use_directory_urls=use_directory_urls,
+ content='[absolute local path](\\image.png)',
+ files=['index.md'],
+ logs="INFO:Doc file 'index.md' contains an absolute link '\\image.png', it was left as is.",
+ ),
+ '<a href="\\image.png">absolute local path</a>',
+ )
- @mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='<[email protected]>'))
def test_email_link(self):
self.assertEqual(
- self.get_rendered_result(['index.md']),
+ self.get_rendered_result(content='<[email protected]>', files=['index.md']),
# Markdown's default behavior is to obscure email addresses by entity-encoding them.
- # The following is equivalent to: '<p><a href="mailto:[email protected]">[email protected]</a></p>'
- '<p><a href="mailto:mail@e'
+ # The following is equivalent to: '<a href="mailto:[email protected]">[email protected]</a>'
+ '<a href="mailto:mail@e'
'xample.com">mail@'
- 'example.com</a></p>',
+ 'example.com</a>',
+ )
+
+ def test_invalid_email_link(self):
+ self.assertEqual(
+ self.get_rendered_result(
+ content='[contact]([email protected])',
+ files=['index.md'],
+ logs="WARNING:Doc file 'index.md' contains a relative link '[email protected]', but the target is not found among documentation files. Did you mean 'mailto:[email protected]'?",
+ ),
+ '<a href="[email protected]">contact</a>',
+ )
+
+ def test_possible_target_uris(self):
+ def test(paths, expected='', exp_true=None, exp_false=None):
+ """Test that `possible_target_uris` yields expected values, for use_directory_urls = true and false"""
+ for use_directory_urls, expected in (
+ (True, exp_true or expected),
+ (False, exp_false or expected),
+ ):
+ with self.subTest(paths, use_directory_urls=use_directory_urls):
+ src_path, dest_path = paths
+ f = File(src_path, '', '', use_directory_urls)
+ actual = _RelativePathTreeprocessor._possible_target_uris(
+ f, dest_path, use_directory_urls
+ )
+ self.assertEqual(list(actual), expected.split(', '))
+
+ test(('index.md', 'index.md'), expected='index.md')
+ test(('index.md', 'foo/bar.md'), expected='foo/bar.md')
+ test(
+ ('index.md', 'foo/bar'),
+ expected='foo/bar, foo/bar/index.md, foo/bar/README.md, foo/bar.md',
+ )
+
+ test(('index.md', 'foo/bar.html'), expected='foo/bar.html, foo/bar.md')
+ test(
+ ('foo.md', 'foo/bar.html'),
+ exp_true='foo/bar.html, foo/bar.md, foo/foo/bar.html, foo/foo/bar.md',
+ exp_false='foo/bar.html, foo/bar.md',
+ )
+
+ test(('foo.md', 'index.md'), exp_true='index.md, foo/index.md', exp_false='index.md')
+ test(('foo.md', 'foo.md'), exp_true='foo.md, foo/foo.md', exp_false='foo.md')
+ test(('foo.md', 'bar.md'), exp_true='bar.md, foo/bar.md', exp_false='bar.md')
+ test(
+ ('foo.md', 'foo/bar.md'), exp_true='foo/bar.md, foo/foo/bar.md', exp_false='foo/bar.md'
+ )
+ test(
+ ('foo.md', 'foo'),
+ exp_true='foo, foo/index.md, foo/README.md, foo.md, foo/foo, foo/foo/index.md, foo/foo/README.md, foo/foo.md',
+ exp_false='foo, foo/index.md, foo/README.md, foo.md',
+ )
+ test(
+ ('foo.md', 'foo/bar'),
+ exp_true='foo/bar, foo/bar/index.md, foo/bar/README.md, foo/bar.md, foo/foo/bar, foo/foo/bar/index.md, foo/foo/bar/README.md, foo/foo/bar.md',
+ exp_false='foo/bar, foo/bar/index.md, foo/bar/README.md, foo/bar.md',
+ )
+ test(
+ ('foo.md', 'foo/bar/'),
+ exp_true='foo/bar, foo/bar/index.md, foo/bar/README.md, foo/bar.md, foo/foo/bar, foo/foo/bar/index.md, foo/foo/bar/README.md, foo/foo/bar.md',
+ exp_false='foo/bar, foo/bar/index.md, foo/bar/README.md',
+ )
+
+ test(
+ ('foo.md', 'foo.html'),
+ exp_true='foo.html, foo.md, foo/foo.html, foo/foo.md',
+ exp_false='foo.html, foo.md',
+ )
+ test(
+ ('foo.md', '../foo/'),
+ exp_true='../foo, foo, foo/index.md, foo/README.md, foo.md',
+ exp_false='../foo',
+ )
+ test(
+ ('foo.md', 'foo/'),
+ exp_true='foo, foo/index.md, foo/README.md, foo.md, foo/foo, foo/foo/index.md, foo/foo/README.md, foo/foo.md',
+ exp_false='foo, foo/index.md, foo/README.md',
+ )
+ test(('foo/index.md', 'index.md'), expected='foo/index.md')
+ test(('foo/index.md', 'foo/bar.html'), expected='foo/foo/bar.html, foo/foo/bar.md')
+ test(('foo/index.md', '../foo.html'), expected='foo.html, foo.md')
+ test(('foo/index.md', '../'), expected='., index.md, README.md')
+ test(
+ ('foo/bar.md', 'index.md'),
+ exp_true='foo/index.md, foo/bar/index.md',
+ exp_false='foo/index.md',
+ )
+ test(
+ ('foo/bar.md', 'foo.md'),
+ exp_true='foo/foo.md, foo/bar/foo.md',
+ exp_false='foo/foo.md',
+ )
+ test(
+ ('foo/bar.md', 'bar.md'),
+ exp_true='foo/bar.md, foo/bar/bar.md',
+ exp_false='foo/bar.md',
+ )
+ test(
+ ('foo/bar.md', 'foo/bar.md'),
+ exp_true='foo/foo/bar.md, foo/bar/foo/bar.md',
+ exp_false='foo/foo/bar.md',
+ )
+ test(
+ ('foo/bar.md', 'foo'),
+ exp_true='foo/foo, foo/foo/index.md, foo/foo/README.md, foo/foo.md, foo/bar/foo, foo/bar/foo/index.md, foo/bar/foo/README.md, foo/bar/foo.md',
+ exp_false='foo/foo, foo/foo/index.md, foo/foo/README.md, foo/foo.md',
+ )
+ test(
+ ('foo/bar.md', 'foo/bar'),
+ exp_true='foo/foo/bar, foo/foo/bar/index.md, foo/foo/bar/README.md, foo/foo/bar.md, foo/bar/foo/bar, foo/bar/foo/bar/index.md, foo/bar/foo/bar/README.md, foo/bar/foo/bar.md',
+ exp_false='foo/foo/bar, foo/foo/bar/index.md, foo/foo/bar/README.md, foo/foo/bar.md',
+ )
+ test(
+ ('foo/bar.md', 'foo.html'),
+ exp_true='foo/foo.html, foo/foo.md, foo/bar/foo.html, foo/bar/foo.md',
+ exp_false='foo/foo.html, foo/foo.md',
+ )
+ test(
+ ('foo/bar.md', 'foo/bar.html'),
+ exp_true='foo/foo/bar.html, foo/foo/bar.md, foo/bar/foo/bar.html, foo/bar/foo/bar.md',
+ exp_false='foo/foo/bar.html, foo/foo/bar.md',
+ )
+ test(
+ ('foo/bar.md', '../foo/bar.html'),
+ exp_true='foo/bar.html, foo/bar.md, foo/foo/bar.html, foo/foo/bar.md',
+ exp_false='foo/bar.html, foo/bar.md',
+ )
+ test(
+ ('foo/bar.md', '../foo'),
+ exp_true='foo, foo/index.md, foo/README.md, foo.md, foo/foo, foo/foo/index.md, foo/foo/README.md, foo/foo.md',
+ exp_false='foo, foo/index.md, foo/README.md, foo.md',
+ )
+ test(
+ ('foo/bar.md', '../'),
+ exp_true='., index.md, README.md, foo, foo/index.md, foo/README.md',
+ exp_false='., index.md, README.md',
+ )
+
+ for src in 'foo/bar.md', 'foo.md', 'foo/index.md':
+ test((src, '/foo'), expected='foo, foo/index.md, foo/README.md, foo.md')
+ test((src, '/foo/bar.md'), expected='foo/bar.md')
+ test((src, '/foo/bar.html'), expected='foo/bar.html, foo/bar.md')
+
+ for dest in '', '.', './':
+ test(('index.md', dest), expected='., index.md')
+ test(('foo/bar.md', dest), expected='foo, foo/bar.md')
+
+ test(
+ ('foo/bar.md', '../test.png'),
+ exp_true='test.png, test.png.md, foo/test.png, foo/test.png.md',
+ exp_false='test.png, test.png.md',
)
| Add ability to warn about pages existing in the docs directory but not included in the "nav" configuration
## Use case
A team uses a CI system and would like to ensure documentation quality never regresses.
To this end, the CI job has a step that runs `mkdocs build --strict` which reports a failure if building the documentation results in any warnings or errors.
However, it can still happen that someone will write new documentation but forget to include it in the `nav` configuration. And MkDocs will detect this and report it. Here is an example output:
```
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- README.md
- foo.md
```
## Feature request
Would it be possible to configure this INFO message to be a WARNING?
As a bonus, would it be possible to configure which files in the docs directory should be ignored by MkDocs completely?
| So, this used to be a warning, but was changed to an info message because we got complaints. I initially made it a warning for this very use case. Unfortunately, for users who want to have pages not included in the nav, this would mean they can't use `--strict`.
We could create a new setting, but we generally try to reduce the number of settings, not add more. From one viewpoint, the setting already exists in `--strict`, but as it turns out that is not granular enough to meet everyone's needs.
For reference, #1604 seems related in part.
As a workaround, is there any reason why you can't let MkDocs auto-generate the nav? That would ensure all pages are already included in the nav. There are other ways to [define page titles][1]. Or do you need to define a custom sort order (which can only be done in the `nav` config setting)?
[1]: https://www.mkdocs.org/user-guide/writing-your-docs/#meta-data
Could you do something like an even stronger strict mode if you have multiple strict flags? Much like how you can sometimes raise verbosity in some applications with multiple verbose flags `-vv`? I think mkdocs uses click, but I haven't checked if it supports such functionality, but I would hope it would as you can do this with `argparse`.
I considered that briefly, although I haven't given it much thought. And yes click supports it, IIRC. Perhaps something like, `--strict`: fail on warning and `--strict --strict`: fail on info? But there are some info messages that should never cause a failure. How do we differentiate between them? Or should be set a policy that those messages should be debug messages?
And how do we handle the matching config setting? Using `strict: 1` for `--strict` and `strict: 2` for `--strict --strict`? Or do we match the log levels with a string: `strict: warn` and `strict: info`?
I personally don't think it needs to be tied to **all** INFO or anything like that as some INFO is just INFO, but yeah, it could elevate some INFO to WARN level. For this reason, I don't think `strict: warn` and `strict: info` makes sense, as a user *may* expect that all INFO should be elevated to WARN, which doesn't make sense.
If you wanted some distinction, than you could tag some info with DEBUG instead of INFO if later it *could* be elevated to warn. I'm not sure how many levels of `strict` will be needed in the future (hopefully only two), but if one day you need a third level, you probably wouldn't want to tie `strict` to anything like `strict: debug` as you may only want to elevate certain items in a certain level. I'd probably just stick with something like `strict: 1` or `strict: 2` for `--strict` and `--strict --strict` respectively. That's just me though. If you wanted to communicate debug statements as part of some "strictness" level, you could include that in the debug output I guess.
It occurs to me that you are assuming that we do the following at each location where a warning is raised:
```python
if config['strict']:
raise error(msg)
else:
log.warning(msg)
```
But that is **not** what we do. We simply raise a warning. We then use a [`logging.filter`][1] to count all `warnings` and then, as the final step of `build`, we [raise an error][2] if count > 0. Using the same method, escalating any `info` messages, would escalate all `info` messages.
However, I suppose we could do something like the following at select locations in the code:
```python
if config['strict'] >= 2:
log.warning(msg)
else:
log.info(msg)
```
I just think that would be weird. Why are only some `info` messages escalated? Yet, there are some `info` messages that don't make sense as `debug` messages, but should never raise an error. Personally, I'm uncomfortable with the inconsistency.
[1]: https://github.com/mkdocs/mkdocs/blob/master/mkdocs/utils/__init__.py#L397
[2]: https://github.com/mkdocs/mkdocs/blob/master/mkdocs/commands/build.py#L303-L304
If inconsistency is a problem, you would have to have more granularity in how you log messages or group things in a way that makes more sense. I agree that raising all `info` doesn't make sense. I would argue that `info` should always just be `info` and not get raised at all. Which means you may need to place messages that can be raised in a category that makes sense.
Of course this is only a suggestion, and if it doesn't make sense due to how this project is architected, then that is okay too. I was mainly just trying to suggest a way to avoid a new config variable by extended the existing functionality in a way that **might** make sense for the project, but if it doesn't, then maybe some other option is more suitable.
Well, we are just using the logging lib's [logging levels][1], which are just integers. The lib fully supports [defining and using your own levels][2]. We could define a level between `warning` (`30`) and `info` (`20`) with a value of `25`. Not sure what to call it though.
[1]: https://docs.python.org/3/library/logging.html#levels
[2]: https://docs.python.org/3/library/logging.html#logging.addLevelName
`warn-level-2` 🤷♂️ . Not sure what would be best. I'm not sure if I have a suggestion that doesn't sound a little awkward, but maybe a little awkward is okay?
@waylan, @facelessuser, thanks for your quick response and such fruitful discussion!
##
> As a workaround, is there any reason why you can't let MkDocs auto-generate the nav? That would ensure all pages are already included in the nav. There are other ways to [define page titles](https://www.mkdocs.org/user-guide/writing-your-docs/#meta-data). Or do you need to define a custom sort order (which can only be done in the `nav` config setting)?
The problem is we have Markdown files pretty much unordered in a directory, i.e. we don't prefix them with numbers or similar, and use the `nav` option to bring them in order.
##
Regarding the proposed solutions to tackle this use case, I have a few thoughts.
Are there other `info` messages that one might consider a `warning`?
If not, would it not be simpler to just create a config option for this use case?
If yes, then perhaps the introduction of another logging level in between `info` and `warning` seems a sane approach. I would call it something like `warning-soft` since `warn-level-2` seems to imply this is something with a higher level than `warning` :slightly_smiling_face:.
Then `strict` could have two options, `warning` or `warning-soft` depending on whether one wants to treat `warning` messages as errors or `warning-soft` messages as errors.
Note that changing the `strict` setting to have this semantics implies that the user has some knowledge of the ordering/severity of logging messages. Is that ok?
In any case, we could probably solve it elegantly by explaining it in the documentation:
for example, _Setting `string` to `warning-soft` would treat all logging messages of severity `warning-soft` or above (i.e. `warning`, `error`) as error and return a non-zero exit code._
> `warn-level-2` seems to imply this is something with a higher level than `warning`
I agree. `warn-soft` is an interesting suggestion. Personally, I was thinking something like `semi-warning`, which is awful IMO. I'm certainly open to other suggestions in this regard.
Generally, introducing an esoteric logging level seems... off.
That said... consider 'notice' to be between 'info' and 'warning'?
https://en.wikipedia.org/wiki/Syslog#Severity_level
> We could define a level between `warning` (`30`) and `info` (`20`) with a value of `25`.
A log level between "warning" and "info" is "notice". See [RFC 3164 - The BSD syslog Protocol](https://tools.ietf.org/html/rfc3164#page-9).
---
@trel was a bit faster.
Excellent! `notice` it is--if we go that route.
What is the approach for a plugin that generates a Markdown file, which is also referenced in the "nav" section of `mkdocs.yml` ? Because I keep seeing this warning:
```
The following pages exist in the docs directory, but are not included in the "nav" configuration:
```
even though the events are ostensibly following correct means of adding the associated `File`
@cetra, please start a new [discussion][1] and ask your question there. While related to this issue, discussing your question will add a lot of noise to the discussion of the issue.
Also, please provide some information about how you are generating Markdown files. Which events are you using in your plugin?
[1]: https://github.com/mkdocs/mkdocs/discussions
Any update on this? Similarly, would love this feature in place for CI purposes.
I was also using `strict` under the assumption that it would error out in this situation, and would prefer if you reverted it to `warning` instead of `info`.
The redirect plugin creates pages that are not included in the nav. Setting the level back to warning would prevent every user of the redirect plugin to use `strict` :confused: That's probably not the only plugin doing that, and there are probably other reasons why a page could exist while not being referenced in the nav. So this feature definitely needs a way to skip checking specific files.
@pawamoy This particular aspect I think is actually not a concern at all. It's only about one-off setups that may exist. I.e. "I just want MkDocs to copy this file, why do I have to put it in nav"
> The redirect plugin creates pages that are not included in the nav.
It doesn't actually create *pages*, only files in the last stage of the build, so there's no warnings associated with it.
There's also a way for plugins to register a particular page to be excluded from warnings
https://github.com/oprypin/mkdocs-literate-nav/blob/0825f8a683a27c13e738b6d7dd2d7b6c962d2a48/mkdocs_literate_nav/plugin.py#L90-L93
Ah, true, my bad, I had the log because I was using a custom script and not mkdocs-redirects! Sorry! And thanks for the link, will check this out
I would be quite curious about how to trick mkdocs to not complain about "The following pages exist in the docs directory" for stuff that I need it there but I do not want to include it inside the navigation (they are included from other files).
* @ssbarnea https://github.com/mkdocs/mkdocs/issues/1888#issuecomment-1552154759
I would like to make many of the messages have configurable logging levels among `warn`, `info`, `ignore` (DEBUG).
Here's a survey of relevant logging messages and situations.
## File
* File exists in docs, missing from nav.
Defaults to `info`, in the future should default to `warn`.
Can also be granularly configured through `not_in_nav`.
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/structure/nav.py#L151-L153
* (serve) File built but will be excluded.
Maybe can be left non-configurable as `info`.
Caused by granular configuration of `exclude_docs`.
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/commands/build.py#L318-L321
## Nav
* Relative link to nonexistent doc.
Defaults to `warn`.
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/structure/nav.py#L167-L170
* (serve) Relative link to excluded doc.
Logging level is based on the above but capped to `info`
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/structure/nav.py#L193-L195
* `/` absolute link.
Defaults to `ignore`. In the future maybe should receive an option beyond logging - turn it into site-relative and apply the same checking as for relative links above.
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/structure/nav.py#L162-L164
* `http://` absolute link.
Just `ignore`. Not sure if this should be made configurable. Maybe check that it doesn't start with `site_url`, but how to express this?
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/structure/nav.py#L160
## Markdown
* Relative link to nonexistent doc
Defaults to `warn`.
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/structure/pages.py#L332-L334
* (serve) Relative link to excluded doc.
Logging level is based on the above but capped to `info`.
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/structure/pages.py#L338-L340
* Absolute links (both kinds).
Currently a message of any kind is missing, should get a configuration that parallels the nav configuration described above and should default to `ignore`.
https://github.com/mkdocs/mkdocs/blob/7b1bc92926029058c09ac86649fb51dd7758353b/mkdocs/structure/pages.py#L320
| 2023-07-02T16:54:55Z | 2023-07-09T14:04:38Z | ["test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_mkdocs_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_empty_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_watch_with_broken_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_script_tag (mkdocs.tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_page_title_from_setext_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_with_locale (mkdocs.tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_theme_precedence (mkdocs.tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_page_title_from_markdown_stripped_anchorlinks (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_normalize_url_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_git_and_shadowed (mkdocs.tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_markdown_extension_with_relative (mkdocs.tests.build_tests.BuildTests.test_markdown_extension_with_relative)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_file_name_with_custom_dest_uri (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_just_search (mkdocs.tests.get_deps_tests.TestGetDeps.test_just_search)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_plugins_adding_files_and_interacting (mkdocs.tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_dict_keys_and_ignores_env (mkdocs.tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_page_title_from_markdown_preserved_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_page_title_from_markdown_strip_formatting (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_page_title_from_markdown_stripped_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_recovers_from_build_error (mkdocs.tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_multi_theme (mkdocs.tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_conflicting_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_exclude_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_nonexistent (mkdocs.tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)"] | [] | ["test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_dict_of_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_sets_only_one_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_only_one_nested)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_unknown_key (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_js_async (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_int_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_all_keys_are_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_wrong_key_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_wrong_key_nested)", "test_exclude_pages_with_invalid_links (mkdocs.tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_string_not_a_dict_of_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_plugin_config_with_multiple_instances_and_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_sets_nested_and_not_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_and_not_nested)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_mjs (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_plugin_config_with_multiple_instances (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_wrong_type (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_unspecified (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_unspecified)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_warning (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_wrong_type_nested (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_wrong_type_nested)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_none_without_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_sets_nested_different (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_different)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_dict_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_sets_nested_not_dict (mkdocs.tests.config.config_options_tests.NestedSubConfigTest.test_sets_nested_not_dict)", "test_bad_relative_doc_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_doc_link)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_image_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_image_link_with_suggestion)", "test_possible_target_uris (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_possible_target_uris)", "test_invalid_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_invalid_email_link)", "test_self_anchor_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_self_anchor_link_with_suggestion)", "test_relative_slash_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_slash_link_with_suggestion)", "test_absolute_link_with_suggestion (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link_with_suggestion)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==3.7.1", "certifi==2023.5.7", "cffi==1.15.1", "click==8.1.4", "cryptography==41.0.1", "distlib==0.3.6", "editables==0.4", "filelock==3.12.2", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.17.3", "httpx==0.24.1", "hyperlink==21.0.0", "idna==3.4", "importlib-metadata==6.8.0", "jaraco-classes==3.3.0", "jeepney==0.8.0", "keyring==24.2.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==9.1.0", "packaging==23.1", "pathspec==0.11.1", "pexpect==4.8.0", "platformdirs==3.8.1", "pluggy==1.2.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.15.1", "pyperclip==1.8.2", "rich==13.4.2", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.0.post1", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.11.8", "trove-classifiers==2023.7.6", "userpath==1.8.0", "virtualenv==20.23.1", "wheel==0.44.0", "zipp==3.16.0"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3258 | 7b1bc92926029058c09ac86649fb51dd7758353b | diff --git a/docs/dev-guide/plugins.md b/docs/dev-guide/plugins.md
index 9fdc410f1c..705faf571b 100644
--- a/docs/dev-guide/plugins.md
+++ b/docs/dev-guide/plugins.md
@@ -110,7 +110,7 @@ class MyPlugin(mkdocs.plugins.BasePlugin):
> from mkdocs.config import base, config_options as c
>
> class _ValidationOptions(base.Config):
-> enable = c.Type(bool, default=True)
+> enabled = c.Type(bool, default=True)
> verbose = c.Type(bool, default=False)
> skip_checks = c.ListOfItems(c.Choice(('foo', 'bar', 'baz')), default=[])
>
@@ -130,7 +130,7 @@ class MyPlugin(mkdocs.plugins.BasePlugin):
> my_plugin:
> definition_file: configs/test.ini # relative to mkdocs.yml
> validation:
-> enable: !ENV [CI, false]
+> enabled: !ENV [CI, false]
> verbose: true
> skip_checks:
> - foo
diff --git a/docs/hooks.py b/docs/hooks.py
index 1ab58b88a6..34b556f17b 100644
--- a/docs/hooks.py
+++ b/docs/hooks.py
@@ -16,7 +16,7 @@ def _get_language_of_translation_file(path: Path) -> str:
def on_page_markdown(markdown: str, page: Page, config: MkDocsConfig, **kwargs):
if page.file.src_uri == 'user-guide/choosing-your-theme.md':
- here = Path(config.config_file_path or '').parent
+ here = Path(config.config_file_path).parent
def replacement(m: re.Match) -> str:
lines = []
diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index 73661dea8e..bfb025ead9 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -618,7 +618,7 @@ For example, to enable permalinks in the (included) `toc` extension, use:
```yaml
markdown_extensions:
- toc:
- permalink: True
+ permalink: true
```
Note that a colon (`:`) must follow the extension name (`toc`) and then on a new
@@ -629,7 +629,7 @@ defined on a separate line:
```yaml
markdown_extensions:
- toc:
- permalink: True
+ permalink: true
separator: "_"
```
@@ -641,10 +641,14 @@ for that extension:
markdown_extensions:
- smarty
- toc:
- permalink: True
+ permalink: true
- sane_lists
```
+> NOTE: **Dynamic config values.**
+>
+> To dynamically configure the extensions, you can get the config values from [environment variables](#environment-variables) or [obtain paths](#paths-relative-to-the-current-file-or-site) of the currently rendered Markdown file or the overall MkDocs site.
+
In the above examples, each extension is a list item (starts with a `-`). As an
alternative, key/value pairs can be used instead. However, in that case an empty
value must be provided for extensions for which no options are defined.
@@ -654,14 +658,14 @@ Therefore, the last example above could also be defined as follows:
markdown_extensions:
smarty: {}
toc:
- permalink: True
+ permalink: true
sane_lists: {}
```
This alternative syntax is required if you intend to override some options via
[inheritance].
-> NOTE: **See Also:**
+> NOTE: **More extensions.**
>
> The Python-Markdown documentation provides a [list of extensions][exts]
> which are available out-of-the-box. For a list of configuration options
@@ -896,7 +900,9 @@ plugins:
**default**: `full`
-## Environment Variables
+## Special YAML tags
+
+### Environment variables
In most cases, the value of a configuration option is set directly in the
configuration file. However, as an option, the value of a configuration option
@@ -933,6 +939,41 @@ cannot be defined within a single environment variable.
For more details, see the [pyyaml_env_tag](https://github.com/waylan/pyyaml-env-tag)
project.
+### Paths relative to the current file or site
+
+NEW: **New in version 1.5.**
+
+Some Markdown extensions can benefit from knowing the path of the Markdown file that's currently being processed, or just the root path of the current site. For that, the special tag `!relative` can be used in most contexts within the config file, though the only known usecases are within [`markdown_extensions`](#markdown_extensions).
+
+Examples of the possible values are:
+
+```yaml
+- !relative # Relative to the directory of the current Markdown file
+- !relative $docs_dir # Path of the docs_dir
+- !relative $config_dir # Path of the directory that contains the main mkdocs.yml
+- !relative $config_dir/some/child/dir # Some subdirectory of the root config directory
+```
+
+(Here, `$docs_dir` and `$config_dir` are currently the *only* special prefixes that are recognized.)
+
+Example:
+
+```yaml
+markdown_extensions:
+ - pymdownx.snippets:
+ base_path: !relative # Relative to the current Markdown file
+```
+
+This allows the [pymdownx.snippets] extension to include files relative to the current Markdown file, which without this tag it would have no way of knowing.
+
+> NOTE: Even for the default case, any extension's base path is technically the *current working directory* although the assumption is that it's the *directory of mkdocs.yml*. So even if you don't want the paths to be relative, to improve the default behavior, always prefer to use this idiom:
+>
+> ```yaml
+> markdown_extensions:
+> - pymdownx.snippets:
+> base_path: !relative $config_dir # Relative to the root directory with mkdocs.yml
+> ```
+
## Configuration Inheritance
Generally, a single file would hold the entire configuration for a site.
@@ -1077,3 +1118,4 @@ echo '{INHERIT: mkdocs.yml, site_name: "Renamed site"}' | mkdocs build -f -
[markdown_extensions]: #markdown_extensions
[nav]: #nav
[inheritance]: #configuration-inheritance
+[pymdownx.snippets]: https://facelessuser.github.io/pymdown-extensions/extensions/snippets/
diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
index c118737a78..4c2a3dabdf 100644
--- a/mkdocs/commands/build.py
+++ b/mkdocs/commands/build.py
@@ -154,6 +154,7 @@ def _build_extra_template(template_name: str, files: Files, config: MkDocsConfig
def _populate_page(page: Page, config: MkDocsConfig, files: Files, dirty: bool = False) -> None:
"""Read page content from docs_dir and render Markdown."""
+ config._current_page = page
try:
# When --dirty is used, only read the page if the file has been modified since the
# previous build of the output.
@@ -185,6 +186,8 @@ def _populate_page(page: Page, config: MkDocsConfig, files: Files, dirty: bool =
message += f" {e}"
log.error(message)
raise
+ finally:
+ config._current_page = None
def _build_page(
@@ -198,6 +201,7 @@ def _build_page(
) -> None:
"""Pass a Page to theme template and write output to site_dir."""
+ config._current_page = page
try:
# When --dirty is used, only build the page if the file has been modified since the
# previous build of the output.
@@ -238,8 +242,6 @@ def _build_page(
else:
log.info(f"Page skipped: '{page.file.src_uri}'. Generated empty output.")
- # Deactivate page
- page.active = False
except Exception as e:
message = f"Error building page '{page.file.src_uri}':"
# Prevent duplicated the error message because it will be printed immediately afterwards.
@@ -247,6 +249,10 @@ def _build_page(
message += f" {e}"
log.error(message)
raise
+ finally:
+ # Deactivate page
+ page.active = False
+ config._current_page = None
def build(
diff --git a/mkdocs/commands/gh_deploy.py b/mkdocs/commands/gh_deploy.py
index de5fb99b0d..f6e5fa05f1 100644
--- a/mkdocs/commands/gh_deploy.py
+++ b/mkdocs/commands/gh_deploy.py
@@ -116,7 +116,7 @@ def gh_deploy(
if message is None:
message = default_message
- sha = _get_current_sha(os.path.dirname(config.config_file_path or ''))
+ sha = _get_current_sha(os.path.dirname(config.config_file_path))
message = message.format(version=mkdocs.__version__, sha=sha)
log.info(
diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py
index 48095f9b35..1797e8153d 100644
--- a/mkdocs/commands/serve.py
+++ b/mkdocs/commands/serve.py
@@ -100,7 +100,8 @@ def error_handler(code) -> bytes | None:
if livereload:
# Watch the documentation files, the config file and the theme files.
server.watch(config.docs_dir)
- server.watch(config.config_file_path)
+ if config.config_file_path:
+ server.watch(config.config_file_path)
if watch_theme:
for d in config.theme.dirs:
diff --git a/mkdocs/config/base.py b/mkdocs/config/base.py
index dcbc6e233a..cee32e319e 100644
--- a/mkdocs/config/base.py
+++ b/mkdocs/config/base.py
@@ -21,8 +21,6 @@
overload,
)
-from yaml import YAMLError
-
from mkdocs import exceptions, utils
from mkdocs.utils import weak_property
@@ -133,7 +131,7 @@ class Config(UserDict):
"""
_schema: PlainConfigSchema
- config_file_path: str | None
+ config_file_path: str
def __init_subclass__(cls):
schema = dict(getattr(cls, '_schema', ()))
@@ -170,7 +168,7 @@ def __init__(self, config_file_path: str | bytes | None = None):
config_file_path = config_file_path.decode(encoding=sys.getfilesystemencoding())
except UnicodeDecodeError:
raise ValidationError("config_file_path is not a Unicode string.")
- self.config_file_path = config_file_path
+ self.config_file_path = config_file_path or ''
def set_defaults(self) -> None:
"""
@@ -257,13 +255,12 @@ def load_dict(self, patch: dict) -> None:
def load_file(self, config_file: IO) -> None:
"""Load config options from the open file descriptor of a YAML file."""
- try:
- return self.load_dict(utils.yaml_load(config_file))
- except YAMLError as e:
- # MkDocs knows and understands ConfigurationErrors
- raise exceptions.ConfigurationError(
- f"MkDocs encountered an error parsing the configuration file: {e}"
- )
+ warnings.warn(
+ "Config.load_file is not used since MkDocs 1.5 and will be removed soon. "
+ "Use MkDocsConfig.load_file instead",
+ DeprecationWarning,
+ )
+ return self.load_dict(utils.yaml_load(config_file))
@weak_property
def user_configs(self) -> Sequence[Mapping[str, Any]]:
@@ -344,7 +341,9 @@ def _open_config_file(config_file: str | IO | None) -> Iterator[IO]:
result_config_file.close()
-def load_config(config_file: str | IO | None = None, **kwargs) -> MkDocsConfig:
+def load_config(
+ config_file: str | IO | None = None, *, config_file_path: str | None = None, **kwargs
+) -> MkDocsConfig:
"""
Load the configuration for a given file object or name
@@ -366,7 +365,10 @@ def load_config(config_file: str | IO | None = None, **kwargs) -> MkDocsConfig:
# Initialize the config with the default schema.
from mkdocs.config.defaults import MkDocsConfig
- cfg = MkDocsConfig(config_file_path=getattr(fd, 'name', ''))
+ if config_file_path is None:
+ if fd is not sys.stdin.buffer:
+ config_file_path = getattr(fd, 'name', None)
+ cfg = MkDocsConfig(config_file_path=config_file_path)
# load the config file
cfg.load_file(fd)
diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index 23a113c01d..05994b03c1 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -708,7 +708,7 @@ class Dir(FilesystemObject):
class DocsDir(Dir):
def post_validation(self, config: Config, key_name: str):
- if config.config_file_path is None:
+ if not config.config_file_path:
return
# Validate that the dir is not the parent dir of the config file.
@@ -826,7 +826,7 @@ def run_validation(self, value: object) -> theme.Theme:
# Ensure custom_dir is an absolute path
if 'custom_dir' in theme_config and not os.path.isabs(theme_config['custom_dir']):
- config_dir = os.path.dirname(self.config_file_path or '')
+ config_dir = os.path.dirname(self.config_file_path)
theme_config['custom_dir'] = os.path.join(config_dir, theme_config['custom_dir'])
if 'custom_dir' in theme_config and not os.path.isdir(theme_config['custom_dir']):
diff --git a/mkdocs/config/defaults.py b/mkdocs/config/defaults.py
index 891ee710cf..1a76f1fa22 100644
--- a/mkdocs/config/defaults.py
+++ b/mkdocs/config/defaults.py
@@ -1,9 +1,11 @@
from __future__ import annotations
-from typing import Dict
+from typing import IO, Dict
+import mkdocs.structure.pages
from mkdocs.config import base
from mkdocs.config import config_options as c
+from mkdocs.utils.yaml import get_yaml_loader, yaml_load
def get_schema() -> base.PlainConfigSchema:
@@ -16,7 +18,7 @@ def get_schema() -> base.PlainConfigSchema:
class MkDocsConfig(base.Config):
"""The configuration of MkDocs itself (the root object of mkdocs.yml)."""
- config_file_path: str | None = c.Optional(c.Type(str)) # type: ignore[assignment]
+ config_file_path: str = c.Type(str) # type: ignore[assignment]
"""The path to the mkdocs.yml config file. Can't be populated from the config."""
site_name = c.Type(str)
@@ -137,7 +139,16 @@ class MkDocsConfig(base.Config):
watch = c.ListOfPaths(default=[])
"""A list of extra paths to watch while running `mkdocs serve`."""
+ _current_page: mkdocs.structure.pages.Page | None = None
+ """The currently rendered page. Please do not access this and instead
+ rely on the `page` argument to event handlers."""
+
def load_dict(self, patch: dict) -> None:
super().load_dict(patch)
if 'config_file_path' in patch:
raise base.ValidationError("Can't set config_file_path in config")
+
+ def load_file(self, config_file: IO) -> None:
+ """Load config options from the open file descriptor of a YAML file."""
+ loader = get_yaml_loader(config=self)
+ self.load_dict(yaml_load(config_file, loader))
diff --git a/mkdocs/utils/__init__.py b/mkdocs/utils/__init__.py
index 23ec3a0b4d..4787d8ca55 100644
--- a/mkdocs/utils/__init__.py
+++ b/mkdocs/utils/__init__.py
@@ -17,7 +17,7 @@
from collections import defaultdict
from datetime import datetime, timezone
from pathlib import PurePath
-from typing import IO, TYPE_CHECKING, Any, Collection, Iterable, MutableSequence, TypeVar
+from typing import TYPE_CHECKING, Collection, Iterable, MutableSequence, TypeVar
from urllib.parse import urlsplit
if sys.version_info >= (3, 10):
@@ -25,11 +25,8 @@
else:
from importlib_metadata import EntryPoint, entry_points
-import yaml
-from mergedeep import merge
-from yaml_env_tag import construct_env_tag
-
from mkdocs import exceptions
+from mkdocs.utils.yaml import get_yaml_loader, yaml_load # noqa - legacy re-export
if TYPE_CHECKING:
from mkdocs.structure.pages import Page
@@ -47,42 +44,6 @@
)
-def get_yaml_loader(loader=yaml.Loader):
- """Wrap PyYaml's loader so we can extend it to suit our needs."""
-
- class Loader(loader):
- """
- Define a custom loader derived from the global loader to leave the
- global loader unaltered.
- """
-
- # Attach Environment Variable constructor.
- # See https://github.com/waylan/pyyaml-env-tag
- Loader.add_constructor('!ENV', construct_env_tag)
-
- return Loader
-
-
-def yaml_load(source: IO | str, loader: type[yaml.BaseLoader] | None = None) -> dict[str, Any]:
- """Return dict of source YAML file using loader, recursively deep merging inherited parent."""
- Loader = loader or get_yaml_loader()
- result = yaml.load(source, Loader=Loader)
- if result is None:
- return {}
- if 'INHERIT' in result and not isinstance(source, str):
- relpath = result.pop('INHERIT')
- abspath = os.path.normpath(os.path.join(os.path.dirname(source.name), relpath))
- if not os.path.exists(abspath):
- raise exceptions.ConfigurationError(
- f"Inherited config file '{relpath}' does not exist at '{abspath}'."
- )
- log.debug(f"Loading inherited configuration file: {abspath}")
- with open(abspath, 'rb') as fd:
- parent = yaml_load(fd, Loader)
- result = merge(parent, result)
- return result
-
-
def modified_time(file_path):
warnings.warn(
"modified_time is never used in MkDocs and will be removed soon.", DeprecationWarning
diff --git a/mkdocs/utils/yaml.py b/mkdocs/utils/yaml.py
new file mode 100644
index 0000000000..40e1d301d6
--- /dev/null
+++ b/mkdocs/utils/yaml.py
@@ -0,0 +1,146 @@
+from __future__ import annotations
+
+import functools
+import logging
+import os
+import os.path
+from typing import IO, TYPE_CHECKING, Any
+
+import mergedeep
+import yaml
+import yaml.constructor
+import yaml_env_tag
+
+from mkdocs import exceptions
+
+if TYPE_CHECKING:
+ from mkdocs.config.defaults import MkDocsConfig
+
+log = logging.getLogger(__name__)
+
+
+def _construct_dir_placeholder(
+ config: MkDocsConfig, loader: yaml.BaseLoader, node: yaml.ScalarNode
+) -> _DirPlaceholder:
+ loader.construct_scalar(node)
+
+ value: str = (node and node.value) or ''
+ prefix, _, suffix = value.partition('/')
+ if prefix.startswith('$'):
+ if prefix == '$config_dir':
+ return ConfigDirPlaceholder(config, suffix)
+ elif prefix == '$docs_dir':
+ return DocsDirPlaceholder(config, suffix)
+ else:
+ raise exceptions.ConfigurationError(
+ f"Unknown prefix {prefix!r} in {node.tag} {node.value!r}"
+ )
+ else:
+ return RelativeDirPlaceholder(config, value)
+
+
+class _DirPlaceholder(os.PathLike):
+ def __init__(self, config: MkDocsConfig, suffix: str = ''):
+ self.config = config
+ self.suffix = suffix
+
+ def value(self) -> str:
+ raise NotImplementedError
+
+ def __fspath__(self) -> str:
+ """Can be used as a path."""
+ return os.path.join(self.value(), self.suffix)
+
+ def __str__(self) -> str:
+ """Can be converted to a string to obtain the current class."""
+ return self.__fspath__()
+
+
+class ConfigDirPlaceholder(_DirPlaceholder):
+ """A placeholder object that gets resolved to the directory of the config file when used as a path.
+
+ The suffix can be an additional sub-path that is always appended to this path.
+
+ This is the implementation of the `!relative $config_dir/suffix` tag, but can also be passed programmatically.
+ """
+
+ def value(self) -> str:
+ return os.path.dirname(self.config.config_file_path)
+
+
+class DocsDirPlaceholder(_DirPlaceholder):
+ """A placeholder object that gets resolved to the docs dir when used as a path.
+
+ The suffix can be an additional sub-path that is always appended to this path.
+
+ This is the implementation of the `!relative $docs_dir/suffix` tag, but can also be passed programmatically.
+ """
+
+ def value(self) -> str:
+ return self.config.docs_dir
+
+
+class RelativeDirPlaceholder(_DirPlaceholder):
+ """A placeholder object that gets resolved to the directory of the Markdown file currently being rendered.
+
+ This is the implementation of the `!relative` tag, but can also be passed programmatically.
+ """
+
+ def __init__(self, config: MkDocsConfig, suffix: str = ''):
+ if suffix:
+ raise exceptions.ConfigurationError(
+ f"'!relative' tag does not expect any value; received {suffix!r}"
+ )
+ super().__init__(config, suffix)
+
+ def value(self) -> str:
+ if self.config._current_page is None:
+ raise exceptions.ConfigurationError(
+ "The current file is not set for the '!relative' tag. "
+ "It cannot be used in this context; the intended usage is within `markdown_extensions`."
+ )
+ return os.path.dirname(self.config._current_page.file.abs_src_path)
+
+
+def get_yaml_loader(loader=yaml.Loader, config: MkDocsConfig | None = None):
+ """Wrap PyYaml's loader so we can extend it to suit our needs."""
+
+ class Loader(loader):
+ """
+ Define a custom loader derived from the global loader to leave the
+ global loader unaltered.
+ """
+
+ # Attach Environment Variable constructor.
+ # See https://github.com/waylan/pyyaml-env-tag
+ Loader.add_constructor('!ENV', yaml_env_tag.construct_env_tag)
+
+ if config is not None:
+ Loader.add_constructor('!relative', functools.partial(_construct_dir_placeholder, config))
+
+ return Loader
+
+
+def yaml_load(source: IO | str, loader: type[yaml.BaseLoader] | None = None) -> dict[str, Any]:
+ """Return dict of source YAML file using loader, recursively deep merging inherited parent."""
+ loader = loader or get_yaml_loader()
+ try:
+ result = yaml.load(source, Loader=loader)
+ except yaml.YAMLError as e:
+ raise exceptions.ConfigurationError(
+ f"MkDocs encountered an error parsing the configuration file: {e}"
+ )
+ if result is None:
+ return {}
+ if 'INHERIT' in result and not isinstance(source, str):
+ relpath = result.pop('INHERIT')
+ abspath = os.path.normpath(os.path.join(os.path.dirname(source.name), relpath))
+ if not os.path.exists(abspath):
+ raise exceptions.ConfigurationError(
+ f"Inherited config file '{relpath}' does not exist at '{abspath}'."
+ )
+ log.debug(f"Loading inherited configuration file: {abspath}")
+ with open(abspath, 'rb') as fd:
+ parent = yaml_load(fd, loader)
+ result = mergedeep.merge(parent, result)
+ return result
| diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index bc161fce87..24b2fa6c6a 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -2,13 +2,19 @@
from __future__ import annotations
import contextlib
+import io
+import os.path
+import re
import textwrap
import unittest
from pathlib import Path
from typing import TYPE_CHECKING
from unittest import mock
+import markdown.preprocessors
+
from mkdocs.commands import build
+from mkdocs.config import base
from mkdocs.exceptions import PluginError
from mkdocs.livereload import LiveReloadServer
from mkdocs.structure.files import File, Files
@@ -743,6 +749,61 @@ def on_files_2(files: Files, config: MkDocsConfig) -> None:
else:
self.assertPathExists(summary_path)
+ @tempdir(
+ files={
+ 'README.md': 'CONFIG_README\n',
+ 'docs/foo.md': 'ROOT_FOO\n',
+ 'docs/test/bar.md': 'TEST_BAR\n',
+ 'docs/main/foo.md': 'MAIN_FOO\n',
+ 'docs/main/main.md': (
+ '--8<-- "README.md"\n\n'
+ '--8<-- "foo.md"\n\n'
+ '--8<-- "test/bar.md"\n\n'
+ '--8<-- "../foo.md"\n\n'
+ ),
+ }
+ )
+ def test_markdown_extension_with_relative(self, config_dir):
+ for base_path, expected in {
+ '!relative': '''
+ <p>(Failed to read 'README.md')</p>
+ <p>MAIN_FOO</p>
+ <p>(Failed to read 'test/bar.md')</p>
+ <p>ROOT_FOO</p>''',
+ '!relative $docs_dir': '''
+ <p>(Failed to read 'README.md')</p>
+ <p>ROOT_FOO</p>
+ <p>TEST_BAR</p>
+ <p>(Failed to read '../foo.md')</p>''',
+ '!relative $config_dir/docs': '''
+ <p>(Failed to read 'README.md')</p>
+ <p>ROOT_FOO</p>
+ <p>TEST_BAR</p>
+ <p>(Failed to read '../foo.md')</p>''',
+ '!relative $config_dir': '''
+ <p>CONFIG_README</p>
+ <p>(Failed to read 'foo.md')</p>
+ <p>(Failed to read 'test/bar.md')</p>
+ <p>(Failed to read '../foo.md')</p>''',
+ }.items():
+ with self.subTest(base_path=base_path):
+ cfg = f'''
+ site_name: test
+ use_directory_urls: false
+ markdown_extensions:
+ - mkdocs.tests.build_tests:
+ base_path: {base_path}
+ '''
+ config = base.load_config(
+ io.StringIO(cfg), config_file_path=os.path.join(config_dir, 'mkdocs.yml')
+ )
+
+ with self._assert_build_logs(''):
+ build.build(config)
+ main_path = Path(config_dir, 'site', 'main', 'main.html')
+ self.assertTrue(main_path.is_file())
+ self.assertIn(textwrap.dedent(expected), main_path.read_text())
+
# Test build.site_directory_contains_stale_files
@tempdir(files=['index.html'])
@@ -752,3 +813,29 @@ def test_site_dir_contains_stale_files(self, site_dir):
@tempdir()
def test_not_site_dir_contains_stale_files(self, site_dir):
self.assertFalse(build.site_directory_contains_stale_files(site_dir))
+
+
+class _TestPreprocessor(markdown.preprocessors.Preprocessor):
+ def __init__(self, base_path: str) -> None:
+ self.base_path = base_path
+
+ def run(self, lines: list[str]) -> list[str]:
+ for i, line in enumerate(lines):
+ m = re.search(r'^--8<-- "(.+)"$', line)
+ if m:
+ try:
+ lines[i] = Path(self.base_path, m[1]).read_text()
+ except OSError:
+ lines[i] = f"(Failed to read {m[1]!r})\n"
+ return lines
+
+
+class _TestExtension(markdown.extensions.Extension):
+ def __init__(self, base_path: str) -> None:
+ self.base_path = base_path
+
+ def extendMarkdown(self, md: markdown.Markdown) -> None:
+ md.preprocessors.register(_TestPreprocessor(self.base_path), "mkdocs_test", priority=32)
+
+
+makeExtension = _TestExtension
| Support for relative base_path in markdown_extensions
Many extensions need to know the base path of the currently rendered Markdown file, as they are supposed to include assets relative to the markdown file. Two of them are:
- [markdown-include](https://github.com/cmacmackin/markdown-include)
- [pymdownx.snippets](https://facelessuser.github.io/pymdown-extensions/extensions/snippets/)
Both make use of the config variable `base_path` for including other files, so in order to configure it, you would specify:
```yaml
markdown_extensions:
- pymdownx.snippets:
base_path: docs
- markdown_include.include:
base_path: docs
```
# Currently
Please take a look at this [example repository](https://github.com/dersimn/mkdocs-snippets-issue).
```
|-- README.md
|-- docs
| |-- big_topic
| | |-- index.md
| | `-- more_important_code.c
| |-- index.md
| `-- smaller_topic
| |-- hello_world.c
| `-- index.md
`-- mkdocs.yml
```
Currently you would have to include the `*.c` files with their full path, so in both files you would have to write:
```
--8<-- "smaller_topic/hello_world.c"
```
```
--8<-- "big_topic/more_important_code.c"
```
# Why is this bad?
This is fine for Markdown files that are created and maintained for just one website, but we are currently including generic sub topics into our site that are shared among many repositories via `git submodule`. For e.g. some introduction topic on how to set up Docker. It's obvious that include paths must be relative to the Markdown file in this case, like:
```
--8<-- "hello_world.c"
```
```
--8<-- "more_important_code.c"
```
# Desirable solution
If we want to be able to specify relative paths in every Markdown file, the `base_path` variable need to change with every Markdown file to be rendered, so it can't simply be included in `mkdocs.yml`.
This makes my feature request different from #998 #777 #761, because I'm not able to alter the `.md` files as they are shared over multiple projects.
It would be nice if we could specify something like
```yaml
markdown_extensions:
- pymdownx.snippets:
base_path: $relative
- markdown_include.include:
base_path: $relative
- one of many other extensions that use exacly 'base_path' as variable:
base_path: $relative
```
that would then make MkDocs add the currently valid path as `base_path` variable for each rendered Markdown file.
This is an issue for the one who _calls_ the plugin, and not the plugin itself, as an additional (dynamic) `base_path` must be exchanged [at this point in code](https://github.com/mkdocs/mkdocs/blob/ff0b7260564e65b6547fd41753ec971e4237823b/mkdocs/structure/pages.py#L173):
```python
md = markdown.Markdown(
extensions=extensions,
extension_configs=config['mdx_configs'] or {}
)
```
Currently (with the upper config from my example), `extension_configs` would contain something in the structure of [this](https://python-markdown.github.io/reference/#extension_configs):
```python
extension_configs = {
'pymdownx.snippets': {
'base_path': '$relative'
},
'markdown_include.include': {
'base_path': '$relative'
}
}
```
We need to replace `$relative` here with the proper path depending on the current navigation.
[1]: https://facelessuser.github.io/pymdown-extensions/faq/#github-ish-configurations
| I just first time tried `pymdownx.snippets` and yeah, indeed, this would be an awesome feature. I'm still structuring my document tree and probably I have to change all those paths to snippets yet so many times...
Patched version of mkdocs: https://github.com/dersimn/mkdocs
..the change is quite small by the way: https://github.com/dersimn/mkdocs/compare/775d506c63d4b57553110ee56b8c1f94d336e1f7..HEAD#diff-81f285125d041f8ec1fca83e7d0a170b496aea52e8f288edf3fd9a4d5773bfa4
Demo repository + instructions: https://github.com/dersimn/mkdocs-snippets-issue
Hi, what's the status on this?
I don't think there was any progress. But I didn't know about this issue and I opened this discussion some time ago: https://github.com/mkdocs/mkdocs/discussions/2833
I actually very much like the idea of variables provided by MkDocs: `$docs_dir`, `$config_dir`, and whatever else is relevant. I don't care about the syntax: there might be a way to use env vars instead, if MkDocs itself exports them:
```yaml
markdown_extensions:
- pymdownx.snippets:
base_path: !ENV MKDOCS_CONFIG_DIR
```
Depending on the order of things, env vars might be impossible to use. This might need a post-process step where `$config_dir` and others are replaced with their values.
I think I'd like to make it work like this:
```yaml
markdown_extensions:
- pymdownx.snippets:
base_path:
- !relative # Relative to current.md
- !docs_dir # Relative to docs_dir
- !config_dir # Relative to mkdocs.yml
```
The issue is that indeed now we need some way to dig through the parsed YAML and find and replace the placeholders. There doesn't seem to be any standard way for that.
Alternatively for a solution that's much much cleaner on MkDocs side but worse on the extension side, the value would actually be dynamically computed, but then we'd require each destination extension to call `str(value)` on anything that expects these dynamic values.
Otherwise of course places like this one get an error
https://github.com/facelessuser/pymdown-extensions/blob/67b084e6d14cbfa0c6c457e14aeb0e007f67a91a/pymdownx/snippets.py#L161
`TypeError: stat: path should be string, bytes, os.PathLike or integer, not _YamlPlaceholder`
That gave me an idea- the value will respond not only to `__str__` but also to `__fspath__`, totally avoiding at least this class of errors. So this works seamlessly with current `pymdownx.snippets` with the example above.
Linked a pull request accordingly.
cc @facelessuser
@oprypin does this allow things like `!docs_dir/some/child/dir`?
No.
That's not a valid YAML tag syntax and I don't have good ideas how to make this work in a different way.
Hm actually... I suppose `!docs_dir some/child/dir` *is* valid YAML syntax
Maybe this idea would be better:
```yaml
- !relative # Relative to current.md
- !relative $docs_dir # Relative to docs_dir
- !relative $docs_dir/some/child/dir
- !relative $config_dir # Relative to mkdocs.yml
```
I find "relative" a bit confusing, but cannot find a better alternative. "path" would be too vague. "relpath" maybe too technical. In fact, relative-ness is not in question here since we use a variable ($docs_dir, $config_dir) which could return an absolute path for all we know. configpath? specialpath? dynamicpath? buildpath? docspath? mkdocspath?
Any other ideas? ¯\\\_(ツ)_/¯
Nope, just go with what you prefer :)
The other thing that's bugging me is this arbitrary `$` symbol that has no precedent in MkDocs configs so far. There would be some precedent for making it like `!relative {docs_dir}` but that's more confusing. | 2023-06-11T23:04:05Z | 2023-07-01T13:42:30Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_mkdocs_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_dict_of_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_watch_with_broken_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_script_tag (mkdocs.tests.utils.templates_tests.UtilsTemplatesTests.test_script_tag)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_bad_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_html_link)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_with_locale (mkdocs.tests.get_deps_tests.TestGetDeps.test_with_locale)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_int_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_all_keys_are_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_exclude_pages_with_invalid_links (mkdocs.tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_normalize_url_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_git_and_shadowed (mkdocs.tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_plugin_config_with_multiple_instances_and_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_file_name_with_custom_dest_uri (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_dict_keys_and_ignores_env (mkdocs.tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_plugin_config_with_multiple_instances (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_warning (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_warning)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_page_title_from_markdown_strip_formatting (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_page_title_from_markdown_stripped_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_recovers_from_build_error (mkdocs.tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_multi_theme (mkdocs.tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)", "test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_empty_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_unknown_key (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_unknown_key)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_js_async (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_js_async)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_page_title_from_setext_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_theme_precedence (mkdocs.tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_page_title_from_markdown_stripped_anchorlinks (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_string_not_a_dict_of_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_just_search (mkdocs.tests.get_deps_tests.TestGetDeps.test_just_search)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_plugins_adding_files_and_interacting (mkdocs.tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_mjs (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_mjs)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_wrong_type (mkdocs.tests.config.config_options_tests.ExtraScriptsTest.test_wrong_type)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_page_title_from_markdown_preserved_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_none_without_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_dict_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_conflicting_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_exclude_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_nonexistent (mkdocs.tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)"] | [] | ["test_markdown_extension_with_relative (mkdocs.tests.build_tests.BuildTests.test_markdown_extension_with_relative)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==3.7.0", "certifi==2023.5.7", "cffi==1.15.1", "click==8.1.3", "cryptography==41.0.1", "distlib==0.3.6", "editables==0.3", "filelock==3.12.2", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.17.2", "httpx==0.24.1", "hyperlink==21.0.0", "idna==3.4", "importlib-metadata==6.7.0", "jaraco-classes==3.2.3", "jeepney==0.8.0", "keyring==24.2.0", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==9.1.0", "packaging==23.1", "pathspec==0.11.1", "pexpect==4.8.0", "platformdirs==3.8.0", "pluggy==1.2.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.15.1", "pyperclip==1.8.2", "rich==13.4.2", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.0.post1", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.11.8", "trove-classifiers==2023.5.24", "userpath==1.8.0", "virtualenv==20.23.1", "wheel==0.44.0", "zipp==3.15.0"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3268 | 285461a3e7557a02b79d26839c629f276be79553 | diff --git a/docs/dev-guide/themes.md b/docs/dev-guide/themes.md
index 32496f0404..1ba3a021cc 100644
--- a/docs/dev-guide/themes.md
+++ b/docs/dev-guide/themes.md
@@ -408,7 +408,7 @@ on the homepage:
show_root_full_path: false
heading_level: 5
-::: mkdocs.structure.pages.Page.parent
+::: mkdocs.structure.StructureItem.parent
options:
show_root_full_path: false
heading_level: 5
@@ -479,7 +479,7 @@ The following attributes are available on `section` objects:
show_root_full_path: false
heading_level: 5
-::: mkdocs.structure.nav.Section.parent
+::: mkdocs.structure.StructureItem.parent
options:
show_root_full_path: false
heading_level: 5
@@ -533,7 +533,7 @@ The following attributes are available on `link` objects:
show_root_full_path: false
heading_level: 5
-::: mkdocs.structure.nav.Link.parent
+::: mkdocs.structure.StructureItem.parent
options:
show_root_full_path: false
heading_level: 5
@@ -633,7 +633,7 @@ and themes should account for this. It is recommended that theme templates wrap
search specific markup with a check for the plugin:
```django
-{% if 'search' in config['plugins'] %}
+{% if 'search' in config.plugins %}
search stuff here...
{% endif %}
```
diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index 1fb55c94ac..e50a76b0bd 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -1021,6 +1021,12 @@ Therefore, defining paths in a parent file which is inherited by multiple
different sites may not work as expected. It is generally best to define
path based options in the primary configuration file only.
+The inheritance can also be used as a quick way to override keys on the command line - by using stdin as the config file. For example:
+
+```bash
+echo '{INHERIT: mkdocs.yml, site_name: "Renamed site"}' | mkdocs build -f -
+```
+
[Theme Developer Guide]: ../dev-guide/themes.md
[pymdk-extensions]: https://python-markdown.github.io/extensions/
[pymkd]: https://python-markdown.github.io/
diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py
index be33aa712d..6c712b74ce 100644
--- a/mkdocs/__main__.py
+++ b/mkdocs/__main__.py
@@ -106,7 +106,9 @@ def __del__(self):
pass_state = click.make_pass_decorator(State, ensure=True)
clean_help = "Remove old files from the site_dir before building (the default)."
-config_help = "Provide a specific MkDocs config"
+config_help = (
+ "Provide a specific MkDocs config. This can be a file name, or '-' to read from stdin."
+)
dev_addr_help = "IP address and port to serve documentation locally (default: localhost:8000)"
strict_help = "Enable strict mode. This will cause MkDocs to abort the build on any warnings."
theme_help = "The theme to use when building your documentation."
@@ -255,11 +257,11 @@ def build_command(clean, **kwargs):
_enable_warnings()
cfg = config.load_config(**kwargs)
- cfg['plugins'].run_event('startup', command='build', dirty=not clean)
+ cfg.plugins.on_startup(command='build', dirty=not clean)
try:
build.build(cfg, dirty=not clean)
finally:
- cfg['plugins'].run_event('shutdown')
+ cfg.plugins.on_shutdown()
@cli.command(name="gh-deploy")
@@ -282,11 +284,11 @@ def gh_deploy_command(
_enable_warnings()
cfg = config.load_config(remote_branch=remote_branch, remote_name=remote_name, **kwargs)
- cfg['plugins'].run_event('startup', command='gh-deploy', dirty=not clean)
+ cfg.plugins.on_startup(command='gh-deploy', dirty=not clean)
try:
build.build(cfg, dirty=not clean)
finally:
- cfg['plugins'].run_event('shutdown')
+ cfg.plugins.on_shutdown()
gh_deploy.gh_deploy(
cfg,
message=message,
diff --git a/mkdocs/commands/build.py b/mkdocs/commands/build.py
index e3bc1b05d4..dcd2040f9c 100644
--- a/mkdocs/commands/build.py
+++ b/mkdocs/commands/build.py
@@ -67,7 +67,7 @@ def _build_template(
Return rendered output for given template as a string.
"""
# Run `pre_template` plugin events.
- template = config.plugins.run_event('pre_template', template, template_name=name, config=config)
+ template = config.plugins.on_pre_template(template, template_name=name, config=config)
if utils.is_error_template(name):
# Force absolute URLs in the nav of error pages and account for the
@@ -82,14 +82,12 @@ def _build_template(
context = get_context(nav, files, config, base_url=base_url)
# Run `template_context` plugin events.
- context = config.plugins.run_event(
- 'template_context', context, template_name=name, config=config
- )
+ context = config.plugins.on_template_context(context, template_name=name, config=config)
output = template.render(context)
# Run `post_template` plugin events.
- output = config.plugins.run_event('post_template', output, template_name=name, config=config)
+ output = config.plugins.on_post_template(output, template_name=name, config=config)
return output
@@ -161,20 +159,22 @@ def _populate_page(page: Page, config: MkDocsConfig, files: Files, dirty: bool =
return
# Run the `pre_page` plugin event
- page = config.plugins.run_event('pre_page', page, config=config, files=files)
+ page = config.plugins.on_pre_page(page, config=config, files=files)
page.read_source(config)
+ assert page.markdown is not None
# Run `page_markdown` plugin events.
- page.markdown = config.plugins.run_event(
- 'page_markdown', page.markdown, page=page, config=config, files=files
+ page.markdown = config.plugins.on_page_markdown(
+ page.markdown, page=page, config=config, files=files
)
page.render(config, files)
+ assert page.content is not None
# Run `page_content` plugin events.
- page.content = config.plugins.run_event(
- 'page_content', page.content, page=page, config=config, files=files
+ page.content = config.plugins.on_page_content(
+ page.content, page=page, config=config, files=files
)
except Exception as e:
message = f"Error reading page '{page.file.src_uri}':"
@@ -216,9 +216,7 @@ def _build_page(
template = env.get_template('main.html')
# Run `page_context` plugin events.
- context = config.plugins.run_event(
- 'page_context', context, page=page, config=config, nav=nav
- )
+ context = config.plugins.on_page_context(context, page=page, config=config, nav=nav)
if excluded:
page.content = (
@@ -231,7 +229,7 @@ def _build_page(
output = template.render(context)
# Run `post_page` plugin events.
- output = config.plugins.run_event('post_page', output, page=page, config=config)
+ output = config.plugins.on_post_page(output, page=page, config=config)
# Write the output file.
if output.strip():
@@ -271,10 +269,10 @@ def build(
start = time.monotonic()
# Run `config` plugin events.
- config = config.plugins.run_event('config', config)
+ config = config.plugins.on_config(config)
# Run `pre_build` plugin events.
- config.plugins.run_event('pre_build', config=config)
+ config.plugins.on_pre_build(config=config)
if not dirty:
log.info("Cleaning site directory")
@@ -298,14 +296,14 @@ def build(
files.add_files_from_theme(env, config)
# Run `files` plugin events.
- files = config.plugins.run_event('files', files, config=config)
+ files = config.plugins.on_files(files, config=config)
# If plugins have added files but haven't set their inclusion level, calculate it again.
_set_exclusions(files._files, config)
nav = get_navigation(files, config)
# Run `nav` plugin events.
- nav = config.plugins.run_event('nav', nav, config=config, files=files)
+ nav = config.plugins.on_nav(nav, config=config, files=files)
log.debug("Reading markdown pages.")
excluded = []
@@ -325,7 +323,7 @@ def build(
)
# Run `env` plugin events.
- env = config.plugins.run_event('env', env, config=config, files=files)
+ env = config.plugins.on_env(env, config=config, files=files)
# Start writing files to site_dir now that all data is gathered. Note that order matters. Files
# with lower precedence get written first so that files with higher precedence can overwrite them.
@@ -348,7 +346,7 @@ def build(
)
# Run `post_build` plugin events.
- config.plugins.run_event('post_build', config=config)
+ config.plugins.on_post_build(config=config)
counts = warning_counter.get_counts()
if counts:
@@ -359,7 +357,7 @@ def build(
except Exception as e:
# Run `build_error` plugin events.
- config.plugins.run_event('build_error', error=e)
+ config.plugins.on_build_error(error=e)
if isinstance(e, BuildError):
log.error(str(e))
raise Abort('Aborted with a BuildError!')
diff --git a/mkdocs/commands/gh_deploy.py b/mkdocs/commands/gh_deploy.py
index f6e5fa05f1..de5fb99b0d 100644
--- a/mkdocs/commands/gh_deploy.py
+++ b/mkdocs/commands/gh_deploy.py
@@ -116,7 +116,7 @@ def gh_deploy(
if message is None:
message = default_message
- sha = _get_current_sha(os.path.dirname(config.config_file_path))
+ sha = _get_current_sha(os.path.dirname(config.config_file_path or ''))
message = message.format(version=mkdocs.__version__, sha=sha)
log.info(
diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py
index 013f0120fd..48095f9b35 100644
--- a/mkdocs/commands/serve.py
+++ b/mkdocs/commands/serve.py
@@ -63,9 +63,7 @@ def mount_path(config: MkDocsConfig):
is_dirty = build_type == 'dirty'
config = get_config()
- config['plugins'].run_event(
- 'startup', command=('build' if is_clean else 'serve'), dirty=is_dirty
- )
+ config.plugins.on_startup(command=('build' if is_clean else 'serve'), dirty=is_dirty)
def builder(config: MkDocsConfig | None = None):
log.info("Building documentation...")
@@ -109,7 +107,7 @@ def error_handler(code) -> bytes | None:
server.watch(d)
# Run `serve` plugin events.
- server = config.plugins.run_event('serve', server, config=config, builder=builder)
+ server = config.plugins.on_serve(server, config=config, builder=builder)
for item in config.watch:
server.watch(item)
@@ -127,6 +125,6 @@ def error_handler(code) -> bytes | None:
# Avoid ugly, unhelpful traceback
raise Abort(f'{type(e).__name__}: {e}')
finally:
- config['plugins'].run_event('shutdown')
+ config.plugins.on_shutdown()
if isdir(site_dir):
shutil.rmtree(site_dir)
diff --git a/mkdocs/config/base.py b/mkdocs/config/base.py
index f4e8279e34..3d14d62126 100644
--- a/mkdocs/config/base.py
+++ b/mkdocs/config/base.py
@@ -331,7 +331,10 @@ def _open_config_file(config_file: str | IO | None) -> Iterator[IO]:
else:
log.debug(f"Loading configuration file: {result_config_file}")
# Ensure file descriptor is at beginning
- result_config_file.seek(0)
+ try:
+ result_config_file.seek(0)
+ except OSError:
+ pass
try:
yield result_config_file
diff --git a/mkdocs/config/config_options.py b/mkdocs/config/config_options.py
index fb8a912fc7..9a5ed70f2d 100644
--- a/mkdocs/config/config_options.py
+++ b/mkdocs/config/config_options.py
@@ -814,8 +814,7 @@ def run_validation(self, value: object) -> theme.Theme:
# Ensure custom_dir is an absolute path
if 'custom_dir' in theme_config and not os.path.isabs(theme_config['custom_dir']):
- assert self.config_file_path is not None
- config_dir = os.path.dirname(self.config_file_path)
+ config_dir = os.path.dirname(self.config_file_path or '')
theme_config['custom_dir'] = os.path.join(config_dir, theme_config['custom_dir'])
if 'custom_dir' in theme_config and not os.path.isdir(theme_config['custom_dir']):
diff --git a/mkdocs/config/defaults.py b/mkdocs/config/defaults.py
index ade08ff8dc..3a2d69d06f 100644
--- a/mkdocs/config/defaults.py
+++ b/mkdocs/config/defaults.py
@@ -16,8 +16,8 @@ def get_schema() -> base.PlainConfigSchema:
class MkDocsConfig(base.Config):
"""The configuration of MkDocs itself (the root object of mkdocs.yml)."""
- config_file_path: str = c.Optional(c.Type(str)) # type: ignore[assignment]
- """Reserved for internal use, stores the mkdocs.yml config file."""
+ config_file_path: str | None = c.Optional(c.Type(str)) # type: ignore[assignment]
+ """The path to the mkdocs.yml config file. Can't be populated from the config."""
site_name = c.Type(str)
"""The title to use for the documentation."""
@@ -136,3 +136,8 @@ class MkDocsConfig(base.Config):
watch = c.ListOfPaths(default=[])
"""A list of extra paths to watch while running `mkdocs serve`."""
+
+ def load_dict(self, patch: dict) -> None:
+ super().load_dict(patch)
+ if 'config_file_path' in patch:
+ raise base.ValidationError("Can't set config_file_path in config")
diff --git a/mkdocs/plugins.py b/mkdocs/plugins.py
index 2c8ecca044..308ca64087 100644
--- a/mkdocs/plugins.py
+++ b/mkdocs/plugins.py
@@ -153,7 +153,7 @@ def on_serve(
# Global events
- def on_config(self, config: MkDocsConfig) -> Config | None:
+ def on_config(self, config: MkDocsConfig) -> MkDocsConfig | None:
"""
The `config` event is the first event called on build and is run immediately
after the user configuration is loaded and validated. Any alterations to the
@@ -235,7 +235,7 @@ def on_post_build(self, *, config: MkDocsConfig) -> None:
config: global configuration object
"""
- def on_build_error(self, error: Exception) -> None:
+ def on_build_error(self, *, error: Exception) -> None:
"""
The `build_error` event is called after an exception of any kind
is caught by MkDocs during the build process.
@@ -481,7 +481,7 @@ def __setitem__(self, key: str, value: BasePlugin) -> None:
self._register_event(event_name[3:], method)
@overload
- def run_event(self, name: str, item: None = None, **kwargs) -> Any:
+ def run_event(self, name: str, **kwargs) -> Any:
...
@overload
@@ -511,6 +511,79 @@ def run_event(self, name: str, item=None, **kwargs):
item = result
return item
+ def on_startup(self, *, command: Literal['build', 'gh-deploy', 'serve'], dirty: bool) -> None:
+ return self.run_event('startup', command=command, dirty=dirty)
+
+ def on_shutdown(self) -> None:
+ return self.run_event('shutdown')
+
+ def on_serve(
+ self, server: LiveReloadServer, *, config: MkDocsConfig, builder: Callable
+ ) -> LiveReloadServer:
+ return self.run_event('serve', server, config=config, builder=builder)
+
+ def on_config(self, config: MkDocsConfig) -> MkDocsConfig:
+ return self.run_event('config', config)
+
+ def on_pre_build(self, *, config: MkDocsConfig) -> None:
+ return self.run_event('pre_build', config=config)
+
+ def on_files(self, files: Files, *, config: MkDocsConfig) -> Files:
+ return self.run_event('files', files, config=config)
+
+ def on_nav(self, nav: Navigation, *, config: MkDocsConfig, files: Files) -> Navigation:
+ return self.run_event('nav', nav, config=config, files=files)
+
+ def on_env(self, env: jinja2.Environment, *, config: MkDocsConfig, files: Files):
+ return self.run_event('env', env, config=config, files=files)
+
+ def on_post_build(self, *, config: MkDocsConfig) -> None:
+ return self.run_event('post_build', config=config)
+
+ def on_build_error(self, *, error: Exception) -> None:
+ return self.run_event('build_error', error=error)
+
+ def on_pre_template(
+ self, template: jinja2.Template, *, template_name: str, config: MkDocsConfig
+ ) -> jinja2.Template:
+ return self.run_event('pre_template', template, template_name=template_name, config=config)
+
+ def on_template_context(
+ self, context: dict[str, Any], *, template_name: str, config: MkDocsConfig
+ ) -> dict[str, Any]:
+ return self.run_event(
+ 'template_context', context, template_name=template_name, config=config
+ )
+
+ def on_post_template(
+ self, output_content: str, *, template_name: str, config: MkDocsConfig
+ ) -> str:
+ return self.run_event(
+ 'post_template', output_content, template_name=template_name, config=config
+ )
+
+ def on_pre_page(self, page: Page, *, config: MkDocsConfig, files: Files) -> Page:
+ return self.run_event('pre_page', page, config=config, files=files)
+
+ def on_page_read_source(self, *, page: Page, config: MkDocsConfig) -> str | None:
+ return self.run_event('page_read_source', page=page, config=config)
+
+ def on_page_markdown(
+ self, markdown: str, *, page: Page, config: MkDocsConfig, files: Files
+ ) -> str:
+ return self.run_event('page_markdown', markdown, page=page, config=config, files=files)
+
+ def on_page_content(self, html: str, *, page: Page, config: MkDocsConfig, files: Files) -> str:
+ return self.run_event('page_content', html, page=page, config=config, files=files)
+
+ def on_page_context(
+ self, context: dict[str, Any], *, page: Page, config: MkDocsConfig, nav: Navigation
+ ) -> dict[str, Any]:
+ return self.run_event('page_context', context, page=page, config=config, nav=nav)
+
+ def on_post_page(self, output: str, *, page: Page, config: MkDocsConfig) -> str:
+ return self.run_event('post_page', output, page=page, config=config)
+
class PrefixedLogger(logging.LoggerAdapter):
"""A logger adapter to prefix log messages."""
diff --git a/mkdocs/structure/__init__.py b/mkdocs/structure/__init__.py
index e69de29bb2..6935640577 100644
--- a/mkdocs/structure/__init__.py
+++ b/mkdocs/structure/__init__.py
@@ -0,0 +1,36 @@
+from __future__ import annotations
+
+import abc
+from typing import TYPE_CHECKING, Iterable
+
+if TYPE_CHECKING:
+ from mkdocs.structure.nav import Section
+
+
+class StructureItem(metaclass=abc.ABCMeta):
+ """An item in MkDocs structure - see concrete subclasses Section, Page or Link."""
+
+ @abc.abstractmethod
+ def __init__(self):
+ ...
+
+ parent: Section | None = None
+ """The immediate parent of the item in the site navigation. `None` if it's at the top level."""
+
+ @property
+ def is_top_level(self) -> bool:
+ return self.parent is None
+
+ title: str | None
+ is_section: bool = False
+ is_page: bool = False
+ is_link: bool = False
+
+ @property
+ def ancestors(self) -> Iterable[StructureItem]:
+ if self.parent is None:
+ return []
+ return [self.parent, *self.parent.ancestors]
+
+ def _indent_print(self, depth=0):
+ return (' ' * depth) + repr(self)
diff --git a/mkdocs/structure/files.py b/mkdocs/structure/files.py
index 49f7565aff..7b47f638a2 100644
--- a/mkdocs/structure/files.py
+++ b/mkdocs/structure/files.py
@@ -8,7 +8,7 @@
import shutil
import warnings
from pathlib import PurePath
-from typing import TYPE_CHECKING, Any, Callable, Iterable, Iterator, Mapping, Sequence
+from typing import TYPE_CHECKING, Callable, Iterable, Iterator, Sequence
from urllib.parse import quote as urlquote
import jinja2.environment
@@ -319,7 +319,7 @@ def is_css(self) -> bool:
_default_exclude = pathspec.gitignore.GitIgnoreSpec.from_lines(['.*', '/templates/'])
-def _set_exclusions(files: Iterable[File], config: MkDocsConfig | Mapping[str, Any]) -> None:
+def _set_exclusions(files: Iterable[File], config: MkDocsConfig) -> None:
"""Re-calculate which files are excluded, based on the patterns in the config."""
exclude: pathspec.gitignore.GitIgnoreSpec | None = config.get('exclude_docs')
exclude = _default_exclude + exclude if exclude else _default_exclude
@@ -335,7 +335,7 @@ def _set_exclusions(files: Iterable[File], config: MkDocsConfig | Mapping[str, A
file.inclusion = InclusionLevel.Included
-def get_files(config: MkDocsConfig | Mapping[str, Any]) -> Files:
+def get_files(config: MkDocsConfig) -> Files:
"""Walk the `docs_dir` and return a Files collection."""
files: list[File] = []
conflicting_files: list[tuple[File, File]] = []
diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
index 4e7b7dc3ec..f2aadd9fd5 100644
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -1,9 +1,10 @@
from __future__ import annotations
import logging
-from typing import TYPE_CHECKING, Any, Iterator, Mapping, TypeVar
+from typing import TYPE_CHECKING, Iterator, TypeVar
from urllib.parse import urlsplit
+from mkdocs.structure import StructureItem
from mkdocs.structure.pages import Page
from mkdocs.utils import nest_paths
@@ -16,7 +17,7 @@
class Navigation:
- def __init__(self, items: list[Page | Section | Link], pages: list[Page]) -> None:
+ def __init__(self, items: list, pages: list[Page]) -> None:
self.items = items # Nested List with full navigation of Sections, Pages, and Links.
self.pages = pages # Flat List of subset of Pages in nav, in order.
@@ -32,34 +33,30 @@ def __init__(self, items: list[Page | Section | Link], pages: list[Page]) -> Non
pages: list[Page]
"""A flat list of all [page][mkdocs.structure.pages.Page] objects contained in the navigation."""
- def __repr__(self):
+ def __str__(self) -> str:
return '\n'.join(item._indent_print() for item in self)
- def __iter__(self) -> Iterator[Page | Section | Link]:
+ def __iter__(self) -> Iterator:
return iter(self.items)
def __len__(self) -> int:
return len(self.items)
-class Section:
- def __init__(self, title: str, children: list[Page | Section | Link]) -> None:
+class Section(StructureItem):
+ def __init__(self, title: str, children: list[StructureItem]) -> None:
self.title = title
self.children = children
- self.parent = None
self.active = False
def __repr__(self):
- return f"Section(title='{self.title}')"
+ return f"Section(title={self.title!r})"
title: str
"""The title of the section."""
- parent: Section | None
- """The immediate parent of the section or `None` if the section is at the top level."""
-
- children: list[Page | Section | Link]
+ children: list[StructureItem]
"""An iterable of all child navigation objects. Children may include nested sections, pages and links."""
@property
@@ -87,28 +84,21 @@ def active(self, value: bool):
is_link: bool = False
"""Indicates that the navigation object is a "link" object. Always `False` for section objects."""
- @property
- def ancestors(self):
- if self.parent is None:
- return []
- return [self.parent] + self.parent.ancestors
-
- def _indent_print(self, depth=0):
- ret = ['{}{}'.format(' ' * depth, repr(self))]
+ def _indent_print(self, depth: int = 0):
+ ret = [super()._indent_print(depth)]
for item in self.children:
ret.append(item._indent_print(depth + 1))
return '\n'.join(ret)
-class Link:
+class Link(StructureItem):
def __init__(self, title: str, url: str):
self.title = title
self.url = url
- self.parent = None
def __repr__(self):
- title = f"'{self.title}'" if (self.title is not None) else '[blank]'
- return f"Link(title={title}, url='{self.url}')"
+ title = f"{self.title!r}" if self.title is not None else '[blank]'
+ return f"Link(title={title}, url={self.url!r})"
title: str
"""The title of the link. This would generally be used as the label of the link."""
@@ -117,9 +107,6 @@ def __repr__(self):
"""The URL that the link points to. The URL should always be an absolute URLs and
should not need to have `base_url` prepended."""
- parent: Section | None
- """The immediate parent of the link. `None` if the link is at the top level."""
-
children: None = None
"""Links do not contain children and the attribute is always `None`."""
@@ -135,17 +122,8 @@ def __repr__(self):
is_link: bool = True
"""Indicates that the navigation object is a "link" object. Always `True` for link objects."""
- @property
- def ancestors(self):
- if self.parent is None:
- return []
- return [self.parent] + self.parent.ancestors
-
- def _indent_print(self, depth=0):
- return '{}{}'.format(' ' * depth, repr(self))
-
-def get_navigation(files: Files, config: MkDocsConfig | Mapping[str, Any]) -> Navigation:
+def get_navigation(files: Files, config: MkDocsConfig) -> Navigation:
"""Build site navigation from config and files."""
documentation_pages = files.documentation_pages()
nav_config = config['nav'] or nest_paths(f.src_uri for f in documentation_pages)
@@ -193,7 +171,7 @@ def get_navigation(files: Files, config: MkDocsConfig | Mapping[str, Any]) -> Na
return Navigation(items, pages)
-def _data_to_navigation(data, files: Files, config: MkDocsConfig | Mapping[str, Any]):
+def _data_to_navigation(data, files: Files, config: MkDocsConfig):
if isinstance(data, dict):
return [
_data_to_navigation((key, value), files, config)
diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index 4f38f2eacb..5f2676af8c 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -5,7 +5,7 @@
import os
import posixpath
import warnings
-from typing import TYPE_CHECKING, Any, Callable, Mapping, MutableMapping
+from typing import TYPE_CHECKING, Any, Callable, MutableMapping
from urllib.parse import unquote as urlunquote
from urllib.parse import urljoin, urlsplit, urlunsplit
@@ -15,6 +15,7 @@
import markdown.treeprocessors
from markdown.util import AMP_SUBSTITUTE
+from mkdocs.structure import StructureItem
from mkdocs.structure.toc import get_toc
from mkdocs.utils import get_build_date, get_markdown_title, meta, weak_property
@@ -23,7 +24,6 @@
from mkdocs.config.defaults import MkDocsConfig
from mkdocs.structure.files import File, Files
- from mkdocs.structure.nav import Section
from mkdocs.structure.toc import TableOfContents
_unescape: Callable[[str], str]
@@ -36,17 +36,14 @@
log = logging.getLogger(__name__)
-class Page:
- def __init__(
- self, title: str | None, file: File, config: MkDocsConfig | Mapping[str, Any]
- ) -> None:
+class Page(StructureItem):
+ def __init__(self, title: str | None, file: File, config: MkDocsConfig) -> None:
file.page = self
self.file = file
if title is not None:
self.title = title
# Navigation attributes
- self.parent = None
self.children = None
self.previous_page = None
self.next_page = None
@@ -74,12 +71,9 @@ def __eq__(self, other) -> bool:
)
def __repr__(self):
- title = f"'{self.title}'" if (self.title is not None) else '[blank]'
+ title = f"{self.title!r}" if self.title is not None else '[blank]'
url = self.abs_url or self.file.url
- return f"Page(title={title}, url='{url}')"
-
- def _indent_print(self, depth=0):
- return '{}{}'.format(' ' * depth, repr(self))
+ return f"Page(title={title}, url={url!r})"
markdown: str | None
"""The original Markdown content from the file."""
@@ -133,10 +127,6 @@ def active(self, value: bool):
def is_index(self) -> bool:
return self.file.name == 'index'
- @property
- def is_top_level(self) -> bool:
- return self.parent is None
-
edit_url: str | None
"""The full URL to the source page in the source repository. Typically used to
provide a link to edit the source page. [base_url][] should not be used with this
@@ -157,10 +147,6 @@ def is_homepage(self) -> bool:
The value will be `None` if the current page is the last item in the site navigation
or if the current page is not included in the navigation at all."""
- parent: Section | None
- """The immediate parent of the page in the site navigation. `None` if the
- page is at the top level."""
-
children: None = None
"""Pages do not contain children and the attribute is always `None`."""
@@ -173,12 +159,6 @@ def is_homepage(self) -> bool:
is_link: bool = False
"""Indicates that the navigation object is a "link" object. Always `False` for page objects."""
- @property
- def ancestors(self):
- if self.parent is None:
- return []
- return [self.parent] + self.parent.ancestors
-
def _set_canonical_url(self, base: str | None) -> None:
if base:
if not base.endswith('/'):
@@ -222,7 +202,7 @@ def _set_edit_url(
self.edit_url = None
def read_source(self, config: MkDocsConfig) -> None:
- source = config['plugins'].run_event('page_read_source', page=self, config=config)
+ source = config.plugins.on_page_read_source(page=self, config=config)
if source is None:
try:
with open(self.file.abs_src_path, encoding='utf-8-sig', errors='strict') as f:
@@ -242,7 +222,7 @@ def _set_title(self) -> None:
)
@weak_property
- def title(self) -> str | None:
+ def title(self) -> str | None: # type: ignore[override]
"""
Returns the title for the current page.
diff --git a/mkdocs/themes/mkdocs/base.html b/mkdocs/themes/mkdocs/base.html
index 2dbebd7291..83def3a519 100644
--- a/mkdocs/themes/mkdocs/base.html
+++ b/mkdocs/themes/mkdocs/base.html
@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- {% if page and page.is_homepage %}<meta name="description" content="{{ config['site_description'] }}">{% endif %}
+ {% if page and page.is_homepage %}<meta name="description" content="{{ config.site_description }}">{% endif %}
{% if config.site_author %}<meta name="author" content="{{ config.site_author }}">{% endif %}
{% if page and page.canonical_url %}<link rel="canonical" href="{{ page.canonical_url }}">{% endif %}
{% if config.site_favicon %}<link rel="shortcut icon" href="{{ config.site_favicon|url }}">
@@ -110,7 +110,7 @@
<ul class="nav navbar-nav ml-auto">
{%- block search_button %}
- {%- if 'search' in config['plugins'] %}
+ {%- if 'search' in config.plugins %}
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> {% trans %}Search{% endtrans %}
@@ -202,7 +202,7 @@
{%- endfor %}
{%- endblock %}
- {% if 'search' in config['plugins'] %}{%- include "search-modal.html" %}{% endif %}
+ {% if 'search' in config.plugins %}{%- include "search-modal.html" %}{% endif %}
{%- include "keyboard-modal.html" %}
</body>
diff --git a/mkdocs/themes/readthedocs/base.html b/mkdocs/themes/readthedocs/base.html
index 6caa756ad7..6c255e0629 100644
--- a/mkdocs/themes/readthedocs/base.html
+++ b/mkdocs/themes/readthedocs/base.html
@@ -104,7 +104,7 @@
</div>
{%- endif %}
{%- block search_button %}
- {%- if 'search' in config['plugins'] %}{%- include "searchbox.html" %}{%- endif %}
+ {%- if 'search' in config.plugins %}{%- include "searchbox.html" %}{%- endif %}
{%- endblock %}
</div>
| diff --git a/mkdocs/tests/base.py b/mkdocs/tests/base.py
index 28e3fd3c1f..c480eaa26e 100644
--- a/mkdocs/tests/base.py
+++ b/mkdocs/tests/base.py
@@ -23,20 +23,17 @@ def get_markdown_toc(markdown_source):
return md.toc_tokens
-def load_config(**cfg) -> MkDocsConfig:
+def load_config(config_file_path: str | None = None, **cfg) -> MkDocsConfig:
"""Helper to build a simple config for testing."""
path_base = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'integration', 'minimal')
- cfg = cfg or {}
if 'site_name' not in cfg:
cfg['site_name'] = 'Example'
- if 'config_file_path' not in cfg:
- cfg['config_file_path'] = os.path.join(path_base, 'mkdocs.yml')
if 'docs_dir' not in cfg:
# Point to an actual dir to avoid a 'does not exist' error on validation.
cfg['docs_dir'] = os.path.join(path_base, 'docs')
if 'plugins' not in cfg:
cfg['plugins'] = []
- conf = MkDocsConfig(config_file_path=cfg['config_file_path'])
+ conf = MkDocsConfig(config_file_path=config_file_path or os.path.join(path_base, 'mkdocs.yml'))
conf.load_dict(cfg)
errors_warnings = conf.validate()
diff --git a/mkdocs/tests/config/config_tests.py b/mkdocs/tests/config/config_tests.py
index 10d092e98c..c43690c4cd 100644
--- a/mkdocs/tests/config/config_tests.py
+++ b/mkdocs/tests/config/config_tests.py
@@ -218,13 +218,10 @@ def test_theme(self, mytheme, custom):
self.assertEqual({k: conf['theme'][k] for k in iter(conf['theme'])}, result['vars'])
def test_empty_nav(self):
- conf = defaults.MkDocsConfig()
- conf.load_dict(
- {
- 'site_name': 'Example',
- 'config_file_path': os.path.join(os.path.abspath('.'), 'mkdocs.yml'),
- }
+ conf = defaults.MkDocsConfig(
+ config_file_path=os.path.join(os.path.abspath('.'), 'mkdocs.yml')
)
+ conf.load_dict({'site_name': 'Example'})
conf.validate()
self.assertEqual(conf['nav'], None)
@@ -242,10 +239,8 @@ def test_error_on_pages(self):
self.assertEqual(warnings, [])
def test_doc_dir_in_site_dir(self):
- j = os.path.join
-
test_configs = (
- {'docs_dir': j('site', 'docs'), 'site_dir': 'site'},
+ {'docs_dir': os.path.join('site', 'docs'), 'site_dir': 'site'},
{'docs_dir': 'docs', 'site_dir': '.'},
{'docs_dir': '.', 'site_dir': '.'},
{'docs_dir': 'docs', 'site_dir': ''},
@@ -253,23 +248,17 @@ def test_doc_dir_in_site_dir(self):
{'docs_dir': 'docs', 'site_dir': 'docs'},
)
- cfg = {
- 'config_file_path': j(os.path.abspath('..'), 'mkdocs.yml'),
- }
-
for test_config in test_configs:
with self.subTest(test_config):
- patch = {**cfg, **test_config}
-
# Same as the default schema, but don't verify the docs_dir exists.
conf = config.Config(
schema=(
('docs_dir', c.Dir(default='docs')),
('site_dir', c.SiteDir(default='site')),
- ('config_file_path', c.Type(str)),
- )
+ ),
+ config_file_path=os.path.join(os.path.abspath('..'), 'mkdocs.yml'),
)
- conf.load_dict(patch)
+ conf.load_dict(test_config)
errors, warnings = conf.validate()
diff --git a/mkdocs/tests/plugin_tests.py b/mkdocs/tests/plugin_tests.py
index 316bd5c76e..7474f607b4 100644
--- a/mkdocs/tests/plugin_tests.py
+++ b/mkdocs/tests/plugin_tests.py
@@ -29,19 +29,19 @@ class _DummyPluginConfig(base.Config):
class DummyPlugin(plugins.BasePlugin[_DummyPluginConfig]):
- def on_pre_page(self, content, **kwargs):
+ def on_page_content(self, html, **kwargs) -> str:
"""modify page content by prepending `foo` config value."""
- return f'{self.config.foo} {content}'
+ return f'{self.config.foo} {html}'
- def on_nav(self, item, **kwargs):
+ def on_nav(self, nav, **kwargs) -> None:
"""do nothing (return None) to not modify item."""
return None
- def on_page_read_source(self, **kwargs):
+ def on_page_read_source(self, **kwargs) -> str:
"""create new source by prepending `foo` config value to 'source'."""
return f'{self.config.foo} source'
- def on_pre_build(self, **kwargs):
+ def on_pre_build(self, **kwargs) -> None:
"""do nothing (return None)."""
return None
@@ -121,40 +121,40 @@ def test_correct_events_registered(self):
'pre_template': [],
'template_context': [],
'post_template': [],
- 'pre_page': [plugin.on_pre_page],
+ 'pre_page': [],
'page_read_source': [plugin.on_page_read_source],
'page_markdown': [],
- 'page_content': [],
+ 'page_content': [plugin.on_page_content],
'page_context': [],
'post_page': [],
},
)
- def test_event_priorities(self):
+ def test_event_priorities(self) -> None:
class PrioPlugin(plugins.BasePlugin):
config_scheme = base.get_schema(_DummyPluginConfig)
@plugins.event_priority(100)
- def on_pre_page(self, content, **kwargs):
+ def on_page_content(self, html, **kwargs) -> None:
pass
@plugins.event_priority(-100)
- def on_nav(self, item, **kwargs):
+ def on_nav(self, nav, **kwargs) -> None:
pass
- def on_page_read_source(self, **kwargs):
+ def on_page_read_source(self, **kwargs) -> None:
pass
@plugins.event_priority(-50)
- def on_post_build(self, **kwargs):
+ def on_post_build(self, **kwargs) -> None:
pass
collection = plugins.PluginCollection()
collection['dummy'] = dummy = DummyPlugin()
collection['prio'] = prio = PrioPlugin()
self.assertEqual(
- collection.events['pre_page'],
- [prio.on_pre_page, dummy.on_pre_page],
+ collection.events['page_content'],
+ [prio.on_page_content, dummy.on_page_content],
)
self.assertEqual(
collection.events['nav'],
@@ -190,7 +190,10 @@ def test_run_event_on_collection(self):
plugin = DummyPlugin()
plugin.load_config({'foo': 'new'})
collection['foo'] = plugin
- self.assertEqual(collection.run_event('pre_page', 'page content'), 'new page content')
+ self.assertEqual(
+ collection.on_page_content('page content', page=None, config={}, files=[]),
+ 'new page content',
+ )
def test_run_event_twice_on_collection(self):
collection = plugins.PluginCollection()
@@ -201,7 +204,8 @@ def test_run_event_twice_on_collection(self):
plugin2.load_config({'foo': 'second'})
collection['bar'] = plugin2
self.assertEqual(
- collection.run_event('pre_page', 'page content'), 'second new page content'
+ collection.on_page_content('page content', page=None, config={}, files=[]),
+ 'second new page content',
)
def test_event_returns_None(self):
@@ -209,25 +213,28 @@ def test_event_returns_None(self):
plugin = DummyPlugin()
plugin.load_config({'foo': 'new'})
collection['foo'] = plugin
- self.assertEqual(collection.run_event('nav', 'nav item'), 'nav item')
+ self.assertEqual(collection.on_nav(['nav item'], config={}, files=[]), ['nav item'])
def test_event_empty_item(self):
collection = plugins.PluginCollection()
plugin = DummyPlugin()
plugin.load_config({'foo': 'new'})
collection['foo'] = plugin
- self.assertEqual(collection.run_event('page_read_source'), 'new source')
+ self.assertEqual(collection.on_page_read_source(page=None, config={}), 'new source')
def test_event_empty_item_returns_None(self):
collection = plugins.PluginCollection()
plugin = DummyPlugin()
plugin.load_config({'foo': 'new'})
collection['foo'] = plugin
- self.assertEqual(collection.run_event('pre_build'), None)
+ self.assertEqual(collection.on_pre_build(config={}), None)
def test_run_undefined_event_on_collection(self):
collection = plugins.PluginCollection()
- self.assertEqual(collection.run_event('pre_page', 'page content'), 'page content')
+ self.assertEqual(
+ collection.on_page_markdown('page markdown', page=None, config={}, files=[]),
+ 'page markdown',
+ )
def test_run_unknown_event_on_collection(self):
collection = plugins.PluginCollection()
| Feature idea: Allow to override docs_dir with commandline option
The build command offers several options. One of them is `--site-dir` to override the setting `site_dir` in a `mkdocs.yml`.
Is it possible to add an option `--docs-dir` to override the setting `docs_dir` as well?
Use case: Use the same mkdocs.yml configuration file to repeatedly execute the `build` command on various different source directories.
mkdocs build --config-file mkdocs.yml --docs-dir /path/to/1/docs/ --site-dir /path/build/1/
mkdocs build --config-file mkdocs.yml --docs-dir /path/to/2/docs/ --site-dir /path/build/2/
mkdocs build --config-file mkdocs.yml --docs-dir /path/to/3/docs/ --site-dir /path/special/3
…
| This might have made (some) sense in the past, however, in #1376 , which will be available in the next release, we are changing the behavior so that all paths in the config file are relative to the config file. Therefore, the config file will be more specific to a given set of files and not likely to work with multiple different `docs_dir`s.
It occurs to me that a way to approach this might be to merge multiple partial config files. Over the years I have seen a few different use cases that could benefit from that sort of feature. For example, other projects which use Python config files can easily `import` one into another allowing all sorts of variations with the correct set of imports with no duplicity. However, that is not something supported by YAML. While YAML does support a `merge`, that only applies to separate "sections" (separated by deliminators) in a single file. YAML provides no support for merging multiple files.
That said, we could potentially take the Python `dict` object from each YAML file and `merge` them. But how would the user specify which files to merge with which? And what if the user wants to merge a subsection of a setting, not the root setting object (for example, should two lists be merged or should one replace the other)? In the end if feels like we would be inventing a whole new mechanism on top of YAML, which I'd rather avoid.
> This might have made (some) sense in the past, however, in #1376 , which will be available in the next release, we are changing the behavior so that all paths in the config file are relative to the config file.
Oh. But should still be possible to use this feature on the command line
mkdocs build --config-file /path/to/general/mkdocs.yml --docs-dir ../1/docs/ --site-dir ../../build/1/
> It occurs to me that a way to approach this might be to merge multiple partial config files. … But how would the user specify which files to merge with which?
Merging values, and configuring which values should preferred, is hard. And way to much overhead for this feature here. I agree, this should be avoided.
In my use case a have one very simple `mkdocs.yml` file and a large number of documentations. All these documentation folders dont have a `mkdocs` file. Instead of copying my single file into all projects I could just use the very same file for all build commands, if I have the opportunity to set *docs* and *site* dir (only site dir possible atm).
Any updates on this feature request? I could also use this feature as well.
This goes for really any config setting to be honest. It'd be great if we could set / override any yaml config setting via CLI.
FWIW this is always possible:
```bash
echo '{INHERIT: mkdocs.yml, docs_dir: docs2}' >mkdocs2.yml; mkdocs build -f mkdocs2.yml
```
And the following is *almost* possible (these two examples are equivalent in Bash):
```bash
echo '{INHERIT: mkdocs.yml, docs_dir: docs2}' | mkdocs build -f -
```
```bash
mkdocs build -f - <<<"{INHERIT: mkdocs.yml, docs_dir: docs2}"
```
But currently it fails, it works only if this line is removed:
https://github.com/mkdocs/mkdocs/blob/afb66c1bea3eb07a917803a25d5e536edd2b8084/mkdocs/config/base.py#L313
Conceptually, a site is a config file along with its dedicated docs dir, and they are tightly connected. So again just conceptually, I think it doesn't make sense to provide a special option to rip them apart for special setups where another docs dir somehow happens to match up.
Note that overriding the docs dir is *not* similar to overriding the config file, because overriding the config file overrides everything, so, well, it isn't even an override. | 2023-06-18T16:07:10Z | 2023-06-19T20:22:11Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_mkdocs_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_mkdocs_config)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_dict_of_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_of_optional)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_watch_with_broken_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_post_validation_error)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_bad_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_html_link)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_int_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_int_type)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_all_keys_are_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_all_keys_are_strings)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_exclude_pages_with_invalid_links (mkdocs.tests.build_tests.BuildTests.test_exclude_pages_with_invalid_links)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_normalize_url_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_git_and_shadowed (mkdocs.tests.get_deps_tests.TestGetDeps.test_git_and_shadowed)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_plugin_config_with_multiple_instances_and_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_file_name_with_custom_dest_uri (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_dict_keys_and_ignores_env (mkdocs.tests.get_deps_tests.TestGetDeps.test_dict_keys_and_ignores_env)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_plugin_config_with_multiple_instances (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_page_title_from_markdown_strip_formatting (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_page_title_from_markdown_stripped_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_recovers_from_build_error (mkdocs.tests.livereload_tests.BuildTests.test_recovers_from_build_error)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_multi_theme (mkdocs.tests.get_deps_tests.TestGetDeps.test_multi_theme)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)", "test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_empty_config (mkdocs.tests.get_deps_tests.TestGetDeps.test_empty_config)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_page_title_from_setext_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_theme_precedence (mkdocs.tests.get_deps_tests.TestGetDeps.test_theme_precedence)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_combined_float_type)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_optional (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_optional)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_page_title_from_markdown_stripped_anchorlinks (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_string_not_a_dict_of_strings (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_string_not_a_dict_of_strings)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_just_search (mkdocs.tests.get_deps_tests.TestGetDeps.test_just_search)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_plugins_adding_files_and_interacting (mkdocs.tests.build_tests.BuildTests.test_plugins_adding_files_and_interacting)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_page_title_from_markdown_preserved_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_none_without_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_none_without_default)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_dict_default (mkdocs.tests.config.config_options_tests.DictOfItemsTest.test_dict_default)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_conflicting_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_conflicting_readme_and_index)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_exclude_readme_and_index (mkdocs.tests.build_tests.BuildTests.test_exclude_readme_and_index)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_nonexistent (mkdocs.tests.get_deps_tests.TestGetDeps.test_nonexistent)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)"] | ["test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)"] | ["test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)"] | ["(failures=1, skipped=4)"] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==3.7.0", "certifi==2023.5.7", "cffi==1.15.1", "click==8.1.3", "cryptography==41.0.1", "distlib==0.3.6", "editables==0.3", "filelock==3.12.2", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.18.0", "httpcore==0.17.2", "httpx==0.24.1", "hyperlink==21.0.0", "idna==3.4", "importlib-metadata==6.7.0", "jaraco-classes==3.2.3", "jeepney==0.8.0", "keyring==23.13.1", "markdown-it-py==3.0.0", "mdurl==0.1.2", "more-itertools==9.1.0", "packaging==23.1", "pathspec==0.11.1", "pexpect==4.8.0", "platformdirs==3.6.0", "pluggy==1.0.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.15.1", "pyperclip==1.8.2", "rich==13.4.2", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.0.post1", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.11.8", "trove-classifiers==2023.5.24", "userpath==1.8.0", "virtualenv==20.23.1", "wheel==0.44.0", "zipp==3.15.0"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3191 | 8ecdfb2510a481c89d0659ba103aa9a87eb94d62 | diff --git a/docs/user-guide/writing-your-docs.md b/docs/user-guide/writing-your-docs.md
index 4697abd5d0..66a100672d 100644
--- a/docs/user-guide/writing-your-docs.md
+++ b/docs/user-guide/writing-your-docs.md
@@ -380,10 +380,14 @@ specific page. The following keys are supported:
MkDocs will attempt to determine the title of a document in the following
ways, in order:
- 1. A title defined in the [nav] configuration setting for a document.
- 2. A title defined in the `title` meta-data key of a document.
- 3. A level 1 Markdown header on the first line of the document body. Please note that [Setext-style] headers are not supported.
- 4. The filename of a document.
+ 1. A title defined in the [nav] configuration setting for a document.
+
+ 2. A title defined in the `title` meta-data key of a document.
+
+ 3. A level 1 Markdown header on the first line of the document body.
+ ([Setext-style] headers are supported *only since MkDocs 1.5*.)
+
+ 4. The filename of a document.
Upon finding a title for a page, MkDoc does not continue checking any
additional sources in the above list.
diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index b278568710..e5a958744c 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -1,27 +1,36 @@
from __future__ import annotations
+import copy
import logging
import os
import posixpath
-from typing import TYPE_CHECKING, Any, Mapping, MutableMapping
+import warnings
+from typing import TYPE_CHECKING, Any, Callable, Mapping, MutableMapping
from urllib.parse import unquote as urlunquote
from urllib.parse import urljoin, urlsplit, urlunsplit
-from xml.etree.ElementTree import Element
+from xml.etree import ElementTree as etree
import markdown
-from markdown.extensions import Extension
-from markdown.treeprocessors import Treeprocessor
+import markdown.extensions
+import markdown.postprocessors
+import markdown.treeprocessors
from markdown.util import AMP_SUBSTITUTE
from mkdocs.structure.files import File, Files
from mkdocs.structure.toc import get_toc
-from mkdocs.utils import get_build_date, get_markdown_title, meta
+from mkdocs.utils import get_build_date, get_markdown_title, meta, weak_property
if TYPE_CHECKING:
from mkdocs.config.defaults import MkDocsConfig
from mkdocs.structure.nav import Section
from mkdocs.structure.toc import TableOfContents
+_unescape: Callable[[str], str]
+try:
+ _unescape = markdown.treeprocessors.UnescapeTreeprocessor().unescape # type: ignore
+except AttributeError:
+ _unescape = markdown.postprocessors.UnescapePostprocessor().run
+
log = logging.getLogger(__name__)
@@ -32,7 +41,8 @@ def __init__(
) -> None:
file.page = self
self.file = file
- self.title = title
+ if title is not None:
+ self.title = title
# Navigation attributes
self.parent = None
@@ -50,6 +60,7 @@ def __init__(
# Placeholders to be filled in later in the build process.
self.markdown = None
+ self._title_from_render: str | None = None
self.content = None
self.toc = [] # type: ignore
self.meta = {}
@@ -69,9 +80,6 @@ def __repr__(self):
def _indent_print(self, depth=0):
return '{}{}'.format(' ' * depth, repr(self))
- title: str | None
- """Contains the Title for the current page."""
-
markdown: str | None
"""The original Markdown content from the file."""
@@ -226,11 +234,18 @@ def read_source(self, config: MkDocsConfig) -> None:
raise
self.markdown, self.meta = meta.get_data(source)
- self._set_title()
def _set_title(self) -> None:
+ warnings.warn(
+ "_set_title is no longer used in MkDocs and will be removed soon.", DeprecationWarning
+ )
+
+ @weak_property
+ def title(self) -> str | None:
"""
- Set the title for a Markdown document.
+ Returns the title for the current page.
+
+ Before calling `read_source()`, this value is empty. It can also be updated by `render()`.
Check these in order and use the first that returns a valid title:
- value provided on init (passed in from config)
@@ -238,48 +253,56 @@ def _set_title(self) -> None:
- content of the first H1 in Markdown content
- convert filename to title
"""
- if self.title is not None:
- return
+ if self.markdown is None:
+ return None
if 'title' in self.meta:
- self.title = self.meta['title']
- return
+ return self.meta['title']
- assert self.markdown is not None
- title = get_markdown_title(self.markdown)
+ if self._title_from_render:
+ return self._title_from_render
+ elif self.content is None: # Preserve legacy behavior only for edge cases in plugins.
+ title_from_md = get_markdown_title(self.markdown)
+ if title_from_md is not None:
+ return title_from_md
- if title is None:
- if self.is_homepage:
- title = 'Home'
- else:
- title = self.file.name.replace('-', ' ').replace('_', ' ')
- # Capitalize if the filename was all lowercase, otherwise leave it as-is.
- if title.lower() == title:
- title = title.capitalize()
+ if self.is_homepage:
+ return 'Home'
- self.title = title
+ title = self.file.name.replace('-', ' ').replace('_', ' ')
+ # Capitalize if the filename was all lowercase, otherwise leave it as-is.
+ if title.lower() == title:
+ title = title.capitalize()
+ return title
def render(self, config: MkDocsConfig, files: Files) -> None:
"""
Convert the Markdown source file to HTML as per the config.
"""
- extensions = [_RelativePathExtension(self.file, files), *config['markdown_extensions']]
+ if self.markdown is None:
+ raise RuntimeError("`markdown` field hasn't been set (via `read_source`)")
+ relative_path_extension = _RelativePathExtension(self.file, files)
+ extract_title_extension = _ExtractTitleExtension()
md = markdown.Markdown(
- extensions=extensions,
+ extensions=[
+ relative_path_extension,
+ extract_title_extension,
+ *config['markdown_extensions'],
+ ],
extension_configs=config['mdx_configs'] or {},
)
- assert self.markdown is not None
self.content = md.convert(self.markdown)
self.toc = get_toc(getattr(md, 'toc_tokens', []))
+ self._title_from_render = extract_title_extension.title
-class _RelativePathTreeprocessor(Treeprocessor):
+class _RelativePathTreeprocessor(markdown.treeprocessors.Treeprocessor):
def __init__(self, file: File, files: Files) -> None:
self.file = file
self.files = files
- def run(self, root: Element) -> Element:
+ def run(self, root: etree.Element) -> etree.Element:
"""
Update urls on anchors and images to make them relative
@@ -335,7 +358,7 @@ def path_to_url(self, url: str) -> str:
return urlunsplit(components)
-class _RelativePathExtension(Extension):
+class _RelativePathExtension(markdown.extensions.Extension):
"""
The Extension class is what we pass to markdown, it then
registers the Treeprocessor.
@@ -348,3 +371,32 @@ def __init__(self, file: File, files: Files) -> None:
def extendMarkdown(self, md: markdown.Markdown) -> None:
relpath = _RelativePathTreeprocessor(self.file, self.files)
md.treeprocessors.register(relpath, "relpath", 0)
+
+
+class _ExtractTitleExtension(markdown.extensions.Extension):
+ def __init__(self) -> None:
+ self.title: str | None = None
+
+ def extendMarkdown(self, md: markdown.Markdown) -> None:
+ md.treeprocessors.register(
+ _ExtractTitleTreeprocessor(self),
+ "mkdocs_extract_title",
+ priority=1, # Close to the end.
+ )
+
+
+class _ExtractTitleTreeprocessor(markdown.treeprocessors.Treeprocessor):
+ def __init__(self, ext: _ExtractTitleExtension) -> None:
+ self.ext = ext
+
+ def run(self, root: etree.Element) -> etree.Element:
+ for el in root:
+ if el.tag == 'h1':
+ # Drop anchorlink from the element, if present.
+ if len(el) > 0 and el[-1].tag == 'a' and not (el.tail or '').strip():
+ el = copy.copy(el)
+ del el[-1]
+ # Extract the text only, recursively.
+ self.ext.title = _unescape(''.join(el.itertext()))
+ break
+ return root
diff --git a/mkdocs/utils/__init__.py b/mkdocs/utils/__init__.py
index 3eb5558473..5ebf3731c8 100644
--- a/mkdocs/utils/__init__.py
+++ b/mkdocs/utils/__init__.py
@@ -385,13 +385,7 @@ def dirname_to_title(dirname: str) -> str:
def get_markdown_title(markdown_src: str) -> str | None:
- """
- Get the title of a Markdown document. The title in this case is considered
- to be a H1 that occurs before any other content in the document.
- The procedure is then to iterate through the lines, stopping at the first
- non-whitespace content. If it is a title, return that, otherwise return
- None.
- """
+ """Soft-deprecated, do not use."""
lines = markdown_src.replace('\r\n', '\n').replace('\r', '\n').split('\n')
while lines:
line = lines.pop(0).strip()
@@ -460,6 +454,19 @@ def get_counts(self) -> list[tuple[str, int]]:
return [(logging.getLevelName(k), v) for k, v in sorted(self.counts.items(), reverse=True)]
+class weak_property:
+ """Same as a read-only property, but allows overwriting the field for good."""
+
+ def __init__(self, func):
+ self.func = func
+ self.__doc__ = func.__doc__
+
+ def __get__(self, instance, owner=None):
+ if instance is None:
+ return self
+ return self.func(instance)
+
+
def __getattr__(name: str):
if name == 'warning_filter':
warnings.warn(
| diff --git a/mkdocs/tests/structure/page_tests.py b/mkdocs/tests/structure/page_tests.py
index 9ccd9ff87e..30a90f6813 100644
--- a/mkdocs/tests/structure/page_tests.py
+++ b/mkdocs/tests/structure/page_tests.py
@@ -4,6 +4,7 @@
import unittest
from unittest import mock
+from mkdocs.config.defaults import MkDocsConfig
from mkdocs.structure.files import File, Files
from mkdocs.structure.pages import Page
from mkdocs.tests.base import dedent, load_config, tempdir
@@ -299,7 +300,84 @@ def test_page_title_from_markdown(self):
self.assertEqual(pg.parent, None)
self.assertEqual(pg.previous_page, None)
self.assertEqual(pg.title, 'Welcome to MkDocs')
- self.assertEqual(pg.toc, [])
+ pg.render(cfg, fl)
+ self.assertEqual(pg.title, 'Welcome to MkDocs')
+
+ _SETEXT_CONTENT = dedent(
+ '''
+ Welcome to MkDocs Setext
+ ========================
+
+ This tests extracting a setext style title.
+ '''
+ )
+
+ @tempdir(files={'testing_setext_title.md': _SETEXT_CONTENT})
+ def test_page_title_from_setext_markdown(self, docs_dir):
+ cfg = load_config()
+ fl = File('testing_setext_title.md', docs_dir, docs_dir, use_directory_urls=True)
+ pg = Page(None, fl, cfg)
+ self.assertIsNone(pg.title)
+ pg.read_source(cfg)
+ self.assertEqual(pg.title, 'Testing setext title')
+ pg.render(cfg, fl)
+ self.assertEqual(pg.title, 'Welcome to MkDocs Setext')
+
+ @tempdir(files={'testing_setext_title.md': _SETEXT_CONTENT})
+ def test_page_title_from_markdown_stripped_anchorlinks(self, docs_dir):
+ cfg = MkDocsConfig()
+ cfg.site_name = 'example'
+ cfg.markdown_extensions = {'toc': {'permalink': '&'}}
+ self.assertEqual(cfg.validate(), ([], []))
+ fl = File('testing_setext_title.md', docs_dir, docs_dir, use_directory_urls=True)
+ pg = Page(None, fl, cfg)
+ pg.read_source(cfg)
+ pg.render(cfg, fl)
+ self.assertEqual(pg.title, 'Welcome to MkDocs Setext')
+
+ _FORMATTING_CONTENT = dedent(
+ '''
+ # Hello *beautiful* `world`
+
+ Hi.
+ '''
+ )
+
+ @tempdir(files={'testing_formatting.md': _FORMATTING_CONTENT})
+ def test_page_title_from_markdown_strip_formatting(self, docs_dir):
+ cfg = load_config()
+ fl = File('testing_formatting.md', docs_dir, docs_dir, use_directory_urls=True)
+ pg = Page(None, fl, cfg)
+ pg.read_source(cfg)
+ pg.render(cfg, fl)
+ self.assertEqual(pg.title, 'Hello beautiful world')
+
+ _ATTRLIST_CONTENT = dedent(
+ '''
+ # Welcome to MkDocs Attr { #welcome }
+
+ This tests extracting the title, with enabled attr_list markdown_extension.
+ '''
+ )
+
+ @tempdir(files={'testing_attr_list.md': _ATTRLIST_CONTENT})
+ def test_page_title_from_markdown_stripped_attr_list(self, docs_dir):
+ cfg = load_config()
+ cfg.markdown_extensions.append('attr_list')
+ fl = File('testing_attr_list.md', docs_dir, docs_dir, use_directory_urls=True)
+ pg = Page(None, fl, cfg)
+ pg.read_source(cfg)
+ pg.render(cfg, fl)
+ self.assertEqual(pg.title, 'Welcome to MkDocs Attr')
+
+ @tempdir(files={'testing_attr_list.md': _ATTRLIST_CONTENT})
+ def test_page_title_from_markdown_preserved_attr_list(self, docs_dir):
+ cfg = load_config()
+ fl = File('testing_attr_list.md', docs_dir, docs_dir, use_directory_urls=True)
+ pg = Page(None, fl, cfg)
+ pg.read_source(cfg)
+ pg.render(cfg, fl)
+ self.assertEqual(pg.title, 'Welcome to MkDocs Attr { #welcome }')
def test_page_title_from_meta(self):
cfg = load_config(docs_dir=self.DOCS_DIR)
@@ -324,6 +402,8 @@ def test_page_title_from_meta(self):
self.assertEqual(pg.previous_page, None)
self.assertEqual(pg.title, 'A Page Title')
self.assertEqual(pg.toc, [])
+ pg.render(cfg, fl)
+ self.assertEqual(pg.title, 'A Page Title')
def test_page_title_from_filename(self):
cfg = load_config(docs_dir=self.DOCS_DIR)
@@ -347,7 +427,8 @@ def test_page_title_from_filename(self):
self.assertEqual(pg.parent, None)
self.assertEqual(pg.previous_page, None)
self.assertEqual(pg.title, 'Page title')
- self.assertEqual(pg.toc, [])
+ pg.render(cfg, fl)
+ self.assertEqual(pg.title, 'Page title')
def test_page_title_from_capitalized_filename(self):
cfg = load_config(docs_dir=self.DOCS_DIR)
@@ -371,7 +452,6 @@ def test_page_title_from_capitalized_filename(self):
self.assertEqual(pg.parent, None)
self.assertEqual(pg.previous_page, None)
self.assertEqual(pg.title, 'pageTitle')
- self.assertEqual(pg.toc, [])
def test_page_title_from_homepage_filename(self):
cfg = load_config(docs_dir=self.DOCS_DIR)
| Add support to extract underline-ish title (setext-style headings)
The util function [`get_markdown_title`](https://github.com/mkdocs/mkdocs/blob/master/mkdocs/utils/__init__.py#L332) supports only ATX-style headers. It should also support:
```markdown
A level-one heading
===================
A level-two heading
-------------------
```
Fix support of stripping attribute list from determined page title if attr_list extension enabled
Add or fix support of stripping attribute list from through markdown file determined page title if attr_list markdown extension enabled
Closes #3136
| I'm closing this as a duplicate of #1826. As the discussion there is long and covers multiple issues, I've copied the relevant [comment][0] below. Also note that in #1843 we have explicitly documented that setext style headers are not supported.
> The page title is set in [`mkdocs.structure.pages.Page._set_title`][1]. The [`mkdocs.utils.get_markdown_title`][2] function actually extracts the title from the Markdown source and would need to be significantly refactored as it currently assumes the header is contained on one line only (it doesn't support setext-style headers because they take 2 lines). Note that the title is set on the page before the Markdown source is rendered to HTML and this is non-negotiable. It would be easier to get the header from the rendered HTML (which would eliminate any concern about which format was used), but MkDocs needs the title to be set at an earlier stage than when it renders the Markdown to HTML. This is documented behavior in the Plugin API which we have promised to continue supporting. Also, I will only consider a change which enforces the use of an H1. If the first header is an H2, then the page title should be defined elsewhere (such as in meta-data) and a custom theme template would presumably be inserting the page title as an H1 separate from the page body.
>
> Finally, this is very much something which could be addressed by a plugin. I expect either the [on_page_markdown][3] or [on_page_content][4] events could be used to overwrite the page title based on the Markdown source or rendered HTML respectively. As a third-party plugin, you could then use whatever criteria you want to define a page title.
[3]: https://www.mkdocs.org/user-guide/plugins/#on_page_markdown
[4]: https://www.mkdocs.org/user-guide/plugins/#on_page_content
[1]: https://github.com/mkdocs/mkdocs/blob/master/mkdocs/structure/pages.py#L143
[2]: https://github.com/mkdocs/mkdocs/blob/master/mkdocs/utils/__init__.py#L332
[0]: https://github.com/mkdocs/mkdocs/issues/1826#issuecomment-511497060
| 2023-04-21T20:05:32Z | 2023-05-29T19:59:32Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_watch_with_broken_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_bad_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_html_link)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_normalize_url_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_plugin_config_with_multiple_instances_and_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_file_name_with_custom_dest_uri (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_custom_dest_uri)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_plugin_config_with_multiple_instances (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)", "test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_filter_paths (mkdocs.tests.structure.file_tests.TestFiles.test_filter_paths)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_page_title_from_markdown_preserved_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_preserved_attr_list)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)"] | [] | ["test_page_title_from_markdown_strip_formatting (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_strip_formatting)", "test_page_title_from_markdown_stripped_attr_list (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_attr_list)", "test_page_title_from_setext_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_setext_markdown)", "test_page_title_from_markdown_stripped_anchorlinks (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown_stripped_anchorlinks)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==3.7.0", "certifi==2023.5.7", "cffi==1.15.1", "click==8.1.3", "cryptography==40.0.2", "distlib==0.3.6", "editables==0.3", "filelock==3.12.0", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.17.0", "httpcore==0.17.2", "httpx==0.24.1", "hyperlink==21.0.0", "idna==3.4", "importlib-metadata==6.6.0", "jaraco-classes==3.2.3", "jeepney==0.8.0", "keyring==23.13.1", "markdown-it-py==2.2.0", "mdurl==0.1.2", "more-itertools==9.1.0", "packaging==23.1", "pathspec==0.11.1", "pexpect==4.8.0", "platformdirs==3.5.1", "pluggy==1.0.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.15.1", "pyperclip==1.8.2", "rich==13.3.5", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.0.post1", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.11.8", "trove-classifiers==2023.5.24", "userpath==1.8.0", "virtualenv==20.23.0", "wheel==0.44.0", "zipp==3.15.0"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3010 | 2a232bf153a5bc22b73f5142030e1101ee96d5b2 | diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index 6592495b97..9330a84696 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -88,7 +88,10 @@ def _indent_print(self, depth=0):
@property
def url(self) -> str:
"""The URL of the page relative to the MkDocs `site_dir`."""
- return '' if self.file.url in ('.', './') else self.file.url
+ url = self.file.url
+ if url in ('.', './'):
+ return ''
+ return url
file: File
"""The documentation [`File`][mkdocs.structure.files.File] that the page is being rendered from."""
diff --git a/mkdocs/utils/__init__.py b/mkdocs/utils/__init__.py
index 8fa39ff538..abc6647d38 100644
--- a/mkdocs/utils/__init__.py
+++ b/mkdocs/utils/__init__.py
@@ -297,16 +297,20 @@ def get_relative_url(url: str, other: str) -> str:
def normalize_url(path: str, page: Optional[Page] = None, base: str = '') -> str:
"""Return a URL relative to the given page or using the base."""
- path, is_abs = _get_norm_url(path)
- if is_abs:
+ path, relative_level = _get_norm_url(path)
+ if relative_level == -1:
return path
if page is not None:
- return get_relative_url(path, page.url)
+ result = get_relative_url(path, page.url)
+ if relative_level > 0:
+ result = '../' * relative_level + result
+ return result
+
return posixpath.join(base, path)
@functools.lru_cache(maxsize=None)
-def _get_norm_url(path: str) -> Tuple[str, bool]:
+def _get_norm_url(path: str) -> Tuple[str, int]:
if not path:
path = '.'
elif '\\' in path:
@@ -318,8 +322,14 @@ def _get_norm_url(path: str) -> Tuple[str, bool]:
# Allow links to be fully qualified URLs
parsed = urlsplit(path)
if parsed.scheme or parsed.netloc or path.startswith(('/', '#')):
- return path, True
- return path, False
+ return path, -1
+
+ # Relative path - preserve information about it
+ norm = posixpath.normpath(path) + '/'
+ relative_level = 0
+ while norm.startswith('../', relative_level * 3):
+ relative_level += 1
+ return path, relative_level
def create_media_urls(
| diff --git a/mkdocs/tests/structure/file_tests.py b/mkdocs/tests/structure/file_tests.py
index 8d8257f0d9..67dc36b60e 100644
--- a/mkdocs/tests/structure/file_tests.py
+++ b/mkdocs/tests/structure/file_tests.py
@@ -444,7 +444,6 @@ def test_get_relative_url_use_directory_urls(self):
'foo/bar.md',
'foo/bar/baz.md',
]
-
to_file_urls = [
'./',
'foo/',
@@ -456,6 +455,8 @@ def test_get_relative_url_use_directory_urls(self):
]
from_file = File('img.jpg', '/path/to/docs', '/path/to/site', use_directory_urls=True)
+ self.assertEqual(from_file.url, 'img.jpg')
+
expected = [
'img.jpg', # img.jpg relative to .
'../img.jpg', # img.jpg relative to foo/
@@ -465,15 +466,15 @@ def test_get_relative_url_use_directory_urls(self):
'../../img.jpg', # img.jpg relative to foo/bar
'../../../img.jpg', # img.jpg relative to foo/bar/baz
]
-
for i, filename in enumerate(to_files):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=True)
- self.assertEqual(from_file.url, 'img.jpg')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
from_file = File('foo/img.jpg', '/path/to/docs', '/path/to/site', use_directory_urls=True)
+ self.assertEqual(from_file.url, 'foo/img.jpg')
+
expected = [
'foo/img.jpg', # foo/img.jpg relative to .
'img.jpg', # foo/img.jpg relative to foo/
@@ -483,15 +484,15 @@ def test_get_relative_url_use_directory_urls(self):
'../img.jpg', # foo/img.jpg relative to foo/bar
'../../img.jpg', # foo/img.jpg relative to foo/bar/baz
]
-
for i, filename in enumerate(to_files):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=True)
- self.assertEqual(from_file.url, 'foo/img.jpg')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
from_file = File('index.html', '/path/to/docs', '/path/to/site', use_directory_urls=True)
+ self.assertEqual(from_file.url, './')
+
expected = [
'./', # . relative to .
'../', # . relative to foo/
@@ -501,15 +502,15 @@ def test_get_relative_url_use_directory_urls(self):
'../../', # . relative to foo/bar
'../../../', # . relative to foo/bar/baz
]
-
for i, filename in enumerate(to_files):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=True)
- self.assertEqual(from_file.url, './')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
from_file = File('file.md', '/path/to/docs', '/path/to/site', use_directory_urls=True)
+ self.assertEqual(from_file.url, 'file/')
+
expected = [
'file/', # file relative to .
'../file/', # file relative to foo/
@@ -519,10 +520,8 @@ def test_get_relative_url_use_directory_urls(self):
'../../file/', # file relative to foo/bar
'../../../file/', # file relative to foo/bar/baz
]
-
for i, filename in enumerate(to_files):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=True)
- self.assertEqual(from_file.url, 'file/')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
@@ -537,7 +536,6 @@ def test_get_relative_url(self):
'foo/bar.md',
'foo/bar/baz.md',
]
-
to_file_urls = [
'index.html',
'foo/index.html',
@@ -549,6 +547,8 @@ def test_get_relative_url(self):
]
from_file = File('img.jpg', '/path/to/docs', '/path/to/site', use_directory_urls=False)
+ self.assertEqual(from_file.url, 'img.jpg')
+
expected = [
'img.jpg', # img.jpg relative to .
'../img.jpg', # img.jpg relative to foo/
@@ -558,16 +558,16 @@ def test_get_relative_url(self):
'../img.jpg', # img.jpg relative to foo/bar.html
'../../img.jpg', # img.jpg relative to foo/bar/baz.html
]
-
for i, filename in enumerate(to_files):
with self.subTest(from_file=from_file.src_path, to_file=filename):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=False)
- self.assertEqual(from_file.url, 'img.jpg')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
from_file = File('foo/img.jpg', '/path/to/docs', '/path/to/site', use_directory_urls=False)
+ self.assertEqual(from_file.url, 'foo/img.jpg')
+
expected = [
'foo/img.jpg', # foo/img.jpg relative to .
'img.jpg', # foo/img.jpg relative to foo/
@@ -577,16 +577,16 @@ def test_get_relative_url(self):
'img.jpg', # foo/img.jpg relative to foo/bar.html
'../img.jpg', # foo/img.jpg relative to foo/bar/baz.html
]
-
for i, filename in enumerate(to_files):
with self.subTest(from_file=from_file.src_path, to_file=filename):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=False)
- self.assertEqual(from_file.url, 'foo/img.jpg')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
from_file = File('index.html', '/path/to/docs', '/path/to/site', use_directory_urls=False)
+ self.assertEqual(from_file.url, 'index.html')
+
expected = [
'index.html', # index.html relative to .
'../index.html', # index.html relative to foo/
@@ -596,16 +596,16 @@ def test_get_relative_url(self):
'../index.html', # index.html relative to foo/bar.html
'../../index.html', # index.html relative to foo/bar/baz.html
]
-
for i, filename in enumerate(to_files):
with self.subTest(from_file=from_file.src_path, to_file=filename):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=False)
- self.assertEqual(from_file.url, 'index.html')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
from_file = File('file.html', '/path/to/docs', '/path/to/site', use_directory_urls=False)
+ self.assertEqual(from_file.url, 'file.html')
+
expected = [
'file.html', # file.html relative to .
'../file.html', # file.html relative to foo/
@@ -615,11 +615,9 @@ def test_get_relative_url(self):
'../file.html', # file.html relative to foo/bar.html
'../../file.html', # file.html relative to foo/bar/baz.html
]
-
for i, filename in enumerate(to_files):
with self.subTest(from_file=from_file.src_path, to_file=filename):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=False)
- self.assertEqual(from_file.url, 'file.html')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
diff --git a/mkdocs/tests/utils/utils_tests.py b/mkdocs/tests/utils/utils_tests.py
index 5be58fb7d8..a72044e274 100644
--- a/mkdocs/tests/utils/utils_tests.py
+++ b/mkdocs/tests/utils/utils_tests.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
+import dataclasses
import datetime
import logging
import os
@@ -9,9 +10,7 @@
from unittest import mock
from mkdocs import exceptions, utils
-from mkdocs.structure.files import File
-from mkdocs.structure.pages import Page
-from mkdocs.tests.base import dedent, load_config, tempdir
+from mkdocs.tests.base import dedent, tempdir
from mkdocs.utils import meta
BASEYML = """
@@ -111,174 +110,76 @@ def test_get_relative_url_empty(self):
self.assertEqual(utils.get_relative_url('/', '.'), './')
self.assertEqual(utils.get_relative_url('/', '/.'), './')
- def test_create_media_urls(self):
- expected_results = {
- 'https://media.cdn.org/jq.js': [
- 'https://media.cdn.org/jq.js',
- 'https://media.cdn.org/jq.js',
- 'https://media.cdn.org/jq.js',
- ],
- 'http://media.cdn.org/jquery.js': [
- 'http://media.cdn.org/jquery.js',
- 'http://media.cdn.org/jquery.js',
- 'http://media.cdn.org/jquery.js',
- ],
- '//media.cdn.org/jquery.js': [
- '//media.cdn.org/jquery.js',
- '//media.cdn.org/jquery.js',
- '//media.cdn.org/jquery.js',
- ],
- 'media.cdn.org/jquery.js': [
- 'media.cdn.org/jquery.js',
- 'media.cdn.org/jquery.js',
- '../media.cdn.org/jquery.js',
- ],
- 'local/file/jquery.js': [
- 'local/file/jquery.js',
- 'local/file/jquery.js',
- '../local/file/jquery.js',
- ],
- 'image.png': [
- 'image.png',
- 'image.png',
- '../image.png',
- ],
- 'style.css?v=20180308c': [
- 'style.css?v=20180308c',
- 'style.css?v=20180308c',
- '../style.css?v=20180308c',
- ],
- '#some_id': [
- '#some_id',
- '#some_id',
- '#some_id',
- ],
- }
-
- cfg = load_config(use_directory_urls=False)
- pages = [
- Page(
- 'Home',
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- Page(
- 'About',
- File('about.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- Page(
- 'FooBar',
- File('foo/bar.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- ]
-
- for i, page in enumerate(pages):
- urls = utils.create_media_urls(expected_results.keys(), page)
- self.assertEqual([v[i] for v in expected_results.values()], urls)
-
- def test_create_media_urls_use_directory_urls(self):
- expected_results = {
- 'https://media.cdn.org/jq.js': [
- 'https://media.cdn.org/jq.js',
- 'https://media.cdn.org/jq.js',
- 'https://media.cdn.org/jq.js',
- ],
- 'http://media.cdn.org/jquery.js': [
- 'http://media.cdn.org/jquery.js',
- 'http://media.cdn.org/jquery.js',
- 'http://media.cdn.org/jquery.js',
- ],
- '//media.cdn.org/jquery.js': [
- '//media.cdn.org/jquery.js',
- '//media.cdn.org/jquery.js',
- '//media.cdn.org/jquery.js',
- ],
- 'media.cdn.org/jquery.js': [
- 'media.cdn.org/jquery.js',
- '../media.cdn.org/jquery.js',
- '../../media.cdn.org/jquery.js',
- ],
- 'local/file/jquery.js': [
- 'local/file/jquery.js',
- '../local/file/jquery.js',
- '../../local/file/jquery.js',
- ],
- 'image.png': [
- 'image.png',
- '../image.png',
- '../../image.png',
- ],
- 'style.css?v=20180308c': [
- 'style.css?v=20180308c',
- '../style.css?v=20180308c',
- '../../style.css?v=20180308c',
- ],
- '#some_id': [
- '#some_id',
- '#some_id',
- '#some_id',
- ],
- }
-
- cfg = load_config(use_directory_urls=True)
- pages = [
- Page(
- 'Home',
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- Page(
- 'About',
- File('about.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- Page(
- 'FooBar',
- File('foo/bar.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- ]
-
- for i, page in enumerate(pages):
- urls = utils.create_media_urls(expected_results.keys(), page)
- self.assertEqual([v[i] for v in expected_results.values()], urls)
+ def test_normalize_url(self):
+ def test(path, base, expected):
+ self.assertEqual(utils.normalize_url(path, _Page(base)), expected)
+
+ # Absolute paths and anchors are unaffected.
+ for base in 'about.html', 'foo/bar.html', 'index.html', '', 'about/', 'foo/bar/':
+ test('https://media.cdn.org/jq.js', base, 'https://media.cdn.org/jq.js')
+ test('http://media.cdn.org/jquery.js', base, 'http://media.cdn.org/jquery.js')
+ test('//media.cdn.org/jquery.js', base, '//media.cdn.org/jquery.js')
+ test('#some_id', base, '#some_id')
+
+ path = 'media.cdn.org/jquery.js'
+ test(path, '', 'media.cdn.org/jquery.js')
+ test(path, 'index.html', 'media.cdn.org/jquery.js')
+ test(path, 'about.html', 'media.cdn.org/jquery.js')
+ test(path, 'about/', '../media.cdn.org/jquery.js')
+ test(path, 'foo/bar.html', '../media.cdn.org/jquery.js')
+ test(path, 'foo/bar/', '../../media.cdn.org/jquery.js')
+
+ path = 'local/file/jquery.js'
+ test(path, '', 'local/file/jquery.js')
+ test(path, 'index.html', 'local/file/jquery.js')
+ test(path, 'about.html', 'local/file/jquery.js')
+ test(path, 'about/', '../local/file/jquery.js')
+ test(path, 'foo/bar.html', '../local/file/jquery.js')
+ test(path, 'foo/bar/', '../../local/file/jquery.js')
+
+ path = '../../../../above/jquery.js'
+ test(path, '', '../../../../above/jquery.js')
+ test(path, 'index.html', '../../../../above/jquery.js')
+ test(path, 'about.html', '../../../../above/jquery.js')
+ test(path, 'about/', '../../../../../above/jquery.js')
+ test(path, 'foo/bar.html', '../../../../../above/jquery.js')
+ test(path, 'foo/bar/', '../../../../../../above/jquery.js')
+
+ path = '../some/dir/'
+ test(path, '', '../some/dir/')
+ test(path, 'index.html', '../some/dir/')
+ test(path, 'about.html', '../some/dir/')
+ test(path, 'about/', '../../some/dir/')
+ test(path, 'foo/bar.html', '../../some/dir/')
+ test(path, 'foo/bar/', '../../../some/dir/')
+
+ path = 'image.png'
+ test(path, '', 'image.png')
+ test(path, 'index.html', 'image.png')
+ test(path, 'about.html', 'image.png')
+ test(path, 'about/', '../image.png')
+ test(path, 'foo/bar.html', '../image.png')
+ test(path, 'foo/bar/', '../../image.png')
+
+ path = 'style.css?v=20180308c'
+ test(path, '', 'style.css?v=20180308c')
+ test(path, 'index.html', 'style.css?v=20180308c')
+ test(path, 'about.html', 'style.css?v=20180308c')
+ test(path, 'about/', '../style.css?v=20180308c')
+ test(path, 'foo/bar.html', '../style.css?v=20180308c')
+ test(path, 'foo/bar/', '../../style.css?v=20180308c')
# TODO: This shouldn't pass on Linux
# @unittest.skipUnless(sys.platform.startswith("win"), "requires Windows")
- def test_create_media_urls_windows(self):
- expected_results = {
- 'local\\windows\\file\\jquery.js': [
- 'local/windows/file/jquery.js',
- 'local/windows/file/jquery.js',
- '../local/windows/file/jquery.js',
- ],
- }
-
- cfg = load_config(use_directory_urls=False)
- pages = [
- Page(
- 'Home',
- File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- Page(
- 'About',
- File('about.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- Page(
- 'FooBar',
- File('foo/bar.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls']),
- cfg,
- ),
- ]
+ def test_normalize_url_windows(self):
+ def test(path, base, expected):
+ self.assertEqual(utils.normalize_url(path, _Page(base)), expected)
with self.assertLogs('mkdocs', level='WARNING'):
- for i, page in enumerate(pages):
- urls = utils.create_media_urls(expected_results.keys(), page)
- self.assertEqual([v[i] for v in expected_results.values()], urls)
+ path = 'local\\windows\\file\\jquery.js'
+ test(path, '', 'local/windows/file/jquery.js')
+ test(path, 'about/', '../local/windows/file/jquery.js')
+ test(path, 'foo/bar/', '../../local/windows/file/jquery.js')
def test_reduce_list(self):
self.assertEqual(
@@ -689,3 +590,8 @@ def test_log_level(self):
self.log.warning('counted')
self.log.info('not counted')
self.assertEqual(self.counter.get_counts(), [('ERROR', 2), ('WARNING', 1)])
+
+
[email protected]
+class _Page:
+ url: str
| relative url start with "../" in nav no longer works
When I tried to make a link to an external resource in `nav` section of mkdos.yml, using the following example, the actual output HTML omits "../" in the relative URL and I couldn't point to external resources out of mkdocs with relative URL.
https://www.mkdocs.org/user-guide/configuration/#nav
The minimal mkdocs.yml to reproduce the problem is as follows:
```yaml
site_name: Example
site_url: https://example.com/foo/
nav:
- Parent: '../'
- Sibling: '../some/dir/'
- Home: './'
- Index: 'index.md'
```
When I compile it with empty docs/index.md file, the navigation section in site/index.html became as follows:
```html
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem">
<a href="./" class="nav-link">Parent</a>
</li>
<li class="navitem">
<a href="some/dir/" class="nav-link">Sibling</a>
</li>
<li class="navitem">
<a href="./" class="nav-link">Home</a>
</li>
<li class="navitem active">
<a href="." class="nav-link">Index</a>
</li>
</ul>
```
What I expect was that the link of "Parent" should point to "../"(= https://example.com/) and the link of Sibling should point to "../some/dir"(=https://example.com/some/dir/), which are outside of the generated doc.
I remember this way (Sibling case) worked in past, but when I recompiled the document with the latest mkdocs, it started emitting unexpected URL.
| I just encountered the same issue. Surprised such a killer bug has not received any response
I confirm that https://github.com/mkdocs/mkdocs/pull/2296 (released in 1.2) changed this behavior.
The thing is, this usage was never supported and always showed warnings anyway:
```
WARNING - A relative path to '../' is included in the 'nav' configuration, which is not found in the documentation files
```
In MkDocs nav, relative links are always assumed to be links to Markdown documents within the site.
You can use this appoach instead:
```yaml
site_url: https://example.com/known/absolute/path/
nav:
- Sibling: '/known/absolute/some/dir/'
```
I am not sure if this will be revisited.
The reason why I'm using this relative URL approach is that I'm deploying the same document to different path of the server, like /docs/docA/ and /docs_testing/docA/, in order to check the appearance before deploying it to the public, and want to make links to /docs/docB/ and /docs_testing/docB/ with single '../docB/'.
I made this config because I found such '../' way in the example in the official user guide, and it worked before, even though it emits some warnings.
I would be happy if this restriction can be switched off with some configuration in the mkdocs.yml.
At least, the documentation should be updated if '../' is no longer supported.
Oh wow, you're right! :disappointed:
https://github.com/mkdocs/mkdocs/blob/f725e225adf9b6cfab45042e44637f137f56d1bd/docs/user-guide/configuration.md?plain=1#L195-L206
Is there any fix or workaround planned for this?
I also would like this behaviour restored. My use case is wanting to deploy effectively two linked sites under the same base URL.
I want to do this so that each sub-site can have it's own navigation tabs, and to make a clear distinction between the two sub-sites by styling them with different colours and titles.
I can achieve the sub-sites easily, by having `site1_mkdocs.yml` and `site2_mkdocs.yml`, each of which build to a subdirectory (`main/site1` and `main/site2`). The problem comes that I want each sub-site to link back to the other with a relative link, `../site1` and `../site2`, and then I get the error and the URL stripped of the relative path.
Also being bit by the same bug. In my case I want to link in my nav to some sphinx docs that are built and available via a relative URL locally. Absolute paths are not an option and neither are URLs. | 2022-10-17T20:39:06Z | 2023-05-09T18:56:54Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_watch_with_broken_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_bad_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_html_link)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_normalize_url_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url_windows)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_plugin_config_with_multiple_instances_and_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances_and_warning)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_plugin_config_with_multiple_instances (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_multiple_instances)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)", "test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_filter_paths (mkdocs.tests.structure.file_tests.TestFiles.test_filter_paths)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)"] | [] | ["test_normalize_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_normalize_url)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==3.6.2", "certifi==2023.5.7", "cffi==1.15.1", "click==8.1.3", "cryptography==40.0.2", "distlib==0.3.6", "editables==0.3", "filelock==3.12.0", "h11==0.14.0", "hatch==1.7.0", "hatchling==1.15.0", "httpcore==0.17.0", "httpx==0.24.0", "hyperlink==21.0.0", "idna==3.4", "importlib-metadata==6.6.0", "jaraco-classes==3.2.3", "jeepney==0.8.0", "keyring==23.13.1", "markdown-it-py==2.2.0", "mdurl==0.1.2", "more-itertools==9.1.0", "packaging==23.1", "pathspec==0.11.1", "pexpect==4.8.0", "platformdirs==3.5.0", "pluggy==1.0.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.15.1", "pyperclip==1.8.2", "rich==13.3.5", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.5.0.post1", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.11.8", "trove-classifiers==2023.5.2", "userpath==1.8.0", "virtualenv==20.23.0", "wheel==0.44.0", "zipp==3.15.0"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
mkdocs/mkdocs | mkdocs__mkdocs-3022 | 1fa2af7926b334a5b02229c3ea1649ff04955b77 | diff --git a/mkdocs/livereload/__init__.py b/mkdocs/livereload/__init__.py
index c2e52ab8e2..e136ff05b4 100644
--- a/mkdocs/livereload/__init__.py
+++ b/mkdocs/livereload/__init__.py
@@ -246,7 +246,7 @@ def condition():
self._epoch_cond.wait_for(condition, timeout=self.poll_response_timeout)
return [b"%d" % self._visible_epoch]
- if path.startswith(self.mount_path):
+ if (path + "/").startswith(self.mount_path):
rel_file_path = path[len(self.mount_path) :]
if path.endswith("/"):
diff --git a/mkdocs/structure/files.py b/mkdocs/structure/files.py
index e469c9e4c6..91679f8280 100644
--- a/mkdocs/structure/files.py
+++ b/mkdocs/structure/files.py
@@ -230,10 +230,7 @@ def _get_url(self, use_directory_urls: bool) -> str:
url = self.dest_uri
dirname, filename = posixpath.split(url)
if use_directory_urls and filename == 'index.html':
- if dirname == '':
- url = '.'
- else:
- url = dirname + '/'
+ url = (dirname or '.') + '/'
return urlquote(url)
def url_relative_to(self, other: File) -> str:
diff --git a/mkdocs/structure/pages.py b/mkdocs/structure/pages.py
index f24ad96733..6592495b97 100644
--- a/mkdocs/structure/pages.py
+++ b/mkdocs/structure/pages.py
@@ -88,7 +88,7 @@ def _indent_print(self, depth=0):
@property
def url(self) -> str:
"""The URL of the page relative to the MkDocs `site_dir`."""
- return '' if self.file.url == '.' else self.file.url
+ return '' if self.file.url in ('.', './') else self.file.url
file: File
"""The documentation [`File`][mkdocs.structure.files.File] that the page is being rendered from."""
@@ -133,7 +133,7 @@ def is_top_level(self) -> bool:
@property
def is_homepage(self) -> bool:
"""Evaluates to `True` for the homepage of the site and `False` for all other pages."""
- return self.is_top_level and self.is_index and self.file.url in ['.', 'index.html']
+ return self.is_top_level and self.is_index and self.file.url in ('.', './', 'index.html')
previous_page: Optional[Page]
"""The [page][mkdocs.structure.pages.Page] object for the previous page or `None`.
| diff --git a/mkdocs/tests/structure/file_tests.py b/mkdocs/tests/structure/file_tests.py
index 7f5fd1ee17..8d8257f0d9 100644
--- a/mkdocs/tests/structure/file_tests.py
+++ b/mkdocs/tests/structure/file_tests.py
@@ -168,7 +168,7 @@ def test_md_index_file_use_directory_urls(self):
self.assertPathsEqual(f.abs_src_path, '/path/to/docs/index.md')
self.assertEqual(f.dest_uri, 'index.html')
self.assertPathsEqual(f.abs_dest_path, '/path/to/site/index.html')
- self.assertEqual(f.url, '.')
+ self.assertEqual(f.url, './')
self.assertEqual(f.name, 'index')
self.assertTrue(f.is_documentation_page())
self.assertFalse(f.is_static_page())
@@ -182,7 +182,7 @@ def test_md_readme_index_file_use_directory_urls(self):
self.assertPathsEqual(f.abs_src_path, '/path/to/docs/README.md')
self.assertEqual(f.dest_uri, 'index.html')
self.assertPathsEqual(f.abs_dest_path, '/path/to/site/index.html')
- self.assertEqual(f.url, '.')
+ self.assertEqual(f.url, './')
self.assertEqual(f.name, 'index')
self.assertTrue(f.is_documentation_page())
self.assertFalse(f.is_static_page())
@@ -446,7 +446,7 @@ def test_get_relative_url_use_directory_urls(self):
]
to_file_urls = [
- '.',
+ './',
'foo/',
'foo/bar/',
'foo/bar/baz/',
@@ -493,18 +493,18 @@ def test_get_relative_url_use_directory_urls(self):
from_file = File('index.html', '/path/to/docs', '/path/to/site', use_directory_urls=True)
expected = [
- '.', # . relative to .
- '..', # . relative to foo/
- '../..', # . relative to foo/bar/
- '../../..', # . relative to foo/bar/baz/
- '..', # . relative to foo
- '../..', # . relative to foo/bar
- '../../..', # . relative to foo/bar/baz
+ './', # . relative to .
+ '../', # . relative to foo/
+ '../../', # . relative to foo/bar/
+ '../../../', # . relative to foo/bar/baz/
+ '../', # . relative to foo
+ '../../', # . relative to foo/bar
+ '../../../', # . relative to foo/bar/baz
]
for i, filename in enumerate(to_files):
file = File(filename, '/path/to/docs', '/path/to/site', use_directory_urls=True)
- self.assertEqual(from_file.url, '.')
+ self.assertEqual(from_file.url, './')
self.assertEqual(file.url, to_file_urls[i])
self.assertEqual(from_file.url_relative_to(file.url), expected[i])
self.assertEqual(from_file.url_relative_to(file), expected[i])
diff --git a/mkdocs/tests/structure/page_tests.py b/mkdocs/tests/structure/page_tests.py
index 24b17a01a8..9ccd9ff87e 100644
--- a/mkdocs/tests/structure/page_tests.py
+++ b/mkdocs/tests/structure/page_tests.py
@@ -659,7 +659,7 @@ def test_relative_html_link(self):
def test_relative_html_link_index(self):
self.assertEqual(
self.get_rendered_result(['non-index.md', 'index.md']),
- '<p><a href="..">link</a></p>',
+ '<p><a href="../">link</a></p>',
)
@mock.patch('mkdocs.structure.pages.open', mock.mock_open(read_data='[link](sub2/index.md)'))
@@ -696,7 +696,7 @@ def test_relative_html_link_with_unencoded_space(self):
def test_relative_html_link_parent_index(self):
self.assertEqual(
self.get_rendered_result(['sub2/non-index.md', 'index.md']),
- '<p><a href="../..">link</a></p>',
+ '<p><a href="../../">link</a></p>',
)
@mock.patch(
| Link to paragraph on index.md breaks
I try to link from a subpage to a paragraph on my root index.md:
`[MyLink](../index.md#contact)`
This results when clicking in a 404 trying to open the following URL:
`documentation#contact`
Correct would be to link to
`documentation/#contact` (note the slash)
Just linking to the page itself works fine
`[MyLink](../index.md)`
`documentation/` (slash is in the link)
Anybody has a clue if I do anything wrong or if this is a bug?
I use mkdocs with Materials template. Can provide more if required.
| Hi. This sounds like something that's happening only in your specific case.
If you don't provide a way for me to see exactly what that case is, I can't start guessing.
Please provide a complete MkDocs site with `mkdocs.yml` that exhibits the problem, which page I should look at, what's going wrong there and what you expected to see instead.
Hi. Sorry for late reply. I stripped down the root issue into an example. The issue also happens with the default template, so not only with materials
[Documentation.zip](https://github.com/mkdocs/mkdocs/files/9857678/Documentation.zip)
I see what's happening, OK. It is a general problem. Thanks for the report. | 2022-10-25T21:45:07Z | 2022-10-29T12:41:50Z | ["test_not_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_not_list)", "test_invalid_config_option (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_unrecognised_keys (mkdocs.tests.config.base_tests.ConfigBaseTests.test_unrecognised_keys)", "test_build_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_use_directory_urls)", "test_deprecated_option_move (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move)", "test_nested_anchor (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_nested_anchor)", "test_named_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_named_address)", "test_repo_name_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_github)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_unknown_option)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_tests.ConfigTests.test_doc_dir_in_site_dir)", "test_defined (mkdocs.tests.config.config_options_legacy_tests.PrivateTest.test_defined)", "test_nav_bad_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_bad_links)", "test_load_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_missing_required)", "test_parse_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory)", "test_context_base_url_homepage (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage)", "test_simple_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_simple_list)", "test_watch_with_broken_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watch_with_broken_symlinks)", "test_serve_dirtyreload (mkdocs.tests.cli_tests.CLITests.test_serve_dirtyreload)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_none)", "test_copy_file_same_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_same_file)", "test_post_validation_error (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_post_validation_error)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_builtins (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins)", "test_invalid_nested_list (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_nested_list)", "test_event_on_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_defaults)", "test_relative_html_link_sub_index_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index_hash)", "test_count_critical (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_critical)", "test_int_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_int_type)", "test_plugin_config_without_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_without_options)", "test_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_default)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_prebuild_index (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index)", "test_change_is_detected_while_building (mkdocs.tests.livereload_tests.BuildTests.test_change_is_detected_while_building)", "test_build_site_dir (mkdocs.tests.cli_tests.CLITests.test_build_site_dir)", "test_context_base_url_absolute_nested_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_nested_no_page)", "test_removed_option (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_removed_option)", "test_correct_events_registered (mkdocs.tests.plugin_tests.TestPluginCollection.test_correct_events_registered)", "test_content_parser_no_sections (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_sections)", "test_default_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_default_address)", "test_repo_name_github (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_github)", "test_watches_through_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_symlinks)", "test_plugin_config_none_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_default)", "test_sort_files (mkdocs.tests.structure.file_tests.TestFiles.test_sort_files)", "test_inherited_theme (mkdocs.tests.theme_tests.ThemeTests.test_inherited_theme)", "test_serve_theme (mkdocs.tests.cli_tests.CLITests.test_serve_theme)", "test_plugin_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_lang)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_config_missing_name)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_optional_with_default (mkdocs.tests.config.config_options_tests.TypeTest.test_optional_with_default)", "test_count_error (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_error)", "test_missing_default (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_missing_default)", "test_missing_config_file (mkdocs.tests.config.config_tests.ConfigTests.test_missing_config_file)", "test_invalid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_invalid_plugin_options)", "test_skip_missing_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_extra_template)", "test_rebuild_after_delete (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_delete)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_bitbucket)", "test_builtins (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins)", "test_custom_dir_only (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir_only)", "test_valid_full_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_full_IPv6_address)", "test_invalid_address_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_port)", "test_copy_file_clean_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_clean_modified)", "test_plugin_config_sub_error (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_error)", "test_lang_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_code)", "test_get_themes (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes)", "test_nav_missing_page (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_missing_page)", "test_bad_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_bad_relative_html_link)", "test_build_theme (mkdocs.tests.cli_tests.CLITests.test_build_theme)", "test_provided_empty (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_empty)", "test_theme_default (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_default)", "test_nested_nonindex_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_nonindex_page)", "test_with_unicode (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_with_unicode)", "test_get_theme_dir_importerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_importerror)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_none)", "test_duplicates (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_duplicates)", "test_context_base_url_relative_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page)", "test_serves_polling_with_timeout (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_timeout)", "test_lang_no_default_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_list)", "test_hooks (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks)", "test_count_debug (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_debug)", "test_dict_of_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_build_dirty (mkdocs.tests.cli_tests.CLITests.test_build_dirty)", "test_not_a_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_dir)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_empty_dict)", "test_email_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_email_link)", "test_relative_html_link_with_unencoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_unencoded_space)", "test_custom_dir (mkdocs.tests.theme_tests.ThemeTests.test_custom_dir)", "test_plugin_config_with_explicit_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_theme_namespace)", "test_missing_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_missing_path)", "test_prebuild_index_raises_oserror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_oserror)", "test_parse_locale_invalid_characters (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_invalid_characters)", "test_theme_name_is_none (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_name_is_none)", "test_redirects_to_directory (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_directory)", "test_prebuild_index_node (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_node)", "test_html_stripping (mkdocs.tests.search_tests.SearchIndexTests.test_html_stripping)", "test_content_parser_content_before_header (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_content_before_header)", "test_run_build_error_event (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_build_error_event)", "test_build_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_modified)", "test_parse_locale_language_territory_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_territory_sep)", "test_invalid_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_default)", "test_serve_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_no_directory_urls)", "test_invalid_address_format (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_format)", "test_build_page_plugin_error (mkdocs.tests.build_tests.BuildTests.test_build_page_plugin_error)", "test_relative_image_link_from_sibling (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_sibling)", "test_gh_deploy_ignore_version (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_ignore_version)", "test_version_unknown (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_version_unknown)", "test_repo_name_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom)", "test_invalid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_url)", "test_file (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_file)", "test_custom_action_warns (mkdocs.tests.livereload_tests.BuildTests.test_custom_action_warns)", "test_indented_toc_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc_html)", "test_lang_default (mkdocs.tests.search_tests.SearchConfigTests.test_lang_default)", "test_css_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_css_file_use_directory_urls)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_rebuild_after_rename (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_after_rename)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_simple)", "test_relative_html_link_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash)", "test_count_warning (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_warning)", "test_get_remote_url_ssh (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_ssh)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_complex_config)", "test_hooks_wrong_type (mkdocs.tests.config.config_options_tests.HooksTest.test_hooks_wrong_type)", "test_post_validation_none_theme_name_and_missing_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_none_theme_name_and_missing_custom_dir)", "test_redirects_to_unicode_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_unicode_mount_path)", "test_flat_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_toc)", "test_entityref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_entityref)", "test_javascript_file (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file)", "test_default (mkdocs.tests.config.config_options_tests.SubConfigTest.test_default)", "test_build_strict (mkdocs.tests.cli_tests.CLITests.test_build_strict)", "test_deploy_ignore_version_default (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version_default)", "test_post_validation_locale (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale)", "test_named_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_named_address)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_plugin_config_with_deduced_theme_namespace_overridden (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace_overridden)", "test_invalid_address_format (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_format)", "test_get_remote_url_enterprise (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_enterprise)", "test_post_validation_locale_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_locale_none)", "test_build_page (mkdocs.tests.build_tests.BuildTests.test_build_page)", "test_serve_no_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_no_livereload)", "test_valid_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_address)", "test_plugin_config_as_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_as_dict)", "test_relative_html_link_sub_page (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page)", "test_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_translations_found)", "test_dict_of_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_dict_of_dicts)", "test_plugin_config_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_defaults)", "test_file (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_file)", "test_valid_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_address)", "test_config_dir_prepended (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_mm_meta_data_blank_first_line (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data_blank_first_line)", "test_mixed_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_mixed_list)", "test_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_string)", "test_nav_no_directory_urls (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_directory_urls)", "test_optional (mkdocs.tests.config.config_options_tests.URLTest.test_optional)", "test_md_index_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested_use_directory_urls)", "test_yaml_inheritance_missing_parent (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance_missing_parent)", "test_event_on_config_include_search_page (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_include_search_page)", "test_theme_config_missing_name (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_config_missing_name)", "test_plugin_config_none_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_none_with_empty_default)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_md_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file)", "test_mm_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_mm_meta_data)", "test_lang_no_default_none (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_none)", "test_page_title_from_capitalized_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_capitalized_filename)", "test_get_current_sha (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_current_sha)", "test_md_readme_index_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file)", "test_invalid_choice (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choice)", "test_with_unicode (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_with_unicode)", "test_invalid_dict_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_invalid_type (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_type)", "test_create_media_urls_windows (mkdocs.tests.utils.utils_tests.UtilsTests.test_create_media_urls_windows)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_invalid_option)", "test_multiple_dirs_can_cause_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_can_cause_rebuild)", "test_non_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_list)", "test_gh_deploy_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_use_directory_urls)", "test_copy_files (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files)", "test_invalid_choices (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_choices)", "test_config_dir_prepended (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_config_dir_prepended)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_optional)", "test_mixed_html (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_html)", "test_copy_files_without_permissions (mkdocs.tests.utils.utils_tests.UtilsTests.test_copy_files_without_permissions)", "test_content_parser_no_id (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser_no_id)", "test_media_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_media_file_use_directory_urls)", "test_flat_h2_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_flat_h2_toc)", "test_invalid_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_invalid_default)", "test_empty_config (mkdocs.tests.config.config_tests.ConfigTests.test_empty_config)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_valid_IPv6_address)", "test_build_config_file (mkdocs.tests.cli_tests.CLITests.test_build_config_file)", "test_jinja_extension_installed (mkdocs.tests.localization_tests.LocalizationTests.test_jinja_extension_installed)", "test_empty (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_empty)", "test_invalid_address_type (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_type)", "test_populate_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_not_modified)", "test_relative_html_link_hash_only (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_hash_only)", "test_int_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_int_type)", "test_lang_multi_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_multi_list)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_leading_zeros)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_bitbucket)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url_is_dir)", "test_serve_default (mkdocs.tests.cli_tests.CLITests.test_serve_default)", "test_context_extra_css_js_from_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page)", "test_page_no_directory_url (mkdocs.tests.structure.page_tests.PageTests.test_page_no_directory_url)", "test_populate_page_read_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_error)", "test_prebuild_index_false (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_false)", "test_page_defaults (mkdocs.tests.structure.page_tests.PageTests.test_page_defaults)", "test_page_edit_url (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url)", "test_get_files_include_readme_without_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_include_readme_without_index)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_subconfig_with_multiple_items)", "test_copy (mkdocs.tests.config.config_options_tests.SchemaTest.test_copy)", "test_empty_nav (mkdocs.tests.config.config_tests.ConfigTests.test_empty_nav)", "test_length (mkdocs.tests.config.config_options_tests.TypeTest.test_length)", "test_media_file (mkdocs.tests.structure.file_tests.TestFiles.test_media_file)", "test_non_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_list)", "test_simple_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_simple_nav)", "test_invalid_type (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_invalid_type)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_invalid_url (mkdocs.tests.config.config_options_tests.URLTest.test_invalid_url)", "test_lang_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_str)", "test_subconfig_normal (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_normal)", "test_dir_bytes (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_dir_bytes)", "test_yaml_meta_data_invalid (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_invalid)", "test_single_type (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_single_type)", "test_missing_without_exists (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_without_exists)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_errors)", "test_external_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_external_link)", "test_serve_config_file (mkdocs.tests.cli_tests.CLITests.test_serve_config_file)", "test_missing_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_missing_path)", "test_edit_uri_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_bitbucket)", "test_env_var_in_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_env_var_in_yaml)", "test_page_canonical_url (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url)", "test_insort_key (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort_key)", "test_add_files_from_theme (mkdocs.tests.structure.file_tests.TestFiles.test_add_files_from_theme)", "test_valid_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_valid_path)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_ok)", "test_populate_page (mkdocs.tests.build_tests.BuildTests.test_populate_page)", "test_uninstalled_theme_as_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_uninstalled_theme_as_config)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_gitlab)", "test_multiple_dirs_changes_rebuild_only_once (mkdocs.tests.livereload_tests.BuildTests.test_multiple_dirs_changes_rebuild_only_once)", "test_defined (mkdocs.tests.config.config_options_tests.PrivateTest.test_defined)", "test_new (mkdocs.tests.new_tests.NewTests.test_new)", "test_lang_bad_type (mkdocs.tests.search_tests.SearchConfigTests.test_lang_bad_type)", "test_validation_warnings (mkdocs.tests.config.base_tests.ConfigBaseTests.test_validation_warnings)", "test_incorrect_type_error (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_prebuild_index_returns_error (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_returns_error)", "test_valid_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_dir)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_dir_bytes (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_dir_bytes)", "test_page_canonical_url_nested (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested)", "test_plugin_config_min_search_length (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_min_search_length)", "test_edit_uri_custom (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_custom)", "test_default_values (mkdocs.tests.utils.utils_tests.LogCounterTests.test_default_values)", "test_page_eq (mkdocs.tests.structure.page_tests.PageTests.test_page_eq)", "test_simple_theme (mkdocs.tests.theme_tests.ThemeTests.test_simple_theme)", "test_copy_file (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file)", "test_theme_name_is_none (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_name_is_none)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_oversized_dict)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_build_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_build_no_directory_urls)", "test_serves_polling_instantly (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_instantly)", "test_required (mkdocs.tests.config.config_options_tests.ChoiceTest.test_required)", "test_relative_html_link_sub_page_hash (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_page_hash)", "test_not_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_not_list)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_required)", "test_md_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested)", "test_plugin_config_multivalue_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_multivalue_dict)", "test_gh_deploy_config_file (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_config_file)", "test_nonexistant_config (mkdocs.tests.config.config_tests.ConfigTests.test_nonexistant_config)", "test_run_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_on_collection)", "test_count_multiple (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_multiple)", "test_relative_image_link_from_subpage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_subpage)", "test_gh_deploy_remote_branch (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_branch)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_serves_polling_with_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_with_mount_path)", "test_gh_deploy_defaults (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_defaults)", "test_get_theme_dir (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir)", "test_nav_no_title (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_no_title)", "test_page_canonical_url_nested_no_slash (mkdocs.tests.structure.page_tests.PageTests.test_page_canonical_url_nested_no_slash)", "test_serve_dev_addr (mkdocs.tests.cli_tests.CLITests.test_serve_dev_addr)", "test_invalid_item_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_int)", "test_event_on_config_theme_locale (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_theme_locale)", "test_unsupported_IPv6_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_IPv6_address)", "test_repo_name_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_gitlab)", "test_get_files_exclude_readme_with_index (mkdocs.tests.structure.file_tests.TestFiles.test_get_files_exclude_readme_with_index)", "test_relative_html_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.ConfigItemsTest.test_optional)", "test_md_file_nested_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_nested_use_directory_urls)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_warning)", "test_empty_list (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_empty_list)", "test_removed_option (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_removed_option)", "test_duplicates (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_duplicates)", "test_plugin_config_not_list (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_list)", "test_repo_name_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom)", "test_charref (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_charref)", "test_log_level (mkdocs.tests.utils.utils_tests.LogCounterTests.test_log_level)", "test_optional (mkdocs.tests.config.config_options_tests.SubConfigTest.test_optional)", "test_extra_context (mkdocs.tests.build_tests.BuildTests.test_extra_context)", "test_parse_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_language_only)", "test_invalid_config_item (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_valid_IPv6_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_valid_IPv6_address)", "test_edit_uri_template_errors (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_errors)", "test_event_on_post_build_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_search_index_only)", "test_old_format (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_old_format)", "test_mkdocs_newer (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_newer)", "test_absolute_win_local_path (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_win_local_path)", "test_get_files (mkdocs.tests.structure.file_tests.TestFiles.test_get_files)", "test_missing_but_required (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_but_required)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_valid_language_territory (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language_territory)", "test_insort (mkdocs.tests.utils.utils_tests.UtilsTests.test_insort)", "test_css_file (mkdocs.tests.structure.file_tests.TestFiles.test_css_file)", "test_lang_list (mkdocs.tests.search_tests.SearchConfigTests.test_lang_list)", "test_event_on_post_build_defaults (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_defaults)", "test_incorrect_type_error (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_incorrect_type_error)", "test_invalid_address_range (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_range)", "test_missing_page (mkdocs.tests.structure.page_tests.PageTests.test_missing_page)", "test_simple_list (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_simple_list)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_deprecated_option_move (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move)", "test_site_dir_is_config_dir_fails (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_site_dir_is_config_dir_fails)", "test_theme (mkdocs.tests.config.config_tests.ConfigTests.test_theme)", "test_invalid_type_dict (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_dict)", "test_serves_with_unicode_characters (mkdocs.tests.livereload_tests.BuildTests.test_serves_with_unicode_characters)", "test_lang_missing_and_with_territory (mkdocs.tests.search_tests.SearchConfigTests.test_lang_missing_and_with_territory)", "test_context_extra_css_js_from_homepage (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_homepage)", "test_multiple_types (mkdocs.tests.config.config_options_tests.TypeTest.test_multiple_types)", "test_deploy_hostname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_hostname)", "test_post_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_post_validation_error)", "test_build_page_custom_template (mkdocs.tests.build_tests.BuildTests.test_build_page_custom_template)", "test_plugin_config_options_not_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_options_not_dict)", "test_optional (mkdocs.tests.config.config_options_tests.ChoiceTest.test_optional)", "test_get_relative_url_empty (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url_empty)", "test_unknown_extension (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_inexisting_custom_dir (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_inexisting_custom_dir)", "test_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_optional)", "test_old_format (mkdocs.tests.config.config_options_tests.NavTest.test_old_format)", "test_list_dicts (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_list_dicts)", "test_theme_as_complex_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_complex_config)", "test_empty_list (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_empty_list)", "test_gh_deploy_remote_name (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_remote_name)", "test_deploy_error (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_error)", "test_serves_modified_html (mkdocs.tests.livereload_tests.BuildTests.test_serves_modified_html)", "test_none_without_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_none_without_default)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_config_int)", "test_none (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_none)", "test_context_base_url_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page_use_directory_urls)", "test_build_defaults (mkdocs.tests.cli_tests.CLITests.test_build_defaults)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_gitlab)", "test_event_on_post_build_multi_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_multi_lang)", "test_gh_deploy_force (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_force)", "test_deprecated_option_move_existing (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_existing)", "test_invalid_nested_list (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_nested_list)", "test_skip_extra_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_extra_template_empty_output)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_required (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_required)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_list_dicts (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_list_dicts)", "test_unsupported_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_unsupported_address)", "test_required (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required)", "test_list_of_optional (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_of_optional)", "test_populate_page_dirty_modified (mkdocs.tests.build_tests.BuildTests.test_populate_page_dirty_modified)", "test_run_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_run_validation_error)", "test_non_path (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_non_path)", "test_context_base_url_nested_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_nested_page)", "test_build_page_dirty_not_modified (mkdocs.tests.build_tests.BuildTests.test_build_page_dirty_not_modified)", "test_theme_as_string (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_string)", "test_context_extra_css_js_from_nested_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_from_nested_page_use_directory_urls)", "test_plugin_config_not_string_or_dict (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_not_string_or_dict)", "test_relative_image_link_from_homepage (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_image_link_from_homepage)", "test_skip_missing_theme_template (mkdocs.tests.build_tests.BuildTests.test_skip_missing_theme_template)", "test_get_relative_url (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_relative_url)", "test_replace_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_replace_default)", "test_invalid_address_range (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_range)", "test_invalid_children_oversized_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_oversized_dict)", "test_valid_dir (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_dir)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_missing_port)", "test_invalid_children_empty_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_children_empty_dict)", "test_build_verbose (mkdocs.tests.cli_tests.CLITests.test_build_verbose)", "test_no_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_no_meta_data)", "test_subclass (mkdocs.tests.config.config_options_tests.SchemaTest.test_subclass)", "test_valid_language (mkdocs.tests.localization_tests.LocalizationTests.test_valid_language)", "test_none (mkdocs.tests.config.config_options_tests.ListOfPathsTest.test_none)", "test_filter_paths (mkdocs.tests.structure.file_tests.TestFiles.test_filter_paths)", "test_invalid_config_option (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_option)", "test_plugin_config_with_options (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_options)", "test_build_page_error (mkdocs.tests.build_tests.BuildTests.test_build_page_error)", "test_md_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_file_use_directory_urls)", "test_edit_uri_template_ok (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_template_ok)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_wrong_type)", "test_deploy (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy)", "test_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_error_handler)", "test_static_file (mkdocs.tests.structure.file_tests.TestFiles.test_static_file)", "test_static_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_static_file_use_directory_urls)", "test_indented_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_indented_toc)", "test_yaml_meta_data (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data)", "test_invalid_item_none (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_none)", "test_valid_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_valid_path)", "test_invalid_dict_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_dict_item)", "test_is_markdown_file (mkdocs.tests.utils.utils_tests.UtilsTests.test_is_markdown_file)", "test_yaml_inheritance (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_inheritance)", "test_event_priorities (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_priorities)", "test_plugin_config_separator (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_separator)", "test_list_default (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_list_default)", "test_not_a_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_not_a_file)", "test_builtins_config (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_builtins_config)", "test_redirects_to_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_redirects_to_mount_path)", "test_missing_default (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_missing_default)", "test_level (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_level)", "test_event_on_config_search_index_only (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_search_index_only)", "test_vars (mkdocs.tests.theme_tests.ThemeTests.test_vars)", "test_plugin_config_indexing (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_indexing)", "test_theme_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_invalid_type)", "test_page_edit_url_warning (mkdocs.tests.structure.page_tests.PageTests.test_page_edit_url_warning)", "test_page_title_from_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_filename)", "test_mime_types (mkdocs.tests.livereload_tests.BuildTests.test_mime_types)", "test_context_base_url_relative_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_relative_no_page_use_directory_urls)", "test_edit_uri_gitlab (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_gitlab)", "test_provided_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_provided_dict)", "test_provided_dict (mkdocs.tests.config.config_options_tests.NavTest.test_provided_dict)", "test_deprecated_option_move_complex (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_move_complex)", "test_default (mkdocs.tests.config.config_options_legacy_tests.ChoiceTest.test_default)", "test_absolute_link (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_absolute_link)", "test_deprecated_option_with_invalid_type (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_with_invalid_type)", "test_default_address (mkdocs.tests.config.config_options_tests.IpAddressTest.test_default_address)", "test_no_links (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_no_links)", "test_new (mkdocs.tests.cli_tests.CLITests.test_new)", "test_invalid_children_config_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_none)", "test_is_cwd_not_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_not_git_repo)", "test_get_by_type_nested_sections (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_get_by_type_nested_sections)", "test_locale_language_territory (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_territory)", "test_copy_theme_files (mkdocs.tests.build_tests.BuildTests.test_copy_theme_files)", "test_skip_theme_template_empty_output (mkdocs.tests.build_tests.BuildTests.test_skip_theme_template_empty_output)", "test_nested_index_page_no_parent (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent)", "test_missing_site_name (mkdocs.tests.config.config_tests.ConfigTests.test_missing_site_name)", "test_plugin_config_empty_list_with_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_default)", "test_parse_locale_unknown_locale (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_unknown_locale)", "test_nested_index_page_no_parent_no_directory_urls (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page_no_parent_no_directory_urls)", "test_invalid_choice (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choice)", "test_subconfig_normal (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_normal)", "test_lang_good_and_bad_code (mkdocs.tests.search_tests.SearchConfigTests.test_lang_good_and_bad_code)", "test_plugin_config_uninstalled (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_uninstalled)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_theme_as_simple_config)", "test_invalid_config_item (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_invalid_config_item)", "test_relative_html_link_sub_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_sub_index)", "test_subconfig_invalid_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_invalid_option)", "test_parse_locale_bad_format (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format)", "test_page_ne (mkdocs.tests.structure.page_tests.PageTests.test_page_ne)", "test_single_type (mkdocs.tests.config.config_options_tests.TypeTest.test_single_type)", "test_invalid_leading_zeros (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_leading_zeros)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_search_indexing_options (mkdocs.tests.search_tests.SearchIndexTests.test_search_indexing_options)", "test_copy_file_dirty_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_modified)", "test_predefined_page_title (mkdocs.tests.structure.page_tests.PageTests.test_predefined_page_title)", "test_invalid_config (mkdocs.tests.config.config_tests.ConfigTests.test_invalid_config)", "test_error_on_pages (mkdocs.tests.config.config_tests.ConfigTests.test_error_on_pages)", "test_length (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_length)", "test_valid_url_is_dir (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url_is_dir)", "test_combined_float_type (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_combined_float_type)", "test_mkdocs_older (mkdocs.tests.gh_deploy_tests.TestGitHubDeployLogs.test_mkdocs_older)", "test_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_site_dir_contains_stale_files)", "test_is_cwd_git_repo (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_is_cwd_git_repo)", "test_gh_deploy_clean (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_clean)", "test_get_theme_dir_keyerror (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_theme_dir_keyerror)", "test_combined_float_type (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_combined_float_type)", "test_plugin_config_empty_list_with_empty_default (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_empty_list_with_empty_default)", "test_yaml_meta_data_not_dict (mkdocs.tests.utils.utils_tests.UtilsTests.test_yaml_meta_data_not_dict)", "test_page_title_from_homepage_filename (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_homepage_filename)", "test_indented_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_indented_nav)", "test_unknown_locale (mkdocs.tests.localization_tests.LocalizationTests.test_unknown_locale)", "test_lang_no_default_str (mkdocs.tests.search_tests.SearchConfigTests.test_lang_no_default_str)", "test_valid_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_valid_file)", "test_post_validation_locale (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale)", "test_context_extra_css_path_warning (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_path_warning)", "test_required (mkdocs.tests.config.config_options_tests.SubConfigTest.test_required)", "test_nest_paths_native (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths_native)", "test_edit_uri_github (mkdocs.tests.config.config_options_tests.EditURITest.test_edit_uri_github)", "test_valid_plugin_options (mkdocs.tests.plugin_tests.TestPluginClass.test_valid_plugin_options)", "test_event_on_config_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_config_lang)", "test_post_validation_locale_invalid_type (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_post_validation_locale_invalid_type)", "test_build_quiet (mkdocs.tests.cli_tests.CLITests.test_build_quiet)", "test_deploy_ignore_version (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_ignore_version)", "test_provided_empty (mkdocs.tests.config.config_options_tests.NavTest.test_provided_empty)", "test_create_media_urls (mkdocs.tests.utils.utils_tests.UtilsTests.test_create_media_urls)", "test_get_themes_warning (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_warning)", "test_deprecated_option_with_type (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type)", "test_not_a_dir (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_dir)", "test_multiple_markdown_config_instances (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_multiple_markdown_config_instances)", "test_builtins_config (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_builtins_config)", "test_files (mkdocs.tests.structure.file_tests.TestFiles.test_files)", "test_run_undefined_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_undefined_event_on_collection)", "test_theme_as_simple_config (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_as_simple_config)", "test_watches_through_relative_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_through_relative_symlinks)", "test_edit_uri_github (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_github)", "test_missing_but_required (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_missing_but_required)", "test_gh_deploy_theme (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_theme)", "test_mixed_list (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_mixed_list)", "test_locale_language_only (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_locale_language_only)", "test_event_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_returns_None)", "test_set_multiple_plugins_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_multiple_plugins_on_collection)", "test_plugin_config_sub_warning (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_sub_warning)", "test_mixed_toc (mkdocs.tests.structure.toc_tests.TableOfContentsTests.test_mixed_toc)", "test_load_default_file_with_yaml (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_default_file_with_yaml)", "test_merge_translations (mkdocs.tests.localization_tests.LocalizationTests.test_merge_translations)", "test_skip_ioerror_extra_template (mkdocs.tests.build_tests.BuildTests.test_skip_ioerror_extra_template)", "test_missing_without_exists (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_missing_without_exists)", "test_relative_html_link_with_encoded_space (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_with_encoded_space)", "test_invalid_choices (mkdocs.tests.config.config_options_tests.ChoiceTest.test_invalid_choices)", "test_string_not_a_list_of_strings (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_string_not_a_list_of_strings)", "test_theme_default (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_default)", "test_deprecated_option_move_invalid (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_move_invalid)", "test_javascript_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_javascript_file_use_directory_urls)", "test_warns_for_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_warns_for_dict)", "test_parse_locale_bad_type (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_type)", "test_count_info (mkdocs.tests.utils.utils_tests.LogCounterTests.test_count_info)", "test_invalid_address_type (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_type)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_serve_strict (mkdocs.tests.cli_tests.CLITests.test_serve_strict)", "test_not_site_dir_contains_stale_files (mkdocs.tests.build_tests.BuildTests.test_not_site_dir_contains_stale_files)", "test_get_themes_error (mkdocs.tests.utils.utils_tests.UtilsTests.test_get_themes_error)", "test_deprecated_option_message (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_message)", "test_prebuild_index_raises_ioerror (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_raises_ioerror)", "test_deprecated_option_with_type_undefined (mkdocs.tests.config.config_options_legacy_tests.DeprecatedTest.test_deprecated_option_with_type_undefined)", "test_none (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_none)", "test_nav_from_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_files)", "test_watches_direct_symlinks (mkdocs.tests.livereload_tests.BuildTests.test_watches_direct_symlinks)", "test_build_extra_template (mkdocs.tests.build_tests.BuildTests.test_build_extra_template)", "test_missing_required (mkdocs.tests.config.base_tests.ConfigBaseTests.test_missing_required)", "test_get_relative_url (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url)", "test_context_extra_css_js_no_page (mkdocs.tests.build_tests.BuildTests.test_context_extra_css_js_no_page)", "test_nested_ungrouped_nav (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav)", "test_valid_url (mkdocs.tests.config.config_options_tests.URLTest.test_valid_url)", "test_reduce_list (mkdocs.tests.utils.utils_tests.UtilsTests.test_reduce_list)", "test_optional (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_optional)", "test_homepage (mkdocs.tests.structure.page_tests.PageTests.test_homepage)", "test_event_on_post_build_single_lang (mkdocs.tests.search_tests.SearchPluginTests.test_event_on_post_build_single_lang)", "test_serves_normal_file (mkdocs.tests.livereload_tests.BuildTests.test_serves_normal_file)", "test_warns_for_dict (mkdocs.tests.config.config_options_tests.NavTest.test_warns_for_dict)", "test_file_eq (mkdocs.tests.structure.file_tests.TestFiles.test_file_eq)", "test_no_theme_config (mkdocs.tests.theme_tests.ThemeTests.test_no_theme_config)", "test_multiple_types (mkdocs.tests.config.config_options_legacy_tests.TypeTest.test_multiple_types)", "test_gh_deploy_strict (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_strict)", "test_none_without_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_none_without_default)", "test_normal_nav (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_normal_nav)", "test_edit_uri_custom (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_custom)", "test_plugin_config_with_explicit_empty_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_explicit_empty_namespace)", "test_page_title_from_markdown (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_markdown)", "test_not_a_file (mkdocs.tests.config.config_options_tests.FilesystemObjectTest.test_not_a_file)", "test_files_append_remove_src_paths (mkdocs.tests.structure.file_tests.TestFiles.test_files_append_remove_src_paths)", "test_create_search_index (mkdocs.tests.search_tests.SearchIndexTests.test_create_search_index)", "test_populate_page_read_plugin_error (mkdocs.tests.build_tests.BuildTests.test_populate_page_read_plugin_error)", "test_deploy_no_cname (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_deploy_no_cname)", "test_set_plugin_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_set_plugin_on_collection)", "test_repo_name_custom_and_empty_edit_uri (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_custom_and_empty_edit_uri)", "test_invalid_type_dict (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_dict)", "test_gh_deploy_dirty (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_dirty)", "test_run_unknown_event_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_unknown_event_on_collection)", "test_nest_paths (mkdocs.tests.utils.utils_tests.UtilsTests.test_nest_paths)", "test_build_theme_template (mkdocs.tests.build_tests.BuildTests.test_build_theme_template)", "test_invalid_item_none (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_item_none)", "test_copy (mkdocs.tests.config.config_options_legacy_tests.SchemaTest.test_copy)", "test_edit_uri_template_warning (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_edit_uri_template_warning)", "test_configkey (mkdocs.tests.config.config_options_tests.MarkdownExtensionsTest.test_configkey)", "test_get_schema (mkdocs.tests.config.base_tests.ConfigBaseTests.test_get_schema)", "test_context_base_url__absolute_nested_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_nested_no_page_use_directory_urls)", "test_gh_deploy_site_dir (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_site_dir)", "test_page_render (mkdocs.tests.structure.page_tests.PageTests.test_page_render)", "test_pre_validation_error (mkdocs.tests.config.base_tests.ConfigBaseTests.test_pre_validation_error)", "test_unsupported_address (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_unsupported_address)", "test_uninstalled_theme_as_string (mkdocs.tests.config.config_options_legacy_tests.ThemeTest.test_uninstalled_theme_as_string)", "test_deprecated_option_simple (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_simple)", "test_BOM (mkdocs.tests.structure.page_tests.PageTests.test_BOM)", "test_get_remote_url_http (mkdocs.tests.gh_deploy_tests.TestGitHubDeploy.test_get_remote_url_http)", "test_source_date_epoch (mkdocs.tests.structure.page_tests.SourceDateEpochTests.test_source_date_epoch)", "test_required_no_default (mkdocs.tests.config.config_options_legacy_tests.OptionallyRequiredTest.test_required_no_default)", "test_copy_file_dirty_not_modified (mkdocs.tests.structure.file_tests.TestFiles.test_copy_file_dirty_not_modified)", "test_serves_directory_index (mkdocs.tests.livereload_tests.BuildTests.test_serves_directory_index)", "test_rebuild_on_edit (mkdocs.tests.livereload_tests.BuildTests.test_rebuild_on_edit)", "test_page_title_from_meta (mkdocs.tests.structure.page_tests.PageTests.test_page_title_from_meta)", "test_list_default (mkdocs.tests.config.config_options_tests.ListOfItemsTest.test_list_default)", "test_gh_deploy_message (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_message)", "test_nav_external_links (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_external_links)", "test_nested_index_page (mkdocs.tests.structure.page_tests.PageTests.test_nested_index_page)", "test_serves_polling_after_event (mkdocs.tests.livereload_tests.BuildTests.test_serves_polling_after_event)", "test_content_parser (mkdocs.tests.search_tests.SearchIndexTests.test_content_parser)", "test_subconfig_with_multiple_items (mkdocs.tests.config.config_options_tests.SubConfigTest.test_subconfig_with_multiple_items)", "test_file_name_with_space (mkdocs.tests.structure.file_tests.TestFiles.test_file_name_with_space)", "test_valid_file (mkdocs.tests.config.config_options_legacy_tests.FilesystemObjectTest.test_valid_file)", "test_build_sitemap_template (mkdocs.tests.build_tests.BuildTests.test_build_sitemap_template)", "test_gh_deploy_no_directory_urls (mkdocs.tests.cli_tests.CLITests.test_gh_deploy_no_directory_urls)", "test_event_empty_item_returns_None (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item_returns_None)", "test_unknown_extension (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_unknown_extension)", "test_post_validation_error (mkdocs.tests.config.config_options_legacy_tests.ListOfItemsTest.test_post_validation_error)", "test_invalid_item_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_item_int)", "test_plugin_config_prebuild_index (mkdocs.tests.search_tests.SearchPluginTests.test_plugin_config_prebuild_index)", "test_bad_error_handler (mkdocs.tests.livereload_tests.BuildTests.test_bad_error_handler)", "test_md_file (mkdocs.tests.structure.file_tests.TestFiles.test_md_file)", "test_normal_nav (mkdocs.tests.config.config_options_tests.NavTest.test_normal_nav)", "test_unicode_yaml (mkdocs.tests.utils.utils_tests.UtilsTests.test_unicode_yaml)", "test_paths_localized_to_config (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_paths_localized_to_config)", "test_unwatch (mkdocs.tests.livereload_tests.BuildTests.test_unwatch)", "test_default (mkdocs.tests.config.config_options_tests.ChoiceTest.test_default)", "test_context_base_url__absolute_no_page_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url__absolute_no_page_use_directory_urls)", "test_invalid_locale (mkdocs.tests.localization_tests.LocalizationTests.test_invalid_locale)", "test_repo_name_bitbucket (mkdocs.tests.config.config_options_legacy_tests.EditURITest.test_repo_name_bitbucket)", "test_event_empty_item (mkdocs.tests.plugin_tests.TestPluginCollection.test_event_empty_item)", "test_subconfig_wrong_type (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_wrong_type)", "test_load_from_missing_file (mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_from_missing_file)", "test_prebuild_index_python_missing_lunr (mkdocs.tests.search_tests.SearchIndexTests.test_prebuild_index_python_missing_lunr)", "test_md_index_file_nested (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_nested)", "test_site_dir_in_docs_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_site_dir_in_docs_dir)", "test_doc_dir_in_site_dir (mkdocs.tests.config.config_options_legacy_tests.SiteDirTest.test_doc_dir_in_site_dir)", "test_valid_url (mkdocs.tests.config.config_options_legacy_tests.URLTest.test_valid_url)", "test_plugin_config_with_deduced_theme_namespace (mkdocs.tests.config.config_options_tests.PluginsTest.test_plugin_config_with_deduced_theme_namespace)", "test_subconfig_unknown_option (mkdocs.tests.config.config_options_legacy_tests.SubConfigTest.test_subconfig_unknown_option)", "test_active (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_active)", "test_invalid_type_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_type_int)", "test_nav_from_nested_files (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nav_from_nested_files)", "test_run_event_twice_on_collection (mkdocs.tests.plugin_tests.TestPluginCollection.test_run_event_twice_on_collection)", "test_hooks (mkdocs.tests.config.config_options_legacy_tests.HooksTest.test_hooks)", "test_serve_livereload (mkdocs.tests.cli_tests.CLITests.test_serve_livereload)", "test_invalid_address_missing_port (mkdocs.tests.config.config_options_legacy_tests.IpAddressTest.test_invalid_address_missing_port)", "test_non_path (mkdocs.tests.config.config_options_legacy_tests.ListOfPathsTest.test_non_path)", "test_build_clean (mkdocs.tests.cli_tests.CLITests.test_build_clean)", "test_file_ne (mkdocs.tests.structure.file_tests.TestFiles.test_file_ne)", "test_deprecated_option_message (mkdocs.tests.config.config_options_tests.DeprecatedTest.test_deprecated_option_message)", "test_create_media_urls_use_directory_urls (mkdocs.tests.utils.utils_tests.UtilsTests.test_create_media_urls_use_directory_urls)", "test_basic_rebuild (mkdocs.tests.livereload_tests.BuildTests.test_basic_rebuild)", "test_serve_watch_theme (mkdocs.tests.cli_tests.CLITests.test_serve_watch_theme)", "test_build_page_empty (mkdocs.tests.build_tests.BuildTests.test_build_page_empty)", "test_invalid_address_port (mkdocs.tests.config.config_options_tests.IpAddressTest.test_invalid_address_port)", "test_invalid_children_config_int (mkdocs.tests.config.config_options_tests.NavTest.test_invalid_children_config_int)", "test_context_base_url_homepage_use_directory_urls (mkdocs.tests.build_tests.BuildTests.test_context_base_url_homepage_use_directory_urls)", "test_parse_locale_bad_format_sep (mkdocs.tests.utils.babel_stub_tests.BabelStubTests.test_parse_locale_bad_format_sep)", "test_invalid_type_int (mkdocs.tests.config.config_options_legacy_tests.NavTest.test_invalid_type_int)", "test_theme_invalid_type (mkdocs.tests.config.config_options_tests.ThemeTest.test_theme_invalid_type)", "test_serves_from_mount_path (mkdocs.tests.livereload_tests.BuildTests.test_serves_from_mount_path)", "test_copying_media (mkdocs.tests.build_tests.BuildTests.test_copying_media)", "test_context_base_url_absolute_no_page (mkdocs.tests.build_tests.BuildTests.test_context_base_url_absolute_no_page)", "test_configkey (mkdocs.tests.config.config_options_legacy_tests.MarkdownExtensionsTest.test_configkey)", "test_nested_ungrouped_nav_no_titles (mkdocs.tests.structure.nav_tests.SiteNavigationTests.test_nested_ungrouped_nav_no_titles)", "test_no_translations_found (mkdocs.tests.localization_tests.LocalizationTests.test_no_translations_found)", "test_serve_use_directory_urls (mkdocs.tests.cli_tests.CLITests.test_serve_use_directory_urls)"] | [] | ["test_md_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_index_file_use_directory_urls)", "test_relative_html_link_parent_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_parent_index)", "test_get_relative_url_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_get_relative_url_use_directory_urls)", "test_relative_html_link_index (mkdocs.tests.structure.page_tests.RelativePathExtensionTests.test_relative_html_link_index)", "test_md_readme_index_file_use_directory_urls (mkdocs.tests.structure.file_tests.TestFiles.test_md_readme_index_file_use_directory_urls)"] | [] | {"install": [], "pre_install": ["tee pyproject.toml <<EOF_1234810234\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"mkdocs\"\ndescription = \"Project documentation with Markdown.\"\nreadme = \"README.md\"\nlicense = \"BSD-2-Clause\"\nauthors = [\n {name = \"Tom Christie\", email = \"[email protected]\"},\n]\nclassifiers = [\n \"Development Status :: 5 - Production/Stable\",\n \"Environment :: Console\",\n \"Environment :: Web Environment\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"Programming Language :: Python :: 3.11\",\n \"Programming Language :: Python :: 3 :: Only\",\n \"Programming Language :: Python :: Implementation :: CPython\",\n \"Programming Language :: Python :: Implementation :: PyPy\",\n \"Topic :: Documentation\",\n \"Topic :: Text Processing\",\n]\ndynamic = [\"version\"]\nrequires-python = \">=3.7\"\ndependencies = [\n \"click >=7.0\",\n \"Jinja2 >=2.11.1\",\n \"markupsafe >=2.0.1\",\n \"Markdown >=3.2.1\",\n \"PyYAML >=5.1\",\n \"watchdog >=2.0\",\n \"ghp-import >=1.0\",\n \"pyyaml_env_tag >=0.1\",\n \"importlib-metadata >=4.3; python_version < '3.10'\",\n \"typing-extensions >=3.10; python_version < '3.8'\",\n \"packaging >=20.5\",\n \"mergedeep >=1.3.4\",\n \"pathspec >=0.11.1\",\n \"platformdirs >=2.2.0\",\n \"colorama >=0.4; platform_system == 'Windows'\",\n]\n[project.optional-dependencies]\ni18n = [\n \"babel >=2.9.0\",\n]\nmin-versions = [\n \"click ==7.0\",\n \"Jinja2 ==2.11.1\",\n \"markupsafe ==2.0.1\",\n \"Markdown ==3.2.1\",\n \"PyYAML ==5.1\",\n \"watchdog ==2.0\",\n \"ghp-import ==1.0\",\n \"pyyaml_env_tag ==0.1\",\n \"importlib-metadata ==4.3; python_version < '3.10'\",\n \"typing-extensions ==3.10; python_version < '3.8'\",\n \"packaging ==20.5\",\n \"mergedeep ==1.3.4\",\n \"pathspec ==0.11.1\",\n \"platformdirs ==2.2.0\",\n \"colorama ==0.4; platform_system == 'Windows'\",\n \"babel ==2.9.0\",\n]\n\n[project.urls]\nDocumentation = \"https://www.mkdocs.org/\"\nSource = \"https://github.com/mkdocs/mkdocs\"\nIssues = \"https://github.com/mkdocs/mkdocs/issues\"\nHistory = \"https://www.mkdocs.org/about/release-notes/\"\n\n[project.scripts]\nmkdocs = \"mkdocs.__main__:cli\"\n\n[project.entry-points.\"mkdocs.themes\"]\nmkdocs = \"mkdocs.themes.mkdocs\"\nreadthedocs = \"mkdocs.themes.readthedocs\"\n\n[project.entry-points.\"mkdocs.plugins\"]\nsearch = \"mkdocs.contrib.search:SearchPlugin\"\n\n[tool.hatch.version]\npath = \"mkdocs/__init__.py\"\n\n[tool.hatch.build]\nartifacts = [\"/mkdocs/**/*.mo\"]\n[tool.hatch.build.targets.sdist]\ninclude = [\"/mkdocs\"]\n[tool.hatch.build.targets.wheel]\nexclude = [\"/mkdocs/tests/integration\", \"*.po\", \"*.pot\", \"babel.cfg\"]\n[tool.hatch.build.hooks.custom]\ndependencies = [\n \"babel\",\n]\n\n[tool.hatch.envs.default.scripts]\nall = [\n \"hatch run style:check\",\n \"hatch run types:check\",\n \"hatch run test:test\",\n \"hatch run lint:check\",\n \"hatch run +type=default integration:test\",\n]\n\n[tool.hatch.envs.test]\nfeatures = [\"i18n\"]\ndependencies = [\n \"coverage\",\n]\n[tool.hatch.envs.test.scripts]\ntest = \"coverage run --source=mkdocs --omit 'mkdocs/tests/*' -m unittest discover -v -p '*tests.py' mkdocs --top-level-directory .\"\n_coverage = [\"test\", \"coverage xml\", \"coverage report --show-missing\"]\nwith-coverage = \"test\"\n[[tool.hatch.envs.test.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"min-req\"]\n[tool.hatch.envs.test.overrides]\nmatrix.type.features = [\n { value = \"min-versions\", if = [\"min-req\"] },\n]\nmatrix.type.scripts = [\n { key = \"with-coverage\", value = \"_coverage\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.integration]\ntemplate = \"docs\"\n[tool.hatch.envs.integration.scripts]\ntest = \"python -m mkdocs.tests.integration\"\n[[tool.hatch.envs.integration.matrix]]\npython = [\"3.7\", \"3.8\", \"3.9\", \"3.10\", \"3.11\", \"pypy3\"]\ntype = [\"default\", \"no-babel\"]\n[tool.hatch.envs.integration.overrides]\nmatrix.type.features = [\n { value = \"i18n\", if = [\"default\"] },\n]\n\n[tool.hatch.envs.types]\ndependencies = [\n \"mypy\",\n \"types-Jinja2\",\n \"types-Markdown\",\n \"types-PyYAML\",\n \"types-setuptools\",\n \"typing-extensions\",\n]\n[tool.hatch.envs.types.scripts]\ncheck = \"mypy mkdocs\"\n\n[tool.hatch.envs.style]\ndetached = true\ndependencies = [\n \"black\",\n \"isort\",\n \"ruff\",\n]\n[tool.hatch.envs.style.scripts]\ncheck = [\n \"isort --check-only --diff mkdocs docs\",\n \"black -q --check --diff mkdocs docs\",\n \"lint\",\n]\nlint = [\n \"ruff check mkdocs docs\"\n]\nfix = [\n \"ruff check --fix mkdocs docs\",\n \"format\",\n]\nformat = [\n \"isort -q mkdocs docs\",\n \"black -q mkdocs docs\",\n]\n\n[tool.hatch.envs.lint]\ndetached = true\ndependencies = [\n \"codespell\",\n]\n[tool.hatch.envs.lint.scripts]\nspelling = \"codespell mkdocs docs *.* -S LC_MESSAGES -S '*.min.js' -S 'lunr*.js' -S fontawesome-webfont.svg -S tinyseg.js\"\nmarkdown = \"npm exec --yes -- markdownlint-cli README.md CONTRIBUTING.md docs/ --ignore docs/CNAME\"\njs = \"npm exec --yes -- jshint mkdocs/\"\ncss = \"npm exec --yes -- csslint --quiet mkdocs/\"\ncheck = [\"markdown\", \"js\", \"css\", \"spelling\"]\n\n[tool.hatch.envs.docs]\ndependencies = [\n \"Markdown >=3.3.3\",\n \"mdx_gh_links >=0.2\",\n \"markdown-callouts >=0.3.0\",\n \"mkdocs-literate-nav >=0.5.0\",\n \"mkdocs-redirects >=1.0.1\",\n \"pymdown-extensions >=8.0.1\",\n \"mkdocstrings-python >=0.7.1\",\n \"mkdocs-click >=0.8.0\",\n]\n\n[tool.black]\nline-length = 100\ntarget-version = [\"py37\"] # 3.7\nskip-string-normalization = true\n\n[tool.isort]\nprofile = \"black\"\nline_length = 100\n\n[tool.ruff]\nselect = [\n \"F\", \"W\", \"E\", \"UP\", \"YTT\", \"C4\", \"FA\", \"PIE\", \"T20\", \"RSE\", \"TCH\", \"DTZ\",\n \"B002\", \"B003\", \"B005\", \"B007\", \"B009\", \"B012\", \"B013\", \"B014\", \"B015\", \"B018\", \"B020\", \"B021\", \"B023\", \"B026\", \"B033\", \"B034\", \"B905\",\n \"COM818\",\n \"PERF101\",\n \"PGH002\", \"PGH004\", \"PGH005\",\n \"PLE\", \"PLW0120\", \"PLW0127\",\n \"RUF001\", \"RUF007\", \"RUF010\", \"RUF100\", \"RUF200\",\n \"SIM101\", \"SIM107\", \"SIM201\", \"SIM202\", \"SIM208\", \"SIM210\", \"SIM211\", \"SIM300\", \"SIM401\", \"SIM910\",\n]\nignore = [\"E501\", \"E731\"]\n\n[tool.ruff.flake8-comprehensions]\nallow-dict-calls-with-keyword-arguments = true\n\n[tool.mypy]\nignore_missing_imports = true\nwarn_unreachable = true\nno_implicit_optional = true\nshow_error_codes = true\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["anyio==3.6.2", "certifi==2022.9.24", "cffi==1.15.1", "click==8.1.3", "commonmark==0.9.1", "cryptography==38.0.1", "distlib==0.3.6", "editables==0.3", "filelock==3.8.0", "h11==0.12.0", "hatch==1.6.3", "hatchling==1.11.1", "httpcore==0.15.0", "httpx==0.23.0", "hyperlink==21.0.0", "idna==3.4", "jaraco-classes==3.2.3", "jeepney==0.8.0", "keyring==23.9.3", "more-itertools==9.0.0", "packaging==21.3", "pathspec==0.10.1", "pexpect==4.8.0", "platformdirs==2.5.2", "pluggy==1.0.0", "ptyprocess==0.7.0", "pycparser==2.21", "pygments==2.13.0", "pyparsing==3.0.9", "pyperclip==1.8.2", "rfc3986==1.5.0", "rich==12.6.0", "secretstorage==3.3.3", "setuptools==75.1.0", "shellingham==1.4.0", "sniffio==1.3.0", "tomli-w==1.0.0", "tomlkit==0.11.6", "userpath==1.8.0", "virtualenv==20.16.6", "wheel==0.44.0"]} | null | ["hatch run +py=3.11 test:with-coverage"] | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2271 | fde47b4b4f978f179b9dff34583cb2b99021f482 | diff --git a/CHANGES.rst b/CHANGES.rst
index aedea8894..a90ff58f1 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -79,6 +79,16 @@ Unreleased
allows the user to search for future output of the generator when
using less and then aborting the program using ctrl-c.
+- ``deprecated: bool | str`` can now be used on options and arguments. This
+ previously was only available for ``Command``. The message can now also be
+ customised by using a ``str`` instead of a ``bool``. :issue:`2263` :pr:`2271`
+
+ - ``Command.deprecated`` formatting in ``--help`` changed from
+ ``(Deprecated) help`` to ``help (DEPRECATED)``.
+ - Parameters cannot be required nor prompted or an error is raised.
+ - A warning will be printed when something deprecated is used.
+
+
Version 8.1.8
-------------
diff --git a/src/click/core.py b/src/click/core.py
index abe9fa9bb..1c1a46714 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -856,12 +856,15 @@ class Command:
If enabled this will add ``--help`` as argument
if no arguments are passed
:param hidden: hide this command from help outputs.
-
- :param deprecated: issues a message indicating that
- the command is deprecated.
+ :param deprecated: If ``True`` or non-empty string, issues a message
+ indicating that the command is deprecated and highlights
+ its deprecation in --help. The message can be customized
+ by using a string as the value.
.. versionchanged:: 8.2
This is the base class for all commands, not ``BaseCommand``.
+ ``deprecated`` can be set to a string as well to customize the
+ deprecation message.
.. versionchanged:: 8.1
``help``, ``epilog``, and ``short_help`` are stored unprocessed,
@@ -905,7 +908,7 @@ def __init__(
add_help_option: bool = True,
no_args_is_help: bool = False,
hidden: bool = False,
- deprecated: bool = False,
+ deprecated: bool | str = False,
) -> None:
#: the name the command thinks it has. Upon registering a command
#: on a :class:`Group` the group will default the command name
@@ -1059,7 +1062,14 @@ def get_short_help_str(self, limit: int = 45) -> str:
text = ""
if self.deprecated:
- text = _("(Deprecated) {text}").format(text=text)
+ deprecated_message = (
+ f"(DEPRECATED: {self.deprecated})"
+ if isinstance(self.deprecated, str)
+ else "(DEPRECATED)"
+ )
+ text = _("{text} {deprecated_message}").format(
+ text=text, deprecated_message=deprecated_message
+ )
return text.strip()
@@ -1089,7 +1099,14 @@ def format_help_text(self, ctx: Context, formatter: HelpFormatter) -> None:
text = ""
if self.deprecated:
- text = _("(Deprecated) {text}").format(text=text)
+ deprecated_message = (
+ f"(DEPRECATED: {self.deprecated})"
+ if isinstance(self.deprecated, str)
+ else "(DEPRECATED)"
+ )
+ text = _("{text} {deprecated_message}").format(
+ text=text, deprecated_message=deprecated_message
+ )
if text:
formatter.write_paragraph()
@@ -1183,9 +1200,13 @@ def invoke(self, ctx: Context) -> t.Any:
in the right way.
"""
if self.deprecated:
+ extra_message = (
+ f" {self.deprecated}" if isinstance(self.deprecated, str) else ""
+ )
message = _(
"DeprecationWarning: The command {name!r} is deprecated."
- ).format(name=self.name)
+ "{extra_message}"
+ ).format(name=self.name, extra_message=extra_message)
echo(style(message, fg="red"), err=True)
if self.callback is not None:
@@ -1988,6 +2009,18 @@ class Parameter:
given. Takes ``ctx, param, incomplete`` and must return a list
of :class:`~click.shell_completion.CompletionItem` or a list of
strings.
+ :param deprecated: If ``True`` or non-empty string, issues a message
+ indicating that the argument is deprecated and highlights
+ its deprecation in --help. The message can be customized
+ by using a string as the value. A deprecated parameter
+ cannot be required, a ValueError will be raised otherwise.
+
+ .. versionchanged:: 8.2.0
+ Introduction of ``deprecated``.
+
+ .. versionchanged:: 8.2
+ Adding duplicate parameter names to a :class:`~click.core.Command` will
+ result in a ``UserWarning`` being shown.
.. versionchanged:: 8.2
Adding duplicate parameter names to a :class:`~click.core.Command` will
@@ -2044,6 +2077,7 @@ def __init__(
[Context, Parameter, str], list[CompletionItem] | list[str]
]
| None = None,
+ deprecated: bool | str = False,
) -> None:
self.name: str | None
self.opts: list[str]
@@ -2071,6 +2105,7 @@ def __init__(
self.metavar = metavar
self.envvar = envvar
self._custom_shell_complete = shell_complete
+ self.deprecated = deprecated
if __debug__:
if self.type.is_composite and nargs != self.type.arity:
@@ -2113,6 +2148,13 @@ def __init__(
f"'default' {subject} must match nargs={nargs}."
)
+ if required and deprecated:
+ raise ValueError(
+ f"The {self.param_type_name} '{self.human_readable_name}' "
+ "is deprecated and still required. A deprecated "
+ f"{self.param_type_name} cannot be required."
+ )
+
def to_info_dict(self) -> dict[str, t.Any]:
"""Gather information that could be useful for a tool generating
user-facing documentation.
@@ -2332,6 +2374,29 @@ def handle_parse_result(
) -> tuple[t.Any, list[str]]:
with augment_usage_errors(ctx, param=self):
value, source = self.consume_value(ctx, opts)
+
+ if (
+ self.deprecated
+ and value is not None
+ and source
+ not in (
+ ParameterSource.DEFAULT,
+ ParameterSource.DEFAULT_MAP,
+ )
+ ):
+ extra_message = (
+ f" {self.deprecated}" if isinstance(self.deprecated, str) else ""
+ )
+ message = _(
+ "DeprecationWarning: The {param_type} {name!r} is deprecated."
+ "{extra_message}"
+ ).format(
+ param_type=self.param_type_name,
+ name=self.human_readable_name,
+ extra_message=extra_message,
+ )
+ echo(style(message, fg="red"), err=True)
+
ctx.set_parameter_source(self.name, source) # type: ignore
try:
@@ -2402,7 +2467,8 @@ class Option(Parameter):
Normally, environment variables are not shown.
:param prompt: If set to ``True`` or a non empty string then the
user will be prompted for input. If set to ``True`` the prompt
- will be the option name capitalized.
+ will be the option name capitalized. A deprecated option cannot be
+ prompted.
:param confirmation_prompt: Prompt a second time to confirm the
value if it was prompted for. Can be set to a string instead of
``True`` to customize the message.
@@ -2469,13 +2535,16 @@ def __init__(
hidden: bool = False,
show_choices: bool = True,
show_envvar: bool = False,
+ deprecated: bool | str = False,
**attrs: t.Any,
) -> None:
if help:
help = inspect.cleandoc(help)
default_is_missing = "default" not in attrs
- super().__init__(param_decls, type=type, multiple=multiple, **attrs)
+ super().__init__(
+ param_decls, type=type, multiple=multiple, deprecated=deprecated, **attrs
+ )
if prompt is True:
if self.name is None:
@@ -2487,6 +2556,14 @@ def __init__(
else:
prompt_text = prompt
+ if deprecated:
+ deprecated_message = (
+ f"(DEPRECATED: {deprecated})"
+ if isinstance(deprecated, str)
+ else "(DEPRECATED)"
+ )
+ help = help + deprecated_message if help is not None else deprecated_message
+
self.prompt = prompt_text
self.confirmation_prompt = confirmation_prompt
self.prompt_required = prompt_required
@@ -2548,6 +2625,9 @@ def __init__(
self.show_envvar = show_envvar
if __debug__:
+ if deprecated and prompt:
+ raise ValueError("`deprecated` options cannot use `prompt`.")
+
if self.nargs == -1:
raise TypeError("nargs=-1 is not supported for options.")
@@ -2983,6 +3063,8 @@ def make_metavar(self) -> str:
var = self.type.get_metavar(self)
if not var:
var = self.name.upper() # type: ignore
+ if self.deprecated:
+ var += "!"
if not self.required:
var = f"[{var}]"
if self.nargs != 1:
| diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 5dc56a468..8c1ff0064 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -275,6 +275,44 @@ def cli(f):
assert result.output == "test\n"
+def test_deprecated_usage(runner):
+ @click.command()
+ @click.argument("f", required=False, deprecated=True)
+ def cli(f):
+ click.echo(f)
+
+ result = runner.invoke(cli, ["--help"])
+ assert result.exit_code == 0, result.output
+ assert "[F!]" in result.output
+
+
[email protected]("deprecated", [True, "USE B INSTEAD"])
+def test_deprecated_warning(runner, deprecated):
+ @click.command()
+ @click.argument(
+ "my-argument", required=False, deprecated=deprecated, default="default argument"
+ )
+ def cli(my_argument: str):
+ click.echo(f"{my_argument}")
+
+ # defaults should not give a deprecated warning
+ result = runner.invoke(cli, [])
+ assert result.exit_code == 0, result.output
+ assert "is deprecated" not in result.output
+
+ result = runner.invoke(cli, ["hello"])
+ assert result.exit_code == 0, result.output
+ assert "argument 'MY_ARGUMENT' is deprecated" in result.output
+
+ if isinstance(deprecated, str):
+ assert deprecated in result.output
+
+
+def test_deprecated_required(runner):
+ with pytest.raises(ValueError, match="is deprecated and still required"):
+ click.Argument(["a"], required=True, deprecated=True)
+
+
def test_eat_options(runner):
@click.command()
@click.option("-f")
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 02c4a3043..eb8df85f9 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -318,23 +318,31 @@ def cli(verbose, args):
@pytest.mark.parametrize("doc", ["CLI HELP", None])
-def test_deprecated_in_help_messages(runner, doc):
- @click.command(deprecated=True, help=doc)
[email protected]("deprecated", [True, "USE OTHER COMMAND INSTEAD"])
+def test_deprecated_in_help_messages(runner, doc, deprecated):
+ @click.command(deprecated=deprecated, help=doc)
def cli():
pass
result = runner.invoke(cli, ["--help"])
- assert "(Deprecated)" in result.output
+ assert "(DEPRECATED" in result.output
+ if isinstance(deprecated, str):
+ assert deprecated in result.output
-def test_deprecated_in_invocation(runner):
- @click.command(deprecated=True)
+
[email protected]("deprecated", [True, "USE OTHER COMMAND INSTEAD"])
+def test_deprecated_in_invocation(runner, deprecated):
+ @click.command(deprecated=deprecated)
def deprecated_cmd():
pass
result = runner.invoke(deprecated_cmd)
assert "DeprecationWarning:" in result.output
+ if isinstance(deprecated, str):
+ assert deprecated in result.output
+
def test_command_parse_args_collects_option_prefixes():
@click.command()
diff --git a/tests/test_options.py b/tests/test_options.py
index 2a3b69287..b7267c182 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -33,6 +33,52 @@ def test_invalid_option(runner):
assert "'--foo'" in message
[email protected]("deprecated", [True, "USE B INSTEAD"])
+def test_deprecated_usage(runner, deprecated):
+ @click.command()
+ @click.option("--foo", default="bar", deprecated=deprecated)
+ def cmd(foo):
+ click.echo(foo)
+
+ result = runner.invoke(cmd, ["--help"])
+ assert "(DEPRECATED" in result.output
+
+ if isinstance(deprecated, str):
+ assert deprecated in result.output
+
+
[email protected]("deprecated", [True, "USE B INSTEAD"])
+def test_deprecated_warning(runner, deprecated):
+ @click.command()
+ @click.option(
+ "--my-option", required=False, deprecated=deprecated, default="default option"
+ )
+ def cli(my_option: str):
+ click.echo(f"{my_option}")
+
+ # defaults should not give a deprecated warning
+ result = runner.invoke(cli, [])
+ assert result.exit_code == 0, result.output
+ assert "is deprecated" not in result.output
+
+ result = runner.invoke(cli, ["--my-option", "hello"])
+ assert result.exit_code == 0, result.output
+ assert "option 'my_option' is deprecated" in result.output
+
+ if isinstance(deprecated, str):
+ assert deprecated in result.output
+
+
+def test_deprecated_required(runner):
+ with pytest.raises(ValueError, match="is deprecated and still required"):
+ click.Option(["--a"], required=True, deprecated=True)
+
+
+def test_deprecated_prompt(runner):
+ with pytest.raises(ValueError, match="`deprecated` options cannot use `prompt`"):
+ click.Option(["--a"], prompt=True, deprecated=True)
+
+
def test_invalid_nargs(runner):
with pytest.raises(TypeError, match="nargs=-1"):
| Mark parameter as deprecated
Thanks for this great project!
Perhaps it's just me who feels that it is rather cumbersome mark a single parameter as deprecated (the closet I found was https://stackoverflow.com/a/50402799). Is there perhaps a more official method to mark a single parameter as deprecated?
That would somewhat be similar to https://github.com/pallets/click/issues/1507.
Possible scenarios:
- the parameter was renamed (e.g. a previous version was using `--name` as option, but now a dev want's to make sure it's the `--sur-name`.
- the parameter is not needed anymore
Perhaps as an example consider:
```
import click
@click.command()
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--name', prompt='Your name',
help='The person to greet.')
def hello(count, name):
"""Simple program that greets NAME for a total of COUNT times."""
for x in range(count):
click.echo(f"Hello {name}!")
if __name__ == '__main__':
hello()
```
and I want to rename `--count` to `--greetings-count`.
However I don't want to remove `--count` instantly, instead when users use `--count` prompt a message that they should use the new `--greetings-count`. The usage of `--count` and `--greetings-count` should be forbidden.
Thanks.
| I'll work on this
@davidism I just implemented to show the message with `--help`.
Is it better to show same message running without `--help`? | 2022-05-02T21:09:55Z | 2024-11-29T00:31:31Z | ["tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_arguments.py::test_nargs_envvar[-1-a b c-expect4]", "tests/test_arguments.py::test_duplicate_names_warning[args_one0-args_two0]", "tests/test_commands.py::test_group_with_args[args3-2-Show this message and exit.]", "tests/test_options.py::test_show_default_precedence[False-one-extra_value9-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_commands.py::test_other_command_forward", "tests/test_options.py::test_flag_duplicate_names", "tests/test_commands.py::test_object_propagation", "tests/test_commands.py::test_group_add_command_name", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "tests/test_arguments.py::test_nargs_envvar[2-a-Takes 2 values but 1 was given.]", "tests/test_commands.py::test_group_with_args[args1-0-Show this message and exit.]", "tests/test_options.py::test_show_true_default_boolean_flag_value", "tests/test_arguments.py::test_subcommand_help", "tests/test_options.py::test_prefixes", "tests/test_commands.py::test_default_maps", "tests/test_options.py::test_show_default_precedence[False-None-extra_value3-False]", "tests/test_arguments.py::test_when_argument_decorator_is_used_multiple_times_cls_is_preserved", "tests/test_commands.py::test_group_parse_args_collects_base_option_prefixes", "tests/test_options.py::test_intrange_default_help_text[type2-x>=1]", "tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_missing_arg", "tests/test_options.py::test_show_default_string", "tests/test_options.py::test_unknown_options[--foo]", "tests/test_commands.py::test_aliased_command_canonical_name", "tests/test_arguments.py::test_eat_options", "tests/test_arguments.py::test_nargs_star", "tests/test_options.py::test_invalid_option", "tests/test_arguments.py::test_nargs_envvar_only_if_values_empty", "tests/test_options.py::test_invalid_flag_combinations[kwargs1-'count' is not valid with 'is_flag'.]", "tests/test_arguments.py::test_nargs_bad_default[value0]", "tests/test_commands.py::test_group_with_args[args0-2-Error: Missing command.]", "tests/test_arguments.py::test_multiple_param_decls_not_allowed", "tests/test_options.py::test_show_envvar", "tests/test_arguments.py::test_file_atomics", "tests/test_arguments.py::test_nargs_envvar[2--None]", "tests/test_options.py::test_init_good_default_list[True-1-default0]", "tests/test_options.py::test_show_default_precedence[False-True-extra_value5-True]", "tests/test_options.py::test_option_with_optional_value[None-expect0]", "tests/test_options.py::test_init_bad_default_list[False-2-default1]", "tests/test_options.py::test_multiple_envvar", "tests/test_arguments.py::test_nargs_err", "tests/test_options.py::test_usage_show_choices[text/int choices]", "tests/test_arguments.py::test_implicit_non_required", "tests/test_options.py::test_dynamic_default_help_text", "tests/test_arguments.py::test_nargs_tup_composite[opts2]", "tests/test_options.py::test_option_with_optional_value[args13-expect13]", "tests/test_options.py::test_trailing_blanks_boolean_envvar", "tests/test_options.py::test_option_with_optional_value[args6-expect6]", "tests/test_options.py::test_invalid_nargs", "tests/test_options.py::test_option_with_optional_value[args11-expect11]", "tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_options.py::test_suggest_possible_options[--cat-Did you mean --count?]", "tests/test_arguments.py::test_stdout_default", "tests/test_options.py::test_unknown_options[-f]", "tests/test_options.py::test_multiple_option_with_optional_value", "tests/test_options.py::test_bool_flag_with_type", "tests/test_arguments.py::test_nargs_envvar[-1--expect5]", "tests/test_arguments.py::test_nargs_bad_default[value2]", "tests/test_options.py::test_option_with_optional_value[args4-expect4]", "tests/test_options.py::test_option_names[option_args1-first]", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_options.py::test_show_default_precedence[None-None-extra_value0-False]", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[EOFError]", "tests/test_commands.py::test_auto_shorthelp", "tests/test_options.py::test_option_with_optional_value[args7-expect7]", "tests/test_arguments.py::test_nargs_tup_composite[opts3]", "tests/test_commands.py::test_unprocessed_options", "tests/test_arguments.py::test_empty_nargs", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_options.py::test_aliases_for_flags", "tests/test_commands.py::test_command_parse_args_collects_option_prefixes", "tests/test_options.py::test_is_bool_flag_is_correctly_set[secondary option [implicit flag]]", "tests/test_arguments.py::test_nargs_specified_plus_star_ordering", "tests/test_options.py::test_multiple_required", "tests/test_options.py::test_show_default_default_map", "tests/test_options.py::test_invalid_flag_combinations[kwargs0-'count' is not valid with 'multiple'.]", "tests/test_commands.py::test_group_with_args[args2-0-obj=obj1\\nmove\\n]", "tests/test_arguments.py::test_nargs_envvar[2-a b c-Takes 2 values but 3 were given.]", "tests/test_commands.py::test_custom_parser", "tests/test_options.py::test_option_names[option_args4-a]", "tests/test_options.py::test_nargs_tup_composite_mult", "tests/test_options.py::test_suggest_possible_options[--bounds-(Possible options: --bound, --count)]", "tests/test_options.py::test_intrange_default_help_text[type0-1<=x<=32]", "tests/test_options.py::test_intrange_default_help_text[type3-x<=32]", "tests/test_options.py::test_nargs_envvar", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [None]]", "tests/test_options.py::test_option_help_preserve_paragraphs", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [True]]", "tests/test_options.py::test_count_default_type_help", "tests/test_options.py::test_legacy_options", "tests/test_options.py::test_option_names[option_args9-_ret]", "tests/test_options.py::test_show_envvar_auto_prefix", "tests/test_options.py::test_option_with_optional_value[args3-expect3]", "tests/test_options.py::test_show_default_precedence[None-True-extra_value2-True]", "tests/test_options.py::test_argument_custom_class", "tests/test_options.py::test_usage_show_choices[float choices]", "tests/test_options.py::test_duplicate_names_warning[opts_one0-opts_two0]", "tests/test_options.py::test_show_default_with_empty_string", "tests/test_options.py::test_dynamic_default_help_special_method", "tests/test_options.py::test_hide_false_default_boolean_flag_value[False]", "tests/test_options.py::test_suggest_possible_options[--bount-(Possible options: --bound, --count)]", "tests/test_options.py::test_missing_option_string_cast", "tests/test_options.py::test_toupper_envvar_prefix", "tests/test_options.py::test_is_bool_flag_is_correctly_set[is_flag=True]", "tests/test_arguments.py::test_defaults_for_nargs", "tests/test_options.py::test_winstyle_options", "tests/test_arguments.py::test_missing_argument_string_cast", "tests/test_options.py::test_missing_required_flag", "tests/test_options.py::test_case_insensitive_choice_returned_exactly", "tests/test_options.py::test_show_default_precedence[True-True-extra_value8-True]", "tests/test_options.py::test_usage_show_choices[bool choices]", "tests/test_options.py::test_dynamic_default_help_unset", "tests/test_options.py::test_option_names[option_args2-apple]", "tests/test_options.py::test_init_good_default_list[False-2-default2]", "tests/test_options.py::test_hide_false_default_boolean_flag_value[None]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool flag_value]", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[KeyboardInterrupt]", "tests/test_options.py::test_callback_validates_prompt", "tests/test_commands.py::test_other_command_invoke", "tests/test_options.py::test_option_names[option_args8-_from]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [False]]", "tests/test_options.py::test_multiple_default_composite_type", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_envvar_flag_value", "tests/test_options.py::test_usage_show_choices[text choices]", "tests/test_options.py::test_option_with_optional_value[args2-expect2]", "tests/test_options.py::test_type_from_flag_value", "tests/test_options.py::test_case_insensitive_choice", "tests/test_options.py::test_init_good_default_list[True-2-default4]", "tests/test_options.py::test_intrange_default_help_text[type1-1<x<32]", "tests/test_arguments.py::test_bytes_args", "tests/test_options.py::test_missing_envvar", "tests/test_options.py::test_custom_validation", "tests/test_options.py::test_option_names[option_args3-cantaloupe]", "tests/test_commands.py::test_invoked_subcommand", "tests/test_options.py::test_show_default_precedence[True-None-extra_value6-True]", "tests/test_options.py::test_option_names[option_args6-apple]", "tests/test_options.py::test_show_default_boolean_flag_name[True-cache]", "tests/test_arguments.py::test_nargs_envvar[2-a b-expect2]", "tests/test_options.py::test_option_with_optional_value[args10-expect10]", "tests/test_options.py::test_option_custom_class_reusable", "tests/test_options.py::test_init_good_default_list[True-2-default3]", "tests/test_options.py::test_show_default_precedence[None-False-extra_value1-False]", "tests/test_arguments.py::test_multiple_not_allowed", "tests/test_options.py::test_option_with_optional_value[args12-expect12]", "tests/test_options.py::test_show_default_precedence[True-False-extra_value7-False]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[non-bool flag_value]", "tests/test_commands.py::test_command_no_args_is_help", "tests/test_options.py::test_option_with_optional_value[args9-expect9]", "tests/test_options.py::test_init_good_default_list[True-1-default1]", "tests/test_options.py::test_init_bad_default_list[True-1-1]", "tests/test_options.py::test_show_default_boolean_flag_name[False-no-cache]", "tests/test_options.py::test_option_custom_class", "tests/test_arguments.py::test_nargs_bad_default[value1]", "tests/test_options.py::test_parse_multiple_default_composite_type", "tests/test_options.py::test_option_with_optional_value[args5-expect5]", "tests/test_options.py::test_option_with_optional_value[args8-expect8]", "tests/test_commands.py::test_deprecated_in_invocation[True]", "tests/test_arguments.py::test_nested_subcommand_help", "tests/test_options.py::test_option_names[option_args0-aggressive]", "tests/test_options.py::test_init_bad_default_list[True-2-default2]", "tests/test_arguments.py::test_nargs_star_ordering", "tests/test_options.py::test_option_with_optional_value[args1-expect1]", "tests/test_options.py::test_option_names[option_args7-cantaloupe]", "tests/test_options.py::test_counting", "tests/test_arguments.py::test_path_allow_dash", "tests/test_options.py::test_is_bool_flag_is_correctly_set[int option]", "tests/test_arguments.py::test_nargs_tup", "tests/test_options.py::test_file_type_help_default", "tests/test_options.py::test_multiple_default_help", "tests/test_options.py::test_option_names[option_args5-c]", "tests/test_options.py::test_multiple_default_type", "tests/test_options.py::test_missing_choice", "tests/test_options.py::test_empty_envvar[MYPATH]", "tests/test_options.py::test_show_default_precedence[False-False-extra_value4-False]", "tests/test_options.py::test_usage_show_choices[int choices]", "tests/test_commands.py::test_forwarded_params_consistency", "tests/test_options.py::test_show_envvar_auto_prefix_dash_in_command", "tests/test_options.py::test_do_not_show_no_default"] | [] | ["tests/test_arguments.py::test_deprecated_required", "tests/test_commands.py::test_deprecated_in_help_messages[True-CLI HELP]", "tests/test_arguments.py::test_deprecated_warning[True]", "tests/test_options.py::test_deprecated_usage[USE B INSTEAD]", "tests/test_arguments.py::test_deprecated_usage", "tests/test_options.py::test_deprecated_warning[USE B INSTEAD]", "tests/test_commands.py::test_deprecated_in_help_messages[USE OTHER COMMAND INSTEAD-CLI HELP]", "tests/test_commands.py::test_deprecated_in_help_messages[USE OTHER COMMAND INSTEAD-None]", "tests/test_options.py::test_deprecated_usage[True]", "tests/test_commands.py::test_deprecated_in_invocation[USE OTHER COMMAND INSTEAD]", "tests/test_options.py::test_duplicate_names_warning[opts_one1-opts_two1]", "tests/test_options.py::test_deprecated_required", "tests/test_commands.py::test_deprecated_in_help_messages[True-None]", "tests/test_arguments.py::test_deprecated_warning[USE B INSTEAD]", "tests/test_options.py::test_deprecated_warning[True]", "tests/test_options.py::test_deprecated_prompt"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "flit-core==3.10.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.2", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2800 | d8763b93021c416549b5f8b4b5497234619410db | diff --git a/CHANGES.rst b/CHANGES.rst
index 540bbe2de..01e8d8b15 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -59,6 +59,9 @@ Unreleased
- If help is shown because ``no_args_is_help`` is enabled (defaults to ``True``
for groups, ``False`` for commands), the exit code is 2 instead of 0.
:issue:`1489` :pr:`1489`
+- Contexts created during shell completion are closed properly, fixing
+ ``ResourceWarning``s when using ``click.File``. :issue:`2644` :pr:`2800`
+ :pr:`2767`
Version 8.1.8
diff --git a/src/click/core.py b/src/click/core.py
index 666ad6813..bf8967f57 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -704,8 +704,8 @@ def exit(self, code: int = 0) -> t.NoReturn:
"""Exits the application with a given exit code.
.. versionchanged:: 8.2
- Force closing of callbacks registered with
- :meth:`call_on_close` before exiting the CLI.
+ Callbacks and context managers registered with :meth:`call_on_close`
+ and :meth:`with_resource` are closed before exiting.
"""
self.close()
raise Exit(code)
diff --git a/src/click/shell_completion.py b/src/click/shell_completion.py
index 6fd9e5422..c8655b12a 100644
--- a/src/click/shell_completion.py
+++ b/src/click/shell_completion.py
@@ -544,44 +544,48 @@ def _resolve_context(
:param args: List of complete args before the incomplete value.
"""
ctx_args["resilient_parsing"] = True
- ctx = cli.make_context(prog_name, args.copy(), **ctx_args)
- args = ctx._protected_args + ctx.args
+ with cli.make_context(prog_name, args.copy(), **ctx_args) as ctx:
+ args = ctx._protected_args + ctx.args
- while args:
- command = ctx.command
+ while args:
+ command = ctx.command
- if isinstance(command, Group):
- if not command.chain:
- name, cmd, args = command.resolve_command(ctx, args)
-
- if cmd is None:
- return ctx
-
- ctx = cmd.make_context(name, args, parent=ctx, resilient_parsing=True)
- args = ctx._protected_args + ctx.args
- else:
- sub_ctx = ctx
-
- while args:
+ if isinstance(command, Group):
+ if not command.chain:
name, cmd, args = command.resolve_command(ctx, args)
if cmd is None:
return ctx
- sub_ctx = cmd.make_context(
- name,
- args,
- parent=ctx,
- allow_extra_args=True,
- allow_interspersed_args=False,
- resilient_parsing=True,
- )
- args = sub_ctx.args
-
- ctx = sub_ctx
- args = [*sub_ctx._protected_args, *sub_ctx.args]
- else:
- break
+ with cmd.make_context(
+ name, args, parent=ctx, resilient_parsing=True
+ ) as sub_ctx:
+ args = ctx._protected_args + ctx.args
+ ctx = sub_ctx
+ else:
+ sub_ctx = ctx
+
+ while args:
+ name, cmd, args = command.resolve_command(ctx, args)
+
+ if cmd is None:
+ return ctx
+
+ with cmd.make_context(
+ name,
+ args,
+ parent=ctx,
+ allow_extra_args=True,
+ allow_interspersed_args=False,
+ resilient_parsing=True,
+ ) as sub_sub_ctx:
+ args = sub_ctx.args
+ sub_ctx = sub_sub_ctx
+
+ ctx = sub_ctx
+ args = [*sub_ctx._protected_args, *sub_ctx.args]
+ else:
+ break
return ctx
| diff --git a/tests/test_shell_completion.py b/tests/test_shell_completion.py
index 3e7a2bd7f..3511f0743 100644
--- a/tests/test_shell_completion.py
+++ b/tests/test_shell_completion.py
@@ -1,3 +1,5 @@
+import warnings
+
import pytest
import click.shell_completion
@@ -414,3 +416,27 @@ class MyshComplete(ShellComplete):
# Using `add_completion_class` as a decorator adds the new shell immediately
assert "mysh" in click.shell_completion._available_shells
assert click.shell_completion._available_shells["mysh"] is MyshComplete
+
+
+# Don't make the ResourceWarning give an error
[email protected]("default")
+def test_files_closed(runner) -> None:
+ with runner.isolated_filesystem():
+ config_file = "foo.txt"
+ with open(config_file, "w") as f:
+ f.write("bar")
+
+ @click.group()
+ @click.option(
+ "--config-file",
+ default=config_file,
+ type=click.File(mode="r"),
+ )
+ @click.pass_context
+ def cli(ctx, config_file):
+ pass
+
+ with warnings.catch_warnings(record=True) as current_warnings:
+ assert not current_warnings, "There should be no warnings to start"
+ _get_completions(cli, args=[], incomplete="")
+ assert not current_warnings, "There should be no warnings after either"
| Click doesn't close file options during shell completion
Click doesn't close file options during shell completion, which causes a resource warning if a program uses a file option.
For example, I have group like this:
```python
@click.group()
@click.option('--config_file',
default=CONFIG,
type=click.File(mode='r'),
help='help')
@click.pass_context
def cli(ctx, config_file: typing.TextIO):
```
and I get this warning:
```
/Users/grzesiek/Library/Caches/pypoetry/virtualenvs/findata-fetcher-3hK6JJJX-py3.12/lib/python3.12/site-packages/click/shell_completion.py:293: ResourceWarning: unclosed file <_io.TextIOWrapper name='/Users/grzesiek/.config/findata/fetcher.json' mode='r' encoding='UTF-8'>
completions = self.get_completions(args, incomplete)
```
## Details
I don't come with reproduction steps, but I can give something equally valuable, I can explain how this bug comes to be.
The issue stems from allocating a context in `core.py` outside of a `with` statement during shell completion. Here's a stack-trace of how that happens:
```
File "/Users/grzesiek/.local/bin/findata-fetcher", line 8, in <module>
sys.exit(main())
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/fetcher/tool.py", line 576, in main
cli(obj={})
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/click/core.py", line 1171, in __call__
return self.main(*args, **kwargs)
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/click/core.py", line 1084, in main
self._main_shell_completion(extra, prog_name, complete_var)
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/click/core.py", line 1165, in _main_shell_completion
rv = shell_complete(self, ctx_args, prog_name, complete_var,
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/click/shell_completion.py", line 49, in shell_complete
echo(comp.complete())
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/click/shell_completion.py", line 296, in complete
completions = self.get_completions(args, incomplete)
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/click/shell_completion.py", line 273, in get_completions
ctx = _resolve_context(self.cli, self.ctx_args, self.prog_name, args)
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/click/shell_completion.py", line 513, in _resolve_context
ctx = cli.make_context(prog_name, args.copy(), **ctx_args)
File "/Users/grzesiek/.local/pipx/venvs/findata-fetcher/lib/python3.12/site-packages/click/core.py", line 952, in make_context
with ctx.scope(cleanup=False):
```
This context gets [returned](https://github.com/pallets/click/blob/ca5e1c3d75e95cbc70fa6ed51ef263592e9ac0d0/src/click/core.py#L1147C19-L1147C19) to `get_completions`, but `get_completions` or its caller never call the context's `__exit__` function.
Calling the `__exit__` function is essential, because `types.File` depends on it for cleanup: https://github.com/pallets/click/blob/ca5e1c3d75e95cbc70fa6ed51ef263592e9ac0d0/src/click/types.py#L740.
## Environment
- Python version: 3.12
- Click version: 8.1.7
| 2024-11-03T13:31:59Z | 2024-11-03T20:38:31Z | ["tests/test_shell_completion.py::test_choice_conflicting_prefix", "tests/test_shell_completion.py::test_option_multiple", "tests/test_shell_completion.py::test_type_choice", "tests/test_shell_completion.py::test_full_source[zsh]", "tests/test_shell_completion.py::test_chained", "tests/test_shell_completion.py::test_full_source[fish]", "tests/test_shell_completion.py::test_full_complete[fish-env4-plain,a\\nplain,b\\tbee\\n]", "tests/test_shell_completion.py::test_option_count", "tests/test_shell_completion.py::test_full_complete[zsh-env2-plain\\na\\n_\\nplain\\nb\\nbee\\n]", "tests/test_shell_completion.py::test_argument_nargs", "tests/test_shell_completion.py::test_option_custom", "tests/test_shell_completion.py::test_completion_item_data", "tests/test_shell_completion.py::test_help_option", "tests/test_shell_completion.py::test_option_flag", "tests/test_shell_completion.py::test_add_completion_class_with_name", "tests/test_shell_completion.py::test_option_optional", "tests/test_shell_completion.py::test_absolute_path", "tests/test_shell_completion.py::test_full_complete[zsh-env3-plain\\nb\\nbee\\n]", "tests/test_shell_completion.py::test_add_different_name", "tests/test_shell_completion.py::test_group", "tests/test_shell_completion.py::test_choice_special_characters", "tests/test_shell_completion.py::test_argument_default", "tests/test_shell_completion.py::test_double_dash", "tests/test_shell_completion.py::test_choice_case_sensitive[False-expect0]", "tests/test_shell_completion.py::test_hidden", "tests/test_shell_completion.py::test_option_nargs", "tests/test_shell_completion.py::test_path_types[type0-file]", "tests/test_shell_completion.py::test_command", "tests/test_shell_completion.py::test_choice_case_sensitive[True-expect1]", "tests/test_shell_completion.py::test_full_complete[bash-env0-plain,a\\nplain,b\\n]", "tests/test_shell_completion.py::test_argument_order", "tests/test_shell_completion.py::test_add_completion_class", "tests/test_shell_completion.py::test_full_complete[fish-env5-plain,b\\tbee\\n]", "tests/test_shell_completion.py::test_full_complete[bash-env1-plain,b\\n]", "tests/test_shell_completion.py::test_path_types[type2-dir]", "tests/test_shell_completion.py::test_path_types[type1-file]", "tests/test_shell_completion.py::test_group_command_same_option", "tests/test_shell_completion.py::test_full_source[bash]", "tests/test_shell_completion.py::test_context_settings"] | [] | ["tests/test_shell_completion.py::test_add_completion_class_decorator", "tests/test_shell_completion.py::test_files_closed"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-1489 | 4271fe283dc9365563aebb369ada8d20eee015a8 | diff --git a/CHANGES.rst b/CHANGES.rst
index 387f84fe3..540bbe2de 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -56,6 +56,9 @@ Unreleased
:issue:`2746` :pr:`2788`
- Add ``Choice.get_invalid_choice_message`` method for customizing the
invalid choice message. :issue:`2621` :pr:`2622`
+- If help is shown because ``no_args_is_help`` is enabled (defaults to ``True``
+ for groups, ``False`` for commands), the exit code is 2 instead of 0.
+ :issue:`1489` :pr:`1489`
Version 8.1.8
diff --git a/src/click/core.py b/src/click/core.py
index 0b924ca4a..666ad6813 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -24,6 +24,7 @@
from .exceptions import ClickException
from .exceptions import Exit
from .exceptions import MissingParameter
+from .exceptions import NoArgsIsHelpError
from .exceptions import UsageError
from .formatting import HelpFormatter
from .formatting import join_options
@@ -1156,8 +1157,7 @@ def make_context(
def parse_args(self, ctx: Context, args: list[str]) -> list[str]:
if not args and self.no_args_is_help and not ctx.resilient_parsing:
- echo(ctx.get_help(), color=ctx.color)
- ctx.exit()
+ raise NoArgsIsHelpError(ctx)
parser = self.make_parser(ctx)
opts, args, param_order = parser.parse_args(args=args)
@@ -1747,8 +1747,7 @@ def format_commands(self, ctx: Context, formatter: HelpFormatter) -> None:
def parse_args(self, ctx: Context, args: list[str]) -> list[str]:
if not args and self.no_args_is_help and not ctx.resilient_parsing:
- echo(ctx.get_help(), color=ctx.color)
- ctx.exit()
+ raise NoArgsIsHelpError(ctx)
rest = super().parse_args(ctx, args)
@@ -1851,7 +1850,7 @@ def resolve_command(
# place.
if cmd is None and not ctx.resilient_parsing:
if _split_opt(cmd_name)[0]:
- self.parse_args(ctx, ctx.args)
+ self.parse_args(ctx, args)
ctx.fail(_("No such command {name!r}.").format(name=original_cmd_name))
return cmd_name if cmd else None, cmd, args[1:]
diff --git a/src/click/exceptions.py b/src/click/exceptions.py
index c7ebe8187..27dd5e010 100644
--- a/src/click/exceptions.py
+++ b/src/click/exceptions.py
@@ -255,6 +255,15 @@ class BadArgumentUsage(UsageError):
"""
+class NoArgsIsHelpError(UsageError):
+ def __init__(self, ctx: Context) -> None:
+ self.ctx: Context
+ super().__init__(ctx.get_help(), ctx=ctx)
+
+ def show(self, file: t.IO[t.Any] | None = None) -> None:
+ echo(self.format_message(), file=file, err=True, color=self.ctx.color)
+
+
class FileError(ClickException):
"""Raised if a file cannot be opened."""
| diff --git a/tests/test_commands.py b/tests/test_commands.py
index 5a56799ad..02c4a3043 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -95,13 +95,9 @@ def long():
)
-def test_no_args_is_help(runner):
- @click.command(no_args_is_help=True)
- def cli():
- pass
-
- result = runner.invoke(cli, [])
- assert result.exit_code == 0
+def test_command_no_args_is_help(runner):
+ result = runner.invoke(click.Command("test", no_args_is_help=True))
+ assert result.exit_code == 2
assert "Show this message and exit." in result.output
@@ -127,7 +123,7 @@ def foo(name):
(["obj1"], 2, "Error: Missing command."),
(["obj1", "--help"], 0, "Show this message and exit."),
(["obj1", "move"], 0, "obj=obj1\nmove\n"),
- ([], 0, "Show this message and exit."),
+ ([], 2, "Show this message and exit."),
],
)
def test_group_with_args(runner, args, exit_code, expect):
| Not specifying a group's command exits with code 0
When a group is created with multiple commands, but the script is called without any commands, the exit code is 0. It looks like [this line](https://github.com/pallets/click/blob/466d0add86f48502db9c02c32e30287d39ab866b/click/core.py#L1028) just needs to be changed to have an exit code. But it's not clear if `ctx.fail()` should be used instead.
### Example Code
```python
import click
@click.group()
def cli():
print("in group")
@cli.command()
def foo():
print("foo")
@cli.command()
def bar():
print("bar")
if __name__ == "__main__":
print("before group")
cli()
```
### Expected Behavior
A non-zero exit code.
### Actual Behavior
```shell
$ python click_poc.py
before group
Usage: click_poc.py [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
bar
foo
$ echo $?
0
```
### Environment
* Python version: Python 3.8.0
* Click version: Click==7.0
| 2020-03-06T22:34:03Z | 2024-11-03T19:56:42Z | ["tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_commands.py::test_other_command_forward", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[EOFError]", "tests/test_commands.py::test_auto_shorthelp", "tests/test_commands.py::test_object_propagation", "tests/test_commands.py::test_group_add_command_name", "tests/test_commands.py::test_group_with_args[args1-0-Show this message and exit.]", "tests/test_commands.py::test_unprocessed_options", "tests/test_commands.py::test_deprecated_in_invocation", "tests/test_commands.py::test_default_maps", "tests/test_commands.py::test_group_parse_args_collects_base_option_prefixes", "tests/test_commands.py::test_command_parse_args_collects_option_prefixes", "tests/test_commands.py::test_aliased_command_canonical_name", "tests/test_commands.py::test_group_with_args[args2-0-obj=obj1\\nmove\\n]", "tests/test_commands.py::test_other_command_invoke", "tests/test_commands.py::test_custom_parser", "tests/test_commands.py::test_group_with_args[args0-2-Error: Missing command.]", "tests/test_commands.py::test_deprecated_in_help_messages[CLI HELP]", "tests/test_commands.py::test_deprecated_in_help_messages[None]", "tests/test_commands.py::test_forwarded_params_consistency", "tests/test_commands.py::test_invoked_subcommand"] | [] | ["tests/test_commands.py::test_command_no_args_is_help", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[KeyboardInterrupt]", "tests/test_commands.py::test_group_with_args[args3-2-Show this message and exit.]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2622 | 1787497713fa389435ed732c9b26274c3cdc458d | diff --git a/CHANGES.rst b/CHANGES.rst
index 495eb2a55..387f84fe3 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -54,6 +54,8 @@ Unreleased
- When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value``
will always be used instead of the value of the environment variable.
:issue:`2746` :pr:`2788`
+- Add ``Choice.get_invalid_choice_message`` method for customizing the
+ invalid choice message. :issue:`2621` :pr:`2622`
Version 8.1.8
diff --git a/docs/api.rst b/docs/api.rst
index 09efd033c..7c070e8ea 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -134,6 +134,7 @@ Types
.. autoclass:: Path
.. autoclass:: Choice
+ :members:
.. autoclass:: IntRange
diff --git a/src/click/types.py b/src/click/types.py
index 2195f3a9b..354c7e381 100644
--- a/src/click/types.py
+++ b/src/click/types.py
@@ -304,16 +304,21 @@ def convert(
if normed_value in normed_choices:
return normed_choices[normed_value]
+ self.fail(self.get_invalid_choice_message(value), param, ctx)
+
+ def get_invalid_choice_message(self, value: t.Any) -> str:
+ """Get the error message when the given choice is invalid.
+
+ :param value: The invalid value.
+
+ .. versionadded:: 8.2
+ """
choices_str = ", ".join(map(repr, self.choices))
- self.fail(
- ngettext(
- "{value!r} is not {choice}.",
- "{value!r} is not one of {choices}.",
- len(self.choices),
- ).format(value=value, choice=choices_str, choices=choices_str),
- param,
- ctx,
- )
+ return ngettext(
+ "{value!r} is not {choice}.",
+ "{value!r} is not one of {choices}.",
+ len(self.choices),
+ ).format(value=value, choice=choices_str, choices=choices_str)
def __repr__(self) -> str:
return f"Choice({list(self.choices)})"
| diff --git a/tests/test_types.py b/tests/test_types.py
index 79068e189..667953a47 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -244,3 +244,9 @@ def test_invalid_path_with_esc_sequence():
click.Path(dir_okay=False).convert(tempdir, None, None)
assert "my\\ndir" in exc_info.value.message
+
+
+def test_choice_get_invalid_choice_message():
+ choice = click.Choice(["a", "b", "c"])
+ message = choice.get_invalid_choice_message("d")
+ assert message == "'d' is not one of 'a', 'b', 'c'."
| Allow customizing fail message for invalid choice in `click.types.Choice`
Move the fail art of `convert()` in the `Choice` class to a new method `get_invalid_choice_fail_message(self)` so in my subclass of `click.Choice` I can customize the way it shows the failing value for the choice
Some CLI option choices are multi-part meaning they are separated by some value, like a comma separated list for example. Maybe each section of this value represents a different part of a schema and it is nice to show a custom message about the specific part.
Contrived version:
Let says my choices are `["maine::goat", "maine::themepark"]` and I give it "maine::toast"`, it'd be nice to say the `maine` part was correct and the `toast` part was not.
| 2023-10-04T21:40:39Z | 2024-11-03T14:54:03Z | ["tests/test_types.py::test_cast_multi_default[2-False-default1-expect1]", "tests/test_types.py::test_path_type[Path-expect3]", "tests/test_types.py::test_file_error_surrogates", "tests/test_types.py::test_range_fail[type2-6-6 is not in the range x<=5.]", "tests/test_types.py::test_cast_multi_default[None-True-None-expect2]", "tests/test_types.py::test_range[type5--1-0]", "tests/test_types.py::test_range_fail[type4-5-0<=x<5]", "tests/test_types.py::test_range[type7-0-1]", "tests/test_types.py::test_path_type[str-a/b/c.txt]", "tests/test_types.py::test_range[type4--100--100]", "tests/test_types.py::test_cast_multi_default[None-True-default3-expect3]", "tests/test_types.py::test_range[type10-0.51-0.51]", "tests/test_types.py::test_range[type13-inf-1.5]", "tests/test_types.py::test_range_fail[type0-6-6 is not in the range 0<=x<=5.]", "tests/test_types.py::test_cast_multi_default[2-True-None-expect4]", "tests/test_types.py::test_path_type[bytes-a/b/c.txt]", "tests/test_types.py::test_range[type6-6-5]", "tests/test_types.py::test_file_surrogates[type1]", "tests/test_types.py::test_range[type11-1.49-1.49]", "tests/test_types.py::test_range[type9-1.2-1.2]", "tests/test_types.py::test_range_fail[type5-0.5-x>0.5]", "tests/test_types.py::test_range_fail[type3-0-0<x<=5]", "tests/test_types.py::test_range[type8-5-4]", "tests/test_types.py::test_file_surrogates[type0]", "tests/test_types.py::test_path_surrogates", "tests/test_types.py::test_range[type3-5-5]", "tests/test_types.py::test_range_fail[type6-1.5-x<1.5]", "tests/test_types.py::test_range[type2-100-100]", "tests/test_types.py::test_range[type1-5-5]", "tests/test_types.py::test_path_resolve_symlink", "tests/test_types.py::test_range[type12--0.0-0.5]", "tests/test_types.py::test_range[type0-3-3]", "tests/test_types.py::test_cast_multi_default[2-True-default5-expect5]", "tests/test_types.py::test_path_type[None-a/b/c.txt]", "tests/test_types.py::test_range_fail[type1-4-4 is not in the range x>=5.]", "tests/test_types.py::test_cast_multi_default[2-False-None-None]", "tests/test_types.py::test_float_range_no_clamp_open", "tests/test_types.py::test_cast_multi_default[-1-None-None-expect6]"] | [] | ["tests/test_types.py::test_choice_get_invalid_choice_message", "tests/test_types.py::test_invalid_path_with_esc_sequence"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2788 | 380008389b32ca2b7de7c73f670a9eee1562004e | diff --git a/CHANGES.rst b/CHANGES.rst
index 7bb076285..495eb2a55 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -51,6 +51,9 @@ Unreleased
- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609`
- A ``UserWarning`` will be shown when multiple parameters attempt to use the
same name. :issue:`2396``
+- When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value``
+ will always be used instead of the value of the environment variable.
+ :issue:`2746` :pr:`2788`
Version 8.1.8
diff --git a/src/click/core.py b/src/click/core.py
index 5420c4bec..0b924ca4a 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -2430,15 +2430,19 @@ class Option(Parameter):
:param hidden: hide this option from help outputs.
:param attrs: Other command arguments described in :class:`Parameter`.
- .. versionchanged:: 8.1.0
+ .. versionchanged:: 8.2
+ ``envvar`` used with ``flag_value`` will always use the ``flag_value``,
+ previously it would use the value of the environment variable.
+
+ .. versionchanged:: 8.1
Help text indentation is cleaned here instead of only in the
``@option`` decorator.
- .. versionchanged:: 8.1.0
+ .. versionchanged:: 8.1
The ``show_default`` parameter overrides
``Context.show_default``.
- .. versionchanged:: 8.1.0
+ .. versionchanged:: 8.1
The default of a single option boolean flag is not shown if the
default value is ``False``.
@@ -2864,6 +2868,8 @@ def resolve_envvar_value(self, ctx: Context) -> str | None:
rv = super().resolve_envvar_value(ctx)
if rv is not None:
+ if self.is_flag and self.flag_value:
+ return str(self.flag_value)
return rv
if (
| diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 825bcc487..5dc56a468 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -198,6 +198,19 @@ def cmd(arg):
assert result.return_value == expect
+def test_envvar_flag_value(runner):
+ @click.command()
+ # is_flag is implicitly true
+ @click.option("--upper", flag_value="upper", envvar="UPPER")
+ def cmd(upper):
+ click.echo(upper)
+ return upper
+
+ # For whatever value of the `env` variable, if it exists, the flag should be `upper`
+ result = runner.invoke(cmd, env={"UPPER": "whatever"})
+ assert result.output.strip() == "upper"
+
+
def test_nargs_envvar_only_if_values_empty(runner):
@click.command()
@click.argument("arg", envvar="X", nargs=-1)
| `flag_value` is not taken into account with `envvar`
When using the ~~--debug option~~ `DEBUG` environment variable in the sample command, the debug value is not correctly set (`flag_value`). It is expected to be either `logging.DEBUG` or `None`, but it seems to be getting the integer value directly from the environment variable.
Sample:
```python
import logging
import os
import sys
import click
# Works as expected
# sys.argv = ['', '--debug']
# Does not work as expected
# os.environ['DEBUG'] = '1'
@click.command()
@click.option('--debug', is_flag=True, flag_value=logging.DEBUG, envvar='DEBUG')
def sample(debug):
click.echo(f"DEBUG: {debug}")
assert debug in [logging.DEBUG, None], f"Invalid debug value: {debug} - expected >{logging.DEBUG}< or None"
if __name__ == '__main__':
sample()
```
There is no different in using `os.environ` or `DEBUG=1 python cli.py`.
`DEBUG=8 python cli.py` prints out: `8`
Environment:
- Python version: 3.12.4
- Click version: 8.1.7
| 2024-10-13T20:47:53Z | 2024-11-03T14:40:46Z | ["tests/test_arguments.py::test_nargs_envvar[2-a b-expect2]", "tests/test_arguments.py::test_nargs_envvar[-1-a b c-expect4]", "tests/test_arguments.py::test_stdout_default", "tests/test_arguments.py::test_nargs_bad_default[value2]", "tests/test_arguments.py::test_nargs_envvar[-1--expect5]", "tests/test_arguments.py::test_multiple_not_allowed", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_defaults_for_nargs", "tests/test_arguments.py::test_missing_argument_string_cast", "tests/test_arguments.py::test_nargs_envvar[2-a-Takes 2 values but 1 was given.]", "tests/test_arguments.py::test_nargs_bad_default[value1]", "tests/test_arguments.py::test_nargs_tup_composite[opts3]", "tests/test_arguments.py::test_subcommand_help", "tests/test_arguments.py::test_nested_subcommand_help", "tests/test_arguments.py::test_empty_nargs", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_star_ordering", "tests/test_arguments.py::test_when_argument_decorator_is_used_multiple_times_cls_is_preserved", "tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_missing_arg", "tests/test_arguments.py::test_path_allow_dash", "tests/test_arguments.py::test_nargs_specified_plus_star_ordering", "tests/test_arguments.py::test_eat_options", "tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_nargs_envvar[2-a b c-Takes 2 values but 3 were given.]", "tests/test_arguments.py::test_nargs_envvar_only_if_values_empty", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_bad_default[value0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_multiple_param_decls_not_allowed", "tests/test_arguments.py::test_file_atomics", "tests/test_arguments.py::test_nargs_envvar[2--None]", "tests/test_arguments.py::test_nargs_err", "tests/test_arguments.py::test_bytes_args", "tests/test_arguments.py::test_implicit_non_required", "tests/test_arguments.py::test_nargs_tup_composite[opts2]"] | [] | ["tests/test_arguments.py::test_envvar_flag_value", "tests/test_arguments.py::test_duplicate_names_warning[args_one0-args_two0]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2397 | fcd85032cff78aa536a6d2b455fb83bfcc02b228 | diff --git a/CHANGES.rst b/CHANGES.rst
index e6032649a..7bb076285 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -49,6 +49,8 @@ Unreleased
``Context.call_on_close`` callbacks and context managers added via
``Context.with_resource`` to be closed on exit as well. :pr:`2680`
- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609`
+- A ``UserWarning`` will be shown when multiple parameters attempt to use the
+ same name. :issue:`2396``
Version 8.1.8
diff --git a/src/click/core.py b/src/click/core.py
index 968a10e77..5420c4bec 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -8,6 +8,7 @@
import sys
import typing as t
from collections import abc
+from collections import Counter
from contextlib import AbstractContextManager
from contextlib import contextmanager
from contextlib import ExitStack
@@ -957,13 +958,29 @@ def get_usage(self, ctx: Context) -> str:
return formatter.getvalue().rstrip("\n")
def get_params(self, ctx: Context) -> list[Parameter]:
- rv = self.params
+ params = self.params
help_option = self.get_help_option(ctx)
if help_option is not None:
- rv = [*rv, help_option]
+ params = [*params, help_option]
- return rv
+ if __debug__:
+ import warnings
+
+ opts = [opt for param in params for opt in param.opts]
+ opts_counter = Counter(opts)
+ duplicate_opts = (opt for opt, count in opts_counter.items() if count > 1)
+
+ for duplicate_opt in duplicate_opts:
+ warnings.warn(
+ (
+ f"The parameter {duplicate_opt} is used more than once. "
+ "Remove its duplicate as parameters should be unique."
+ ),
+ stacklevel=3,
+ )
+
+ return params
def format_usage(self, ctx: Context, formatter: HelpFormatter) -> None:
"""Writes the usage line into the formatter.
@@ -1973,6 +1990,10 @@ class Parameter:
of :class:`~click.shell_completion.CompletionItem` or a list of
strings.
+ .. versionchanged:: 8.2
+ Adding duplicate parameter names to a :class:`~click.core.Command` will
+ result in a ``UserWarning`` being shown.
+
.. versionchanged:: 8.0
``process_value`` validates required parameters and bounded
``nargs``, and invokes the parameter callback before returning
@@ -2974,7 +2995,7 @@ def _parse_decls(
else:
raise TypeError(
"Arguments take exactly one parameter declaration, got"
- f" {len(decls)}."
+ f" {len(decls)}: {decls}."
)
return name, [arg], []
| diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 7f6629fba..825bcc487 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -401,3 +401,23 @@ def bar(arg):
assert isinstance(foo.params[0], CustomArgument)
assert isinstance(bar.params[0], CustomArgument)
+
+
[email protected](
+ "args_one,args_two",
+ [
+ (
+ ("aardvark",),
+ ("aardvark",),
+ ),
+ ],
+)
+def test_duplicate_names_warning(runner, args_one, args_two):
+ @click.command()
+ @click.argument(*args_one)
+ @click.argument(*args_two)
+ def cli(one, two):
+ pass
+
+ with pytest.warns(UserWarning):
+ runner.invoke(cli, [])
diff --git a/tests/test_options.py b/tests/test_options.py
index 74ccc5ff9..2a3b69287 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -989,3 +989,29 @@ def cli_without_choices(g):
result = runner.invoke(cli_without_choices, ["--help"])
assert metavars in result.output
+
+
[email protected](
+ "opts_one,opts_two",
+ [
+ # No duplicate shortnames
+ (
+ ("-a", "--aardvark"),
+ ("-a", "--avocado"),
+ ),
+ # No duplicate long names
+ (
+ ("-a", "--aardvark"),
+ ("-b", "--aardvark"),
+ ),
+ ],
+)
+def test_duplicate_names_warning(runner, opts_one, opts_two):
+ @click.command()
+ @click.option(*opts_one)
+ @click.option(*opts_two)
+ def cli(one, two):
+ pass
+
+ with pytest.warns(UserWarning):
+ runner.invoke(cli, [])
| Issue UserWarning when overriding Parameter name
When a command is given multiple parameters that use the same name, a UserWarning should be fired to highlight the conflict. Currently, the command will quietly allow one parameter to override the names of another.
(This is a slightly different problem than https://github.com/pallets/click/issues/1465. In that issue, True and False values were given the same names within a single parameter.)
**Example of the issue:**
```python
@click.command()
@click.option("-a", "--aardvark", is_flag=True)
@click.option("-a", "--avocado", is_flag=True)
def cli(aardvark: bool = False, avocado: bool = False):
if aardvark:
print("Animal")
if avocado:
print("Fruit")
```
In this scenario, the short-name, `-a`, appears ambiguous. A warning would help the user realize the conflict they've introduced.
I'll also provide a pull request for consideration.
| 2022-11-07T03:47:35Z | 2024-11-03T14:11:59Z | ["tests/test_arguments.py::test_nargs_envvar[-1-a b c-expect4]", "tests/test_options.py::test_show_default_precedence[False-one-extra_value9-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "tests/test_arguments.py::test_nargs_envvar[2-a-Takes 2 values but 1 was given.]", "tests/test_options.py::test_show_true_default_boolean_flag_value", "tests/test_arguments.py::test_subcommand_help", "tests/test_options.py::test_prefixes", "tests/test_options.py::test_show_default_precedence[False-None-extra_value3-False]", "tests/test_arguments.py::test_when_argument_decorator_is_used_multiple_times_cls_is_preserved", "tests/test_options.py::test_intrange_default_help_text[type2-x>=1]", "tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_missing_arg", "tests/test_options.py::test_show_default_string", "tests/test_options.py::test_unknown_options[--foo]", "tests/test_arguments.py::test_eat_options", "tests/test_arguments.py::test_nargs_star", "tests/test_options.py::test_invalid_option", "tests/test_arguments.py::test_nargs_envvar_only_if_values_empty", "tests/test_options.py::test_invalid_flag_combinations[kwargs1-'count' is not valid with 'is_flag'.]", "tests/test_arguments.py::test_nargs_bad_default[value0]", "tests/test_arguments.py::test_multiple_param_decls_not_allowed", "tests/test_options.py::test_show_envvar", "tests/test_arguments.py::test_file_atomics", "tests/test_arguments.py::test_nargs_envvar[2--None]", "tests/test_options.py::test_init_good_default_list[True-1-default0]", "tests/test_options.py::test_show_default_precedence[False-True-extra_value5-True]", "tests/test_options.py::test_option_with_optional_value[None-expect0]", "tests/test_options.py::test_init_bad_default_list[False-2-default1]", "tests/test_options.py::test_multiple_envvar", "tests/test_arguments.py::test_nargs_err", "tests/test_options.py::test_usage_show_choices[text/int choices]", "tests/test_arguments.py::test_implicit_non_required", "tests/test_options.py::test_dynamic_default_help_text", "tests/test_arguments.py::test_nargs_tup_composite[opts2]", "tests/test_options.py::test_option_with_optional_value[args13-expect13]", "tests/test_options.py::test_trailing_blanks_boolean_envvar", "tests/test_options.py::test_option_with_optional_value[args6-expect6]", "tests/test_options.py::test_invalid_nargs", "tests/test_options.py::test_option_with_optional_value[args11-expect11]", "tests/test_options.py::test_suggest_possible_options[--cat-Did you mean --count?]", "tests/test_arguments.py::test_stdout_default", "tests/test_options.py::test_unknown_options[-f]", "tests/test_options.py::test_multiple_option_with_optional_value", "tests/test_options.py::test_bool_flag_with_type", "tests/test_arguments.py::test_nargs_envvar[-1--expect5]", "tests/test_arguments.py::test_nargs_bad_default[value2]", "tests/test_options.py::test_option_with_optional_value[args4-expect4]", "tests/test_options.py::test_option_names[option_args1-first]", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_options.py::test_show_default_precedence[None-None-extra_value0-False]", "tests/test_options.py::test_option_with_optional_value[args7-expect7]", "tests/test_arguments.py::test_nargs_tup_composite[opts3]", "tests/test_arguments.py::test_empty_nargs", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_options.py::test_aliases_for_flags", "tests/test_options.py::test_is_bool_flag_is_correctly_set[secondary option [implicit flag]]", "tests/test_arguments.py::test_nargs_specified_plus_star_ordering", "tests/test_options.py::test_multiple_required", "tests/test_options.py::test_show_default_default_map", "tests/test_options.py::test_invalid_flag_combinations[kwargs0-'count' is not valid with 'multiple'.]", "tests/test_arguments.py::test_nargs_envvar[2-a b c-Takes 2 values but 3 were given.]", "tests/test_options.py::test_option_names[option_args4-a]", "tests/test_options.py::test_nargs_tup_composite_mult", "tests/test_options.py::test_suggest_possible_options[--bounds-(Possible options: --bound, --count)]", "tests/test_options.py::test_intrange_default_help_text[type0-1<=x<=32]", "tests/test_options.py::test_intrange_default_help_text[type3-x<=32]", "tests/test_options.py::test_nargs_envvar", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [None]]", "tests/test_options.py::test_option_help_preserve_paragraphs", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [True]]", "tests/test_options.py::test_count_default_type_help", "tests/test_options.py::test_legacy_options", "tests/test_options.py::test_option_names[option_args9-_ret]", "tests/test_options.py::test_show_envvar_auto_prefix", "tests/test_options.py::test_option_with_optional_value[args3-expect3]", "tests/test_options.py::test_show_default_precedence[None-True-extra_value2-True]", "tests/test_options.py::test_argument_custom_class", "tests/test_options.py::test_usage_show_choices[float choices]", "tests/test_options.py::test_show_default_with_empty_string", "tests/test_options.py::test_dynamic_default_help_special_method", "tests/test_options.py::test_hide_false_default_boolean_flag_value[False]", "tests/test_options.py::test_suggest_possible_options[--bount-(Possible options: --bound, --count)]", "tests/test_options.py::test_missing_option_string_cast", "tests/test_options.py::test_toupper_envvar_prefix", "tests/test_options.py::test_is_bool_flag_is_correctly_set[is_flag=True]", "tests/test_arguments.py::test_defaults_for_nargs", "tests/test_options.py::test_winstyle_options", "tests/test_arguments.py::test_missing_argument_string_cast", "tests/test_options.py::test_missing_required_flag", "tests/test_options.py::test_case_insensitive_choice_returned_exactly", "tests/test_options.py::test_show_default_precedence[True-True-extra_value8-True]", "tests/test_options.py::test_usage_show_choices[bool choices]", "tests/test_options.py::test_dynamic_default_help_unset", "tests/test_options.py::test_option_names[option_args2-apple]", "tests/test_options.py::test_init_good_default_list[False-2-default2]", "tests/test_options.py::test_hide_false_default_boolean_flag_value[None]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool flag_value]", "tests/test_options.py::test_callback_validates_prompt", "tests/test_options.py::test_option_names[option_args8-_from]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [False]]", "tests/test_options.py::test_multiple_default_composite_type", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_options.py::test_usage_show_choices[text choices]", "tests/test_options.py::test_option_with_optional_value[args2-expect2]", "tests/test_options.py::test_type_from_flag_value", "tests/test_options.py::test_case_insensitive_choice", "tests/test_options.py::test_init_good_default_list[True-2-default4]", "tests/test_options.py::test_intrange_default_help_text[type1-1<x<32]", "tests/test_arguments.py::test_bytes_args", "tests/test_options.py::test_missing_envvar", "tests/test_options.py::test_custom_validation", "tests/test_options.py::test_option_names[option_args3-cantaloupe]", "tests/test_options.py::test_show_default_precedence[True-None-extra_value6-True]", "tests/test_options.py::test_option_names[option_args6-apple]", "tests/test_options.py::test_show_default_boolean_flag_name[True-cache]", "tests/test_arguments.py::test_nargs_envvar[2-a b-expect2]", "tests/test_options.py::test_option_with_optional_value[args10-expect10]", "tests/test_options.py::test_option_custom_class_reusable", "tests/test_options.py::test_init_good_default_list[True-2-default3]", "tests/test_options.py::test_show_default_precedence[None-False-extra_value1-False]", "tests/test_arguments.py::test_multiple_not_allowed", "tests/test_options.py::test_option_with_optional_value[args12-expect12]", "tests/test_options.py::test_show_default_precedence[True-False-extra_value7-False]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[non-bool flag_value]", "tests/test_options.py::test_option_with_optional_value[args9-expect9]", "tests/test_options.py::test_init_good_default_list[True-1-default1]", "tests/test_options.py::test_init_bad_default_list[True-1-1]", "tests/test_options.py::test_show_default_boolean_flag_name[False-no-cache]", "tests/test_options.py::test_option_custom_class", "tests/test_arguments.py::test_nargs_bad_default[value1]", "tests/test_options.py::test_parse_multiple_default_composite_type", "tests/test_options.py::test_option_with_optional_value[args5-expect5]", "tests/test_options.py::test_option_with_optional_value[args8-expect8]", "tests/test_arguments.py::test_nested_subcommand_help", "tests/test_options.py::test_option_names[option_args0-aggressive]", "tests/test_options.py::test_init_bad_default_list[True-2-default2]", "tests/test_arguments.py::test_nargs_star_ordering", "tests/test_options.py::test_option_with_optional_value[args1-expect1]", "tests/test_options.py::test_option_names[option_args7-cantaloupe]", "tests/test_options.py::test_counting", "tests/test_arguments.py::test_path_allow_dash", "tests/test_options.py::test_is_bool_flag_is_correctly_set[int option]", "tests/test_arguments.py::test_nargs_tup", "tests/test_options.py::test_file_type_help_default", "tests/test_options.py::test_multiple_default_help", "tests/test_options.py::test_option_names[option_args5-c]", "tests/test_options.py::test_multiple_default_type", "tests/test_options.py::test_missing_choice", "tests/test_options.py::test_empty_envvar[MYPATH]", "tests/test_options.py::test_show_default_precedence[False-False-extra_value4-False]", "tests/test_options.py::test_usage_show_choices[int choices]", "tests/test_options.py::test_show_envvar_auto_prefix_dash_in_command", "tests/test_options.py::test_do_not_show_no_default"] | [] | ["tests/test_options.py::test_duplicate_names_warning[opts_one0-opts_two0]", "tests/test_options.py::test_duplicate_names_warning[opts_one1-opts_two1]", "tests/test_arguments.py::test_duplicate_names_warning[args_one0-args_two0]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2727 | c326df95e9e3da0425360e030413f6a3ee25fdee | diff --git a/.gitignore b/.gitignore
index 62c1b887d..787c22259 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,8 @@
.vscode/
.venv*/
venv*/
+.env*/
+env*/
__pycache__/
dist/
.coverage*
diff --git a/CHANGES.rst b/CHANGES.rst
index 59c5b58f7..e6032649a 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -48,6 +48,7 @@ Unreleased
- ``Context.close`` will be called on exit. This results in all
``Context.call_on_close`` callbacks and context managers added via
``Context.with_resource`` to be closed on exit as well. :pr:`2680`
+- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609`
Version 8.1.8
diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py
index 923641a44..7b97bfb55 100644
--- a/src/click/_termui_impl.py
+++ b/src/click/_termui_impl.py
@@ -47,6 +47,7 @@ def __init__(
empty_char: str = " ",
bar_template: str = "%(bar)s",
info_sep: str = " ",
+ hidden: bool = False,
show_eta: bool = True,
show_percent: bool | None = None,
show_pos: bool = False,
@@ -61,6 +62,7 @@ def __init__(
self.empty_char = empty_char
self.bar_template = bar_template
self.info_sep = info_sep
+ self.hidden = hidden
self.show_eta = show_eta
self.show_percent = show_percent
self.show_pos = show_pos
@@ -105,7 +107,7 @@ def __init__(
self.max_width: int | None = None
self.entered: bool = False
self.current_item: V | None = None
- self.is_hidden: bool = not isatty(self.file)
+ self._is_atty = isatty(self.file)
self._last_line: str | None = None
def __enter__(self) -> ProgressBar[V]:
@@ -136,7 +138,7 @@ def __next__(self) -> V:
return next(iter(self))
def render_finish(self) -> None:
- if self.is_hidden:
+ if self.hidden or not self._is_atty:
return
self.file.write(AFTER_BAR)
self.file.flush()
@@ -232,13 +234,14 @@ def format_progress_line(self) -> str:
def render_progress(self) -> None:
import shutil
- if self.is_hidden:
- # Only output the label as it changes if the output is not a
- # TTY. Use file=stderr if you expect to be piping stdout.
+ if self.hidden:
+ return
+
+ if not self._is_atty:
+ # Only output the label once if the output is not a TTY.
if self._last_line != self.label:
self._last_line = self.label
echo(self.label, file=self.file, color=self.color)
-
return
buf = []
@@ -342,7 +345,7 @@ def generator(self) -> cabc.Iterator[V]:
if not self.entered:
raise RuntimeError("You need to use progress bars in a with block.")
- if self.is_hidden:
+ if not self._is_atty:
yield from self.iter
else:
for rv in self.iter:
diff --git a/src/click/termui.py b/src/click/termui.py
index 12d6edf5f..e14e6701c 100644
--- a/src/click/termui.py
+++ b/src/click/termui.py
@@ -288,6 +288,7 @@ def progressbar(
iterable: cabc.Iterable[V] | None = None,
length: int | None = None,
label: str | None = None,
+ hidden: bool = False,
show_eta: bool = True,
show_percent: bool | None = None,
show_pos: bool = False,
@@ -363,6 +364,9 @@ def progressbar(
length. If an iterable is not provided the progress bar
will iterate over a range of that length.
:param label: the label to show next to the progress bar.
+ :param hidden: hide the progressbar. Defaults to ``False``. When no tty is
+ detected, it will only print the progressbar label. Setting this to
+ ``False`` also disables that.
:param show_eta: enables or disables the estimated time display. This is
automatically disabled if the length cannot be
determined.
@@ -395,6 +399,9 @@ def progressbar(
:param update_min_steps: Render only when this many updates have
completed. This allows tuning for very fast iterators.
+ .. versionadded:: 8.2
+ The ``hidden`` argument.
+
.. versionchanged:: 8.0
Output is shown even if execution time is less than 0.5 seconds.
@@ -406,11 +413,10 @@ def progressbar(
in 7.0 that removed all output.
.. versionadded:: 8.0
- Added the ``update_min_steps`` parameter.
+ The ``update_min_steps`` parameter.
- .. versionchanged:: 4.0
- Added the ``color`` parameter. Added the ``update`` method to
- the object.
+ .. versionadded:: 4.0
+ The ``color`` parameter and ``update`` method.
.. versionadded:: 2.0
"""
@@ -420,6 +426,7 @@ def progressbar(
return ProgressBar(
iterable=iterable,
length=length,
+ hidden=hidden,
show_eta=show_eta,
show_percent=show_percent,
show_pos=show_pos,
| diff --git a/tests/test_termui.py b/tests/test_termui.py
index 0dcd2330c..8fdfe8d64 100644
--- a/tests/test_termui.py
+++ b/tests/test_termui.py
@@ -71,7 +71,7 @@ def cli():
assert result.exception is None
-def test_progressbar_hidden(runner, monkeypatch):
+def test_progressbar_no_tty(runner, monkeypatch):
@click.command()
def cli():
with _create_progress(label="working") as progress:
@@ -82,6 +82,17 @@ def cli():
assert runner.invoke(cli, []).output == "working\n"
+def test_progressbar_hidden_manual(runner, monkeypatch):
+ @click.command()
+ def cli():
+ with _create_progress(label="see nothing", hidden=True) as progress:
+ for _ in progress:
+ pass
+
+ monkeypatch.setattr(click._termui_impl, "isatty", lambda _: True)
+ assert runner.invoke(cli, []).output == ""
+
+
@pytest.mark.parametrize("avg, expected", [([], 0.0), ([1, 4], 2.5)])
def test_progressbar_time_per_iteration(runner, avg, expected):
with _create_progress(2, avg=avg) as progress:
| `progressbar(hide=True)` option for hiding the progress bar
Often when I use the Click `progressbar` I find myself wanting to conditionally hide it. Sometimes it's because there's another option in play which means I have output to display in place of it - others it's because I added a `--silent` option (as seen in `curl`) for disabling it entirely.
It's actually a bit tricky doing this at the moment, due to its use as a context manager.
What I'd really like to be able to do is this:
```python
hide = True # or False depending on various things
with click.progressbar(items, show_eta=True, hide=hide):
for item in items:
process_item(item)
```
| Here's [one workaround](https://github.com/simonw/sqlite-utils/blob/622c3a5a7dd53a09c029e2af40c2643fe7579340/sqlite_utils/utils.py#L432-L450) I've used for this, which feels pretty messy:
```python
class NullProgressBar:
def __init__(self, *args):
self.args = args
def __iter__(self):
yield from self.args[0]
def update(self, value):
pass
@contextlib.contextmanager
def progressbar(*args, **kwargs):
silent = kwargs.pop("silent")
if silent:
yield NullProgressBar(*args)
else:
with click.progressbar(*args, **kwargs) as bar:
yield bar
```
Then:
```python
with progressbar(
length=self.count, silent=not show_progress, label="1: Evaluating"
) as bar:
```
It looks like there's already a property that could be used for this:
https://github.com/pallets/click/blob/ca5e1c3d75e95cbc70fa6ed51ef263592e9ac0d0/src/click/_termui_impl.py#L107
So the implementation may be as straight-forward as adding a `hide: bool = False` parameter and then doing this:
```python
self.is_hidden: bool = not hide and not isatty(self.file)
```
I tried this:
```python
with click.progressbar(
ids, label="Calculating similarities", show_percent=True
) as bar:
if hide:
bar.is_hidden = True
```
But it still shows the bar once at the start of the loop, because of this:
https://github.com/pallets/click/blob/ca5e1c3d75e95cbc70fa6ed51ef263592e9ac0d0/src/click/_termui_impl.py#L110-L113
Which calls `render_progress()` before I've had a chance to toggle `is_hidden` to `False`: https://github.com/pallets/click/blob/ca5e1c3d75e95cbc70fa6ed51ef263592e9ac0d0/src/click/_termui_impl.py#L231-L239 | 2024-05-20T22:11:49Z | 2024-11-03T13:12:06Z | ["tests/test_termui.py::test_progressbar_format_eta[900-00:15:00]", "tests/test_termui.py::test_file_prompt_default_format[file_kwargs1]", "tests/test_termui.py::test_progressbar_format_eta[0-00:00:00]", "tests/test_termui.py::test_prompt_required_false[short sep value]", "tests/test_termui.py::test_progressbar_update_with_item_show_func", "tests/test_termui.py::test_progressbar_format_progress_line[0-True-True-0- [--------] 0/0 0%]", "tests/test_termui.py::test_prompt_required_false[long no value]", "tests/test_termui.py::test_progressbar_eta[True-0]", "tests/test_termui.py::test_progressbar_format_pos[0-5]", "tests/test_termui.py::test_prompt_required_false[no flag]", "tests/test_termui.py::test_progressbar_length_hint", "tests/test_termui.py::test_progressbar_yields_all_items", "tests/test_termui.py::test_prompt_required_false[long sep value]", "tests/test_termui.py::test_progressbar_format_pos[4-0]", "tests/test_termui.py::test_progressbar_format_pos[-1-1]", "tests/test_termui.py::test_progressbar_format_pos[5-5]", "tests/test_termui.py::test_progressbar_time_per_iteration[avg0-0.0]", "tests/test_termui.py::test_progressbar_format_progress_line[0-False-True-0- [--------] 0/0]", "tests/test_termui.py::test_secho_non_text[test-test]", "tests/test_termui.py::test_progressbar_init_exceptions", "tests/test_termui.py::test_secho_non_text[123-\\x1b[45m123\\x1b[0m]", "tests/test_termui.py::test_progressbar_update", "tests/test_termui.py::test_fast_edit", "tests/test_termui.py::test_file_prompt_default_format[file_kwargs2]", "tests/test_termui.py::test_progressbar_format_eta[90-00:01:30]", "tests/test_termui.py::test_false_show_default_cause_no_default_display_in_prompt", "tests/test_termui.py::test_progressbar_eta[False-5]", "tests/test_termui.py::test_progressbar_format_progress_line[0-False-False-0- [--------]1]", "tests/test_termui.py::test_progressbar_format_bar[0-True-8-0-########]", "tests/test_termui.py::test_prompt_required_with_required[True-False-None-prompt]", "tests/test_termui.py::test_prompt_required_with_required[False-True-args3-prompt]", "tests/test_termui.py::test_confirmation_prompt[True---]", "tests/test_termui.py::test_progressbar_iter_outside_with_exceptions", "tests/test_termui.py::test_progressbar_format_pos[6-5]", "tests/test_termui.py::test_progressbar_format_bar[8-False-7-0-#######-]", "tests/test_termui.py::test_progressbar_format_progress_line_with_show_func[test]", "tests/test_termui.py::test_prompt_required_false[long join value]", "tests/test_termui.py::test_confirmation_prompt[Confirm Password-password\\npassword\\n-None-password]", "tests/test_termui.py::test_choices_list_in_prompt", "tests/test_termui.py::test_progressbar_format_eta[99999999999-1157407d 09:46:39]", "tests/test_termui.py::test_progressbar_time_per_iteration[avg1-2.5]", "tests/test_termui.py::test_file_prompt_default_format[file_kwargs0]", "tests/test_termui.py::test_progressbar_format_eta[9000-02:30:00]", "tests/test_termui.py::test_progressbar_format_eta[30-00:00:30]", "tests/test_termui.py::test_confirmation_prompt[False-None-None-None]", "tests/test_termui.py::test_prompt_required_with_required[False-True-None-prompt]", "tests/test_termui.py::test_progressbar_no_tty", "tests/test_termui.py::test_progressbar_format_progress_line_with_show_func[None]", "tests/test_termui.py::test_progressbar_strip_regression", "tests/test_termui.py::test_secho", "tests/test_termui.py::test_progressbar_format_progress_line[0-False-False-0- [--------]0]", "tests/test_termui.py::test_progress_bar_update_min_steps", "tests/test_termui.py::test_progressbar_item_show_func", "tests/test_termui.py::test_prompt_required_false[short no value]", "tests/test_termui.py::test_confirmation_prompt[True-password\\npassword-None-password]", "tests/test_termui.py::test_prompt_required_false[no value opt]", "tests/test_termui.py::test_progressbar_format_progress_line[8-True-True-8- [########] 8/8 100%]", "tests/test_termui.py::test_prompt_required_false[short join value]", "tests/test_termui.py::test_prompt_required_with_required[True-False-args1-Option '-v' requires an argument.]", "tests/test_termui.py::test_progressbar_format_eta[None-]", "tests/test_termui.py::test_progressbar_is_iterator"] | [] | ["tests/test_termui.py::test_progressbar_hidden_manual"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2696 | 0e0c00324a5af35f8995c7ff88df67b0f5594a58 | diff --git a/CHANGES.rst b/CHANGES.rst
index f3997a546..086ccf4cc 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -43,6 +43,8 @@ Unreleased
collect stderr output and never raise an exception. Add a new
output` stream to simulate what the user sees in its terminal. Removes
the ``mix_stderr`` parameter in ``CliRunner``. :issue:`2522` :pr:`2523`
+- If ``show_envvar`` then show env var in error messages.
+ :issue:`2695`
Version 8.1.8
diff --git a/src/click/core.py b/src/click/core.py
index 9b1a846ba..f17a8a818 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -2372,8 +2372,8 @@ class Option(Parameter):
For single option boolean flags, the default remains hidden if
its value is ``False``.
:param show_envvar: Controls if an environment variable should be
- shown on the help page. Normally, environment variables are not
- shown.
+ shown on the help page and error messages.
+ Normally, environment variables are not shown.
:param prompt: If set to ``True`` or a non empty string then the
user will be prompted for input. If set to ``True`` the prompt
will be the option name capitalized.
@@ -2551,6 +2551,12 @@ def to_info_dict(self) -> dict[str, t.Any]:
)
return info_dict
+ def get_error_hint(self, ctx: Context) -> str:
+ result = super().get_error_hint(ctx)
+ if self.show_envvar:
+ result += f" (env var: '{self.envvar}')"
+ return result
+
def _parse_decls(
self, decls: cabc.Sequence[str], expose_value: bool
) -> tuple[str | None, list[str], list[str]]:
| diff --git a/tests/test_options.py b/tests/test_options.py
index 293f2532a..74ccc5ff9 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -531,6 +531,22 @@ def cmd(foo):
assert "bar" in choices
+def test_missing_envvar(runner):
+ cli = click.Command(
+ "cli", params=[click.Option(["--foo"], envvar="bar", required=True)]
+ )
+ result = runner.invoke(cli)
+ assert result.exit_code == 2
+ assert "Error: Missing option '--foo'." in result.output
+ cli = click.Command(
+ "cli",
+ params=[click.Option(["--foo"], envvar="bar", show_envvar=True, required=True)],
+ )
+ result = runner.invoke(cli)
+ assert result.exit_code == 2
+ assert "Error: Missing option '--foo' (env var: 'bar')." in result.output
+
+
def test_case_insensitive_choice(runner):
@click.command()
@click.option("--foo", type=click.Choice(["Orange", "Apple"], case_sensitive=False))
| show envvar in error hint
```py
@click.command()
@click.option('--a', required=True, envvar="b", show_envvar=True)
def f(a): ...
f()
```
Here I would want the error message to show the env var.
| 2024-03-27T23:54:11Z | 2024-11-03T12:21:04Z | ["tests/test_options.py::test_show_default_precedence[False-one-extra_value9-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "tests/test_options.py::test_show_true_default_boolean_flag_value", "tests/test_options.py::test_prefixes", "tests/test_options.py::test_show_default_precedence[False-None-extra_value3-False]", "tests/test_options.py::test_intrange_default_help_text[type2-x>=1]", "tests/test_options.py::test_show_default_string", "tests/test_options.py::test_unknown_options[--foo]", "tests/test_options.py::test_invalid_option", "tests/test_options.py::test_invalid_flag_combinations[kwargs1-'count' is not valid with 'is_flag'.]", "tests/test_options.py::test_show_envvar", "tests/test_options.py::test_init_good_default_list[True-1-default0]", "tests/test_options.py::test_show_default_precedence[False-True-extra_value5-True]", "tests/test_options.py::test_option_with_optional_value[None-expect0]", "tests/test_options.py::test_init_bad_default_list[False-2-default1]", "tests/test_options.py::test_multiple_envvar", "tests/test_options.py::test_usage_show_choices[text/int choices]", "tests/test_options.py::test_dynamic_default_help_text", "tests/test_options.py::test_option_with_optional_value[args13-expect13]", "tests/test_options.py::test_trailing_blanks_boolean_envvar", "tests/test_options.py::test_option_with_optional_value[args6-expect6]", "tests/test_options.py::test_invalid_nargs", "tests/test_options.py::test_option_with_optional_value[args11-expect11]", "tests/test_options.py::test_suggest_possible_options[--cat-Did you mean --count?]", "tests/test_options.py::test_unknown_options[-f]", "tests/test_options.py::test_multiple_option_with_optional_value", "tests/test_options.py::test_option_with_optional_value[args4-expect4]", "tests/test_options.py::test_bool_flag_with_type", "tests/test_options.py::test_option_names[option_args1-first]", "tests/test_options.py::test_show_default_precedence[None-None-extra_value0-False]", "tests/test_options.py::test_option_with_optional_value[args7-expect7]", "tests/test_options.py::test_aliases_for_flags", "tests/test_options.py::test_is_bool_flag_is_correctly_set[secondary option [implicit flag]]", "tests/test_options.py::test_multiple_required", "tests/test_options.py::test_show_default_default_map", "tests/test_options.py::test_invalid_flag_combinations[kwargs0-'count' is not valid with 'multiple'.]", "tests/test_options.py::test_option_names[option_args4-a]", "tests/test_options.py::test_nargs_tup_composite_mult", "tests/test_options.py::test_suggest_possible_options[--bounds-(Possible options: --bound, --count)]", "tests/test_options.py::test_intrange_default_help_text[type0-1<=x<=32]", "tests/test_options.py::test_intrange_default_help_text[type3-x<=32]", "tests/test_options.py::test_nargs_envvar", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [None]]", "tests/test_options.py::test_option_help_preserve_paragraphs", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [True]]", "tests/test_options.py::test_count_default_type_help", "tests/test_options.py::test_legacy_options", "tests/test_options.py::test_option_names[option_args9-_ret]", "tests/test_options.py::test_show_envvar_auto_prefix", "tests/test_options.py::test_option_with_optional_value[args3-expect3]", "tests/test_options.py::test_show_default_precedence[None-True-extra_value2-True]", "tests/test_options.py::test_argument_custom_class", "tests/test_options.py::test_usage_show_choices[float choices]", "tests/test_options.py::test_show_default_with_empty_string", "tests/test_options.py::test_dynamic_default_help_special_method", "tests/test_options.py::test_hide_false_default_boolean_flag_value[False]", "tests/test_options.py::test_suggest_possible_options[--bount-(Possible options: --bound, --count)]", "tests/test_options.py::test_missing_option_string_cast", "tests/test_options.py::test_toupper_envvar_prefix", "tests/test_options.py::test_is_bool_flag_is_correctly_set[is_flag=True]", "tests/test_options.py::test_winstyle_options", "tests/test_options.py::test_missing_required_flag", "tests/test_options.py::test_case_insensitive_choice_returned_exactly", "tests/test_options.py::test_show_default_precedence[True-True-extra_value8-True]", "tests/test_options.py::test_usage_show_choices[bool choices]", "tests/test_options.py::test_dynamic_default_help_unset", "tests/test_options.py::test_option_names[option_args2-apple]", "tests/test_options.py::test_init_good_default_list[False-2-default2]", "tests/test_options.py::test_hide_false_default_boolean_flag_value[None]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool flag_value]", "tests/test_options.py::test_callback_validates_prompt", "tests/test_options.py::test_option_names[option_args8-_from]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [False]]", "tests/test_options.py::test_multiple_default_composite_type", "tests/test_options.py::test_usage_show_choices[text choices]", "tests/test_options.py::test_option_with_optional_value[args2-expect2]", "tests/test_options.py::test_type_from_flag_value", "tests/test_options.py::test_case_insensitive_choice", "tests/test_options.py::test_init_good_default_list[True-2-default4]", "tests/test_options.py::test_intrange_default_help_text[type1-1<x<32]", "tests/test_options.py::test_custom_validation", "tests/test_options.py::test_option_names[option_args3-cantaloupe]", "tests/test_options.py::test_show_default_precedence[True-None-extra_value6-True]", "tests/test_options.py::test_show_default_boolean_flag_name[True-cache]", "tests/test_options.py::test_option_names[option_args6-apple]", "tests/test_options.py::test_option_with_optional_value[args10-expect10]", "tests/test_options.py::test_option_custom_class_reusable", "tests/test_options.py::test_init_good_default_list[True-2-default3]", "tests/test_options.py::test_show_default_precedence[None-False-extra_value1-False]", "tests/test_options.py::test_option_with_optional_value[args12-expect12]", "tests/test_options.py::test_show_default_precedence[True-False-extra_value7-False]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[non-bool flag_value]", "tests/test_options.py::test_option_with_optional_value[args9-expect9]", "tests/test_options.py::test_init_good_default_list[True-1-default1]", "tests/test_options.py::test_init_bad_default_list[True-1-1]", "tests/test_options.py::test_show_default_boolean_flag_name[False-no-cache]", "tests/test_options.py::test_option_custom_class", "tests/test_options.py::test_parse_multiple_default_composite_type", "tests/test_options.py::test_option_with_optional_value[args8-expect8]", "tests/test_options.py::test_option_with_optional_value[args5-expect5]", "tests/test_options.py::test_option_names[option_args0-aggressive]", "tests/test_options.py::test_init_bad_default_list[True-2-default2]", "tests/test_options.py::test_option_names[option_args7-cantaloupe]", "tests/test_options.py::test_option_with_optional_value[args1-expect1]", "tests/test_options.py::test_counting", "tests/test_options.py::test_is_bool_flag_is_correctly_set[int option]", "tests/test_options.py::test_file_type_help_default", "tests/test_options.py::test_multiple_default_help", "tests/test_options.py::test_option_names[option_args5-c]", "tests/test_options.py::test_multiple_default_type", "tests/test_options.py::test_missing_choice", "tests/test_options.py::test_empty_envvar[MYPATH]", "tests/test_options.py::test_show_default_precedence[False-False-extra_value4-False]", "tests/test_options.py::test_usage_show_choices[int choices]", "tests/test_options.py::test_show_envvar_auto_prefix_dash_in_command", "tests/test_options.py::test_do_not_show_no_default"] | [] | ["tests/test_options.py::test_missing_envvar"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2517 | a6e0d2936891030f5092c9869c7391104f6721d9 | diff --git a/CHANGES.rst b/CHANGES.rst
index ad6271262..a43a5531f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -36,6 +36,9 @@ Unreleased
:issue:`2356`
- Do not display default values in prompts when ``Option.show_default`` is
``False``. :pr:`2509`
+- Add ``get_help_extra`` method on ``Option`` to fetch the generated extra
+ items used in ``get_help_record`` to render help text. :issue:`2516`
+ :pr:`2517`
Version 8.1.8
diff --git a/src/click/core.py b/src/click/core.py
index 66af7795a..9b1a846ba 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -2668,7 +2668,28 @@ def _write_opts(opts: cabc.Sequence[str]) -> str:
rv.append(_write_opts(self.secondary_opts))
help = self.help or ""
- extra = []
+
+ extra = self.get_help_extra(ctx)
+ extra_items = []
+ if "envvars" in extra:
+ extra_items.append(
+ _("env var: {var}").format(var=", ".join(extra["envvars"]))
+ )
+ if "default" in extra:
+ extra_items.append(_("default: {default}").format(default=extra["default"]))
+ if "range" in extra:
+ extra_items.append(extra["range"])
+ if "required" in extra:
+ extra_items.append(_(extra["required"]))
+
+ if extra_items:
+ extra_str = "; ".join(extra_items)
+ help = f"{help} [{extra_str}]" if help else f"[{extra_str}]"
+
+ return ("; " if any_prefix_is_slash else " / ").join(rv), help
+
+ def get_help_extra(self, ctx: Context) -> types.OptionHelpExtra:
+ extra: types.OptionHelpExtra = {}
if self.show_envvar:
envvar = self.envvar
@@ -2682,12 +2703,10 @@ def _write_opts(opts: cabc.Sequence[str]) -> str:
envvar = f"{ctx.auto_envvar_prefix}_{self.name.upper()}"
if envvar is not None:
- var_str = (
- envvar
- if isinstance(envvar, str)
- else ", ".join(str(d) for d in envvar)
- )
- extra.append(_("env var: {var}").format(var=var_str))
+ if isinstance(envvar, str):
+ extra["envvars"] = (envvar,)
+ else:
+ extra["envvars"] = tuple(str(d) for d in envvar)
# Temporarily enable resilient parsing to avoid type casting
# failing for the default. Might be possible to extend this to
@@ -2732,7 +2751,7 @@ def _write_opts(opts: cabc.Sequence[str]) -> str:
default_string = str(default_value)
if default_string:
- extra.append(_("default: {default}").format(default=default_string))
+ extra["default"] = default_string
if (
isinstance(self.type, types._NumberRangeBase)
@@ -2742,16 +2761,12 @@ def _write_opts(opts: cabc.Sequence[str]) -> str:
range_str = self.type._describe_range()
if range_str:
- extra.append(range_str)
+ extra["range"] = range_str
if self.required:
- extra.append(_("required"))
+ extra["required"] = "required"
- if extra:
- extra_str = "; ".join(extra)
- help = f"{help} [{extra_str}]" if help else f"[{extra_str}]"
-
- return ("; " if any_prefix_is_slash else " / ").join(rv), help
+ return extra
@t.overload
def get_default(
diff --git a/src/click/types.py b/src/click/types.py
index 595443b3f..2195f3a9b 100644
--- a/src/click/types.py
+++ b/src/click/types.py
@@ -1095,3 +1095,10 @@ def convert_type(ty: t.Any | None, default: t.Any | None = None) -> ParamType:
#: A UUID parameter.
UUID = UUIDParameterType()
+
+
+class OptionHelpExtra(t.TypedDict, total=False):
+ envvars: tuple[str, ...]
+ default: str
+ range: str
+ required: str
| diff --git a/tests/test_options.py b/tests/test_options.py
index 49df83bbd..293f2532a 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -316,6 +316,7 @@ def __str__(self):
opt = click.Option(["-a"], default=Value(), show_default=True)
ctx = click.Context(click.Command("cli"))
+ assert opt.get_help_extra(ctx) == {"default": "special value"}
assert "special value" in opt.get_help_record(ctx)[1]
@@ -331,6 +332,7 @@ def __str__(self):
def test_intrange_default_help_text(type, expect):
option = click.Option(["--num"], type=type, show_default=True, default=2)
context = click.Context(click.Command("test"))
+ assert option.get_help_extra(context) == {"default": "2", "range": expect}
result = option.get_help_record(context)[1]
assert expect in result
@@ -339,6 +341,7 @@ def test_count_default_type_help():
"""A count option with the default type should not show >=0 in help."""
option = click.Option(["--count"], count=True, help="some words")
context = click.Context(click.Command("test"))
+ assert option.get_help_extra(context) == {}
result = option.get_help_record(context)[1]
assert result == "some words"
@@ -354,6 +357,7 @@ def test_file_type_help_default():
["--in"], type=click.File(), default=__file__, show_default=True
)
context = click.Context(click.Command("test"))
+ assert option.get_help_extra(context) == {"default": __file__}
result = option.get_help_record(context)[1]
assert __file__ in result
@@ -741,6 +745,7 @@ def test_show_default_boolean_flag_name(runner, default, expect):
help="Enable/Disable the cache.",
)
ctx = click.Context(click.Command("test"))
+ assert opt.get_help_extra(ctx) == {"default": expect}
message = opt.get_help_record(ctx)[1]
assert f"[default: {expect}]" in message
@@ -757,6 +762,7 @@ def test_show_true_default_boolean_flag_value(runner):
help="Enable the cache.",
)
ctx = click.Context(click.Command("test"))
+ assert opt.get_help_extra(ctx) == {"default": "True"}
message = opt.get_help_record(ctx)[1]
assert "[default: True]" in message
@@ -774,6 +780,7 @@ def test_hide_false_default_boolean_flag_value(runner, default):
help="Enable the cache.",
)
ctx = click.Context(click.Command("test"))
+ assert opt.get_help_extra(ctx) == {}
message = opt.get_help_record(ctx)[1]
assert "[default: " not in message
@@ -782,6 +789,7 @@ def test_show_default_string(runner):
"""When show_default is a string show that value as default."""
opt = click.Option(["--limit"], show_default="unlimited")
ctx = click.Context(click.Command("cli"))
+ assert opt.get_help_extra(ctx) == {"default": "(unlimited)"}
message = opt.get_help_record(ctx)[1]
assert "[default: (unlimited)]" in message
@@ -798,6 +806,7 @@ def test_do_not_show_no_default(runner):
"""When show_default is True and no default is set do not show None."""
opt = click.Option(["--limit"], show_default=True)
ctx = click.Context(click.Command("cli"))
+ assert opt.get_help_extra(ctx) == {}
message = opt.get_help_record(ctx)[1]
assert "[default: None]" not in message
@@ -808,28 +817,30 @@ def test_do_not_show_default_empty_multiple():
"""
opt = click.Option(["-a"], multiple=True, help="values", show_default=True)
ctx = click.Context(click.Command("cli"))
+ assert opt.get_help_extra(ctx) == {}
message = opt.get_help_record(ctx)[1]
assert message == "values"
@pytest.mark.parametrize(
- ("ctx_value", "opt_value", "expect"),
+ ("ctx_value", "opt_value", "extra_value", "expect"),
[
- (None, None, False),
- (None, False, False),
- (None, True, True),
- (False, None, False),
- (False, False, False),
- (False, True, True),
- (True, None, True),
- (True, False, False),
- (True, True, True),
- (False, "one", True),
+ (None, None, {}, False),
+ (None, False, {}, False),
+ (None, True, {"default": "1"}, True),
+ (False, None, {}, False),
+ (False, False, {}, False),
+ (False, True, {"default": "1"}, True),
+ (True, None, {"default": "1"}, True),
+ (True, False, {}, False),
+ (True, True, {"default": "1"}, True),
+ (False, "one", {"default": "(one)"}, True),
],
)
-def test_show_default_precedence(ctx_value, opt_value, expect):
+def test_show_default_precedence(ctx_value, opt_value, extra_value, expect):
ctx = click.Context(click.Command("test"), show_default=ctx_value)
opt = click.Option("-a", default=1, help="value", show_default=opt_value)
+ assert opt.get_help_extra(ctx) == extra_value
help = opt.get_help_record(ctx)[1]
assert ("default:" in help) is expect
| Split extra help item computing with help record rendering
I maintain [Click Extra, a drop-in replacement for Click which adds colorization](https://github.com/kdeldycke/click-extra/tree/main#readme) of the help screen.
I am currently relying on finicky regular expressions to identify and match the extra items that are displayed at the end of each option's help. These extra items are rendered in square brackets and looks like:
- `[default: None]`
- `[default: (unlimited)]`
- `[env var: COLOR_CLI8_TIME; default: no-time]`
- and a variety of other formats.
The problem is that the generation of these extra items are deeply embedded within Click and are impossible to fetch independently.
That's why I propose a simple refactor of the `Option.get_help_record()` method, and split it in two:
- a new method to compute the values of these extra items
- keep the original `get_help_record()` as-is, but dedicated to help message rendering only
I have a PR that is ready at #2517.
| 2023-05-16T14:13:34Z | 2024-11-02T23:35:57Z | ["tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "tests/test_options.py::test_prefixes", "tests/test_options.py::test_unknown_options[--foo]", "tests/test_options.py::test_invalid_option", "tests/test_options.py::test_invalid_flag_combinations[kwargs1-'count' is not valid with 'is_flag'.]", "tests/test_options.py::test_show_envvar", "tests/test_options.py::test_init_good_default_list[True-1-default0]", "tests/test_options.py::test_option_with_optional_value[None-expect0]", "tests/test_options.py::test_init_bad_default_list[False-2-default1]", "tests/test_options.py::test_multiple_envvar", "tests/test_options.py::test_usage_show_choices[text/int choices]", "tests/test_options.py::test_dynamic_default_help_text", "tests/test_options.py::test_option_with_optional_value[args13-expect13]", "tests/test_options.py::test_trailing_blanks_boolean_envvar", "tests/test_options.py::test_option_with_optional_value[args6-expect6]", "tests/test_options.py::test_invalid_nargs", "tests/test_options.py::test_option_with_optional_value[args11-expect11]", "tests/test_options.py::test_suggest_possible_options[--cat-Did you mean --count?]", "tests/test_options.py::test_unknown_options[-f]", "tests/test_options.py::test_multiple_option_with_optional_value", "tests/test_options.py::test_option_with_optional_value[args4-expect4]", "tests/test_options.py::test_bool_flag_with_type", "tests/test_options.py::test_option_names[option_args1-first]", "tests/test_options.py::test_option_with_optional_value[args7-expect7]", "tests/test_options.py::test_aliases_for_flags", "tests/test_options.py::test_is_bool_flag_is_correctly_set[secondary option [implicit flag]]", "tests/test_options.py::test_multiple_required", "tests/test_options.py::test_show_default_default_map", "tests/test_options.py::test_invalid_flag_combinations[kwargs0-'count' is not valid with 'multiple'.]", "tests/test_options.py::test_option_names[option_args4-a]", "tests/test_options.py::test_nargs_tup_composite_mult", "tests/test_options.py::test_suggest_possible_options[--bounds-(Possible options: --bound, --count)]", "tests/test_options.py::test_nargs_envvar", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [None]]", "tests/test_options.py::test_option_help_preserve_paragraphs", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [True]]", "tests/test_options.py::test_legacy_options", "tests/test_options.py::test_option_names[option_args9-_ret]", "tests/test_options.py::test_show_envvar_auto_prefix", "tests/test_options.py::test_option_with_optional_value[args3-expect3]", "tests/test_options.py::test_argument_custom_class", "tests/test_options.py::test_usage_show_choices[float choices]", "tests/test_options.py::test_show_default_with_empty_string", "tests/test_options.py::test_suggest_possible_options[--bount-(Possible options: --bound, --count)]", "tests/test_options.py::test_missing_option_string_cast", "tests/test_options.py::test_toupper_envvar_prefix", "tests/test_options.py::test_is_bool_flag_is_correctly_set[is_flag=True]", "tests/test_options.py::test_winstyle_options", "tests/test_options.py::test_missing_required_flag", "tests/test_options.py::test_case_insensitive_choice_returned_exactly", "tests/test_options.py::test_usage_show_choices[bool choices]", "tests/test_options.py::test_dynamic_default_help_unset", "tests/test_options.py::test_option_names[option_args2-apple]", "tests/test_options.py::test_init_good_default_list[False-2-default2]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool flag_value]", "tests/test_options.py::test_callback_validates_prompt", "tests/test_options.py::test_option_names[option_args8-_from]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [False]]", "tests/test_options.py::test_multiple_default_composite_type", "tests/test_options.py::test_usage_show_choices[text choices]", "tests/test_options.py::test_option_with_optional_value[args2-expect2]", "tests/test_options.py::test_type_from_flag_value", "tests/test_options.py::test_case_insensitive_choice", "tests/test_options.py::test_init_good_default_list[True-2-default4]", "tests/test_options.py::test_option_names[option_args3-cantaloupe]", "tests/test_options.py::test_custom_validation", "tests/test_options.py::test_option_names[option_args6-apple]", "tests/test_options.py::test_option_with_optional_value[args10-expect10]", "tests/test_options.py::test_option_custom_class_reusable", "tests/test_options.py::test_init_good_default_list[True-2-default3]", "tests/test_options.py::test_option_with_optional_value[args12-expect12]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[non-bool flag_value]", "tests/test_options.py::test_option_with_optional_value[args9-expect9]", "tests/test_options.py::test_init_good_default_list[True-1-default1]", "tests/test_options.py::test_init_bad_default_list[True-1-1]", "tests/test_options.py::test_option_custom_class", "tests/test_options.py::test_parse_multiple_default_composite_type", "tests/test_options.py::test_option_with_optional_value[args8-expect8]", "tests/test_options.py::test_option_with_optional_value[args5-expect5]", "tests/test_options.py::test_option_names[option_args0-aggressive]", "tests/test_options.py::test_init_bad_default_list[True-2-default2]", "tests/test_options.py::test_option_names[option_args7-cantaloupe]", "tests/test_options.py::test_option_with_optional_value[args1-expect1]", "tests/test_options.py::test_counting", "tests/test_options.py::test_is_bool_flag_is_correctly_set[int option]", "tests/test_options.py::test_multiple_default_help", "tests/test_options.py::test_option_names[option_args5-c]", "tests/test_options.py::test_multiple_default_type", "tests/test_options.py::test_missing_choice", "tests/test_options.py::test_empty_envvar[MYPATH]", "tests/test_options.py::test_usage_show_choices[int choices]", "tests/test_options.py::test_show_envvar_auto_prefix_dash_in_command"] | [] | ["tests/test_options.py::test_dynamic_default_help_special_method", "tests/test_options.py::test_hide_false_default_boolean_flag_value[False]", "tests/test_options.py::test_show_default_precedence[None-False-extra_value1-False]", "tests/test_options.py::test_show_default_precedence[False-one-extra_value9-True]", "tests/test_options.py::test_show_default_precedence[True-False-extra_value7-False]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_show_default_precedence[None-None-extra_value0-False]", "tests/test_options.py::test_show_default_boolean_flag_name[False-no-cache]", "tests/test_options.py::test_show_default_precedence[True-True-extra_value8-True]", "tests/test_options.py::test_show_true_default_boolean_flag_value", "tests/test_options.py::test_show_default_precedence[False-None-extra_value3-False]", "tests/test_options.py::test_hide_false_default_boolean_flag_value[None]", "tests/test_options.py::test_intrange_default_help_text[type2-x>=1]", "tests/test_options.py::test_show_default_string", "tests/test_options.py::test_file_type_help_default", "tests/test_options.py::test_show_default_precedence[None-True-extra_value2-True]", "tests/test_options.py::test_show_default_precedence[False-True-extra_value5-True]", "tests/test_options.py::test_intrange_default_help_text[type0-1<=x<=32]", "tests/test_options.py::test_show_default_precedence[False-False-extra_value4-False]", "tests/test_options.py::test_intrange_default_help_text[type1-1<x<32]", "tests/test_options.py::test_intrange_default_help_text[type3-x<=32]", "tests/test_options.py::test_count_default_type_help", "tests/test_options.py::test_do_not_show_no_default", "tests/test_options.py::test_show_default_precedence[True-None-extra_value6-True]", "tests/test_options.py::test_show_default_boolean_flag_name[True-cache]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2365 | 02046e7a19480f85fff7e4577486518abe47e401 | diff --git a/CHANGES.rst b/CHANGES.rst
index b5d970117..097a79f75 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -31,6 +31,9 @@ Unreleased
- When generating a command's name from a decorated function's name, the
suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed.
:issue:`2322`
+- Show the ``types.ParamType.name`` for ``types.Choice`` options within
+ ``--help`` message if ``show_choices=False`` is specified.
+ :issue:`2356`
Version 8.1.8
diff --git a/src/click/types.py b/src/click/types.py
index 8d9750b63..595443b3f 100644
--- a/src/click/types.py
+++ b/src/click/types.py
@@ -259,7 +259,13 @@ def to_info_dict(self) -> dict[str, t.Any]:
return info_dict
def get_metavar(self, param: Parameter) -> str:
- choices_str = "|".join(self.choices)
+ if param.param_type_name == "option" and not param.show_choices: # type: ignore
+ choice_metavars = [
+ convert_type(type(choice)).name.upper() for choice in self.choices
+ ]
+ choices_str = "|".join([*dict.fromkeys(choice_metavars)])
+ else:
+ choices_str = "|".join([str(i) for i in self.choices])
# Use curly braces to indicate a required argument.
if param.required and param.param_type_name == "argument":
| diff --git a/tests/test_options.py b/tests/test_options.py
index 7397f3667..49df83bbd 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -926,3 +926,39 @@ def test_invalid_flag_combinations(runner, kwargs, message):
click.Option(["-a"], **kwargs)
assert message in str(e.value)
+
+
[email protected](
+ ("choices", "metavars"),
+ [
+ pytest.param(["foo", "bar"], "[TEXT]", id="text choices"),
+ pytest.param([1, 2], "[INTEGER]", id="int choices"),
+ pytest.param([1.0, 2.0], "[FLOAT]", id="float choices"),
+ pytest.param([True, False], "[BOOLEAN]", id="bool choices"),
+ pytest.param(["foo", 1], "[TEXT|INTEGER]", id="text/int choices"),
+ ],
+)
+def test_usage_show_choices(runner, choices, metavars):
+ """When show_choices=False is set, the --help output
+ should print choice metavars instead of values.
+ """
+
+ @click.command()
+ @click.option("-g", type=click.Choice(choices))
+ def cli_with_choices(g):
+ pass
+
+ @click.command()
+ @click.option(
+ "-g",
+ type=click.Choice(choices),
+ show_choices=False,
+ )
+ def cli_without_choices(g):
+ pass
+
+ result = runner.invoke(cli_with_choices, ["--help"])
+ assert f"[{'|'.join([str(i) for i in choices])}]" in result.output
+
+ result = runner.invoke(cli_without_choices, ["--help"])
+ assert metavars in result.output
| `show_choices=False` seems to have no effect
I noticed when using Typer that even if you pass `show_choices=False`, the choices still get shown in the help. It seems that this is related to Click.
Example:
```python
import click
@click.command()
@click.option('-s', '--string-to-echo', type=click.Choice(['hello', 'world']), show_choices=False)
def echo(string):
click.echo(string)
if __name__ == "__main__":
echo()
```
```
Usage: ... [OPTIONS]
Options:
-s, --string-to-echo [hello|world]
--help Show this message and exit.
```
I guess it isn't documented what `show_choices` does for `Option` (if anything) in the non-prompt case, but I expected `show_choices=False` to disable showing the choices in the help.
Environment:
- Python version: 3.9.13
- Click version: 8.1.3
| 2022-10-02T03:14:28Z | 2024-11-02T22:45:04Z | ["tests/test_options.py::test_show_default_precedence[True-None-True]", "tests/test_options.py::test_show_default_precedence[False-one-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "tests/test_options.py::test_show_true_default_boolean_flag_value", "tests/test_options.py::test_prefixes", "tests/test_options.py::test_intrange_default_help_text[type2-x>=1]", "tests/test_options.py::test_show_default_string", "tests/test_options.py::test_unknown_options[--foo]", "tests/test_options.py::test_invalid_option", "tests/test_options.py::test_invalid_flag_combinations[kwargs1-'count' is not valid with 'is_flag'.]", "tests/test_options.py::test_show_envvar", "tests/test_options.py::test_init_good_default_list[True-1-default0]", "tests/test_options.py::test_option_with_optional_value[None-expect0]", "tests/test_options.py::test_init_bad_default_list[False-2-default1]", "tests/test_options.py::test_multiple_envvar", "tests/test_options.py::test_dynamic_default_help_text", "tests/test_options.py::test_option_with_optional_value[args13-expect13]", "tests/test_options.py::test_trailing_blanks_boolean_envvar", "tests/test_options.py::test_option_with_optional_value[args6-expect6]", "tests/test_options.py::test_invalid_nargs", "tests/test_options.py::test_option_with_optional_value[args11-expect11]", "tests/test_options.py::test_suggest_possible_options[--cat-Did you mean --count?]", "tests/test_options.py::test_unknown_options[-f]", "tests/test_options.py::test_multiple_option_with_optional_value", "tests/test_options.py::test_option_with_optional_value[args4-expect4]", "tests/test_options.py::test_bool_flag_with_type", "tests/test_options.py::test_option_names[option_args1-first]", "tests/test_options.py::test_option_with_optional_value[args7-expect7]", "tests/test_options.py::test_aliases_for_flags", "tests/test_options.py::test_is_bool_flag_is_correctly_set[secondary option [implicit flag]]", "tests/test_options.py::test_multiple_required", "tests/test_options.py::test_show_default_default_map", "tests/test_options.py::test_invalid_flag_combinations[kwargs0-'count' is not valid with 'multiple'.]", "tests/test_options.py::test_option_names[option_args4-a]", "tests/test_options.py::test_nargs_tup_composite_mult", "tests/test_options.py::test_suggest_possible_options[--bounds-(Possible options: --bound, --count)]", "tests/test_options.py::test_intrange_default_help_text[type0-1<=x<=32]", "tests/test_options.py::test_intrange_default_help_text[type3-x<=32]", "tests/test_options.py::test_nargs_envvar", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [None]]", "tests/test_options.py::test_option_help_preserve_paragraphs", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [True]]", "tests/test_options.py::test_count_default_type_help", "tests/test_options.py::test_legacy_options", "tests/test_options.py::test_option_names[option_args9-_ret]", "tests/test_options.py::test_show_envvar_auto_prefix", "tests/test_options.py::test_option_with_optional_value[args3-expect3]", "tests/test_options.py::test_argument_custom_class", "tests/test_options.py::test_show_default_with_empty_string", "tests/test_options.py::test_show_default_precedence[True-False-False]", "tests/test_options.py::test_dynamic_default_help_special_method", "tests/test_options.py::test_hide_false_default_boolean_flag_value[False]", "tests/test_options.py::test_suggest_possible_options[--bount-(Possible options: --bound, --count)]", "tests/test_options.py::test_missing_option_string_cast", "tests/test_options.py::test_toupper_envvar_prefix", "tests/test_options.py::test_is_bool_flag_is_correctly_set[is_flag=True]", "tests/test_options.py::test_winstyle_options", "tests/test_options.py::test_missing_required_flag", "tests/test_options.py::test_case_insensitive_choice_returned_exactly", "tests/test_options.py::test_dynamic_default_help_unset", "tests/test_options.py::test_option_names[option_args2-apple]", "tests/test_options.py::test_init_good_default_list[False-2-default2]", "tests/test_options.py::test_show_default_precedence[True-True-True]", "tests/test_options.py::test_hide_false_default_boolean_flag_value[None]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool flag_value]", "tests/test_options.py::test_callback_validates_prompt", "tests/test_options.py::test_show_default_precedence[False-False-False]", "tests/test_options.py::test_option_names[option_args8-_from]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [False]]", "tests/test_options.py::test_multiple_default_composite_type", "tests/test_options.py::test_option_with_optional_value[args2-expect2]", "tests/test_options.py::test_type_from_flag_value", "tests/test_options.py::test_case_insensitive_choice", "tests/test_options.py::test_init_good_default_list[True-2-default4]", "tests/test_options.py::test_show_default_precedence[None-False-False]", "tests/test_options.py::test_intrange_default_help_text[type1-1<x<32]", "tests/test_options.py::test_custom_validation", "tests/test_options.py::test_option_names[option_args3-cantaloupe]", "tests/test_options.py::test_show_default_precedence[None-None-False]", "tests/test_options.py::test_show_default_boolean_flag_name[True-cache]", "tests/test_options.py::test_option_names[option_args6-apple]", "tests/test_options.py::test_option_with_optional_value[args10-expect10]", "tests/test_options.py::test_option_custom_class_reusable", "tests/test_options.py::test_init_good_default_list[True-2-default3]", "tests/test_options.py::test_option_with_optional_value[args12-expect12]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[non-bool flag_value]", "tests/test_options.py::test_show_default_precedence[False-None-False]", "tests/test_options.py::test_option_with_optional_value[args9-expect9]", "tests/test_options.py::test_init_good_default_list[True-1-default1]", "tests/test_options.py::test_init_bad_default_list[True-1-1]", "tests/test_options.py::test_show_default_precedence[False-True-True]", "tests/test_options.py::test_show_default_boolean_flag_name[False-no-cache]", "tests/test_options.py::test_option_custom_class", "tests/test_options.py::test_parse_multiple_default_composite_type", "tests/test_options.py::test_option_with_optional_value[args8-expect8]", "tests/test_options.py::test_option_with_optional_value[args5-expect5]", "tests/test_options.py::test_option_names[option_args0-aggressive]", "tests/test_options.py::test_init_bad_default_list[True-2-default2]", "tests/test_options.py::test_option_names[option_args7-cantaloupe]", "tests/test_options.py::test_option_with_optional_value[args1-expect1]", "tests/test_options.py::test_counting", "tests/test_options.py::test_is_bool_flag_is_correctly_set[int option]", "tests/test_options.py::test_show_default_precedence[None-True-True]", "tests/test_options.py::test_file_type_help_default", "tests/test_options.py::test_multiple_default_help", "tests/test_options.py::test_option_names[option_args5-c]", "tests/test_options.py::test_multiple_default_type", "tests/test_options.py::test_missing_choice", "tests/test_options.py::test_empty_envvar[MYPATH]", "tests/test_options.py::test_show_envvar_auto_prefix_dash_in_command", "tests/test_options.py::test_do_not_show_no_default"] | [] | ["tests/test_options.py::test_usage_show_choices[text choices]", "tests/test_options.py::test_usage_show_choices[text/int choices]", "tests/test_options.py::test_usage_show_choices[int choices]", "tests/test_options.py::test_usage_show_choices[bool choices]", "tests/test_options.py::test_usage_show_choices[float choices]"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-actions]\nlabels = update\ndeps = gha-update\ncommands = gha-update\n\n[testenv:update-pre_commit]\nlabels = update\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit autoupdate -j4\n\n[testenv:update-requirements]\nlabels = update\ndeps = pip-tools\nskip_install = true\nchange_dir = requirements\ncommands =\n pip-compile build.in -q {posargs:-U}\n pip-compile docs.in -q {posargs:-U}\n pip-compile tests.in -q {posargs:-U}\n pip-compile typing.in -q {posargs:-U}\n pip-compile dev.in -q {posargs:-U}\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==1.0.0", "babel==2.16.0", "build==1.2.2.post1", "cachetools==5.5.0", "certifi==2024.8.30", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.4.0", "colorama==0.4.6", "distlib==0.3.9", "docutils==0.21.2", "filelock==3.16.1", "identify==2.6.1", "idna==3.10", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.4", "markupsafe==3.0.2", "mypy==1.13.0", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pallets-sphinx-themes==2.3.0", "pip-compile-multi==2.6.4", "pip-tools==7.4.1", "platformdirs==4.3.6", "pluggy==1.5.0", "pre-commit==4.0.1", "pygments==2.18.0", "pyproject-api==1.8.0", "pyproject-hooks==1.2.0", "pyright==1.1.386", "pytest==8.3.3", "pyyaml==6.0.2", "requests==2.32.3", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==8.1.3", "sphinx-issues==5.0.0", "sphinx-notfound-page==1.0.4", "sphinx-tabs==3.4.7", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "toposort==1.10", "tox==4.23.2", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.0", "wheel==0.44.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2730 | 5b1624bf09947d6f10eaffd63d6fb737dfe7656a | diff --git a/CHANGES.rst b/CHANGES.rst
index 8a09daf35..7ca76f967 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -12,6 +12,8 @@ Unreleased
the help for an option. :issue:`2500`
- The test runner handles stripping color consistently on Windows.
:issue:`2705`
+- Show correct value for flag default when using ``default_map``.
+ :issue:`2632`
Version 8.1.7
diff --git a/src/click/core.py b/src/click/core.py
index 367beb266..ab7d45250 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -2800,7 +2800,7 @@ def _write_opts(opts: t.Sequence[str]) -> str:
# For boolean flags that have distinct True/False opts,
# use the opt without prefix instead of the value.
default_string = split_opt(
- (self.opts if self.default else self.secondary_opts)[0]
+ (self.opts if default_value else self.secondary_opts)[0]
)[1]
elif self.is_bool_flag and not self.secondary_opts and not default_value:
default_string = ""
| diff --git a/tests/test_defaults.py b/tests/test_defaults.py
index 5ab05edb8..5c5e168ab 100644
--- a/tests/test_defaults.py
+++ b/tests/test_defaults.py
@@ -59,3 +59,28 @@ def cli(y, f, v):
result = runner.invoke(cli, ["-y", "-n", "-f", "-v", "-q"], standalone_mode=False)
assert result.return_value == ((True, False), (True,), (1, -1))
+
+
+def test_flag_default_map(runner):
+ """test flag with default map"""
+
+ @click.group()
+ def cli():
+ pass
+
+ @cli.command()
+ @click.option("--name/--no-name", is_flag=True, show_default=True, help="name flag")
+ def foo(name):
+ click.echo(name)
+
+ result = runner.invoke(cli, ["foo"])
+ assert "False" in result.output
+
+ result = runner.invoke(cli, ["foo", "--help"])
+ assert "default: no-name" in result.output
+
+ result = runner.invoke(cli, ["foo"], default_map={"foo": {"name": True}})
+ assert "True" in result.output
+
+ result = runner.invoke(cli, ["foo", "--help"], default_map={"foo": {"name": True}})
+ assert "default: name" in result.output
| Flag option with secondary opts: show_default=True does not show value from default_map in "help" output
I'm setting the `default_map` from a config file, and it seems the values from the `default_map` are not correctly shown in the `--help` output if I set `show_default=True` on my option.
My Option looks like this:
```python
@click.option(
"--long/--short",
"-l/-s",
is_flag=True,
show_default=True,
help="show additional information like size and creation date",
)
```
I initialize the `default_map` with a custom command class that I attach via the `@click.command` decorator like this `@click.command(cls=ConfigAwareCommand)`
```python
from click import Command as _Command
class ConfigAwareCommand(_Command):
def __init__(self, *args, **kwargs):
kwargs["context_settings"] = {
"default_map": CONFIG.get_cli_command_defaults(kwargs["name"])
}
super().__init__(*args, **kwargs)
```
The `default_map` value is in my example `{'long': True}`. In the `--help` output, the default value is shown like this
```
-l, --long / -s, --short show additional information like size and
creation date [default: short]
```
When executing the command, the default value from the `default_map` is used correctly (`long` defaults to `True`).
During debugging, I might have found the culprit inside [src/click/core.py](https://github.com/pallets/click/blob/main/src/click/core.py#L2746)
```python
elif self.is_bool_flag and self.secondary_opts:
# For boolean flags that have distinct True/False opts,
# use the opt without prefix instead of the value.
default_string = _split_opt(
(self.opts if self.default else self.secondary_opts)[0]
)[1]
```
As you can see, `self.default` is used instead of the `default_value` variable that is initialized [further above](https://github.com/pallets/click/blob/main/src/click/core.py#L2720) this code snippet.
If I change the part of the code above and use `default_value` instead of `self.default` the help output shows the correct default values from the `default_map`.
```python
elif self.is_bool_flag and self.secondary_opts:
# For boolean flags that have distinct True/False opts,
# use the opt without prefix instead of the value.
default_string = _split_opt(
(self.opts if default_value else self.secondary_opts)[0]
)[1]
```
I am not sure if I do something wrong or if this is indeed a bug.
Environment:
- Python version: 3.10.12
- Click version: 8.1.7
| Hi, I'm at PyCon 2024 and picked up this issue. I wrote a unit tests to re-produce this issue and I believe this is a bug in latest main. I also think the OP is correct about what is causing it, when I replace `self.default` with `default_value` in this line of `core.py` the tests pass: https://github.com/pallets/click/blob/9f63c3b477d444245b0cc21ac23c28f6e8f4c385/src/click/core.py#L2725 | 2024-05-21T20:43:18Z | 2024-05-22T21:13:00Z | ["tests/test_defaults.py::test_nargs_plus_multiple", "tests/test_defaults.py::test_multiple_defaults", "tests/test_defaults.py::test_basic_defaults"] | [] | ["tests/test_defaults.py::test_multiple_flag_default", "tests/test_defaults.py::test_flag_default_map"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-requirements]\ndeps =\n pip-tools\n pre-commit\nskip_install = true\nchange_dir = requirements\ncommands =\n pre-commit autoupdate -j4\n pip-compile -U build.in\n pip-compile -U docs.in\n pip-compile -U tests.in\n pip-compile -U typing.in\n pip-compile -U dev.in\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==0.7.13", "babel==2.12.1", "build==0.10.0", "cachetools==5.3.1", "certifi==2023.5.7", "cfgv==3.3.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "colorama==0.4.6", "distlib==0.3.6", "docutils==0.18.1", "filelock==3.12.2", "identify==2.5.24", "idna==3.4", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.2", "markupsafe==2.1.3", "mypy==1.4.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pallets-sphinx-themes==2.1.1", "pip-compile-multi==2.6.3", "pip-tools==6.13.0", "platformdirs==3.8.0", "pluggy==1.2.0", "pre-commit==3.3.3", "pygments==2.15.1", "pyproject-api==1.5.2", "pyproject-hooks==1.0.0", "pyright==1.1.317", "pytest==7.4.0", "pyyaml==6.0.1", "requests==2.31.0", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==7.0.1", "sphinx-issues==3.0.1", "sphinx-tabs==3.4.5", "sphinxcontrib-applehelp==1.0.4", "sphinxcontrib-devhelp==1.0.2", "sphinxcontrib-htmlhelp==2.0.1", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==1.0.3", "sphinxcontrib-serializinghtml==1.1.5", "toposort==1.10", "tox==4.6.3", "typing-extensions==4.6.3", "urllib3==2.0.3", "virtualenv==20.23.1", "wheel==0.40.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2728 | e88c11239971d309744fd3f9139259f64787f45a | diff --git a/CHANGES.rst b/CHANGES.rst
index 4188303ed..aba1bbe07 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,9 @@ Version 8.1.8
Unreleased
- Fix an issue with type hints for ``click.open_file()``. :issue:`2717`
+- Fix issue where error message for invalid ``click.Path`` displays on
+ multiple lines. :issue:`2697`
+
Version 8.1.7
-------------
diff --git a/src/click/types.py b/src/click/types.py
index dc52bac3d..c310377a0 100644
--- a/src/click/types.py
+++ b/src/click/types.py
@@ -892,7 +892,7 @@ def convert(
)
if not self.dir_okay and stat.S_ISDIR(st.st_mode):
self.fail(
- _("{name} '{filename}' is a directory.").format(
+ _("{name} {filename!r} is a directory.").format(
name=self.name.title(), filename=format_filename(value)
),
param,
| diff --git a/tests/test_types.py b/tests/test_types.py
index 0a2508882..79068e189 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -1,5 +1,6 @@
import os.path
import pathlib
+import platform
import tempfile
import pytest
@@ -232,3 +233,14 @@ def test_file_surrogates(type, tmp_path):
def test_file_error_surrogates():
message = FileError(filename="\udcff").format_message()
assert message == "Could not open file '�': unknown error"
+
+
[email protected](
+ platform.system() == "Windows", reason="Filepath syntax differences."
+)
+def test_invalid_path_with_esc_sequence():
+ with pytest.raises(click.BadParameter) as exc_info:
+ with tempfile.TemporaryDirectory(prefix="my\ndir") as tempdir:
+ click.Path(dir_okay=False).convert(tempdir, None, None)
+
+ assert "my\\ndir" in exc_info.value.message
| Broken message about invalid argument value for template "File ... is a directory"
**User Actions**
```sh
mkdir $'my\ndir'
my-tool $'my\ndir'
```
**Expected Output**
```
Invalid value for 'PATH': File 'my\ndir' is a directory.
```
**Actual Output**
```
Invalid value for 'PATH': File 'my
dir' is a directory.
```
**Code**
```python
from pathlib import Path
from typing import Annotated
import typer
def main(path: Annotated[Path, typer.Argument(dir_okay=False)]) -> None:
pass
if __name__ == '__main__':
typer.run(main)
```
**Cause**
You clearly forgot `!r` on [this](https://github.com/pallets/click/blob/f8857cb03268b5b952b88b2acb3e11d9f0f7b6e4/src/click/types.py#L896) line and are using quotes instead.
Just compare these lines in [click.types](https://github.com/pallets/click/blob/f8857cb03268b5b952b88b2acb3e11d9f0f7b6e4/src/click/types.py#L870-L928):
```python
_("{name} {filename!r} does not exist.").format(
_("{name} {filename!r} is a file.").format(
_("{name} '{filename}' is a directory.").format(
_("{name} {filename!r} is not readable.").format(
_("{name} {filename!r} is not writable.").format(
_("{name} {filename!r} is not executable.").format(
```
| I'm going to work on this at the PyCon 2024 sprints. | 2024-05-20T23:23:43Z | 2024-05-21T14:46:21Z | ["tests/test_types.py::test_cast_multi_default[2-False-default1-expect1]", "tests/test_types.py::test_path_type[Path-expect3]", "tests/test_types.py::test_range_fail[type2-6-6 is not in the range x<=5.]", "tests/test_types.py::test_cast_multi_default[None-True-None-expect2]", "tests/test_types.py::test_range[type5--1-0]", "tests/test_types.py::test_range_fail[type4-5-0<=x<5]", "tests/test_types.py::test_range[type7-0-1]", "tests/test_types.py::test_path_type[str-a/b/c.txt]", "tests/test_types.py::test_range[type4--100--100]", "tests/test_types.py::test_cast_multi_default[None-True-default3-expect3]", "tests/test_types.py::test_range[type10-0.51-0.51]", "tests/test_types.py::test_range[type13-inf-1.5]", "tests/test_types.py::test_range_fail[type0-6-6 is not in the range 0<=x<=5.]", "tests/test_types.py::test_cast_multi_default[2-True-None-expect4]", "tests/test_types.py::test_path_type[bytes-a/b/c.txt]", "tests/test_types.py::test_range[type6-6-5]", "tests/test_types.py::test_file_surrogates[type1]", "tests/test_types.py::test_range[type11-1.49-1.49]", "tests/test_types.py::test_range[type9-1.2-1.2]", "tests/test_types.py::test_range_fail[type5-0.5-x>0.5]", "tests/test_types.py::test_range_fail[type3-0-0<x<=5]", "tests/test_types.py::test_range[type8-5-4]", "tests/test_types.py::test_file_surrogates[type0]", "tests/test_types.py::test_path_surrogates", "tests/test_types.py::test_range[type3-5-5]", "tests/test_types.py::test_range_fail[type6-1.5-x<1.5]", "tests/test_types.py::test_range[type2-100-100]", "tests/test_types.py::test_range[type1-5-5]", "tests/test_types.py::test_path_resolve_symlink", "tests/test_types.py::test_range[type12--0.0-0.5]", "tests/test_types.py::test_range[type0-3-3]", "tests/test_types.py::test_cast_multi_default[2-True-default5-expect5]", "tests/test_types.py::test_path_type[None-a/b/c.txt]", "tests/test_types.py::test_range_fail[type1-4-4 is not in the range x>=5.]", "tests/test_types.py::test_cast_multi_default[2-False-None-None]", "tests/test_types.py::test_float_range_no_clamp_open", "tests/test_types.py::test_cast_multi_default[-1-None-None-expect6]"] | [] | ["tests/test_types.py::test_invalid_path_with_esc_sequence", "tests/test_types.py::test_file_error_surrogates"] | [] | {"install": ["uv pip install -e .", "pre-commit install"], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{13,12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\nconstrain_package_deps = true\nuse_frozen_constraints = true\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright tests/typing\n pyright --verifytypes click --ignoreexternal\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml\n\n[testenv:update-requirements]\ndeps =\n pip-tools\n pre-commit\nskip_install = true\nchange_dir = requirements\ncommands =\n pre-commit autoupdate -j4\n pip-compile -U build.in\n pip-compile -U docs.in\n pip-compile -U tests.in\n pip-compile -U typing.in\n pip-compile -U dev.in\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["alabaster==0.7.13", "babel==2.12.1", "build==0.10.0", "cachetools==5.3.1", "certifi==2023.5.7", "cfgv==3.3.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "colorama==0.4.6", "distlib==0.3.6", "docutils==0.18.1", "filelock==3.12.2", "identify==2.5.24", "idna==3.4", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.2", "markupsafe==2.1.3", "mypy==1.4.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pallets-sphinx-themes==2.1.1", "pip-compile-multi==2.6.3", "pip-tools==6.13.0", "platformdirs==3.8.0", "pluggy==1.2.0", "pre-commit==3.3.3", "pygments==2.15.1", "pyproject-api==1.5.2", "pyproject-hooks==1.0.0", "pyright==1.1.317", "pytest==7.4.0", "pyyaml==6.0.1", "requests==2.31.0", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==7.0.1", "sphinx-issues==3.0.1", "sphinx-tabs==3.4.5", "sphinxcontrib-applehelp==1.0.4", "sphinxcontrib-devhelp==1.0.2", "sphinxcontrib-htmlhelp==2.0.1", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==1.0.3", "sphinxcontrib-serializinghtml==1.1.5", "toposort==1.10", "tox==4.6.3", "typing-extensions==4.6.3", "urllib3==2.0.3", "virtualenv==20.23.1", "wheel==0.40.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2604 | b63ace28d50b53e74b5260f6cb357ccfe5560133 | diff --git a/CHANGES.rst b/CHANGES.rst
index b2fad81de..7f1530ab4 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -28,6 +28,9 @@ Unreleased
- Enable deferred evaluation of annotations with
``from __future__ import annotations``. :pr:`2270`
+- When generating a command's name from a decorated function's name, the
+ suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed.
+ :issue:`2322`
Version 8.1.7
diff --git a/src/click/decorators.py b/src/click/decorators.py
index fe6ae6a43..892d807f1 100644
--- a/src/click/decorators.py
+++ b/src/click/decorators.py
@@ -178,9 +178,10 @@ def command(
callback. This will also automatically attach all decorated
:func:`option`\s and :func:`argument`\s as parameters to the command.
- The name of the command defaults to the name of the function with
- underscores replaced by dashes. If you want to change that, you can
- pass the intended name as the first argument.
+ The name of the command defaults to the name of the function, converted to
+ lowercase, with underscores ``_`` replaced by dashes ``-``, and the suffixes
+ ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed. For example,
+ ``init_data_command`` becomes ``init-data``.
All keyword arguments are forwarded to the underlying command class.
For the ``params`` argument, any decorated params are appended to
@@ -190,10 +191,13 @@ def command(
that can be invoked as a command line utility or be attached to a
command :class:`Group`.
- :param name: the name of the command. This defaults to the function
- name with underscores replaced by dashes.
- :param cls: the command class to instantiate. This defaults to
- :class:`Command`.
+ :param name: The name of the command. Defaults to modifying the function's
+ name as described above.
+ :param cls: The command class to create. Defaults to :class:`Command`.
+
+ .. versionchanged:: 8.2
+ The suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are
+ removed when generating the name.
.. versionchanged:: 8.1
This decorator can be applied without parentheses.
@@ -236,12 +240,16 @@ def decorator(f: _AnyCallable) -> CmdType:
assert cls is not None
assert not callable(name)
- cmd = cls(
- name=name or f.__name__.lower().replace("_", "-"),
- callback=f,
- params=params,
- **attrs,
- )
+ if name is not None:
+ cmd_name = name
+ else:
+ cmd_name = f.__name__.lower().replace("_", "-")
+ cmd_left, sep, suffix = cmd_name.rpartition("-")
+
+ if sep and suffix in {"command", "cmd", "group", "grp"}:
+ cmd_name = cmd_left
+
+ cmd = cls(name=cmd_name, callback=f, params=params, **attrs)
cmd.__doc__ = f.__doc__
return cmd
| diff --git a/tests/test_command_decorators.py b/tests/test_command_decorators.py
index cfdab3c31..5bd268c0a 100644
--- a/tests/test_command_decorators.py
+++ b/tests/test_command_decorators.py
@@ -1,3 +1,5 @@
+import pytest
+
import click
@@ -69,3 +71,22 @@ def cli(a, b):
assert cli.params[1].name == "b"
result = runner.invoke(cli, ["1", "2"])
assert result.output == "1 2\n"
+
+
[email protected](
+ "name",
+ [
+ "init_data",
+ "init_data_command",
+ "init_data_cmd",
+ "init_data_group",
+ "init_data_grp",
+ ],
+)
+def test_generate_name(name: str) -> None:
+ def f():
+ pass
+
+ f.__name__ = name
+ f = click.command(f)
+ assert f.name == "init-data"
diff --git a/tests/test_commands.py b/tests/test_commands.py
index ecf2cada5..5a56799ad 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -249,7 +249,7 @@ def other_cmd(ctx, a, b, c):
result = runner.invoke(cli, standalone_mode=False)
# invoke should type cast default values, str becomes int, empty
# multiple should be empty tuple instead of None
- assert result.return_value == ("other-cmd", 42, 15, ())
+ assert result.return_value == ("other", 42, 15, ())
def test_invoked_subcommand(runner):
| strip "_command" suffix when generating command name
You often want a command to have the same name as a function it is wrapping. However, this will cause a name collision, if your command is going to call `init_data` its function can't also be called `init_data`. So instead it's written as `init_data_command`, and then the command name has to be specified manually `@command("init-data")`. Click should remove a `_command` suffix when generating the command name from the function name.
```python
def init_data(external=False):
...
@cli.command
@click.option("--external/--internal")
def init_data_command(external):
init_data(external=external)
```
Currently this command would be named `init-data-command`. After the change, it would be `init-data`.
| Hi @davidism, Am I right in assuming the expected behaviour would be that both `_command` and `_cmd` suffixes are dropped?
An example using `_cmd` as a suffix:
https://github.com/pallets/click/blob/fb4327216543d751e2654a0d3bf6ce3d31c435cc/examples/imagepipe/imagepipe.py#L74-L98 | 2023-09-01T21:14:41Z | 2023-09-01T21:17:53Z | ["tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_commands.py::test_other_command_forward", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[EOFError]", "tests/test_commands.py::test_auto_shorthelp", "tests/test_commands.py::test_object_propagation", "tests/test_commands.py::test_group_add_command_name", "tests/test_commands.py::test_group_with_args[args1-0-Show this message and exit.]", "tests/test_commands.py::test_unprocessed_options", "tests/test_commands.py::test_deprecated_in_invocation", "tests/test_commands.py::test_default_maps", "tests/test_commands.py::test_group_parse_args_collects_base_option_prefixes", "tests/test_command_decorators.py::test_command_no_parens", "tests/test_commands.py::test_command_parse_args_collects_option_prefixes", "tests/test_commands.py::test_aliased_command_canonical_name", "tests/test_commands.py::test_group_with_args[args2-0-obj=obj1\\nmove\\n]", "tests/test_command_decorators.py::test_custom_command_no_parens", "tests/test_commands.py::test_group_with_args[args3-0-Show this message and exit.]", "tests/test_commands.py::test_other_command_invoke", "tests/test_commands.py::test_custom_parser", "tests/test_commands.py::test_group_with_args[args0-2-Error: Missing command.]", "tests/test_commands.py::test_deprecated_in_help_messages[CLI HELP]", "tests/test_commands.py::test_no_args_is_help", "tests/test_command_decorators.py::test_generate_name[init_data]", "tests/test_commands.py::test_deprecated_in_help_messages[None]", "tests/test_command_decorators.py::test_group_no_parens", "tests/test_commands.py::test_forwarded_params_consistency", "tests/test_command_decorators.py::test_params_argument", "tests/test_commands.py::test_invoked_subcommand"] | [] | ["tests/test_command_decorators.py::test_generate_name[init_data_group]", "tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_command_decorators.py::test_generate_name[init_data_cmd]", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[KeyboardInterrupt]", "tests/test_command_decorators.py::test_generate_name[init_data_grp]", "tests/test_command_decorators.py::test_generate_name[init_data_command]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands =\n mypy\n pyright --verifytypes click\n pyright tests/typing\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["alabaster==0.7.13", "babel==2.12.1", "build==0.10.0", "cachetools==5.3.1", "certifi==2023.7.22", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.2.0", "colorama==0.4.6", "distlib==0.3.7", "docutils==0.18.1", "filelock==3.12.2", "identify==2.5.26", "idna==3.4", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.2", "markupsafe==2.1.3", "mypy==1.5.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pallets-sphinx-themes==2.1.1", "pip-compile-multi==2.6.3", "pip-tools==7.3.0", "platformdirs==3.10.0", "pluggy==1.2.0", "pre-commit==3.3.3", "pygments==2.16.1", "pyproject-api==1.5.4", "pyproject-hooks==1.0.0", "pyright==1.1.323", "pytest==7.4.0", "pyyaml==6.0.1", "requests==2.31.0", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==7.2.1", "sphinx-issues==3.0.1", "sphinx-tabs==3.4.1", "sphinxcontrib-applehelp==1.0.7", "sphinxcontrib-devhelp==1.0.5", "sphinxcontrib-htmlhelp==2.0.4", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==1.0.6", "sphinxcontrib-serializinghtml==1.1.8", "toposort==1.10", "tox==4.9.0", "typing-extensions==4.7.1", "urllib3==2.0.4", "virtualenv==20.24.3", "wheel==0.41.1"]} | tox -- | null | null | null | swa-bench:sw.eval |
pallets/click | pallets__click-2312 | c77966e092edc9b8835e7327294b9177059fc90e | diff --git a/CHANGES.rst b/CHANGES.rst
index cf27f573a..14cc09da0 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -24,6 +24,8 @@ Unreleased
``command_class``. :issue:`2416`
- ``multiple=True`` is allowed for flag options again and does not require
setting ``default=()``. :issue:`2246, 2292, 2295`
+- Make the decorators returned by ``@argument()`` and ``@option()`` reusable when the
+ ``cls`` parameter is used. :issue:`2294`
Version 8.1.3
diff --git a/src/click/decorators.py b/src/click/decorators.py
index 9205aa7a0..797449d63 100644
--- a/src/click/decorators.py
+++ b/src/click/decorators.py
@@ -329,7 +329,9 @@ def _param_memo(f: t.Callable[..., t.Any], param: Parameter) -> None:
f.__click_params__.append(param) # type: ignore
-def argument(*param_decls: str, **attrs: t.Any) -> _Decorator[FC]:
+def argument(
+ *param_decls: str, cls: t.Optional[t.Type[Argument]] = None, **attrs: t.Any
+) -> _Decorator[FC]:
"""Attaches an argument to the command. All positional arguments are
passed as parameter declarations to :class:`Argument`; all keyword
arguments are forwarded unchanged (except ``cls``).
@@ -345,16 +347,19 @@ def argument(*param_decls: str, **attrs: t.Any) -> _Decorator[FC]:
``cls``.
:param attrs: Passed as keyword arguments to the constructor of ``cls``.
"""
+ if cls is None:
+ cls = Argument
def decorator(f: FC) -> FC:
- ArgumentClass = attrs.pop("cls", None) or Argument
- _param_memo(f, ArgumentClass(param_decls, **attrs))
+ _param_memo(f, cls(param_decls, **attrs))
return f
return decorator
-def option(*param_decls: str, **attrs: t.Any) -> _Decorator[FC]:
+def option(
+ *param_decls: str, cls: t.Optional[t.Type[Option]] = None, **attrs: t.Any
+) -> _Decorator[FC]:
"""Attaches an option to the command. All positional arguments are
passed as parameter declarations to :class:`Option`; all keyword
arguments are forwarded unchanged (except ``cls``).
@@ -370,12 +375,11 @@ def option(*param_decls: str, **attrs: t.Any) -> _Decorator[FC]:
``cls``.
:param attrs: Passed as keyword arguments to the constructor of ``cls``.
"""
+ if cls is None:
+ cls = Option
def decorator(f: FC) -> FC:
- # Issue 926, copy attrs, so pre-defined options can re-use the same cls=
- option_attrs = attrs.copy()
- OptionClass = option_attrs.pop("cls", None) or Option
- _param_memo(f, OptionClass(param_decls, **option_attrs))
+ _param_memo(f, cls(param_decls, **attrs))
return f
return decorator
| diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index 3395c552b..7f6629fba 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -381,3 +381,23 @@ def subcmd():
result = runner.invoke(cli, ["arg1", "cmd", "arg2", "subcmd", "--help"])
assert not result.exception
assert "Usage: cli ARG1 cmd ARG2 subcmd [OPTIONS]" in result.output
+
+
+def test_when_argument_decorator_is_used_multiple_times_cls_is_preserved():
+ class CustomArgument(click.Argument):
+ pass
+
+ reusable_argument = click.argument("art", cls=CustomArgument)
+
+ @click.command()
+ @reusable_argument
+ def foo(arg):
+ pass
+
+ @click.command()
+ @reusable_argument
+ def bar(arg):
+ pass
+
+ assert isinstance(foo.params[0], CustomArgument)
+ assert isinstance(bar.params[0], CustomArgument)
| Parameter decorator factories shouldn't pop `cls` from `attrs`
Popping `cls` introduces a side-effect that prevents the reuse of the returned decorator. For example, consider the code below. The function `my_shared_argument` is a decorator that is expected to register an argument of type `ArgumentWithHelp`. Instead, what happens is:
- the first time the decorator is used, `cls=ArgumentWithHelp` will be popped from `attrs` -> `attrs` is now modified in-place
- the following times the decorator is used, `cls` won't be in `attrs`.
```python
import click
class ArgumentWithHelp(click.Argument):
def __init__(self, *args, help=None, **attrs):
super().__init__(*args, **attrs)
self.help = help
def argument_with_help(*args, cls=ArgumentWithHelp, **kwargs):
return click.argument(*args, cls=cls, **kwargs)
my_shared_argument = argument_with_help("pippo", help="very useful help")
@click.command()
@my_shared_argument
def foo(pippo):
print(pippo)
@click.command()
@my_shared_argument
def bar(pippo):
print(pippo)
```
Running this file as it is:
```python
Traceback (most recent call last):
File "C:/Users/sboby/AppData/Roaming/JetBrains/PyCharmCE2022.1/scratches/scratch_4.py", line 27, in <module>
def bar(pippo):
File "H:\Repo\unbox\UnboxTranslate\venv\lib\site-packages\click\decorators.py", line 287, in decorator
_param_memo(f, ArgumentClass(param_decls, **attrs))
File "H:\Repo\unbox\UnboxTranslate\venv\lib\site-packages\click\core.py", line 2950, in __init__
super().__init__(param_decls, required=required, **attrs)
TypeError: __init__() got an unexpected keyword argument 'help'
Process finished with exit code 1
```
<strike>The `@option` decorator is affected by the same problem but it won't crash in a similar situation because `click.Option.__init__` ignore extra arguments: it will just silently use `click.Option` as class.</strike>
The `@option` decorator is actually not affected because `attrs` is copied. This copy is nonetheless unnecessary, since adding `cls` to the signature of the function would be a more straightforward solution.
Environment:
- Python version: irrelevant
- Click version: 8.1.3 (but all versions are affected)
| 2022-06-18T22:37:29Z | 2023-07-04T01:29:36Z | ["tests/test_arguments.py::test_nargs_envvar[2-a b-expect2]", "tests/test_arguments.py::test_nargs_envvar[-1-a b c-expect4]", "tests/test_arguments.py::test_stdout_default", "tests/test_arguments.py::test_nargs_bad_default[value2]", "tests/test_arguments.py::test_nargs_envvar[-1--expect5]", "tests/test_arguments.py::test_multiple_not_allowed", "tests/test_arguments.py::test_argument_unbounded_nargs_cant_have_default", "tests/test_arguments.py::test_defaults_for_nargs", "tests/test_arguments.py::test_missing_argument_string_cast", "tests/test_arguments.py::test_nargs_envvar[2-a-Takes 2 values but 1 was given.]", "tests/test_arguments.py::test_nargs_bad_default[value1]", "tests/test_arguments.py::test_nargs_tup_composite[opts3]", "tests/test_arguments.py::test_subcommand_help", "tests/test_arguments.py::test_empty_nargs", "tests/test_arguments.py::test_nargs_tup_composite[opts0]", "tests/test_arguments.py::test_nargs_star_ordering", "tests/test_arguments.py::test_file_args", "tests/test_arguments.py::test_missing_arg", "tests/test_arguments.py::test_path_allow_dash", "tests/test_arguments.py::test_nargs_specified_plus_star_ordering", "tests/test_arguments.py::test_eat_options", "tests/test_arguments.py::test_nargs_star", "tests/test_arguments.py::test_nargs_envvar[2-a b c-Takes 2 values but 3 were given.]", "tests/test_arguments.py::test_nargs_envvar_only_if_values_empty", "tests/test_arguments.py::test_nargs_tup", "tests/test_arguments.py::test_nargs_bad_default[value0]", "tests/test_arguments.py::test_nargs_tup_composite[opts1]", "tests/test_arguments.py::test_multiple_param_decls_not_allowed", "tests/test_arguments.py::test_file_atomics", "tests/test_arguments.py::test_nargs_envvar[2--None]", "tests/test_arguments.py::test_nargs_err", "tests/test_arguments.py::test_bytes_args", "tests/test_arguments.py::test_implicit_non_required", "tests/test_arguments.py::test_nargs_tup_composite[opts2]"] | [] | ["tests/test_arguments.py::test_when_argument_decorator_is_used_multiple_times_cls_is_preserved", "tests/test_arguments.py::test_nested_subcommand_help"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands = mypy\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["alabaster==0.7.13", "babel==2.12.1", "build==0.10.0", "cachetools==5.3.1", "certifi==2023.5.7", "cfgv==3.3.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "colorama==0.4.6", "distlib==0.3.6", "docutils==0.18.1", "filelock==3.12.2", "identify==2.5.24", "idna==3.4", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.2", "markupsafe==2.1.3", "mypy==1.4.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pallets-sphinx-themes==2.1.1", "pip-compile-multi==2.6.3", "pip-tools==6.13.0", "platformdirs==3.8.0", "pluggy==1.2.0", "pre-commit==3.3.3", "pygments==2.15.1", "pyproject-api==1.5.2", "pyproject-hooks==1.0.0", "pytest==7.4.0", "pyyaml==6.0", "requests==2.31.0", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==7.0.1", "sphinx-issues==3.0.1", "sphinx-tabs==3.4.1", "sphinxcontrib-applehelp==1.0.4", "sphinxcontrib-devhelp==1.0.2", "sphinxcontrib-htmlhelp==2.0.1", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==1.0.3", "sphinxcontrib-serializinghtml==1.1.5", "toposort==1.10", "tox==4.6.3", "typing-extensions==4.6.3", "urllib3==2.0.3", "virtualenv==20.23.1", "wheel==0.40.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2550 | d34d31f6dde4350f9508f0327698f851c595d91c | diff --git a/CHANGES.rst b/CHANGES.rst
index 2debd7814..cf27f573a 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,6 +22,8 @@ Unreleased
``standalone_mode`` is disabled. :issue:`2380`
- ``@group.command`` does not fail if the group was created with a custom
``command_class``. :issue:`2416`
+- ``multiple=True`` is allowed for flag options again and does not require
+ setting ``default=()``. :issue:`2246, 2292, 2295`
Version 8.1.3
diff --git a/src/click/core.py b/src/click/core.py
index b03a76039..cc65e896b 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -2570,8 +2570,13 @@ def __init__(
# flag if flag_value is set.
self._flag_needs_value = flag_value is not None
+ self.default: t.Union[t.Any, t.Callable[[], t.Any]]
+
if is_flag and default_is_missing and not self.required:
- self.default: t.Union[t.Any, t.Callable[[], t.Any]] = False
+ if multiple:
+ self.default = ()
+ else:
+ self.default = False
if flag_value is None:
flag_value = not self.default
@@ -2622,9 +2627,6 @@ def __init__(
if self.is_flag:
raise TypeError("'count' is not valid with 'is_flag'.")
- if self.multiple and self.is_flag:
- raise TypeError("'multiple' is not valid with 'is_flag', use 'count'.")
-
def to_info_dict(self) -> t.Dict[str, t.Any]:
info_dict = super().to_info_dict()
info_dict.update(
| diff --git a/tests/test_defaults.py b/tests/test_defaults.py
index 0e438eb89..8ef5ea292 100644
--- a/tests/test_defaults.py
+++ b/tests/test_defaults.py
@@ -38,3 +38,24 @@ def cli(arg):
result = runner.invoke(cli, [])
assert not result.exception
assert result.output.splitlines() == ["<1|2>", "<3|4>"]
+
+
+def test_multiple_flag_default(runner):
+ """Default default for flags when multiple=True should be empty tuple."""
+
+ @click.command
+ # flag due to secondary token
+ @click.option("-y/-n", multiple=True)
+ # flag due to is_flag
+ @click.option("-f", is_flag=True, multiple=True)
+ # flag due to flag_value
+ @click.option("-v", "v", flag_value=1, multiple=True)
+ @click.option("-q", "v", flag_value=-1, multiple=True)
+ def cli(y, f, v):
+ return y, f, v
+
+ result = runner.invoke(cli, standalone_mode=False)
+ assert result.return_value == ((), (), ())
+
+ result = runner.invoke(cli, ["-y", "-n", "-f", "-v", "-q"], standalone_mode=False)
+ assert result.return_value == ((True, False), (True,), (1, -1))
diff --git a/tests/test_options.py b/tests/test_options.py
index d4090c725..91249b234 100644
--- a/tests/test_options.py
+++ b/tests/test_options.py
@@ -911,10 +911,6 @@ def test_is_bool_flag_is_correctly_set(option, expected):
[
({"count": True, "multiple": True}, "'count' is not valid with 'multiple'."),
({"count": True, "is_flag": True}, "'count' is not valid with 'is_flag'."),
- (
- {"multiple": True, "is_flag": True},
- "'multiple' is not valid with 'is_flag', use 'count'.",
- ),
],
)
def test_invalid_flag_combinations(runner, kwargs, message):
| can't get list of bools using multiple flag
I have an option that is a list of `bool`s, but I'm pairing each boolean value with another `multiple` option. So I do actually need a list of booleans and not just a count of values because order matters.
I'm not using `is_flag`, but I assume this translates to the same under the hood.
```
@click.option(
"--collection/--single",
"-c/-s",
type=bool,
default=[False],
count=True,
help=(
"Is a file a collection of books? Add once for every file included. "
"Consumed in order of files."
),
)
@click.option(
"--file",
"-f",
required=True,
type=click.Path(
exists=True, readable=True, dir_okay=False, allow_dash=True, path_type=str
),
multiple=True,
help=(
"The path of the input file. Note: Every file must be paired with a language. "
"And the pairs will be processed left to right."
),
)
```
Environment:
Python version: 3.9.7.1
Click version: 8.1.3
Is there an alternative way I should be doing this? If not #2246 breaks my code.
| 2023-07-03T16:10:28Z | 2023-07-03T16:31:19Z | ["tests/test_options.py::test_show_default_precedence[True-None-True]", "tests/test_options.py::test_show_default_precedence[False-one-True]", "tests/test_options.py::test_do_not_show_default_empty_multiple", "tests/test_options.py::test_flag_duplicate_names", "tests/test_options.py::test_empty_envvar[AUTO_MYPATH]", "tests/test_options.py::test_show_true_default_boolean_flag_value", "tests/test_options.py::test_prefixes", "tests/test_options.py::test_intrange_default_help_text[type2-x>=1]", "tests/test_options.py::test_show_default_string", "tests/test_options.py::test_unknown_options[--foo]", "tests/test_options.py::test_invalid_option", "tests/test_options.py::test_invalid_flag_combinations[kwargs1-'count' is not valid with 'is_flag'.]", "tests/test_options.py::test_show_envvar", "tests/test_options.py::test_init_good_default_list[True-1-default0]", "tests/test_options.py::test_option_with_optional_value[None-expect0]", "tests/test_options.py::test_init_bad_default_list[False-2-default1]", "tests/test_options.py::test_multiple_envvar", "tests/test_options.py::test_dynamic_default_help_text", "tests/test_options.py::test_option_with_optional_value[args13-expect13]", "tests/test_options.py::test_trailing_blanks_boolean_envvar", "tests/test_options.py::test_option_with_optional_value[args6-expect6]", "tests/test_options.py::test_invalid_nargs", "tests/test_options.py::test_option_with_optional_value[args11-expect11]", "tests/test_options.py::test_suggest_possible_options[--cat-Did you mean --count?]", "tests/test_options.py::test_unknown_options[-f]", "tests/test_options.py::test_multiple_option_with_optional_value", "tests/test_options.py::test_option_with_optional_value[args4-expect4]", "tests/test_options.py::test_bool_flag_with_type", "tests/test_options.py::test_option_names[option_args1-first]", "tests/test_options.py::test_option_with_optional_value[args7-expect7]", "tests/test_options.py::test_aliases_for_flags", "tests/test_options.py::test_is_bool_flag_is_correctly_set[secondary option [implicit flag]]", "tests/test_options.py::test_multiple_required", "tests/test_options.py::test_show_default_default_map", "tests/test_options.py::test_invalid_flag_combinations[kwargs0-'count' is not valid with 'multiple'.]", "tests/test_options.py::test_option_names[option_args4-a]", "tests/test_defaults.py::test_nargs_plus_multiple", "tests/test_options.py::test_nargs_tup_composite_mult", "tests/test_options.py::test_suggest_possible_options[--bounds-(Possible options: --bound, --count)]", "tests/test_options.py::test_intrange_default_help_text[type0-1<=x<=32]", "tests/test_options.py::test_intrange_default_help_text[type3-x<=32]", "tests/test_options.py::test_nargs_envvar", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [None]]", "tests/test_options.py::test_option_help_preserve_paragraphs", "tests/test_defaults.py::test_basic_defaults", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [True]]", "tests/test_options.py::test_count_default_type_help", "tests/test_options.py::test_legacy_options", "tests/test_options.py::test_option_names[option_args9-_ret]", "tests/test_options.py::test_show_envvar_auto_prefix", "tests/test_options.py::test_option_with_optional_value[args3-expect3]", "tests/test_options.py::test_argument_custom_class", "tests/test_defaults.py::test_multiple_defaults", "tests/test_options.py::test_show_default_precedence[True-False-False]", "tests/test_options.py::test_dynamic_default_help_special_method", "tests/test_options.py::test_hide_false_default_boolean_flag_value[False]", "tests/test_options.py::test_suggest_possible_options[--bount-(Possible options: --bound, --count)]", "tests/test_options.py::test_missing_option_string_cast", "tests/test_options.py::test_toupper_envvar_prefix", "tests/test_options.py::test_is_bool_flag_is_correctly_set[is_flag=True]", "tests/test_options.py::test_winstyle_options", "tests/test_options.py::test_missing_required_flag", "tests/test_options.py::test_case_insensitive_choice_returned_exactly", "tests/test_options.py::test_dynamic_default_help_unset", "tests/test_options.py::test_option_names[option_args2-apple]", "tests/test_options.py::test_init_good_default_list[False-2-default2]", "tests/test_options.py::test_show_default_precedence[True-True-True]", "tests/test_options.py::test_hide_false_default_boolean_flag_value[None]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool flag_value]", "tests/test_options.py::test_callback_validates_prompt", "tests/test_options.py::test_show_default_precedence[False-False-False]", "tests/test_options.py::test_option_names[option_args8-_from]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[bool non-flag [False]]", "tests/test_options.py::test_multiple_default_composite_type", "tests/test_options.py::test_option_with_optional_value[args2-expect2]", "tests/test_options.py::test_type_from_flag_value", "tests/test_options.py::test_case_insensitive_choice", "tests/test_options.py::test_init_good_default_list[True-2-default4]", "tests/test_options.py::test_show_default_precedence[None-False-False]", "tests/test_options.py::test_intrange_default_help_text[type1-1<x<32]", "tests/test_options.py::test_custom_validation", "tests/test_options.py::test_option_names[option_args3-cantaloupe]", "tests/test_options.py::test_show_default_precedence[None-None-False]", "tests/test_options.py::test_show_default_boolean_flag_name[True-cache]", "tests/test_options.py::test_option_names[option_args6-apple]", "tests/test_options.py::test_option_with_optional_value[args10-expect10]", "tests/test_options.py::test_option_custom_class_reusable", "tests/test_options.py::test_init_good_default_list[True-2-default3]", "tests/test_options.py::test_option_with_optional_value[args12-expect12]", "tests/test_options.py::test_is_bool_flag_is_correctly_set[non-bool flag_value]", "tests/test_options.py::test_show_default_precedence[False-None-False]", "tests/test_options.py::test_option_with_optional_value[args9-expect9]", "tests/test_options.py::test_init_good_default_list[True-1-default1]", "tests/test_options.py::test_init_bad_default_list[True-1-1]", "tests/test_options.py::test_show_default_precedence[False-True-True]", "tests/test_options.py::test_show_default_boolean_flag_name[False-no-cache]", "tests/test_options.py::test_option_custom_class", "tests/test_options.py::test_parse_multiple_default_composite_type", "tests/test_options.py::test_option_with_optional_value[args8-expect8]", "tests/test_options.py::test_option_with_optional_value[args5-expect5]", "tests/test_options.py::test_option_names[option_args0-aggressive]", "tests/test_options.py::test_init_bad_default_list[True-2-default2]", "tests/test_options.py::test_option_names[option_args7-cantaloupe]", "tests/test_options.py::test_option_with_optional_value[args1-expect1]", "tests/test_options.py::test_counting", "tests/test_options.py::test_is_bool_flag_is_correctly_set[int option]", "tests/test_options.py::test_show_default_precedence[None-True-True]", "tests/test_options.py::test_file_type_help_default", "tests/test_options.py::test_multiple_default_help", "tests/test_options.py::test_option_names[option_args5-c]", "tests/test_options.py::test_multiple_default_type", "tests/test_options.py::test_missing_choice", "tests/test_options.py::test_empty_envvar[MYPATH]", "tests/test_options.py::test_show_envvar_auto_prefix_dash_in_command", "tests/test_options.py::test_do_not_show_no_default"] | [] | ["tests/test_defaults.py::test_multiple_flag_default"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands = mypy\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["alabaster==0.7.13", "babel==2.12.1", "build==0.10.0", "cachetools==5.3.1", "certifi==2023.5.7", "cfgv==3.3.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "colorama==0.4.6", "distlib==0.3.6", "docutils==0.18.1", "filelock==3.12.2", "identify==2.5.24", "idna==3.4", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.2", "markupsafe==2.1.3", "mypy==1.4.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pallets-sphinx-themes==2.1.1", "pip-compile-multi==2.6.3", "pip-tools==6.13.0", "platformdirs==3.8.0", "pluggy==1.2.0", "pre-commit==3.3.3", "pygments==2.15.1", "pyproject-api==1.5.2", "pyproject-hooks==1.0.0", "pytest==7.4.0", "pyyaml==6.0", "requests==2.31.0", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==7.0.1", "sphinx-issues==3.0.1", "sphinx-tabs==3.4.1", "sphinxcontrib-applehelp==1.0.4", "sphinxcontrib-devhelp==1.0.2", "sphinxcontrib-htmlhelp==2.0.1", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==1.0.3", "sphinxcontrib-serializinghtml==1.1.5", "toposort==1.10", "tox==4.6.3", "typing-extensions==4.6.3", "urllib3==2.0.3", "virtualenv==20.23.1", "wheel==0.40.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2417 | e4066e1f325088ee42ae7bc0bc6c2e47533ff2c3 | diff --git a/CHANGES.rst b/CHANGES.rst
index 37646a9c7..2debd7814 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -20,6 +20,8 @@ Unreleased
- ZSH completion script works when loaded from ``fpath``. :issue:`2344`.
- ``EOFError`` and ``KeyboardInterrupt`` tracebacks are not suppressed when
``standalone_mode`` is disabled. :issue:`2380`
+- ``@group.command`` does not fail if the group was created with a custom
+ ``command_class``. :issue:`2416`
Version 8.1.3
diff --git a/src/click/core.py b/src/click/core.py
index a6fc501e2..b03a76039 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -1871,9 +1871,6 @@ def command(
"""
from .decorators import command
- if self.command_class and kwargs.get("cls") is None:
- kwargs["cls"] = self.command_class
-
func: t.Optional[t.Callable[..., t.Any]] = None
if args and callable(args[0]):
@@ -1883,6 +1880,9 @@ def command(
(func,) = args
args = ()
+ if self.command_class and kwargs.get("cls") is None:
+ kwargs["cls"] = self.command_class
+
def decorator(f: t.Callable[..., t.Any]) -> Command:
cmd: Command = command(*args, **kwargs)(f)
self.add_command(cmd)
| diff --git a/tests/test_command_decorators.py b/tests/test_command_decorators.py
index 9d54d7b27..cfdab3c31 100644
--- a/tests/test_command_decorators.py
+++ b/tests/test_command_decorators.py
@@ -11,6 +11,26 @@ def cli():
assert result.output == "hello\n"
+def test_custom_command_no_parens(runner):
+ class CustomCommand(click.Command):
+ pass
+
+ class CustomGroup(click.Group):
+ command_class = CustomCommand
+
+ @click.group(cls=CustomGroup)
+ def grp():
+ pass
+
+ @grp.command
+ def cli():
+ click.echo("hello custom command class")
+
+ result = runner.invoke(cli)
+ assert result.exception is None
+ assert result.output == "hello custom command class\n"
+
+
def test_group_no_parens(runner):
@click.group
def grp():
| Cannot use parameterless command decorator with custom command_class
Click throws an assertion error if you try to use the parameterless command decorator on a group with a command_class defined. The error is due to the command_class being added to kwargs before the assertion for no kwargs.
# minimal repro
```
import click
class CustomCommand(click.Command):
pass
class CustomGroup(click.Group):
command_class = CustomCommand
@click.group(cls=CustomGroup)
def grp():
pass
@grp.command
def cli():
click.echo("hello custom command class")
```
## error
```
ewilliamson@ip-192-168-50-39 ~ % python minimal_repro.py
Traceback (most recent call last):
File "/Users/ewilliamson/minimal_repro.py", line 14, in <module>
def cli():
File "/Users/ewilliamson/.pyenv/versions/3.10.7/lib/python3.10/site-packages/click/core.py", line 1847, in command
assert (
AssertionError: Use 'command(**kwargs)(callable)' to provide arguments.
```
## expected
The `@grp.command` would be successfully parsed the same as without using `CustomGroup`
<!--
Describe the expected behavior that should have happened but didn't.
-->
Environment:
- Python version: `Python 3.10.7`
- Click version: `click==8.1.3`
| 2022-12-15T22:06:00Z | 2023-06-30T19:29:14Z | ["tests/test_command_decorators.py::test_command_no_parens", "tests/test_command_decorators.py::test_group_no_parens"] | [] | ["tests/test_command_decorators.py::test_params_argument", "tests/test_command_decorators.py::test_custom_command_no_parens"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands = mypy\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["alabaster==0.7.13", "babel==2.12.1", "build==0.10.0", "cachetools==5.3.1", "certifi==2023.5.7", "cfgv==3.3.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "colorama==0.4.6", "distlib==0.3.6", "docutils==0.18.1", "filelock==3.12.2", "identify==2.5.24", "idna==3.4", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.2", "markupsafe==2.1.3", "mypy==1.4.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pallets-sphinx-themes==2.1.1", "pip-compile-multi==2.6.3", "pip-tools==6.13.0", "platformdirs==3.8.0", "pluggy==1.2.0", "pre-commit==3.3.3", "pygments==2.15.1", "pyproject-api==1.5.2", "pyproject-hooks==1.0.0", "pytest==7.4.0", "pyyaml==6.0", "requests==2.31.0", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==7.0.1", "sphinx-issues==3.0.1", "sphinx-tabs==3.4.1", "sphinxcontrib-applehelp==1.0.4", "sphinxcontrib-devhelp==1.0.2", "sphinxcontrib-htmlhelp==2.0.1", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==1.0.3", "sphinxcontrib-serializinghtml==1.1.5", "toposort==1.10", "tox==4.6.3", "typing-extensions==4.6.3", "urllib3==2.0.3", "virtualenv==20.23.1", "wheel==0.40.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2380 | df9ad4085d60710b507b54c8fc369ee186eb1d64 | diff --git a/CHANGES.rst b/CHANGES.rst
index 674e44901..37646a9c7 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -18,6 +18,8 @@ Unreleased
- Improve command name detection when using Shiv or PEX. :issue:`2332`
- Avoid showing empty lines if command help text is empty. :issue:`2368`
- ZSH completion script works when loaded from ``fpath``. :issue:`2344`.
+- ``EOFError`` and ``KeyboardInterrupt`` tracebacks are not suppressed when
+ ``standalone_mode`` is disabled. :issue:`2380`
Version 8.1.3
diff --git a/src/click/core.py b/src/click/core.py
index 9a5f88ad3..a6fc501e2 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -1086,9 +1086,9 @@ def main(
# even always obvious that `rv` indicates success/failure
# by its truthiness/falsiness
ctx.exit()
- except (EOFError, KeyboardInterrupt):
+ except (EOFError, KeyboardInterrupt) as e:
echo(file=sys.stderr)
- raise Abort() from None
+ raise Abort() from e
except ClickException as e:
if not standalone_mode:
raise
| diff --git a/tests/test_commands.py b/tests/test_commands.py
index d72a1825e..ed9d96f3c 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -397,3 +397,15 @@ def command2(e):
runner.invoke(group, ["command1"])
assert opt_prefixes == {"-", "--", "~", "+"}
+
+
[email protected]("exc", (EOFError, KeyboardInterrupt))
+def test_abort_exceptions_with_disabled_standalone_mode(runner, exc):
+ @click.command()
+ def cli():
+ raise exc("catch me!")
+
+ rv = runner.invoke(cli, standalone_mode=False)
+ assert rv.exit_code == 1
+ assert isinstance(rv.exception.__cause__, exc)
+ assert rv.exception.__cause__.args == ("catch me!",)
| Unable to see EOFError exception in the traceback with disabled standalone mode
According to the [docs](https://click.palletsprojects.com/en/8.0.x/exceptions/?highlight=standalone%20mode#what-if-i-don-t-want-that) disabled standalone mode disables exception handling. However, click still suppresses `EOFError` (as well as `KeyboardInterrupt`) exceptions from the stack trace due to the `raise ... from None` construction, see:
https://github.com/pallets/click/blob/0aec1168ac591e159baf6f61026d6ae322c53aaf/src/click/core.py#L1066-L1068
I'd suggest changing the [line](https://github.com/pallets/click/blob/0aec1168ac591e159baf6f61026d6ae322c53aaf/src/click/core.py#L1068) to `raise Abort() from e`, so that users can see the original exception in the stack trace.
Real world example. I use asyncio streams that can [raise IncompleteReadError](https://github.com/python/cpython/blob/d03acd7270d66ddb8e987f9743405147ecc15087/Lib/asyncio/exceptions.py#L29) which inherited from `EOFError`, but I can't see the exception in the stack trace even with disabled standalone mode which looks like a bug to me.
**How to replicate the bug:**
1. Create the following script:
```python
# t.py
import click
@click.command()
def cli():
raise EOFError('I want to see this exception')
if __name__ == '__main__':
cli.main(standalone_mode=False)
```
2. Run module `python -m t`
**Actual behavior:**
```python
Traceback (most recent call last):
File "/Users/albert/.pyenv/versions/3.10.4/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/albert/.pyenv/versions/3.10.4/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/private/var/folders/l0/lnq1ghps5yqc4vkgszlcz92m0000gp/T/tmp.X1tRYLrm/t.py", line 10, in <module>
cli.main(standalone_mode=False)
File "/private/var/folders/l0/lnq1ghps5yqc4vkgszlcz92m0000gp/T/tmp.X1tRYLrm/.venv/lib/python3.10/site-packages/click/core.py", line 1068, in main
raise Abort() from None
click.exceptions.Abort
```
**Expected behavior:**
```python
Traceback (most recent call last):
File "/private/var/folders/l0/lnq1ghps5yqc4vkgszlcz92m0000gp/T/tmp.X1tRYLrm/.venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/private/var/folders/l0/lnq1ghps5yqc4vkgszlcz92m0000gp/T/tmp.X1tRYLrm/.venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/private/var/folders/l0/lnq1ghps5yqc4vkgszlcz92m0000gp/T/tmp.X1tRYLrm/.venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/private/var/folders/l0/lnq1ghps5yqc4vkgszlcz92m0000gp/T/tmp.X1tRYLrm/t.py", line 6, in cli
raise EOFError('I want to see this exception')
EOFError: I want to see this exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/albert/.pyenv/versions/3.10.4/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/albert/.pyenv/versions/3.10.4/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/private/var/folders/l0/lnq1ghps5yqc4vkgszlcz92m0000gp/T/tmp.X1tRYLrm/t.py", line 10, in <module>
cli.main(standalone_mode=False)
File "/private/var/folders/l0/lnq1ghps5yqc4vkgszlcz92m0000gp/T/tmp.X1tRYLrm/.venv/lib/python3.10/site-packages/click/core.py", line 1068, in main
raise Abort() from e
click.exceptions.Abort
```
Environment:
- Python version: 3.10.4
- Click version: 8.1.3
| 2022-10-17T18:57:10Z | 2023-06-30T19:19:42Z | ["tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_commands.py::test_other_command_forward", "tests/test_commands.py::test_auto_shorthelp", "tests/test_commands.py::test_object_propagation", "tests/test_commands.py::test_group_add_command_name", "tests/test_commands.py::test_group_with_args[args1-0-Show this message and exit.]", "tests/test_commands.py::test_unprocessed_options", "tests/test_commands.py::test_deprecated_in_invocation", "tests/test_commands.py::test_default_maps", "tests/test_commands.py::test_group_parse_args_collects_base_option_prefixes", "tests/test_commands.py::test_base_command", "tests/test_commands.py::test_command_parse_args_collects_option_prefixes", "tests/test_commands.py::test_aliased_command_canonical_name", "tests/test_commands.py::test_group_with_args[args2-0-obj=obj1\\nmove\\n]", "tests/test_commands.py::test_group_with_args[args3-0-Show this message and exit.]", "tests/test_commands.py::test_other_command_invoke", "tests/test_commands.py::test_group_with_args[args0-2-Error: Missing command.]", "tests/test_commands.py::test_deprecated_in_help_messages[CLI HELP]", "tests/test_commands.py::test_no_args_is_help", "tests/test_commands.py::test_deprecated_in_help_messages[None]", "tests/test_commands.py::test_forwarded_params_consistency", "tests/test_commands.py::test_invoked_subcommand"] | [] | ["tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[EOFError]", "tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_commands.py::test_abort_exceptions_with_disabled_standalone_mode[KeyboardInterrupt]"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands = mypy\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["alabaster==0.7.13", "babel==2.12.1", "build==0.10.0", "cachetools==5.3.1", "certifi==2023.5.7", "cfgv==3.3.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "colorama==0.4.6", "distlib==0.3.6", "docutils==0.18.1", "filelock==3.12.2", "identify==2.5.24", "idna==3.4", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.2", "markupsafe==2.1.3", "mypy==1.4.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pallets-sphinx-themes==2.1.1", "pip-compile-multi==2.6.3", "pip-tools==6.13.0", "platformdirs==3.8.0", "pluggy==1.2.0", "pre-commit==3.3.3", "pygments==2.15.1", "pyproject-api==1.5.2", "pyproject-hooks==1.0.0", "pytest==7.4.0", "pyyaml==6.0", "requests==2.31.0", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==7.0.1", "sphinx-issues==3.0.1", "sphinx-tabs==3.4.1", "sphinxcontrib-applehelp==1.0.4", "sphinxcontrib-devhelp==1.0.2", "sphinxcontrib-htmlhelp==2.0.1", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==1.0.3", "sphinxcontrib-serializinghtml==1.1.5", "toposort==1.10", "tox==4.6.3", "typing-extensions==4.6.3", "urllib3==2.0.3", "virtualenv==20.23.1", "wheel==0.40.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
pallets/click | pallets__click-2369 | a4f5450a2541e2f2f8cacf57f50435eb78422f99 | diff --git a/CHANGES.rst b/CHANGES.rst
index 66808a83c..76c234f6b 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -16,6 +16,7 @@ Unreleased
- Improve type annotations for pyright type checker. :issue:`2268`
- Improve responsiveness of ``click.clear()``. :issue:`2284`
- Improve command name detection when using Shiv or PEX. :issue:`2332`
+- Avoid showing empty lines if command help text is empty. :issue:`2368`
Version 8.1.3
diff --git a/src/click/core.py b/src/click/core.py
index d61f7babd..9a5f88ad3 100644
--- a/src/click/core.py
+++ b/src/click/core.py
@@ -1360,13 +1360,16 @@ def format_help(self, ctx: Context, formatter: HelpFormatter) -> None:
def format_help_text(self, ctx: Context, formatter: HelpFormatter) -> None:
"""Writes the help text to the formatter if it exists."""
- text = self.help if self.help is not None else ""
+ if self.help is not None:
+ # truncate the help text to the first form feed
+ text = inspect.cleandoc(self.help).partition("\f")[0]
+ else:
+ text = ""
if self.deprecated:
text = _("(Deprecated) {text}").format(text=text)
if text:
- text = inspect.cleandoc(text).partition("\f")[0]
formatter.write_paragraph()
with formatter.indentation():
| diff --git a/tests/test_commands.py b/tests/test_commands.py
index 3a0d4b9c6..d72a1825e 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -95,20 +95,6 @@ def long():
)
-def test_help_truncation(runner):
- @click.command()
- def cli():
- """This is a command with truncated help.
- \f
-
- This text should be truncated.
- """
-
- result = runner.invoke(cli, ["--help"])
- assert result.exit_code == 0
- assert "This is a command with truncated help." in result.output
-
-
def test_no_args_is_help(runner):
@click.command(no_args_is_help=True)
def cli():
diff --git a/tests/test_formatting.py b/tests/test_formatting.py
index 1cbf32bec..fe7e7bad1 100644
--- a/tests/test_formatting.py
+++ b/tests/test_formatting.py
@@ -296,6 +296,26 @@ def cli(ctx):
]
+def test_truncating_docstring_no_help(runner):
+ @click.command()
+ @click.pass_context
+ def cli(ctx):
+ """
+ \f
+
+ This text should be truncated.
+ """
+
+ result = runner.invoke(cli, ["--help"], terminal_width=60)
+ assert not result.exception
+ assert result.output.splitlines() == [
+ "Usage: cli [OPTIONS]",
+ "",
+ "Options:",
+ " --help Show this message and exit.",
+ ]
+
+
def test_removing_multiline_marker(runner):
@click.group()
def cli():
| Spurious empty lines in the help output (regression)
Click since version 8.1.0 doesn't properly account for a scenario that the callback's docstring can have no "help text" part, like so:
```python
@click.command()
def callback():
"""
\f
More stuff.
"""
```
This results in empty lines in the output:
```
% python3 test --help
Usage: test [OPTIONS]
Options:
--help Show this message and exit.
```
Before 8.1.0:
```
% python3 test --help
Usage: test [OPTIONS]
Options:
--help Show this message and exit.
```
Environment:
- Python version: 3.9.2
- Click version: 8.1.3
| 2022-10-05T12:39:42Z | 2023-06-30T16:43:46Z | ["tests/test_commands.py::test_other_command_invoke_with_defaults", "tests/test_formatting.py::test_formatting_with_options_metavar_empty", "tests/test_commands.py::test_group_invoke_collects_used_option_prefixes", "tests/test_commands.py::test_other_command_forward", "tests/test_formatting.py::test_basic_functionality", "tests/test_formatting.py::test_formatting_empty_help_lines", "tests/test_commands.py::test_auto_shorthelp", "tests/test_commands.py::test_object_propagation", "tests/test_commands.py::test_group_add_command_name", "tests/test_formatting.py::test_wrapping_long_options_strings", "tests/test_commands.py::test_group_with_args[args1-0-Show this message and exit.]", "tests/test_commands.py::test_unprocessed_options", "tests/test_formatting.py::test_removing_multiline_marker", "tests/test_formatting.py::test_formatting_usage_error", "tests/test_formatting.py::test_truncating_docstring", "tests/test_commands.py::test_deprecated_in_invocation", "tests/test_commands.py::test_default_maps", "tests/test_commands.py::test_group_parse_args_collects_base_option_prefixes", "tests/test_commands.py::test_base_command", "tests/test_commands.py::test_command_parse_args_collects_option_prefixes", "tests/test_commands.py::test_aliased_command_canonical_name", "tests/test_formatting.py::test_formatting_usage_error_no_help", "tests/test_formatting.py::test_global_show_default", "tests/test_commands.py::test_group_with_args[args2-0-obj=obj1\\nmove\\n]", "tests/test_commands.py::test_group_with_args[args3-0-Show this message and exit.]", "tests/test_formatting.py::test_formatting_usage_error_nested", "tests/test_commands.py::test_other_command_invoke", "tests/test_commands.py::test_group_with_args[args0-2-Error: Missing command.]", "tests/test_formatting.py::test_formatting_usage_error_metavar_missing_arg", "tests/test_commands.py::test_deprecated_in_help_messages[CLI HELP]", "tests/test_formatting.py::test_formatting_usage_custom_help", "tests/test_commands.py::test_no_args_is_help", "tests/test_formatting.py::test_wrapping_long_command_name", "tests/test_formatting.py::test_formatting_custom_type_metavar", "tests/test_commands.py::test_deprecated_in_help_messages[None]", "tests/test_formatting.py::test_formatting_usage_error_metavar_bad_arg", "tests/test_commands.py::test_forwarded_params_consistency", "tests/test_commands.py::test_invoked_subcommand"] | [] | ["tests/test_formatting.py::test_help_formatter_write_text", "tests/test_formatting.py::test_truncating_docstring_no_help"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n py3{12,11,10,9,8,7}\n pypy310\n # style\n # typing\n # docs\nskip_missing_interpreters = true\n\n[testenv]\npackage = wheel\nwheel_build_env = .pkg\ndeps = -r requirements/tests.txt\ncommands = pytest --color=no -rA -p no:cacheprovider -v --tb=no --basetemp={envtmpdir} {posargs}\n\n[testenv:style]\ndeps = pre-commit\nskip_install = true\ncommands = pre-commit run --all-files\n\n[testenv:typing]\ndeps = -r requirements/typing.txt\ncommands = mypy\n\n[testenv:docs]\ndeps = -r requirements/docs.txt\ncommands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["alabaster==0.7.13", "babel==2.12.1", "build==0.10.0", "cachetools==5.3.1", "certifi==2023.5.7", "cfgv==3.3.1", "chardet==5.1.0", "charset-normalizer==3.1.0", "colorama==0.4.6", "distlib==0.3.6", "docutils==0.18.1", "filelock==3.12.2", "identify==2.5.24", "idna==3.4", "imagesize==1.4.1", "iniconfig==2.0.0", "jinja2==3.1.2", "markupsafe==2.1.3", "mypy==1.4.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pallets-sphinx-themes==2.1.1", "pip-compile-multi==2.6.3", "pip-tools==6.13.0", "platformdirs==3.8.0", "pluggy==1.2.0", "pre-commit==3.3.3", "pygments==2.15.1", "pyproject-api==1.5.2", "pyproject-hooks==1.0.0", "pytest==7.4.0", "pyyaml==6.0", "requests==2.31.0", "setuptools==75.1.0", "snowballstemmer==2.2.0", "sphinx==7.0.1", "sphinx-issues==3.0.1", "sphinx-tabs==3.4.1", "sphinxcontrib-applehelp==1.0.4", "sphinxcontrib-devhelp==1.0.2", "sphinxcontrib-htmlhelp==2.0.1", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-log-cabinet==1.0.1", "sphinxcontrib-qthelp==1.0.3", "sphinxcontrib-serializinghtml==1.1.5", "toposort==1.10", "tox==4.6.3", "typing-extensions==4.6.3", "urllib3==2.0.3", "virtualenv==20.23.1", "wheel==0.40.0"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
cowrie/cowrie | cowrie__cowrie-1405 | 0df3cd9e187fd2c90b152a9dc57d2f6b9652256b | diff --git a/src/cowrie/shell/filetransfer.py b/src/cowrie/shell/filetransfer.py
index 2eed756977..976b69a27d 100644
--- a/src/cowrie/shell/filetransfer.py
+++ b/src/cowrie/shell/filetransfer.py
@@ -147,7 +147,7 @@ class SFTPServerForCowrieUser(object):
def __init__(self, avatar):
self.avatar = avatar
- self.avatar.server.initFileSystem()
+ self.avatar.server.initFileSystem(self.avatar.home)
self.fs = self.avatar.server.fs
def _absPath(self, path):
diff --git a/src/cowrie/shell/fs.py b/src/cowrie/shell/fs.py
index 8457d51b30..eaf1cfe559 100644
--- a/src/cowrie/shell/fs.py
+++ b/src/cowrie/shell/fs.py
@@ -72,7 +72,7 @@ class PermissionDenied(Exception):
class HoneyPotFilesystem(object):
- def __init__(self, fs, arch):
+ def __init__(self, fs, arch, home):
try:
with open(CowrieConfig().get('shell', 'filesystem'), 'rb') as f:
@@ -86,6 +86,7 @@ def __init__(self, fs, arch):
# Keep track of arch so we can return appropriate binary
self.arch = arch
+ self.home = home
# Keep track of open file descriptors
self.tempfiles = {}
@@ -113,10 +114,17 @@ def init_honeyfs(self, honeyfs_path):
if f and f[A_TYPE] == T_FILE:
self.update_realfile(f, realfile_path)
- def resolve_path(self, path, cwd):
+ def resolve_path(self, pathspec, cwd):
"""
This function does not need to be in this class, it has no dependencies
"""
+
+ # If a path within home directory is specified, convert it to an absolute path
+ if pathspec.startswith("~/"):
+ path = self.home + pathspec[1:]
+ else:
+ path = pathspec
+
pieces = path.rstrip('/').split('/')
if path[0] == '/':
diff --git a/src/cowrie/shell/server.py b/src/cowrie/shell/server.py
index 746466c7f2..931455bc91 100644
--- a/src/cowrie/shell/server.py
+++ b/src/cowrie/shell/server.py
@@ -69,11 +69,11 @@ def getCommandOutput(self, file):
cmdoutput = json.load(f)
return cmdoutput
- def initFileSystem(self):
+ def initFileSystem(self, home):
"""
Do this so we can trigger it later. Not all sessions need file system
"""
- self.fs = fs.HoneyPotFilesystem(None, self.arch)
+ self.fs = fs.HoneyPotFilesystem(None, self.arch, home)
try:
self.process = self.getCommandOutput(CowrieConfig().get('shell', 'processes'))['command']['ps']
diff --git a/src/cowrie/shell/session.py b/src/cowrie/shell/session.py
index c1271c1d2f..6a3e5769f6 100644
--- a/src/cowrie/shell/session.py
+++ b/src/cowrie/shell/session.py
@@ -41,7 +41,7 @@ def __init__(self, avatar, reactor=None):
else:
self.environ['PATH'] = '/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games'
- self.server.initFileSystem()
+ self.server.initFileSystem(self.avatar.home)
if self.avatar.temporary:
self.server.fs.mkdir(self.avatar.home, self.uid, self.gid, 4096, 755)
diff --git a/src/cowrie/telnet/session.py b/src/cowrie/telnet/session.py
index 47c80e2ec5..61ef684e97 100644
--- a/src/cowrie/telnet/session.py
+++ b/src/cowrie/telnet/session.py
@@ -57,7 +57,7 @@ def __init__(self, username, server):
self.avatar = self
# Do the delayed file system initialization
- self.server.initFileSystem()
+ self.server.initFileSystem(self.home)
def connectionMade(self):
processprotocol = TelnetSessionProcessProtocol(self)
| diff --git a/src/cowrie/test/fake_server.py b/src/cowrie/test/fake_server.py
index 5a172b255b..94f085ff10 100644
--- a/src/cowrie/test/fake_server.py
+++ b/src/cowrie/test/fake_server.py
@@ -18,7 +18,7 @@ def __init__(self):
self.arch = 'linux-x64-lsb'
self.hostname = "unitTest"
- self.fs = fs.HoneyPotFilesystem(None, 'arch')
+ self.fs = fs.HoneyPotFilesystem(None, 'arch', '/root')
self.process = None
diff --git a/src/cowrie/test/test_chmod.py b/src/cowrie/test/test_chmod.py
new file mode 100644
index 0000000000..44a2a25aa5
--- /dev/null
+++ b/src/cowrie/test/test_chmod.py
@@ -0,0 +1,125 @@
+# -*- test-case-name: Cowrie Test Cases -*-
+
+# Copyright (c) 2020 Peter Sufliarsky
+# See LICENSE for details.
+
+"""
+Tests for general shell interaction and chmod command
+"""
+
+from __future__ import absolute_import, division
+
+import os
+
+from twisted.trial import unittest
+
+from cowrie.shell import protocol
+from cowrie.test import fake_server, fake_transport
+
+os.environ["HONEYPOT_DATA_PATH"] = "../data"
+os.environ["HONEYPOT_DOWNLOAD_PATH"] = "/tmp"
+os.environ["SHELL_FILESYSTEM"] = "../share/cowrie/fs.pickle"
+
+PROMPT = b"root@unitTest:~# "
+
+
+class ShellTeeCommandTests(unittest.TestCase):
+
+ def setUp(self):
+ self.proto = protocol.HoneyPotInteractiveProtocol(fake_server.FakeAvatar(fake_server.FakeServer()))
+ self.tr = fake_transport.FakeTransport("1.1.1.1", "1111")
+ self.proto.makeConnection(self.tr)
+ self.tr.clear()
+
+ def test_chmod_command_001(self):
+ """
+ Missing operand
+ """
+ self.proto.lineReceived(b"chmod")
+ self.assertEquals(
+ self.tr.value(),
+ b"chmod: missing operand\nTry 'chmod --help' for more information.\n"
+ + PROMPT
+ )
+
+ def test_chmod_command_002(self):
+ """
+ Missing operand after...
+ """
+ self.proto.lineReceived(b"chmod arg")
+ self.assertEquals(
+ self.tr.value(),
+ b"chmod: missing operand after \xe2\x80\x98arg\xe2\x80\x99\nTry 'chmod --help' for more information.\n"
+ + PROMPT
+ )
+
+ def test_chmod_command_003(self):
+ """
+ Missing operand
+ """
+ self.proto.lineReceived(b"chmod +x")
+ self.assertEquals(
+ self.tr.value(),
+ b"chmod: missing operand after \xe2\x80\x98+x\xe2\x80\x99\nTry 'chmod --help' for more information.\n"
+ + PROMPT
+ )
+
+ def test_chmod_command_004(self):
+ """
+ No such file or directory
+ """
+ self.proto.lineReceived(b"chmod +x abcd")
+ self.assertEquals(self.tr.value(), b"chmod: cannot access 'abcd': No such file or directory\n" + PROMPT)
+
+ # does not work properly
+ # def test_chmod_command_005(self):
+ # """
+ # Invalid option
+ # """
+ # self.proto.lineReceived(b"chmod -A +x abcd")
+ # self.assertEquals(
+ # self.tr.value(),
+ # b"chmod: invalid option -- 'A'\nTry 'chmod --help' for more information.\n" + PROMPT
+ # )
+
+ def test_chmod_command_006(self):
+ """
+ Invalid mode
+ """
+ self.proto.lineReceived(b"chmod abcd efgh")
+ self.assertEquals(
+ self.tr.value(),
+ b"chmod: invalid mode: \xe2\x80\x98abcd\xe2\x80\x99\nTry 'chmod --help' for more information.\n"
+ + PROMPT
+ )
+
+ def test_chmod_command_007(self):
+ """
+ Valid directory .ssh recursive
+ """
+ self.proto.lineReceived(b"chmod -R +x .ssh")
+ self.assertEquals(self.tr.value(), PROMPT)
+
+ def test_chmod_command_008(self):
+ """
+ Valid directory .ssh
+ """
+ self.proto.lineReceived(b"chmod +x .ssh")
+ self.assertEquals(self.tr.value(), PROMPT)
+
+ def test_chmod_command_009(self):
+ """
+ Valid directory /root/.ssh
+ """
+ self.proto.lineReceived(b"chmod +x /root/.ssh")
+ self.assertEquals(self.tr.value(), PROMPT)
+
+ def test_chmod_command_010(self):
+ """
+ Valid directory ~/.ssh
+ """
+ self.proto.lineReceived(b"chmod +x ~/.ssh")
+ self.assertEquals(self.tr.value(), PROMPT)
+
+ def tearDown(self):
+ self.proto.connectionLost("tearDown From Unit Test")
| Resolving paths with ~/
**Describe the bug**
Quite often I see the following input from my visitors:
```
cd ~ && rm -rf .ssh && mkdir .ssh && echo "ssh-rsa [SSH_KEY] [USERNAME]">>.ssh/authorized_keys && chmod -R go= ~/.ssh && cd ~
```
There is an issue with chmod argument `~/.ssh`. Cowrie can not resolve this path. However, when I'm testing with `.ssh` and I'm located in the `/root` directory, it works well. Should paths like `~/something` work with cowrie?
**To Reproduce**
```
# pwd
/root
# chmod -R go= .ssh
# chmod -R go= ~/.ssh
chmod: cannot access '~/.ssh': No such file or directory
```
**Expected behavior**
Cowrie should properly resolve paths within the current user's home directory when using `~/`
**Solution**
Just let me know whether there is any quick fix for this. If this needs further analysis, I can have a look.
| 2020-09-05T18:36:34Z | 2020-10-04T09:36:29Z | [] | [] | ["(successes=70)"] | [] | {"install": [], "pre_install": [], "python": "3.8", "pip_packages": ["alabaster==0.7.13", "appdirs==1.4.4", "attrs==19.3.0", "automat==24.8.1", "babel==2.16.0", "bcrypt==3.1.7", "certifi==2024.8.30", "cffi==1.17.1", "charset-normalizer==3.4.0", "click==8.1.7", "configparser==5.0.0", "constantly==23.10.4", "cryptography==3.0", "distlib==0.3.9", "docutils==0.20.1", "filelock==3.16.1", "flake8==3.8.3", "flake8-import-order==0.18.1", "hyperlink==21.0.0", "idna==3.10", "imagesize==1.4.1", "incremental==22.10.0", "jinja2==3.1.4", "markupsafe==2.1.5", "mccabe==0.6.1", "packaging==20.4", "pip==20.2.3", "platformdirs==4.3.6", "pluggy==1.5.0", "pur==5.3.0", "py==1.11.0", "pyasn1==0.4.8", "pyasn1-modules==0.2.8", "pycodestyle==2.6.0", "pycparser==2.22", "pyflakes==2.2.0", "pygments==2.18.0", "pyhamcrest==2.1.0", "pyopenssl==19.1.0", "pyparsing==2.4.7", "python-dateutil==2.8.1", "pytz==2024.2", "requests==2.32.3", "service-identity==18.1.0", "setuptools==49.2.0", "six==1.16.0", "snowballstemmer==2.2.0", "sphinx==3.1.2", "sphinx-rtd-theme==0.5.0", "sphinxcontrib-applehelp==1.0.4", "sphinxcontrib-devhelp==1.0.2", "sphinxcontrib-htmlhelp==2.0.1", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==1.0.3", "sphinxcontrib-serializinghtml==1.1.5", "tftpy==0.8.0", "toml==0.10.2", "tox==3.18.0", "treq==20.4.1", "twisted==20.3.0", "typing-extensions==4.12.2", "urllib3==2.2.3", "virtualenv==20.27.1", "wheel==0.35.1", "zope-interface==7.1.1"]} | tox -- | null | null | null | swa-bench:sw.eval |
|
ipython/ipython | ipython__ipython-14486 | ad07901d8cf6fb874262c6387bd24d9e5a284144 | diff --git a/IPython/core/prefilter.py b/IPython/core/prefilter.py
index e611b4b834..a29df0c27a 100644
--- a/IPython/core/prefilter.py
+++ b/IPython/core/prefilter.py
@@ -476,8 +476,8 @@ def check(self, line_info):
any python operator, we should simply execute the line (regardless of
whether or not there's a possible autocall expansion). This avoids
spurious (and very confusing) geattr() accesses."""
- if line_info.the_rest and line_info.the_rest[0] in '!=()<>,+*/%^&|':
- return self.prefilter_manager.get_handler_by_name('normal')
+ if line_info.the_rest and line_info.the_rest[0] in "!=()<>,+*/%^&|":
+ return self.prefilter_manager.get_handler_by_name("normal")
else:
return None
@@ -512,6 +512,8 @@ def check(self, line_info):
callable(oinfo.obj)
and (not self.exclude_regexp.match(line_info.the_rest))
and self.function_name_regexp.match(line_info.ifun)
+ and line_info.raw_the_rest.startswith(" ")
+ or not line_info.raw_the_rest.strip()
):
return self.prefilter_manager.get_handler_by_name("auto")
else:
diff --git a/IPython/core/splitinput.py b/IPython/core/splitinput.py
index 0cd70ec910..33e462b3b8 100644
--- a/IPython/core/splitinput.py
+++ b/IPython/core/splitinput.py
@@ -76,7 +76,7 @@ def split_user_input(line, pattern=None):
# print('line:<%s>' % line) # dbg
# print('pre <%s> ifun <%s> rest <%s>' % (pre,ifun.strip(),the_rest)) # dbg
- return pre, esc or '', ifun.strip(), the_rest.lstrip()
+ return pre, esc or "", ifun.strip(), the_rest
class LineInfo(object):
@@ -107,11 +107,15 @@ class LineInfo(object):
the_rest
Everything else on the line.
+
+ raw_the_rest
+ the_rest without whitespace stripped.
"""
def __init__(self, line, continue_prompt=False):
self.line = line
self.continue_prompt = continue_prompt
- self.pre, self.esc, self.ifun, self.the_rest = split_user_input(line)
+ self.pre, self.esc, self.ifun, self.raw_the_rest = split_user_input(line)
+ self.the_rest = self.raw_the_rest.lstrip()
self.pre_char = self.pre.strip()
if self.pre_char:
@@ -136,3 +140,6 @@ def ofind(self, ip) -> OInfo:
def __str__(self):
return "LineInfo [%s|%s|%s|%s]" %(self.pre, self.esc, self.ifun, self.the_rest)
+
+ def __repr__(self):
+ return "<" + str(self) + ">"
| diff --git a/IPython/core/tests/test_handlers.py b/IPython/core/tests/test_handlers.py
index 604dadee1a..905d9abe07 100644
--- a/IPython/core/tests/test_handlers.py
+++ b/IPython/core/tests/test_handlers.py
@@ -7,17 +7,13 @@
# our own packages
from IPython.core import autocall
from IPython.testing import tools as tt
+import pytest
+from collections.abc import Callable
#-----------------------------------------------------------------------------
# Globals
#-----------------------------------------------------------------------------
-# Get the public instance of IPython
-
-failures = []
-num_tests = 0
-
-#-----------------------------------------------------------------------------
# Test functions
#-----------------------------------------------------------------------------
@@ -31,67 +27,49 @@ def __call__(self):
return "called"
-def run(tests):
- """Loop through a list of (pre, post) inputs, where pre is the string
- handed to ipython, and post is how that string looks after it's been
- transformed (i.e. ipython's notion of _i)"""
- tt.check_pairs(ip.prefilter_manager.prefilter_lines, tests)
-
[email protected](
+ "autocall, input, output",
+ [
+ # For many of the below, we're also checking that leading whitespace
+ # turns off the esc char, which it should unless there is a continuation
+ # line.
+ ("1", '"no change"', '"no change"'), # normal
+ ("1", "lsmagic", "get_ipython().run_line_magic('lsmagic', '')"), # magic
+ # Only explicit escapes or instances of IPyAutocallable should get
+ # expanded
+ ("0", 'len "abc"', 'len "abc"'),
+ ("0", "autocallable", "autocallable()"),
+ # Don't add extra brackets (gh-1117)
+ ("0", "autocallable()", "autocallable()"),
+ ("1", 'len "abc"', 'len("abc")'),
+ ("1", 'len "abc";', 'len("abc");'), # ; is special -- moves out of parens
+ # Autocall is turned off if first arg is [] and the object
+ # is both callable and indexable. Like so:
+ ("1", "len [1,2]", "len([1,2])"), # len doesn't support __getitem__...
+ ("1", "call_idx [1]", "call_idx [1]"), # call_idx *does*..
+ ("1", "call_idx 1", "call_idx(1)"),
+ ("1", "len", "len"), # only at 2 does it auto-call on single args
+ ("2", 'len "abc"', 'len("abc")'),
+ ("2", 'len "abc";', 'len("abc");'),
+ ("2", "len [1,2]", "len([1,2])"),
+ ("2", "call_idx [1]", "call_idx [1]"),
+ ("2", "call_idx 1", "call_idx(1)"),
+ # T his is what's different:
+ ("2", "len", "len()"), # only at 2 does it auto-call on single args
+ ("0", "Callable[[int], None]", "Callable[[int], None]"),
+ ("1", "Callable[[int], None]", "Callable[[int], None]"),
+ ("1", "Callable[[int], None]", "Callable[[int], None]"),
+ ],
+)
+def test_handlers_I(autocall, input, output):
+ autocallable = Autocallable()
+ ip.user_ns["autocallable"] = autocallable
-def test_handlers():
call_idx = CallableIndexable()
- ip.user_ns['call_idx'] = call_idx
+ ip.user_ns["call_idx"] = call_idx
- # For many of the below, we're also checking that leading whitespace
- # turns off the esc char, which it should unless there is a continuation
- # line.
- run(
- [('"no change"', '"no change"'), # normal
- (u"lsmagic", "get_ipython().run_line_magic('lsmagic', '')"), # magic
- #("a = b # PYTHON-MODE", '_i'), # emacs -- avoids _in cache
- ])
+ ip.user_ns["Callable"] = Callable
- # Objects which are instances of IPyAutocall are *always* autocalled
- autocallable = Autocallable()
- ip.user_ns['autocallable'] = autocallable
-
- # auto
- ip.run_line_magic("autocall", "0")
- # Only explicit escapes or instances of IPyAutocallable should get
- # expanded
- run(
- [
- ('len "abc"', 'len "abc"'),
- ("autocallable", "autocallable()"),
- # Don't add extra brackets (gh-1117)
- ("autocallable()", "autocallable()"),
- ]
- )
+ ip.run_line_magic("autocall", autocall)
+ assert ip.prefilter_manager.prefilter_lines(input) == output
ip.run_line_magic("autocall", "1")
- run(
- [
- ('len "abc"', 'len("abc")'),
- ('len "abc";', 'len("abc");'), # ; is special -- moves out of parens
- # Autocall is turned off if first arg is [] and the object
- # is both callable and indexable. Like so:
- ("len [1,2]", "len([1,2])"), # len doesn't support __getitem__...
- ("call_idx [1]", "call_idx [1]"), # call_idx *does*..
- ("call_idx 1", "call_idx(1)"),
- ("len", "len"), # only at 2 does it auto-call on single args
- ]
- )
- ip.run_line_magic("autocall", "2")
- run(
- [
- ('len "abc"', 'len("abc")'),
- ('len "abc";', 'len("abc");'),
- ("len [1,2]", "len([1,2])"),
- ("call_idx [1]", "call_idx [1]"),
- ("call_idx 1", "call_idx(1)"),
- # This is what's different:
- ("len", "len()"), # only at 2 does it auto-call on single args
- ]
- )
- ip.run_line_magic("autocall", "1")
-
- assert failures == []
diff --git a/IPython/core/tests/test_prefilter.py b/IPython/core/tests/test_prefilter.py
index 91c3c86882..999cd43e6e 100644
--- a/IPython/core/tests/test_prefilter.py
+++ b/IPython/core/tests/test_prefilter.py
@@ -48,7 +48,7 @@ def dummy_magic(line): pass
def test_autocall_binops():
"""See https://github.com/ipython/ipython/issues/81"""
- ip.magic('autocall 2')
+ ip.run_line_magic("autocall", "2")
f = lambda x: x
ip.user_ns['f'] = f
try:
@@ -71,8 +71,8 @@ def test_autocall_binops():
finally:
pm.unregister_checker(ac)
finally:
- ip.magic('autocall 0')
- del ip.user_ns['f']
+ ip.run_line_magic("autocall", "0")
+ del ip.user_ns["f"]
def test_issue_114():
@@ -105,23 +105,35 @@ def __call__(self, x):
return x
# Create a callable broken object
- ip.user_ns['x'] = X()
- ip.magic('autocall 2')
+ ip.user_ns["x"] = X()
+ ip.run_line_magic("autocall", "2")
try:
# Even if x throws an attribute error when looking at its rewrite
# attribute, we should not crash. So the test here is simply making
# the prefilter call and not having an exception.
ip.prefilter('x 1')
finally:
- del ip.user_ns['x']
- ip.magic('autocall 0')
+ del ip.user_ns["x"]
+ ip.run_line_magic("autocall", "0")
+
+
+def test_autocall_type_ann():
+ ip.run_cell("import collections.abc")
+ ip.run_line_magic("autocall", "1")
+ try:
+ assert (
+ ip.prefilter("collections.abc.Callable[[int], None]")
+ == "collections.abc.Callable[[int], None]"
+ )
+ finally:
+ ip.run_line_magic("autocall", "0")
def test_autocall_should_support_unicode():
- ip.magic('autocall 2')
- ip.user_ns['π'] = lambda x: x
+ ip.run_line_magic("autocall", "2")
+ ip.user_ns["π"] = lambda x: x
try:
assert ip.prefilter("π 3") == "π(3)"
finally:
- ip.magic('autocall 0')
- del ip.user_ns['π']
+ ip.run_line_magic("autocall", "0")
+ del ip.user_ns["π"]
diff --git a/IPython/core/tests/test_splitinput.py b/IPython/core/tests/test_splitinput.py
index 1462e7fa03..f5fc53fafe 100644
--- a/IPython/core/tests/test_splitinput.py
+++ b/IPython/core/tests/test_splitinput.py
@@ -1,7 +1,8 @@
# coding: utf-8
from IPython.core.splitinput import split_user_input, LineInfo
-from IPython.testing import tools as tt
+
+import pytest
tests = [
("x=1", ("", "", "x", "=1")),
@@ -19,18 +20,19 @@
(";ls", ("", ";", "ls", "")),
(" ;ls", (" ", ";", "ls", "")),
("f.g(x)", ("", "", "f.g", "(x)")),
- ("f.g (x)", ("", "", "f.g", "(x)")),
+ ("f.g (x)", ("", "", "f.g", " (x)")),
("?%hist1", ("", "?", "%hist1", "")),
("?%%hist2", ("", "?", "%%hist2", "")),
("??%hist3", ("", "??", "%hist3", "")),
("??%%hist4", ("", "??", "%%hist4", "")),
("?x*", ("", "?", "x*", "")),
+ ("Pérez Fernando", ("", "", "Pérez", " Fernando")),
]
-tests.append(("Pérez Fernando", ("", "", "Pérez", "Fernando")))
-def test_split_user_input():
- return tt.check_pairs(split_user_input, tests)
[email protected]("input, output", tests)
+def test_split_user_input(input, output):
+ assert split_user_input(input) == output
def test_LineInfo():
| Bug with autocall
Hi,
We are seeing the following bug with autocall (where below is showing valid code for a type hint):
```
$ ipython
Python 3.11.8 (main, Mar 15 2024, 12:37:54) [GCC 10.3.1 20210422 (Red Hat 10.3.1-1)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.22.2 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import collections.abc
In [2]: collections.abc.Callable[[int], None]
Out[2]: collections.abc.Callable[[int], None]
In [3]: %autocall 1
...:
Automatic calling is: Smart
In [4]: collections.abc.Callable[[int], None]
...:
------> collections.abc.Callable([[int], None])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[4], line 1
----> 1 collections.abc.Callable([[int], None])
TypeError: Callable() takes no arguments
```
| 2024-07-22T13:06:38Z | 2024-07-29T06:58:46Z | ["IPython/core/tests/test_handlers.py::test_handlers_I[0-autocallable()-autocallable()]", "IPython/core/tests/test_handlers.py::test_handlers_I[2-len \"abc\"-len(\"abc\")]", "IPython/core/tests/test_splitinput.py::test_split_user_input[??x-output5]", "IPython/core/tests/test_splitinput.py::test_split_user_input[ ;ls-output13]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-call_idx [1]-call_idx [1]]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-lsmagic-get_ipython().run_line_magic('lsmagic', '')]", "IPython/core/tests/test_splitinput.py::test_split_user_input[?-output1]", "IPython/core/tests/test_splitinput.py::test_split_user_input[??-output2]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-len \"abc\";-len(\"abc\");]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-len-len]", "IPython/core/tests/test_handlers.py::test_handlers_I[0-len \"abc\"-len \"abc\"]", "IPython/core/tests/test_splitinput.py::test_split_user_input[ ??-output4]", "IPython/core/tests/test_splitinput.py::test_split_user_input[;ls-output12]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-len \"abc\"-len(\"abc\")]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-len [1,2]-len([1,2])]", "IPython/core/tests/test_prefilter.py::test_autocall_should_support_unicode", "IPython/core/tests/test_splitinput.py::test_split_user_input[?%hist1-output16]", "IPython/core/tests/test_splitinput.py::test_split_user_input[!ls-output7]", "IPython/core/tests/test_handlers.py::test_handlers_I[2-len [1,2]-len([1,2])]", "IPython/core/tests/test_splitinput.py::test_split_user_input[ ?-output3]", "IPython/core/tests/test_prefilter.py::test_autocall_binops", "IPython/core/tests/test_handlers.py::test_handlers_I[2-len-len()]", "IPython/core/tests/test_handlers.py::test_handlers_I[2-call_idx [1]-call_idx [1]]", "IPython/core/tests/test_handlers.py::test_handlers_I[2-call_idx 1-call_idx(1)]", "IPython/core/tests/test_splitinput.py::test_split_user_input[?x=1-output6]", "IPython/core/tests/test_handlers.py::test_handlers_I[2-len \"abc\";-len(\"abc\");]", "IPython/core/tests/test_prefilter.py::test_prefilter_attribute_errors", "IPython/core/tests/test_splitinput.py::test_split_user_input[??%%hist4-output19]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-\"no change\"-\"no change\"]", "IPython/core/tests/test_splitinput.py::test_split_user_input[,ls-output11]", "IPython/core/tests/test_prefilter.py::test_prefilter", "IPython/core/tests/test_splitinput.py::test_split_user_input[x=1-output0]", "IPython/core/tests/test_splitinput.py::test_split_user_input[f.g(x)-output14]", "IPython/core/tests/test_splitinput.py::test_split_user_input[?x*-output20]", "IPython/core/tests/test_splitinput.py::test_split_user_input[!!ls-output9]", "IPython/core/tests/test_splitinput.py::test_split_user_input[??%hist3-output18]", "IPython/core/tests/test_handlers.py::test_handlers_I[0-Callable[[int], None]-Callable[[int], None]]", "IPython/core/tests/test_prefilter.py::test_prefilter_shadowed", "IPython/core/tests/test_splitinput.py::test_split_user_input[ !!ls-output10]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-call_idx 1-call_idx(1)]", "IPython/core/tests/test_handlers.py::test_handlers_I[0-autocallable-autocallable()]", "IPython/core/tests/test_prefilter.py::test_issue_114", "IPython/core/tests/test_splitinput.py::test_split_user_input[?%%hist2-output17]", "IPython/core/tests/test_splitinput.py::test_split_user_input[ !ls-output8]"] | [] | ["IPython/core/tests/test_handlers.py::test_handlers_I[1-Callable[[int], None]-Callable[[int], None]1]", "IPython/core/tests/test_splitinput.py::test_split_user_input[P\\xe9rez Fernando-output21]", "IPython/core/tests/test_handlers.py::test_handlers_I[1-Callable[[int], None]-Callable[[int], None]0]", "IPython/core/tests/test_splitinput.py::test_LineInfo", "IPython/core/tests/test_splitinput.py::test_split_user_input[f.g (x)-output15]", "IPython/core/tests/test_prefilter.py::test_autocall_type_ann"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.12", "pip_packages": ["asttokens==2.4.1", "decorator==5.1.1", "executing==2.0.1", "iniconfig==2.0.0", "jedi==0.19.1", "matplotlib-inline==0.1.7", "packaging==24.1", "parso==0.8.4", "pexpect==4.9.0", "pickleshare==0.7.5", "pluggy==1.5.0", "prompt-toolkit==3.0.47", "ptyprocess==0.7.0", "pure-eval==0.2.3", "pygments==2.18.0", "pytest==8.3.2", "pytest-asyncio==0.21.2", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.3", "testpath==0.6.0", "traitlets==5.14.3", "wcwidth==0.2.13", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
ipython/ipython | ipython__ipython-14466 | 1454013b8b615ce75d30d38b7710e3fccca16263 | diff --git a/IPython/lib/pretty.py b/IPython/lib/pretty.py
index 631445b24e..8a24632d60 100644
--- a/IPython/lib/pretty.py
+++ b/IPython/lib/pretty.py
@@ -406,8 +406,16 @@ def pretty(self, obj):
meth = cls._repr_pretty_
if callable(meth):
return meth(obj, self, cycle)
- if cls is not object \
- and callable(cls.__dict__.get('__repr__')):
+ if (
+ cls is not object
+ # check if cls defines __repr__
+ and "__repr__" in cls.__dict__
+ # check if __repr__ is callable.
+ # Note: we need to test getattr(cls, '__repr__')
+ # instead of cls.__dict__['__repr__']
+ # in order to work with descriptors like partialmethod,
+ and callable(_safe_getattr(cls, "__repr__", None))
+ ):
return _repr_pprint(obj, self, cycle)
return _default_pprint(obj, self, cycle)
| diff --git a/IPython/core/tests/test_formatters.py b/IPython/core/tests/test_formatters.py
index c642befacc..cd8c83e555 100644
--- a/IPython/core/tests/test_formatters.py
+++ b/IPython/core/tests/test_formatters.py
@@ -103,7 +103,7 @@ def set_fp(p):
def test_for_type():
f = PlainTextFormatter()
-
+
# initial return, None
assert f.for_type(C, foo_printer) is None
# no func queries
@@ -116,9 +116,9 @@ def test_for_type():
def test_for_type_string():
f = PlainTextFormatter()
-
+
type_str = '%s.%s' % (C.__module__, 'C')
-
+
# initial return, None
assert f.for_type(type_str, foo_printer) is None
# no func queries
@@ -130,9 +130,9 @@ def test_for_type_string():
def test_for_type_by_name():
f = PlainTextFormatter()
-
+
mod = C.__module__
-
+
# initial return, None
assert f.for_type_by_name(mod, "C", foo_printer) is None
# no func queries
@@ -146,7 +146,7 @@ def test_for_type_by_name():
def test_lookup():
f = PlainTextFormatter()
-
+
f.for_type(C, foo_printer)
assert f.lookup(C()) is foo_printer
with pytest.raises(KeyError):
@@ -155,7 +155,7 @@ def test_lookup():
def test_lookup_string():
f = PlainTextFormatter()
type_str = '%s.%s' % (C.__module__, 'C')
-
+
f.for_type(type_str, foo_printer)
assert f.lookup(C()) is foo_printer
# should move from deferred to imported dict
@@ -173,16 +173,16 @@ def test_lookup_by_type_string():
f = PlainTextFormatter()
type_str = '%s.%s' % (C.__module__, 'C')
f.for_type(type_str, foo_printer)
-
+
# verify insertion
assert _mod_name_key(C) in f.deferred_printers
assert C not in f.type_printers
-
+
assert f.lookup_by_type(type_str) is foo_printer
# lookup by string doesn't cause import
assert _mod_name_key(C) in f.deferred_printers
assert C not in f.type_printers
-
+
assert f.lookup_by_type(C) is foo_printer
# should move from deferred to imported dict
assert _mod_name_key(C) not in f.deferred_printers
@@ -220,10 +220,10 @@ def test_pop():
def test_pop_string():
f = PlainTextFormatter()
type_str = '%s.%s' % (C.__module__, 'C')
-
+
with pytest.raises(KeyError):
f.pop(type_str)
-
+
f.for_type(type_str, foo_printer)
f.pop(type_str)
with pytest.raises(KeyError):
@@ -238,7 +238,7 @@ def test_pop_string():
with pytest.raises(KeyError):
f.pop(type_str)
assert f.pop(type_str, None) is None
-
+
def test_error_method():
f = HTMLFormatter()
@@ -341,14 +341,14 @@ def __getattr__(self, key):
assert text_hat._repr_html_ == "_repr_html_"
with capture_output() as captured:
result = f(text_hat)
-
+
assert result is None
assert "FormatterWarning" not in captured.stderr
class CallableMagicHat(object):
def __getattr__(self, key):
return lambda : key
-
+
call_hat = CallableMagicHat()
with capture_output() as captured:
result = f(call_hat)
@@ -358,11 +358,11 @@ def __getattr__(self, key):
class BadReprArgs(object):
def _repr_html_(self, extra, args):
return "html"
-
+
bad = BadReprArgs()
with capture_output() as captured:
result = f(bad)
-
+
assert result is None
assert "FormatterWarning" not in captured.stderr
@@ -406,13 +406,13 @@ def _ipython_display_(self):
class NotSelfDisplaying(object):
def __repr__(self):
return "NotSelfDisplaying"
-
+
def _ipython_display_(self):
raise NotImplementedError
-
+
save_enabled = f.ipython_display_formatter.enabled
f.ipython_display_formatter.enabled = True
-
+
yes = SelfDisplaying()
no = NotSelfDisplaying()
@@ -444,7 +444,7 @@ def _repr_png_(self):
return 'should-be-overwritten'
def _repr_html_(self):
return '<b>hi!</b>'
-
+
f = get_ipython().display_formatter
html_f = f.formatters['text/html']
save_enabled = html_f.enabled
@@ -507,7 +507,7 @@ def _repr_mimebundle_(self, include=None, exclude=None):
}
}
return (data, metadata)
-
+
f = get_ipython().display_formatter
obj = HasReprMimeMeta()
d, md = f.format(obj)
@@ -529,3 +529,18 @@ def _repr_mimebundle_(self, include=None, exclude=None):
obj = BadReprMime()
d, md = f.format(obj)
assert "text/plain" in d
+
+
+def test_custom_repr_namedtuple_partialmethod():
+ from functools import partialmethod
+ from typing import NamedTuple
+
+ class Foo(NamedTuple):
+ ...
+
+ Foo.__repr__ = partialmethod(lambda obj: "Hello World")
+ foo = Foo()
+
+ f = PlainTextFormatter()
+ assert f.pprint
+ assert f(foo) == "Hello World"
| `display` does not honor custom `__repr__` for `NamedTuple` when defined by `partialmethod`
The issue occurs when the custom `__repr__` is defined via `partialmethod`:
```python
from functools import partialmethod
from typing import NamedTuple
def my_pprint(obj, **options):
return "Hello World"
def add_custom_pprint(cls=None, **options):
if cls is None:
def decorator(cls):
return add_custom_pprint(cls, **options)
return decorator
cls.__repr__ = partialmethod(my_pprint, **options)
return cls
@add_custom_pprint
class MyNamedTuple(NamedTuple):
x: int
y: int
x = MyNamedTuple(1, 2)
print(x) # "Hello World"
display(x) # (1, 2)
```
<details><summary> without partialmethod, both display and print give the same result: </summary>
```python
from typing import NamedTuple
def my_pprint(obj, **options):
return "Hello World"
def add_custom_pprint(cls=None, **options):
if cls is None:
def decorator(cls):
return add_custom_pprint(cls, **options)
return decorator
cls.__repr__ = my_pprint
return cls
@add_custom_pprint
class MyNamedTuple(NamedTuple):
x: int
y: int
x = MyNamedTuple(1, 2)
print(x) # "Hello World"
display(x) # "Hello World"
```
</details>
| The culprit:
https://github.com/ipython/ipython/blob/1454013b8b615ce75d30d38b7710e3fccca16263/IPython/lib/pretty.py#L409-L411
This check is incorrect, because `partialmethod` is a descriptor and not callable. Instead, the test should be replaced with `callable(getattr(cls, "__repr__", None))`. | 2024-06-20T11:01:28Z | 2024-06-25T08:24:04Z | ["IPython/core/tests/test_formatters.py::test_lookup_by_type_string", "IPython/core/tests/test_formatters.py::test_print_method_bound", "IPython/core/tests/test_formatters.py::test_string_in_formatter", "IPython/core/tests/test_formatters.py::test_error_method", "IPython/core/tests/test_formatters.py::test_lookup_by_type", "IPython/core/tests/test_formatters.py::test_for_type_by_name", "IPython/core/tests/test_formatters.py::test_pdf_formatter", "IPython/core/tests/test_formatters.py::test_lookup_string", "IPython/core/tests/test_formatters.py::test_lookup", "IPython/core/tests/test_formatters.py::test_pretty_max_seq_length", "IPython/core/tests/test_formatters.py::test_for_type", "IPython/core/tests/test_formatters.py::test_repr_mime_meta", "IPython/core/tests/test_formatters.py::test_bad_repr_traceback", "IPython/core/tests/test_formatters.py::test_ipython_display_formatter", "IPython/core/tests/test_formatters.py::test_bad_precision", "IPython/core/tests/test_formatters.py::test_warn_error_for_type", "IPython/core/tests/test_formatters.py::test_pop", "IPython/core/tests/test_formatters.py::test_print_method_weird", "IPython/core/tests/test_formatters.py::test_pop_string", "IPython/core/tests/test_formatters.py::test_error_pretty_method", "IPython/core/tests/test_formatters.py::test_in_formatter", "IPython/core/tests/test_formatters.py::test_repr_mime", "IPython/core/tests/test_formatters.py::test_precision", "IPython/core/tests/test_formatters.py::test_for_type_string", "IPython/core/tests/test_formatters.py::test_format_config", "IPython/core/tests/test_formatters.py::test_pass_correct_include_exclude", "IPython/core/tests/test_formatters.py::test_pretty", "IPython/core/tests/test_formatters.py::test_nowarn_notimplemented", "IPython/core/tests/test_formatters.py::test_deferred"] | [] | ["IPython/core/tests/test_formatters.py::test_custom_repr_namedtuple_partialmethod", "IPython/core/tests/test_formatters.py::test_repr_mime_failure"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.12", "pip_packages": ["asttokens==2.4.1", "decorator==5.1.1", "executing==2.0.1", "iniconfig==2.0.0", "jedi==0.19.1", "matplotlib-inline==0.1.7", "packaging==24.1", "parso==0.8.4", "pexpect==4.9.0", "pickleshare==0.7.5", "pluggy==1.5.0", "prompt-toolkit==3.0.47", "ptyprocess==0.7.0", "pure-eval==0.2.2", "pygments==2.18.0", "pytest==8.2.2", "pytest-asyncio==0.21.2", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.3", "testpath==0.6.0", "traitlets==5.14.3", "wcwidth==0.2.13", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-14231 | 4977b5d92b4b46327e78fc60ae9aa45db8db24b1 | diff --git a/IPython/core/events.py b/IPython/core/events.py
index 90ff8f746d7..ef39c4fd0a4 100644
--- a/IPython/core/events.py
+++ b/IPython/core/events.py
@@ -82,7 +82,11 @@ def trigger(self, event, *args, **kwargs):
func(*args, **kwargs)
except (Exception, KeyboardInterrupt):
if self.print_on_error:
- print("Error in callback {} (for {}):".format(func, event))
+ print(
+ "Error in callback {} (for {}), with arguments args {},kwargs {}:".format(
+ func, event, args, kwargs
+ )
+ )
self.shell.showtraceback()
# event_name -> prototype mapping
diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py
index 0025ad519f0..98c9a0d01ae 100644
--- a/IPython/extensions/autoreload.py
+++ b/IPython/extensions/autoreload.py
@@ -701,7 +701,7 @@ def aimport(self, parameter_s="", stream=None):
# Inject module to user namespace
self.shell.push({top_name: top_module})
- def pre_run_cell(self):
+ def pre_run_cell(self, info):
if self._reloader.enabled:
try:
self._reloader.check()
diff --git a/setup.cfg b/setup.cfg
index 65e6ed684eb..2dd5c6e9709 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -73,7 +73,7 @@ qtconsole =
terminal =
test =
pytest<7.1
- pytest-asyncio
+ pytest-asyncio<0.22
testpath
pickleshare
test_extra =
| diff --git a/IPython/extensions/tests/test_autoreload.py b/IPython/extensions/tests/test_autoreload.py
index 89a4add328a..781885dd9d3 100644
--- a/IPython/extensions/tests/test_autoreload.py
+++ b/IPython/extensions/tests/test_autoreload.py
@@ -21,6 +21,7 @@
import shutil
import random
import time
+import traceback
from io import StringIO
from dataclasses import dataclass
@@ -31,6 +32,7 @@
from IPython.extensions.autoreload import AutoreloadMagics
from IPython.core.events import EventManager, pre_run_cell
from IPython.testing.decorators import skipif_not_numpy
+from IPython.core.interactiveshell import ExecutionInfo
if platform.python_implementation() == "PyPy":
pytest.skip(
@@ -56,8 +58,27 @@ def __init__(self):
register_magics = set_hook = noop
+ def showtraceback(
+ self,
+ exc_tuple=None,
+ filename=None,
+ tb_offset=None,
+ exception_only=False,
+ running_compiled_code=False,
+ ):
+ traceback.print_exc()
+
def run_code(self, code):
- self.events.trigger("pre_run_cell")
+ self.events.trigger(
+ "pre_run_cell",
+ ExecutionInfo(
+ raw_cell="",
+ store_history=False,
+ silent=False,
+ shell_futures=False,
+ cell_id=None,
+ ),
+ )
exec(code, self.user_ns)
self.auto_magics.post_execute_hook()
@@ -279,6 +300,7 @@ def power(self, p):
@skipif_not_numpy
def test_comparing_numpy_structures(self):
self.shell.magic_autoreload("2")
+ self.shell.run_code("1+1")
mod_name, mod_fn = self.new_module(
textwrap.dedent(
"""
| Using autoreload magic fails with the latest version
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.
If you are unsure, it's ok to post here, though, there are few maintainer so you might not get a fast response.
-->
* Create a notebook with two cells
* First cell with the following code
```
%load_ext autoreload
%autoreload 2
```
* Second cell with
```
print(1234)
```
Upon running the second cell, the following error is displayed
```
Error in callback <bound method AutoreloadMagics.pre_run_cell of <IPython.extensions.autoreload.AutoreloadMagics object at 0x106796e90>> (for pre_run_cell):
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
TypeError: AutoreloadMagics.pre_run_cell() takes 1 positional argument but 2 were given
```
Downgrading to 8.16.1 fixes this
| From a quick look the event manager callback code was modified by #14216. There may be some functionality that needs to be restored in handling callbacks there.
I'm astonished this was not found by tests. | 2023-10-31T08:35:01Z | 2023-10-31T09:21:21Z | ["IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_aimport_parsing", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_verbose_names", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_enums", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_class_type"] | [] | ["IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_smoketest_autoreload", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_autoreload_output", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_autoload_newly_added_objects", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_class_attributes", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_smoketest_aimport"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.12", "pip_packages": ["asttokens==2.4.1", "attrs==23.1.0", "decorator==5.1.1", "executing==2.0.1", "iniconfig==2.0.0", "jedi==0.19.1", "matplotlib-inline==0.1.6", "packaging==23.2", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.3.0", "prompt-toolkit==3.0.39", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.16.1", "pytest==7.0.1", "pytest-asyncio==0.21.1", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.3", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.13.0", "wcwidth==0.2.9", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-14185 | 6004e9b0bb0c702b840dfec54df8284234720817 | diff --git a/IPython/core/guarded_eval.py b/IPython/core/guarded_eval.py
index 5d405b2208e..a304affc35d 100644
--- a/IPython/core/guarded_eval.py
+++ b/IPython/core/guarded_eval.py
@@ -1,3 +1,4 @@
+from inspect import signature, Signature
from typing import (
Any,
Callable,
@@ -335,6 +336,7 @@ def __getitem__(self, key):
IDENTITY_SUBSCRIPT = _IdentitySubscript()
SUBSCRIPT_MARKER = "__SUBSCRIPT_SENTINEL__"
+UNKNOWN_SIGNATURE = Signature()
class GuardRejection(Exception):
@@ -415,6 +417,10 @@ def guarded_eval(code: str, context: EvaluationContext):
}
+class Duck:
+ """A dummy class used to create objects of other classes without calling their ``__init__``"""
+
+
def _find_dunder(node_op, dunders) -> Union[Tuple[str, ...], None]:
dunder = None
for op, candidate_dunder in dunders.items():
@@ -584,6 +590,27 @@ def eval_node(node: Union[ast.AST, None], context: EvaluationContext):
if policy.can_call(func) and not node.keywords:
args = [eval_node(arg, context) for arg in node.args]
return func(*args)
+ try:
+ sig = signature(func)
+ except ValueError:
+ sig = UNKNOWN_SIGNATURE
+ # if annotation was not stringized, or it was stringized
+ # but resolved by signature call we know the return type
+ not_empty = sig.return_annotation is not Signature.empty
+ not_stringized = not isinstance(sig.return_annotation, str)
+ if not_empty and not_stringized:
+ duck = Duck()
+ # if allow-listed builtin is on type annotation, instantiate it
+ if policy.can_call(sig.return_annotation) and not node.keywords:
+ args = [eval_node(arg, context) for arg in node.args]
+ return sig.return_annotation(*args)
+ try:
+ # if custom class is in type annotation, mock it;
+ # this only works for heap types, not builtins
+ duck.__class__ = sig.return_annotation
+ return duck
+ except TypeError:
+ pass
raise GuardRejection(
"Call for",
func, # not joined to avoid calling `repr`
| diff --git a/IPython/core/tests/test_guarded_eval.py b/IPython/core/tests/test_guarded_eval.py
index 6fb321abe12..13f909188f9 100644
--- a/IPython/core/tests/test_guarded_eval.py
+++ b/IPython/core/tests/test_guarded_eval.py
@@ -253,16 +253,36 @@ def test_method_descriptor():
assert guarded_eval("list.copy.__name__", context) == "copy"
+class HeapType:
+ pass
+
+
+class CallCreatesHeapType:
+ def __call__(self) -> HeapType:
+ return HeapType()
+
+
+class CallCreatesBuiltin:
+ def __call__(self) -> frozenset:
+ return frozenset()
+
+
@pytest.mark.parametrize(
- "data,good,bad,expected",
+ "data,good,bad,expected, equality",
[
- [[1, 2, 3], "data.index(2)", "data.append(4)", 1],
- [{"a": 1}, "data.keys().isdisjoint({})", "data.update()", True],
+ [[1, 2, 3], "data.index(2)", "data.append(4)", 1, True],
+ [{"a": 1}, "data.keys().isdisjoint({})", "data.update()", True, True],
+ [CallCreatesHeapType(), "data()", "data.__class__()", HeapType, False],
+ [CallCreatesBuiltin(), "data()", "data.__class__()", frozenset, False],
],
)
-def test_evaluates_calls(data, good, bad, expected):
+def test_evaluates_calls(data, good, bad, expected, equality):
context = limited(data=data)
- assert guarded_eval(good, context) == expected
+ value = guarded_eval(good, context)
+ if equality:
+ assert value == expected
+ else:
+ assert isinstance(value, expected)
with pytest.raises(GuardRejection):
guarded_eval(bad, context)
@@ -534,7 +554,7 @@ def index(self, k):
def test_assumption_instance_attr_do_not_matter():
"""This is semi-specified in Python documentation.
- However, since the specification says 'not guaranted
+ However, since the specification says 'not guaranteed
to work' rather than 'is forbidden to work', future
versions could invalidate this assumptions. This test
is meant to catch such a change if it ever comes true.
| Tab complete for class __call__ not working
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.
If you are unsure, it's ok to post here, though, there are few maintainer so you might not get a fast response.
-->
If I make the following two files:
```python
# t.py
class MyClass:
def my_method(self) -> None:
print('this is my method')
def foo() -> MyClass: return MyClass()
```
and
```python
# f.py
class MyClass:
def my_method(self) -> None:
print('this is my method')
class Foo:
def __call__(self) -> MyClass:
return MyClass()
foo = Foo()
```
then `foo().my_method()` works for both
But - I only get the auto-complete suggestion for the first one: `ipython -i t.py`:

`ipython -i f.py`:

Shouldn't both autocomplete to the method available in `MyClass`?
For reference, this came up here https://github.com/pola-rs/polars/issues/11433
| Indeed, neither jedi nor our standard `limited` evaluation policy for fallback completer handles this. Only `unsafe` policy or higher works:

This is because we do not currently use type hints for completion, something that would be a huge improvement and possibly not hard to implement in context of guarded evaluation completer (as long as types are not stripped on runtime).
makes sense, thanks for your response!
I guess the solution is to refactor on Polars' side then? I think there might be a workaround anyway | 2023-09-30T10:17:38Z | 2023-10-01T17:20:23Z | ["IPython/core/tests/test_guarded_eval.py::test_access_builtins[context0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-0xXXXXXXXXX-3740122863]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-True is True-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-1 & 1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-True is not True-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context2-(1\\n+\\n1)-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-True is False-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-(1 < 4) < 3-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-2 << 1-4]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 in [1] in [[2]]-False]", "IPython/core/tests/test_guarded_eval.py::test_external_not_installed", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 <= 1-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-0 in [1]-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-True-True]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-import ast]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-True is False-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 <= 1-False]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-def func(): pass]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 < 2 > 1 > 0 > -1 < 1-True]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-x = 1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context2-list(range(20))[3:-2:3]-expected2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 >= 2-True]", "IPython/core/tests/test_guarded_eval.py::test_number_attributes[int.numerator-numerator]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_calls[data0-data.index(2)-data.append(4)-1-True]", "IPython/core/tests/test_guarded_eval.py::test_object", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-1.0-1.0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context1-~5--6]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 < 1-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-(1 < 4) < 3-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-0 in [1]-False]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-class C: pass]", "IPython/core/tests/test_guarded_eval.py::test_set_literal", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-False is not True-True]", "IPython/core/tests/test_guarded_eval.py::test_access_builtins_fails", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 < 4 < 3-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-9 < 2 < 3 < 4-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-3 - 1-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 in [1]-True]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-def func(): pass]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-2 * 3-6]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 in [1] in [[2]]-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-2 >> 1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 < 1-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 < 2 < 3 < 4-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-5 // 2-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 >= 2-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-True-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-1 | 2-3]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 < 2 < 3 < 4-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-2 >> 1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 != 1-False]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-class C: pass]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-False is not True-True]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-del x]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 in [1]-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-4 > 3 > 2 > 9-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-False is False-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-1 & 2-0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 > 1-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-5 / 2-2.5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-True is False-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-1 + 1-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 in [1]-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-2 >> 1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 <= 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 == 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 in [1] in [[1]]-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-5**2-25]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-True is not True-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-0 not in [1]-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-4 > 3 > 2 > 9-False]", "IPython/core/tests/test_guarded_eval.py::test_guards_binary_operations", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-1 & 2-0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-False is False-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-1-1]", "IPython/core/tests/test_guarded_eval.py::test_guards_unary_operations", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-5 // 2-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-2 * 3-6]", "IPython/core/tests/test_guarded_eval.py::test_guards_attributes", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 != 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 > 1-True]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-def func(): pass]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_if_expression", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 != 1-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-5**2-25]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-1.0-1.0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-9 < 2 < 3 < 4-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context0-+5-5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-False is False-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-9 < 2 < 3 < 4-False]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-del x]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-1 | 2-3]", "IPython/core/tests/test_guarded_eval.py::test_rejects_forbidden", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-[]-expected6]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 == 2-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-[]-expected6]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 not in [1]-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-1 + 1-2]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-import ast]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-x = 1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-3 - 1-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 == 2-False]", "IPython/core/tests/test_guarded_eval.py::test_dict_literal", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-4 > 3 > 2 > 1-True]", "IPython/core/tests/test_guarded_eval.py::test_guards_comparisons", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context2-list(range(10))[-1:]-expected1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 <= 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-4 > 3 > 2 > 9-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-(1 < 4) < 3-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 not in [1]-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-1 & 1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-1.0-1.0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-2 << 1-4]", "IPython/core/tests/test_guarded_eval.py::test_access_builtins[context1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-None-None]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-1.0-1.0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context0--5--5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context1-+5-5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-3 - 1-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context1-list(range(20))[3:-2:3]-expected2]", "IPython/core/tests/test_guarded_eval.py::test_named_tuple", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context1-(1\\n+\\n1)-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-False is not True-True]", "IPython/core/tests/test_guarded_eval.py::test_access_builtins[context2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-True-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-None-None]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 < 2 < 3 < 4-True]", "IPython/core/tests/test_guarded_eval.py::test_guards_locals_and_globals", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-True is not True-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context0-(1\\n+\\n1)-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-2 * 3-6]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-x += 1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-4 > 3 > 2 > 1-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 < 4 < 3-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 >= 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-0xXXXXXXXXX-3740122863]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-1 + 1-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-0 in [1]-False]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-import ast]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 >= 2-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-4 > 3 > 2 > 1-True]", "IPython/core/tests/test_guarded_eval.py::test_access_locals_and_globals", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context1-list(range(10))[-1:]-expected1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-{}-expected5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-2 << 1-4]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-{}-expected5]", "IPython/core/tests/test_guarded_eval.py::test_access_builtins[context3]", "IPython/core/tests/test_guarded_eval.py::test_rejects_custom_properties", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-5 / 2-2.5]", "IPython/core/tests/test_guarded_eval.py::test_method_descriptor", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 == 2-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 == 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-0 not in [1]-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-0xXXXXXXXXX-3740122863]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 < 2 > 1 > 0 > -1 < 1-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context2--5--5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 in [1] in [[1]]-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-0xXXXXXXXXX-3740122863]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-[]-expected6]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-x = 1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-0 not in [1]-True]", "IPython/core/tests/test_guarded_eval.py::test_assumption_instance_attr_do_not_matter", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 > 1-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context0-list(range(10))[-1:]-expected1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-None-None]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context0-~5--6]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-{}-expected5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 == 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 <= 2-True]", "IPython/core/tests/test_guarded_eval.py::test_list", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 not in [1]-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 in [1] in [[2]]-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-1 & 2-0]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context0-list(range(20))[3:-2:3]-expected2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 >= 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 != 1-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-[]-expected6]", "IPython/core/tests/test_guarded_eval.py::test_number_attributes[complex.real-real]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 != 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 < 1-False]", "IPython/core/tests/test_guarded_eval.py::test_list_literal", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-x += 1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 in [1] in [[1]]-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context2-~5--6]", "IPython/core/tests/test_guarded_eval.py::test_subscript", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-True-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 >= 2-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-True is True-True]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-del x]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-class C: pass]", "IPython/core/tests/test_guarded_eval.py::test_dict", "IPython/core/tests/test_guarded_eval.py::test_set", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-5 // 2-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-None-None]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-5**2-25]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context1--5--5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-1 | 2-3]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 <= 1-False]", "IPython/core/tests/test_guarded_eval.py::test_unbind_method", "IPython/core/tests/test_guarded_eval.py::test_number_attributes[float.is_integer-is_integer]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context2-+5-5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_calls[data1-data.keys().isdisjoint({})-data.update()-True-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-5 / 2-2.5]", "IPython/core/tests/test_guarded_eval.py::test_assumption_named_tuples_share_getitem", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-True is True-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 < 2 > 1 > 0 > -1 < 1-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 != 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 < 4 < 3-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-{}-expected5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-1 & 1-1]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-x += 1]"] | [] | ["IPython/core/tests/test_guarded_eval.py::test_evaluates_calls[data3-data()-data.__class__()-frozenset-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_calls[data2-data()-data.__class__()-HeapType-False]"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.4.0", "attrs==23.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.19.0", "matplotlib-inline==0.1.6", "packaging==23.2", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.3.0", "prompt-toolkit==3.0.39", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.16.1", "pytest==7.0.1", "pytest-asyncio==0.21.1", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.3", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.10.1", "wcwidth==0.2.8", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-14146 | 46c7ccf03476e6b52fca007625a0f8bca8cf0864 | diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py
index 5964d0288cb..30be9fc0d19 100644
--- a/IPython/core/debugger.py
+++ b/IPython/core/debugger.py
@@ -108,6 +108,7 @@
import os
from IPython import get_ipython
+from contextlib import contextmanager
from IPython.utils import PyColorize
from IPython.utils import coloransi, py3compat
from IPython.core.excolors import exception_colors
@@ -127,6 +128,11 @@
DEBUGGERSKIP = "__debuggerskip__"
+# this has been implemented in Pdb in Python 3.13 (https://github.com/python/cpython/pull/106676
+# on lower python versions, we backported the feature.
+CHAIN_EXCEPTIONS = sys.version_info < (3, 13)
+
+
def make_arrow(pad):
"""generate the leading arrow in front of traceback or debugger"""
if pad >= 2:
@@ -185,6 +191,9 @@ class Pdb(OldPdb):
"""
+ if CHAIN_EXCEPTIONS:
+ MAX_CHAINED_EXCEPTION_DEPTH = 999
+
default_predicates = {
"tbhide": True,
"readonly": False,
@@ -281,6 +290,10 @@ def __init__(self, completekey=None, stdin=None, stdout=None, context=5, **kwarg
# list of predicates we use to skip frames
self._predicates = self.default_predicates
+ if CHAIN_EXCEPTIONS:
+ self._chained_exceptions = tuple()
+ self._chained_exception_index = 0
+
#
def set_colors(self, scheme):
"""Shorthand access to the color table scheme selector method."""
@@ -330,9 +343,106 @@ def hidden_frames(self, stack):
ip_hide = [h if i > ip_start[0] else True for (i, h) in enumerate(ip_hide)]
return ip_hide
- def interaction(self, frame, traceback):
+ if CHAIN_EXCEPTIONS:
+
+ def _get_tb_and_exceptions(self, tb_or_exc):
+ """
+ Given a tracecack or an exception, return a tuple of chained exceptions
+ and current traceback to inspect.
+ This will deal with selecting the right ``__cause__`` or ``__context__``
+ as well as handling cycles, and return a flattened list of exceptions we
+ can jump to with do_exceptions.
+ """
+ _exceptions = []
+ if isinstance(tb_or_exc, BaseException):
+ traceback, current = tb_or_exc.__traceback__, tb_or_exc
+
+ while current is not None:
+ if current in _exceptions:
+ break
+ _exceptions.append(current)
+ if current.__cause__ is not None:
+ current = current.__cause__
+ elif (
+ current.__context__ is not None
+ and not current.__suppress_context__
+ ):
+ current = current.__context__
+
+ if len(_exceptions) >= self.MAX_CHAINED_EXCEPTION_DEPTH:
+ self.message(
+ f"More than {self.MAX_CHAINED_EXCEPTION_DEPTH}"
+ " chained exceptions found, not all exceptions"
+ "will be browsable with `exceptions`."
+ )
+ break
+ else:
+ traceback = tb_or_exc
+ return tuple(reversed(_exceptions)), traceback
+
+ @contextmanager
+ def _hold_exceptions(self, exceptions):
+ """
+ Context manager to ensure proper cleaning of exceptions references
+ When given a chained exception instead of a traceback,
+ pdb may hold references to many objects which may leak memory.
+ We use this context manager to make sure everything is properly cleaned
+ """
+ try:
+ self._chained_exceptions = exceptions
+ self._chained_exception_index = len(exceptions) - 1
+ yield
+ finally:
+ # we can't put those in forget as otherwise they would
+ # be cleared on exception change
+ self._chained_exceptions = tuple()
+ self._chained_exception_index = 0
+
+ def do_exceptions(self, arg):
+ """exceptions [number]
+ List or change current exception in an exception chain.
+ Without arguments, list all the current exception in the exception
+ chain. Exceptions will be numbered, with the current exception indicated
+ with an arrow.
+ If given an integer as argument, switch to the exception at that index.
+ """
+ if not self._chained_exceptions:
+ self.message(
+ "Did not find chained exceptions. To move between"
+ " exceptions, pdb/post_mortem must be given an exception"
+ " object rather than a traceback."
+ )
+ return
+ if not arg:
+ for ix, exc in enumerate(self._chained_exceptions):
+ prompt = ">" if ix == self._chained_exception_index else " "
+ rep = repr(exc)
+ if len(rep) > 80:
+ rep = rep[:77] + "..."
+ self.message(f"{prompt} {ix:>3} {rep}")
+ else:
+ try:
+ number = int(arg)
+ except ValueError:
+ self.error("Argument must be an integer")
+ return
+ if 0 <= number < len(self._chained_exceptions):
+ self._chained_exception_index = number
+ self.setup(None, self._chained_exceptions[number].__traceback__)
+ self.print_stack_entry(self.stack[self.curindex])
+ else:
+ self.error("No exception with that number")
+
+ def interaction(self, frame, tb_or_exc):
try:
- OldPdb.interaction(self, frame, traceback)
+ if CHAIN_EXCEPTIONS:
+ # this context manager is part of interaction in 3.13
+ _chained_exceptions, tb = self._get_tb_and_exceptions(tb_or_exc)
+ with self._hold_exceptions(_chained_exceptions):
+ OldPdb.interaction(self, frame, tb)
+ else:
+ OldPdb.interaction(self, frame, traceback)
+
except KeyboardInterrupt:
self.stdout.write("\n" + self.shell.get_exception_only())
diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py
index 6cd94eaf674..27d92dc5835 100644
--- a/IPython/core/ultratb.py
+++ b/IPython/core/ultratb.py
@@ -1246,7 +1246,13 @@ def debugger(self, force: bool = False):
if etb and etb.tb_next:
etb = etb.tb_next
self.pdb.botframe = etb.tb_frame
- self.pdb.interaction(None, etb)
+ # last_value should be deprecated, but last-exc sometimme not set
+ # please check why later and remove the getattr.
+ exc = sys.last_value if sys.version_info < (3, 12) else getattr(sys, "last_exc", sys.last_value) # type: ignore[attr-defined]
+ if exc:
+ self.pdb.interaction(None, exc)
+ else:
+ self.pdb.interaction(None, etb)
if hasattr(self, 'tb'):
del self.tb
diff --git a/docs/source/whatsnew/version8.rst b/docs/source/whatsnew/version8.rst
index 1ceb9f876f8..f3ff4752354 100644
--- a/docs/source/whatsnew/version8.rst
+++ b/docs/source/whatsnew/version8.rst
@@ -1,6 +1,23 @@
============
8.x Series
============
+
+.. _version 8.15:
+
+IPython 8.15
+------------
+
+Medium release of IPython after a couple of month hiatus, and a bit off-schedule.
+
+The main change is the addition of the ability to move between chained
+exceptions when using IPdb, this feature was also contributed to upstream Pdb
+and is thus native to CPython in Python 3.13+ Though ipdb should support this
+feature in older version of Python. I invite you to look at the `CPython changes
+and docs <https://github.com/python/cpython/pull/106676>`_ for more details.
+
+I also want o thanks the `D.E. Shaw group <https://www.deshaw.com/>`_ for
+suggesting and funding this feature.
+
.. _version 8.14:
IPython 8.14
| diff --git a/IPython/terminal/tests/test_debug_magic.py b/IPython/terminal/tests/test_debug_magic.py
index faa3b7c4993..16ed53d31af 100644
--- a/IPython/terminal/tests/test_debug_magic.py
+++ b/IPython/terminal/tests/test_debug_magic.py
@@ -68,8 +68,10 @@ def test_debug_magic_passes_through_generators():
child.expect_exact('----> 1 for x in gen:')
child.expect(ipdb_prompt)
- child.sendline('u')
- child.expect_exact('*** Oldest frame')
+ child.sendline("u")
+ child.expect_exact(
+ "*** all frames above hidden, use `skip_hidden False` to get get into those."
+ )
child.expect(ipdb_prompt)
child.sendline('exit')
| ipdb: support for chained exceptions
This is a common pattern to enrich an exception with more information:
```
def foo(x):
try:
bar(x)
except Exception as e:
raise ValueError("foo(): bar failed") from e
def bar(x):
1/x
```
This is common when a second exception occurs during exception handling:
```
def foo(x):
try:
bar(x)
except Exception as e:
raise ValueError("some other error")
def bar(x):
1/x
```
In both cases, ipdb (and pdb) wont let us step up the stack from to find the error in `bar`. While python 3.11 has [Exception.add_note](https://peps.python.org/pep-0678/), there will continue to be lots of code using the methods above (and its not always practical to use this).
Example:

Can we enhance ipdb to handle both cases?
| Apologies for the late reply to this issue. After a bit of investigating it should be possible with some refactor; I believe in both case.
One limitation is that pdb get a Traceback by default instead of a full Exception and you can go from Exception to TB but not the other way around.
I can mess around with the internal state of pdb when you do `up` (from the oldest frame), or `down` ( from the Newest frame), and jump to the `__context__` (or `__cause__` of `raise ...from`) it seem to work, at least on the surface.
Discussion upstream before opening an issue https://discuss.python.org/t/interested-in-support-to-jump-between-chained-exception-in-pdb/29470
See discussion in https://github.com/python/cpython/issues/106670 as well. | 2023-08-29T09:57:51Z | 2023-08-29T12:16:00Z | [] | [] | ["IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==23.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.19.0", "matplotlib-inline==0.1.6", "packaging==23.1", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.3.0", "prompt-toolkit==3.0.39", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.16.1", "pytest==7.0.1", "pytest-asyncio==0.21.1", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.2", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.9.0", "wcwidth==0.2.6", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13991 | 4db24c349d2e211b5cfb51f3b1485c6d7f037290 | diff --git a/IPython/terminal/shortcuts/__init__.py b/IPython/terminal/shortcuts/__init__.py
index 41533c8071c..f71ce498fa0 100644
--- a/IPython/terminal/shortcuts/__init__.py
+++ b/IPython/terminal/shortcuts/__init__.py
@@ -181,30 +181,45 @@ def create_identifier(handler: Callable):
]
AUTO_SUGGEST_BINDINGS = [
+ # there are two reasons for re-defining bindings defined upstream:
+ # 1) prompt-toolkit does not execute autosuggestion bindings in vi mode,
+ # 2) prompt-toolkit checks if we are at the end of text, not end of line
+ # hence it does not work in multi-line mode of navigable provider
Binding(
- auto_suggest.accept_in_vi_insert_mode,
+ auto_suggest.accept_or_jump_to_end,
["end"],
- "default_buffer_focused & (ebivim | ~vi_insert_mode)",
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
),
Binding(
- auto_suggest.accept_in_vi_insert_mode,
+ auto_suggest.accept_or_jump_to_end,
["c-e"],
- "vi_insert_mode & default_buffer_focused & ebivim",
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
+ ),
+ Binding(
+ auto_suggest.accept,
+ ["c-f"],
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
+ ),
+ Binding(
+ auto_suggest.accept,
+ ["right"],
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
),
- Binding(auto_suggest.accept, ["c-f"], "vi_insert_mode & default_buffer_focused"),
Binding(
auto_suggest.accept_word,
["escape", "f"],
- "vi_insert_mode & default_buffer_focused & ebivim",
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
),
Binding(
auto_suggest.accept_token,
["c-right"],
- "has_suggestion & default_buffer_focused",
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
),
Binding(
auto_suggest.discard,
["escape"],
+ # note this one is using `emacs_insert_mode`, not `emacs_like_insert_mode`
+ # as in `vi_insert_mode` we do not want `escape` to be shadowed (ever).
"has_suggestion & default_buffer_focused & emacs_insert_mode",
),
Binding(
@@ -236,22 +251,23 @@ def create_identifier(handler: Callable):
Binding(
auto_suggest.accept_character,
["escape", "right"],
- "has_suggestion & default_buffer_focused",
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
),
Binding(
auto_suggest.accept_and_move_cursor_left,
["c-left"],
- "has_suggestion & default_buffer_focused",
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
),
Binding(
auto_suggest.accept_and_keep_cursor,
["c-down"],
- "has_suggestion & default_buffer_focused",
+ "has_suggestion & default_buffer_focused & emacs_like_insert_mode",
),
Binding(
auto_suggest.backspace_and_resume_hint,
["backspace"],
- "has_suggestion & default_buffer_focused",
+ # no `has_suggestion` here to allow resuming if no suggestion
+ "default_buffer_focused & emacs_like_insert_mode",
),
]
diff --git a/IPython/terminal/shortcuts/auto_suggest.py b/IPython/terminal/shortcuts/auto_suggest.py
index 0c193d9cec0..93c1fa4fdf6 100644
--- a/IPython/terminal/shortcuts/auto_suggest.py
+++ b/IPython/terminal/shortcuts/auto_suggest.py
@@ -2,6 +2,7 @@
import tokenize
from io import StringIO
from typing import Callable, List, Optional, Union, Generator, Tuple
+import warnings
from prompt_toolkit.buffer import Buffer
from prompt_toolkit.key_binding import KeyPressEvent
@@ -178,9 +179,8 @@ def down(self, query: str, other_than: str, history: History) -> None:
break
-# Needed for to accept autosuggestions in vi insert mode
-def accept_in_vi_insert_mode(event: KeyPressEvent):
- """Apply autosuggestion if at end of line."""
+def accept_or_jump_to_end(event: KeyPressEvent):
+ """Apply autosuggestion or jump to end of line."""
buffer = event.current_buffer
d = buffer.document
after_cursor = d.text[d.cursor_position :]
@@ -193,6 +193,15 @@ def accept_in_vi_insert_mode(event: KeyPressEvent):
nc.end_of_line(event)
+def _deprected_accept_in_vi_insert_mode(event: KeyPressEvent):
+ """Accept autosuggestion or jump to end of line.
+
+ .. deprecated:: 8.12
+ Use `accept_or_jump_to_end` instead.
+ """
+ return accept_or_jump_to_end(event)
+
+
def accept(event: KeyPressEvent):
"""Accept autosuggestion"""
buffer = event.current_buffer
@@ -373,3 +382,16 @@ def swap_autosuggestion_down(event: KeyPressEvent):
provider=provider,
direction_method=provider.down,
)
+
+
+def __getattr__(key):
+ if key == "accept_in_vi_insert_mode":
+ warnings.warn(
+ "`accept_in_vi_insert_mode` is deprecated since IPython 8.12 and "
+ "renamed to `accept_or_jump_to_end`. Please update your configuration "
+ "accordingly",
+ DeprecationWarning,
+ stacklevel=2,
+ )
+ return _deprected_accept_in_vi_insert_mode
+ raise AttributeError
diff --git a/IPython/terminal/shortcuts/filters.py b/IPython/terminal/shortcuts/filters.py
index a4a6213079d..4627769af32 100644
--- a/IPython/terminal/shortcuts/filters.py
+++ b/IPython/terminal/shortcuts/filters.py
@@ -181,10 +181,33 @@ def is_windows_os():
"vi_mode": vi_mode,
"vi_insert_mode": vi_insert_mode,
"emacs_insert_mode": emacs_insert_mode,
+ # https://github.com/ipython/ipython/pull/12603 argued for inclusion of
+ # emacs key bindings with a configurable `emacs_bindings_in_vi_insert_mode`
+ # toggle; when the toggle is on user can access keybindigns like `ctrl + e`
+ # in vi insert mode. Because some of the emacs bindings involve `escape`
+ # followed by another key, e.g. `escape` followed by `f`, prompt-toolkit
+ # needs to wait to see if there will be another character typed in before
+ # executing pure `escape` keybinding; in vi insert mode `escape` switches to
+ # command mode which is common and performance critical action for vi users.
+ # To avoid the delay users employ a workaround:
+ # https://github.com/ipython/ipython/issues/13443#issuecomment-1032753703
+ # which involves switching `emacs_bindings_in_vi_insert_mode` off.
+ #
+ # For the workaround to work:
+ # 1) end users need to toggle `emacs_bindings_in_vi_insert_mode` off
+ # 2) all keybindings which would involve `escape` need to respect that
+ # toggle by including either:
+ # - `vi_insert_mode & ebivim` for actions which have emacs keybindings
+ # predefined upstream in prompt-toolkit, or
+ # - `emacs_like_insert_mode` for actions which do not have existing
+ # emacs keybindings predefined upstream (or need overriding of the
+ # upstream bindings to modify behaviour), defined below.
+ "emacs_like_insert_mode": (vi_insert_mode & ebivim) | emacs_insert_mode,
"has_completions": has_completions,
"insert_mode": vi_insert_mode | emacs_insert_mode,
"default_buffer_focused": default_buffer_focused,
"search_buffer_focused": has_focus(SEARCH_BUFFER),
+ # `ebivim` stands for emacs bindings in vi insert mode
"ebivim": ebivim,
"supports_suspend": supports_suspend,
"is_windows_os": is_windows_os,
| diff --git a/IPython/terminal/tests/test_shortcuts.py b/IPython/terminal/tests/test_shortcuts.py
index 18c9daba929..45bb327988b 100644
--- a/IPython/terminal/tests/test_shortcuts.py
+++ b/IPython/terminal/tests/test_shortcuts.py
@@ -1,7 +1,7 @@
import pytest
from IPython.terminal.shortcuts.auto_suggest import (
accept,
- accept_in_vi_insert_mode,
+ accept_or_jump_to_end,
accept_token,
accept_character,
accept_word,
@@ -22,6 +22,13 @@
from unittest.mock import patch, Mock
+def test_deprected():
+ import IPython.terminal.shortcuts.auto_suggest as iptsa
+
+ with pytest.warns(DeprecationWarning, match=r"8\.12.+accept_or_jump_to_end"):
+ iptsa.accept_in_vi_insert_mode
+
+
def make_event(text, cursor, suggestion):
event = Mock()
event.current_buffer = Mock()
@@ -80,7 +87,7 @@ def test_autosuggest_at_EOL(text, cursor, suggestion, called):
event = make_event(text, cursor, suggestion)
event.current_buffer.insert_text = Mock()
- accept_in_vi_insert_mode(event)
+ accept_or_jump_to_end(event)
if called:
event.current_buffer.insert_text.assert_called()
else:
| Auto suggestions cannot be completed when in the middle of multi-line input
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.
If you are unsure, it's ok to post here, though, there are few maintainer so you might not get a fast response.
-->
Completing an ipython 8 [autosuggestion](https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#autosuggestions) by pressing `ctrl-f` or `ctrl-e` works perfectly for code on the final line of multi-line input (the following two screenshots show before and after pressing `ctrl-f` or `ctrl-e`):
<img width="357" alt="Screenshot 2023-03-12 at 14 09 48" src="https://user-images.githubusercontent.com/19657652/224570634-fb856132-4b73-46b4-bdf0-576f9601633f.png">
<img width="363" alt="Screenshot 2023-03-12 at 14 10 00" src="https://user-images.githubusercontent.com/19657652/224570647-40ccf5c1-00d6-4d5e-b965-691ca12ffe51.png">
However pressing `ctrl-f` or `ctrl-e` fails when trying to complete the suggestion in the middle of multi-line input -- instead, the only thing that works is holding down right arrow until the suggestion is completed:
<img width="361" alt="Screenshot 2023-03-12 at 14 11 27" src="https://user-images.githubusercontent.com/19657652/224570743-37756db5-989a-46d4-8447-bb23649d7309.png">
Note this problem persists across different terminals (apple Terminal and iTerm2) and after disabling custom `bashrc` and `inputrc`. Is there any way suggestions can be completed with one keystroke in the middle of multi-line input?
| Thank you for the report, I can reproduce it. Here are two workarounds for now:
- you can use <kbd>End</kbd>
- you can update to 8.11 where <kbd>right</kbd> was changed back to complete full line (whereas <kbd>ctrl</kbd> + <kbd>right</kbd> completes token-by-token and <kbd>alt</kbd> + <kbd>right</kbd> completes character-by- character).
Thanks for the quick response. Unfortunately I tried hitting <kbd>Right</kbd> in ipython 8.11 and it doesn't work (<kbd>Ctrl</kbd>+<kbd>Right</kbd> and <kbd>Alt</kbd>+<kbd>Right</kbd> also don't work)... ~~so now there seems to be no way to complete a middle line~~.
Edit: Actually while <kbd>Right</kbd> and <kbd>Alt</kbd>+<kbd>Right</kbd> don't work, <kbd>Ctrl</kbd>+<kbd>Right</kbd> works in Terminal but not iTerm2 (on my setup). However <kbd>End</kbd> does work in both ipython 8.10 and ipython 8.11. I'll use that for the time being.
This is not strictly related to this bug, but I just wanted to ask if you happen to have an opinion on https://github.com/ipython/ipython/issues/13987? Please leave :+1: or :-1: over there if you do - thank you :) | 2023-03-26T14:28:40Z | 2023-03-30T08:29:49Z | [] | [] | ["IPython/terminal/tests/test_shortcuts.py::test_other_providers", "IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[d-ef out(tag: str, n=50):-ef ]", "IPython/terminal/tests/test_shortcuts.py::test_add_shortcut_for_new_command", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-3-123456789-False]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[de -f out(tag: str, n=50):-f]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=50)-:-:]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def- out(tag: str, n=50):- ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=-50):-50)]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def ou-t(tag: str, n=50):-t(]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[d-ef out(tag: str, n=50):-e]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(t-ag: str, n=50):-ag: ]", "IPython/terminal/tests/test_shortcuts.py::test_accept[-def out(tag: str, n=50):-def out(tag: str, n=50):]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str,- n=50):- n]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def -out(tag: str, n=50):-out(]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n-=50):-=]", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[de-f out(tag: str, n=50):-f ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(ta-g: str, n=50):-g: ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def o-ut(tag: str, n=50):-ut(]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: st-r, n=50):-r, ]", "IPython/terminal/tests/test_shortcuts.py::test_discard[def -out(tag: str, n=50):]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456 \\n789-6-123456789-True]", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[def- out(tag: str, n=50):- ]", "IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_failure", "IPython/terminal/tests/test_shortcuts.py::test_modify_unique_shortcut", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[d-ef out(tag: str, n=50):-ef ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-6-123456789-True]", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider_connection", "IPython/terminal/tests/test_shortcuts.py::test_deprected", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[-def out(tag: str, n=50):-def ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, -n=50):-n=]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str-, n=50):-, n]", "IPython/terminal/tests/test_shortcuts.py::test_accept_and_keep_cursor[def -out(tag: str, n=50):-out(tag: str, n=50):-4]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[def- out(tag: str, n=50):- ]", "IPython/terminal/tests/test_shortcuts.py::test_discard[-def out(tag: str, n=50):]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: -str, n=50):-str, ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[de -f out(tag: str, n=50):-f ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=50-):-):]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: s-tr, n=50):-tr, ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[-def out(tag: str, n=50):-def ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=5-0):-0)]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[-def out(tag: str, n=50):-d]", "IPython/terminal/tests/test_shortcuts.py::test_accept_and_keep_cursor[-def out(tag: str, n=50):-def out(tag: str, n=50):-0]", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[def -out(tag: str, n=50):-out(tag: ]", "IPython/terminal/tests/test_shortcuts.py::test_accept[def -out(tag: str, n=50):-out(tag: str, n=50):]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag:- str, n=50):- ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag-: str, n=50):-: ]", "IPython/terminal/tests/test_shortcuts.py::test_add_shortcut_for_existing_command", "IPython/terminal/tests/test_shortcuts.py::test_disable_shortcut", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out-(tag: str, n=50):-(]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token_empty", "IPython/terminal/tests/test_shortcuts.py::test_setting_shortcuts_before_pt_app_init", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(-tag: str, n=50):-tag: ]"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==23.0", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.0.0", "prompt-toolkit==3.0.38", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.14.0", "pytest==7.0.1", "pytest-asyncio==0.21.0", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.2", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.9.0", "wcwidth==0.2.6", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13943 | 2a5fdf9dab8e5fa50a03ce686aaf11cb38844587 | diff --git a/IPython/core/completer.py b/IPython/core/completer.py
index f0bbb4e5619..a41f492b04e 100644
--- a/IPython/core/completer.py
+++ b/IPython/core/completer.py
@@ -1162,11 +1162,36 @@ def attr_matches(self, text):
raise
except Exception:
# Silence errors from completion function
- #raise # dbg
pass
# Build match list to return
n = len(attr)
- return ["%s.%s" % (expr, w) for w in words if w[:n] == attr]
+
+ # Note: ideally we would just return words here and the prefix
+ # reconciliator would know that we intend to append to rather than
+ # replace the input text; this requires refactoring to return range
+ # which ought to be replaced (as does jedi).
+ tokens = _parse_tokens(expr)
+ rev_tokens = reversed(tokens)
+ skip_over = {tokenize.ENDMARKER, tokenize.NEWLINE}
+ name_turn = True
+
+ parts = []
+ for token in rev_tokens:
+ if token.type in skip_over:
+ continue
+ if token.type == tokenize.NAME and name_turn:
+ parts.append(token.string)
+ name_turn = False
+ elif token.type == tokenize.OP and token.string == "." and not name_turn:
+ parts.append(token.string)
+ name_turn = True
+ else:
+ # short-circuit if not empty nor name token
+ break
+
+ prefix_after_space = "".join(reversed(parts))
+
+ return ["%s.%s" % (prefix_after_space, w) for w in words if w[:n] == attr]
def _evaluate_expr(self, expr):
obj = not_found
| diff --git a/IPython/core/tests/test_completer.py b/IPython/core/tests/test_completer.py
index 7783798eb36..3ff6569ed62 100644
--- a/IPython/core/tests/test_completer.py
+++ b/IPython/core/tests/test_completer.py
@@ -543,6 +543,7 @@ def test_greedy_completions(self):
"""
ip = get_ipython()
ip.ex("a=list(range(5))")
+ ip.ex("d = {'a b': str}")
_, c = ip.complete(".", line="a[0].")
self.assertFalse(".real" in c, "Shouldn't have completed on a[0]: %s" % c)
@@ -561,14 +562,14 @@ def _(line, cursor_pos, expect, message, completion):
_(
"a[0].",
5,
- "a[0].real",
+ ".real",
"Should have completed on a[0].: %s",
Completion(5, 5, "real"),
)
_(
"a[0].r",
6,
- "a[0].real",
+ ".real",
"Should have completed on a[0].r: %s",
Completion(5, 6, "real"),
)
@@ -576,10 +577,24 @@ def _(line, cursor_pos, expect, message, completion):
_(
"a[0].from_",
10,
- "a[0].from_bytes",
+ ".from_bytes",
"Should have completed on a[0].from_: %s",
Completion(5, 10, "from_bytes"),
)
+ _(
+ "assert str.star",
+ 14,
+ "str.startswith",
+ "Should have completed on `assert str.star`: %s",
+ Completion(11, 14, "startswith"),
+ )
+ _(
+ "d['a b'].str",
+ 12,
+ ".strip",
+ "Should have completed on `d['a b'].str`: %s",
+ Completion(9, 12, "strip"),
+ )
def test_omit__names(self):
# also happens to test IPCompleter as a configurable
| ipython==8.8.0 has weird tab completion bug
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.
If you are unsure, it's ok to post here, though, there are few maintainer so you might not get a fast response.
-->
self.my_attr.my_method(self.f<tab>
Becomes:
self.my_attr.my_method(self.my_attr.my_method(self.foo
It looks like it would grab and prepend the front part of the line.
## Workaround
Rolling back to 8.7.0 solves it.
## Repro
Unfortunately, I failed to reproduce it with simple setup with a simple class and method and attribute.
But I easily reproduce this bug at my work projects (which are huge... and have so much complicated dependencies). I think this bug wouldn't manifest itself unless the code base is complicated enough.
I've confirmed 8.7.0 doesn't have this issue.
| @suewonjp thank you for opening this issue. A reproducer would really help. Based on your example I tried:
```python
class A:
def my_method(self):
pass
class B:
my_attr = A()
field = 1
def test(self):
self.my_attr.my_method(self.f<tab>
```
but it worked correctly, completing `field`.
Also, would you mind checking if changing [`IPCompleter.evaluation`](https://ipython.readthedocs.io/en/stable/api/generated/IPython.core.completer.html#IPython.core.completer.Completer.evaluation) has any influence on the behaviour you see?
Thank you for your reply.
I think I'll identify the problem commit by git binary search or something when I have time for that at work.
> Also, would you mind checking if changing IPCompleter.evaluation has any influence on the behaviour you see?
I'll try
It's likely related to completer refactor, so I would not spend time on bisecting IPython history. A reproducible example is all we need :)
> reproducible example is all we need :)
Yes. I know. But I already tried several test scenarios and all failed to reproduce it.
Anyway, the problem commit is 4b0aed94df9573566e87941eec4e23bd58727097
I've confirmed the issue appears at the commit and doesn't appear at its previous commit.
Now I can investigate the issue side by side with two git worktrees (one uses 4b0aed9, the other uses 8.7.0) and compare internal states of the two.
I think this approach is a good option since it seems like the issue is only reproducible at my work place.
It depends on whether I can find time to do that at work, though. (I have upcoming deadline for my current tasks so...)
The issue was gone by setting True for `IPCompleter.use_jedi` option. I've been using `IPCompleter.use_jedi = False` for a long while due to the issue at #11653
And with debug setting enabled, I've got the following.

`assert str.st<tab>` becomes `assert assert str.st*` and `assert assert str.st<tab>` becomes `assert assert assert.st*` and so on... just it tries grabbing things before it on the line endlessly.
Honestly, I doubt this may help you fix the issue, but it's what I've got so far. I hope I could share more helpful clues later...
@krassowski
I've come up with a very minimum setup which can reproduce the issue (I think)
- CD to ipython repository
- Update it to the latest main branch
- Create a virtualenv
- Install ipython itself with `pip install -e .`
- Create a fresh new profile (just in case)
- `ipython profile create debug`
- Start a session
- `ipython --profile=debug`
- Disable use_jedi
- `%config IPCompleter.use_jedi = False`
- Try a simple tab autocompletion
- `assert str.st<tab>`
I could reproduce the issue with the procedure above on WSL and Mac. So the issue is not dependent on platforms at all.
I hope this would help.
Ok, so previously `IPCompleter.python_matches` (`attr_matches` to be precise) was returning: `["str.startswith", "str.strip"]` but now it is `["assert str.startswith", "assert str.strip"]`.
Previously `expr = "str"`, now `expr = "assert str"`. Larger expr is good for evaluation, but we need to trim it so that the prefix reconciliation algorithm does not go crazy (or change the reconciliation algorithm, but this may not be possible).
PR on the way.
| 2023-02-12T22:41:00Z | 2023-02-13T09:34:50Z | ["IPython/core/tests/test_completer.py::TestCompleter::test_import_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing", "IPython/core/tests/test_completer.py::test_line_split", "IPython/core/tests/test_completer.py::test_protect_filename", "IPython/core/tests/test_completer.py::TestCompleter::test_object_key_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_completions_have_type", "IPython/core/tests/test_completer.py::TestCompleter::test_default_arguments_from_docstring", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[1 + 1-None]", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes4", "IPython/core/tests/test_completer.py::TestCompleter::test_aimport_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_back_unicode_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_back_latex_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_spaces", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes3", "IPython/core/tests/test_completer.py::TestCompleter::test_custom_completion_error", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[-1.--1.]", "IPython/core/tests/test_completer.py::TestCompleter::test_line_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_restrict_to_dicts", "IPython/core/tests/test_completer.py::TestCompleter::test_all_completions_dups", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_numbers", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[0b_1110_0101-0b_1110_0101]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[.1.-None]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[, .1-.1]", "IPython/core/tests/test_completer.py::TestCompleter::test_get__all__entries_no__all__ok", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[, 1 + 1-None]", "IPython/core/tests/test_completer.py::TestCompleter::test_class_key_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_contexts", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_closures", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing_explicit", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_disabling", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[-1.0--1.0]", "IPython/core/tests/test_completer.py::TestCompleter::test_cell_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_local_file_completions", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[+1-+1]", "IPython/core/tests/test_completer.py::TestCompleter::test_get__all__entries_ok", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes2", "IPython/core/tests/test_completer.py::TestCompleter::test_jedi", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_order", "IPython/core/tests/test_completer.py::TestCompleter::test_nested_import_module_completer", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[0b_0011_1111_0100_1110-0b_0011_1111_0100_1110]", "IPython/core/tests/test_completer.py::TestCompleter::test_delim_setting", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[.1 -None]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[1..-None]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[, +.1-+.1]", "IPython/core/tests/test_completer.py::TestCompleter::test_match_dict_keys_tuple", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_bytes", "IPython/core/tests/test_completer.py::TestCompleter::test_limit_to__all__False_ok", "IPython/core/tests/test_completer.py::TestCompleter::test_abspath_file_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_invalids", "IPython/core/tests/test_completer.py::TestCompleter::test_snake_case_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_unicode_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_forward_unicode_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_priority", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_unicode_py3", "IPython/core/tests/test_completer.py::TestCompleter::test_from_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_latex_no_results", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression_with_iterator", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[..-None]", "IPython/core/tests/test_completer.py::TestCompleter::test_mix_terms", "IPython/core/tests/test_completer.py::TestCompleter::test_quoted_file_completions", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[+1.-+1.]", "IPython/core/tests/test_completer.py::test_unicode_range", "IPython/core/tests/test_completer.py::TestCompleter::test_tryimport", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_config", "IPython/core/tests/test_completer.py::TestCompleter::test_func_kw_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_percent_symbol_restrict_to_magic_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_line_cell_magics", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[0xXXXXXXXXX-0xXXXXXXXXX]", "IPython/core/tests/test_completer.py::TestCompleter::test_custom_completion_ordering", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[-1--1]", "IPython/core/tests/test_completer.py::TestCompleter::test_completion_have_signature", "IPython/core/tests/test_completer.py::TestCompleter::test_fwd_unicode_restricts", "IPython/core/tests/test_completer.py::TestCompleter::test_match_dict_keys", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[, 1-1]", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes1", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression_with_jedi", "IPython/core/tests/test_completer.py::TestCompleter::test_latex_completions", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[1.234-1.234]", "IPython/core/tests/test_completer.py::TestCompleter::test_omit__names", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[,1-1]", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_string", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[.1-.1]", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_color"] | [] | ["IPython/core/tests/test_completer.py::TestCompleter::test_greedy_completions"] | ["IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions Known failure on jedi<=0.18.0"] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==23.0", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.0.0", "prompt-toolkit==3.0.36", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.14.0", "pytest==7.0.1", "pytest-asyncio==0.20.3", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.2", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.9.0", "wcwidth==0.2.6", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13928 | 87de97f2b6e09eb32fe931e65c18e11b0f12bbde | diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py
index b5fc148ab1c..41a3321b039 100644
--- a/IPython/terminal/interactiveshell.py
+++ b/IPython/terminal/interactiveshell.py
@@ -16,6 +16,7 @@
Unicode,
Dict,
Integer,
+ List,
observe,
Instance,
Type,
@@ -29,7 +30,7 @@
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory
from prompt_toolkit.enums import DEFAULT_BUFFER, EditingMode
-from prompt_toolkit.filters import (HasFocus, Condition, IsDone)
+from prompt_toolkit.filters import HasFocus, Condition, IsDone
from prompt_toolkit.formatted_text import PygmentsTokens
from prompt_toolkit.history import History
from prompt_toolkit.layout.processors import ConditionalProcessor, HighlightMatchingBracketProcessor
@@ -49,7 +50,13 @@
from .pt_inputhooks import get_inputhook_name_and_func
from .prompts import Prompts, ClassicPrompts, RichPromptDisplayHook
from .ptutils import IPythonPTCompleter, IPythonPTLexer
-from .shortcuts import create_ipython_shortcuts
+from .shortcuts import (
+ create_ipython_shortcuts,
+ create_identifier,
+ RuntimeBinding,
+ add_binding,
+)
+from .shortcuts.filters import KEYBINDING_FILTERS, filter_from_string
from .shortcuts.auto_suggest import (
NavigableAutoSuggestFromHistory,
AppendAutoSuggestionInAnyLine,
@@ -415,6 +422,165 @@ def _autosuggestions_provider_changed(self, change):
provider = change.new
self._set_autosuggestions(provider)
+ shortcuts = List(
+ trait=Dict(
+ key_trait=Enum(
+ [
+ "command",
+ "match_keys",
+ "match_filter",
+ "new_keys",
+ "new_filter",
+ "create",
+ ]
+ ),
+ per_key_traits={
+ "command": Unicode(),
+ "match_keys": List(Unicode()),
+ "match_filter": Unicode(),
+ "new_keys": List(Unicode()),
+ "new_filter": Unicode(),
+ "create": Bool(False),
+ },
+ ),
+ help="""Add, disable or modifying shortcuts.
+
+ Each entry on the list should be a dictionary with ``command`` key
+ identifying the target function executed by the shortcut and at least
+ one of the following:
+
+ - ``match_keys``: list of keys used to match an existing shortcut,
+ - ``match_filter``: shortcut filter used to match an existing shortcut,
+ - ``new_keys``: list of keys to set,
+ - ``new_filter``: a new shortcut filter to set
+
+ The filters have to be composed of pre-defined verbs and joined by one
+ of the following conjunctions: ``&`` (and), ``|`` (or), ``~`` (not).
+ The pre-defined verbs are:
+
+ {}
+
+
+ To disable a shortcut set ``new_keys`` to an empty list.
+ To add a shortcut add key ``create`` with value ``True``.
+
+ When modifying/disabling shortcuts, ``match_keys``/``match_filter`` can
+ be omitted if the provided specification uniquely identifies a shortcut
+ to be modified/disabled. When modifying a shortcut ``new_filter`` or
+ ``new_keys`` can be omitted which will result in reuse of the existing
+ filter/keys.
+
+ Only shortcuts defined in IPython (and not default prompt-toolkit
+ shortcuts) can be modified or disabled. The full list of shortcuts,
+ command identifiers and filters is available under
+ :ref:`terminal-shortcuts-list`.
+ """.format(
+ "\n ".join([f"- `{k}`" for k in KEYBINDING_FILTERS])
+ ),
+ ).tag(config=True)
+
+ @observe("shortcuts")
+ def _shortcuts_changed(self, change):
+ if self.pt_app:
+ self.pt_app.key_bindings = self._merge_shortcuts(user_shortcuts=change.new)
+
+ def _merge_shortcuts(self, user_shortcuts):
+ # rebuild the bindings list from scratch
+ key_bindings = create_ipython_shortcuts(self)
+
+ # for now we only allow adding shortcuts for commands which are already
+ # registered; this is a security precaution.
+ known_commands = {
+ create_identifier(binding.handler): binding.handler
+ for binding in key_bindings.bindings
+ }
+ shortcuts_to_skip = []
+ shortcuts_to_add = []
+
+ for shortcut in user_shortcuts:
+ command_id = shortcut["command"]
+ if command_id not in known_commands:
+ allowed_commands = "\n - ".join(known_commands)
+ raise ValueError(
+ f"{command_id} is not a known shortcut command."
+ f" Allowed commands are: \n - {allowed_commands}"
+ )
+ old_keys = shortcut.get("match_keys", None)
+ old_filter = (
+ filter_from_string(shortcut["match_filter"])
+ if "match_filter" in shortcut
+ else None
+ )
+ matching = [
+ binding
+ for binding in key_bindings.bindings
+ if (
+ (old_filter is None or binding.filter == old_filter)
+ and (old_keys is None or [k for k in binding.keys] == old_keys)
+ and create_identifier(binding.handler) == command_id
+ )
+ ]
+
+ new_keys = shortcut.get("new_keys", None)
+ new_filter = shortcut.get("new_filter", None)
+
+ command = known_commands[command_id]
+
+ creating_new = shortcut.get("create", False)
+ modifying_existing = not creating_new and (
+ new_keys is not None or new_filter
+ )
+
+ if creating_new and new_keys == []:
+ raise ValueError("Cannot add a shortcut without keys")
+
+ if modifying_existing:
+ specification = {
+ key: shortcut[key]
+ for key in ["command", "filter"]
+ if key in shortcut
+ }
+ if len(matching) == 0:
+ raise ValueError(f"No shortcuts matching {specification} found")
+ elif len(matching) > 1:
+ raise ValueError(
+ f"Multiple shortcuts matching {specification} found,"
+ f" please add keys/filter to select one of: {matching}"
+ )
+
+ matched = matching[0]
+ old_filter = matched.filter
+ old_keys = list(matched.keys)
+ shortcuts_to_skip.append(
+ RuntimeBinding(
+ command,
+ keys=old_keys,
+ filter=old_filter,
+ )
+ )
+
+ if new_keys != []:
+ shortcuts_to_add.append(
+ RuntimeBinding(
+ command,
+ keys=new_keys or old_keys,
+ filter=filter_from_string(new_filter)
+ if new_filter is not None
+ else (
+ old_filter
+ if old_filter is not None
+ else filter_from_string("always")
+ ),
+ )
+ )
+
+ # rebuild the bindings list from scratch
+ key_bindings = create_ipython_shortcuts(self, skip=shortcuts_to_skip)
+ for binding in shortcuts_to_add:
+ add_binding(key_bindings, binding)
+
+ return key_bindings
+
prompt_includes_vi_mode = Bool(True,
help="Display the current vi mode (when using vi editing mode)."
).tag(config=True)
@@ -452,8 +618,7 @@ def prompt():
return
# Set up keyboard shortcuts
- key_bindings = create_ipython_shortcuts(self)
-
+ key_bindings = self._merge_shortcuts(user_shortcuts=self.shortcuts)
# Pre-populate history from IPython's history database
history = PtkHistoryAdapter(self)
@@ -477,7 +642,7 @@ def prompt():
enable_open_in_editor=self.extra_open_editor_shortcuts,
color_depth=self.color_depth,
tempfile_suffix=".py",
- **self._extra_prompt_options()
+ **self._extra_prompt_options(),
)
if isinstance(self.auto_suggest, NavigableAutoSuggestFromHistory):
self.auto_suggest.connect(self.pt_app)
diff --git a/IPython/terminal/shortcuts/__init__.py b/IPython/terminal/shortcuts/__init__.py
index 7ec9a2871a6..9711c81ef3c 100644
--- a/IPython/terminal/shortcuts/__init__.py
+++ b/IPython/terminal/shortcuts/__init__.py
@@ -7,414 +7,269 @@
# Distributed under the terms of the Modified BSD License.
import os
-import re
import signal
import sys
import warnings
-from typing import Callable, Dict, Union
+from dataclasses import dataclass
+from typing import Callable, Any, Optional, List
from prompt_toolkit.application.current import get_app
-from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
-from prompt_toolkit.filters import Condition, emacs_insert_mode, has_completions
-from prompt_toolkit.filters import has_focus as has_focus_impl
-from prompt_toolkit.filters import (
- has_selection,
- has_suggestion,
- vi_insert_mode,
- vi_mode,
-)
from prompt_toolkit.key_binding import KeyBindings
+from prompt_toolkit.key_binding.key_processor import KeyPressEvent
from prompt_toolkit.key_binding.bindings import named_commands as nc
from prompt_toolkit.key_binding.bindings.completion import (
display_completions_like_readline,
)
from prompt_toolkit.key_binding.vi_state import InputMode, ViState
-from prompt_toolkit.layout.layout import FocusableElement
+from prompt_toolkit.filters import Condition
+from IPython.core.getipython import get_ipython
from IPython.terminal.shortcuts import auto_match as match
from IPython.terminal.shortcuts import auto_suggest
+from IPython.terminal.shortcuts.filters import filter_from_string
from IPython.utils.decorators import undoc
__all__ = ["create_ipython_shortcuts"]
-@undoc
-@Condition
-def cursor_in_leading_ws():
- before = get_app().current_buffer.document.current_line_before_cursor
- return (not before) or before.isspace()
-
-
-def has_focus(value: FocusableElement):
- """Wrapper around has_focus adding a nice `__name__` to tester function"""
- tester = has_focus_impl(value).func
- tester.__name__ = f"is_focused({value})"
- return Condition(tester)
-
-
-@undoc
-@Condition
-def has_line_below() -> bool:
- document = get_app().current_buffer.document
- return document.cursor_position_row < len(document.lines) - 1
-
-
-@undoc
-@Condition
-def has_line_above() -> bool:
- document = get_app().current_buffer.document
- return document.cursor_position_row != 0
-
-
-def create_ipython_shortcuts(shell, for_all_platforms: bool = False) -> KeyBindings:
- """Set up the prompt_toolkit keyboard shortcuts for IPython.
-
- Parameters
- ----------
- shell: InteractiveShell
- The current IPython shell Instance
- for_all_platforms: bool (default false)
- This parameter is mostly used in generating the documentation
- to create the shortcut binding for all the platforms, and export
- them.
-
- Returns
- -------
- KeyBindings
- the keybinding instance for prompt toolkit.
+@dataclass
+class BaseBinding:
+ command: Callable[[KeyPressEvent], Any]
+ keys: List[str]
- """
- # Warning: if possible, do NOT define handler functions in the locals
- # scope of this function, instead define functions in the global
- # scope, or a separate module, and include a user-friendly docstring
- # describing the action.
- kb = KeyBindings()
- insert_mode = vi_insert_mode | emacs_insert_mode
+@dataclass
+class RuntimeBinding(BaseBinding):
+ filter: Condition
- if getattr(shell, "handle_return", None):
- return_handler = shell.handle_return(shell)
- else:
- return_handler = newline_or_execute_outer(shell)
- kb.add("enter", filter=(has_focus(DEFAULT_BUFFER) & ~has_selection & insert_mode))(
- return_handler
- )
-
- @Condition
- def ebivim():
- return shell.emacs_bindings_in_vi_insert_mode
-
- @kb.add(
- "escape",
- "enter",
- filter=(has_focus(DEFAULT_BUFFER) & ~has_selection & insert_mode & ebivim),
- )
- def reformat_and_execute(event):
- """Reformat code and execute it"""
- reformat_text_before_cursor(
- event.current_buffer, event.current_buffer.document, shell
- )
- event.current_buffer.validate_and_handle()
-
- kb.add("c-\\")(quit)
-
- kb.add("c-p", filter=(vi_insert_mode & has_focus(DEFAULT_BUFFER)))(
- previous_history_or_previous_completion
- )
-
- kb.add("c-n", filter=(vi_insert_mode & has_focus(DEFAULT_BUFFER)))(
- next_history_or_next_completion
- )
-
- kb.add("c-g", filter=(has_focus(DEFAULT_BUFFER) & has_completions))(
- dismiss_completion
- )
-
- kb.add("c-c", filter=has_focus(DEFAULT_BUFFER))(reset_buffer)
-
- kb.add("c-c", filter=has_focus(SEARCH_BUFFER))(reset_search_buffer)
-
- supports_suspend = Condition(lambda: hasattr(signal, "SIGTSTP"))
- kb.add("c-z", filter=supports_suspend)(suspend_to_bg)
-
- # Ctrl+I == Tab
- kb.add(
- "tab",
- filter=(
- has_focus(DEFAULT_BUFFER)
- & ~has_selection
- & insert_mode
- & cursor_in_leading_ws
- ),
- )(indent_buffer)
- kb.add("c-o", filter=(has_focus(DEFAULT_BUFFER) & emacs_insert_mode))(
- newline_autoindent_outer(shell.input_transformer_manager)
- )
-
- kb.add("f2", filter=has_focus(DEFAULT_BUFFER))(open_input_in_editor)
-
- @Condition
- def auto_match():
- return shell.auto_match
-
- def all_quotes_paired(quote, buf):
- paired = True
- i = 0
- while i < len(buf):
- c = buf[i]
- if c == quote:
- paired = not paired
- elif c == "\\":
- i += 1
- i += 1
- return paired
-
- focused_insert = (vi_insert_mode | emacs_insert_mode) & has_focus(DEFAULT_BUFFER)
- _preceding_text_cache: Dict[Union[str, Callable], Condition] = {}
- _following_text_cache: Dict[Union[str, Callable], Condition] = {}
-
- def preceding_text(pattern: Union[str, Callable]):
- if pattern in _preceding_text_cache:
- return _preceding_text_cache[pattern]
-
- if callable(pattern):
-
- def _preceding_text():
- app = get_app()
- before_cursor = app.current_buffer.document.current_line_before_cursor
- # mypy can't infer if(callable): https://github.com/python/mypy/issues/3603
- return bool(pattern(before_cursor)) # type: ignore[operator]
+@dataclass
+class Binding(BaseBinding):
+ # while filter could be created by referencing variables directly (rather
+ # than created from strings), by using strings we ensure that users will
+ # be able to create filters in configuration (e.g. JSON) files too, which
+ # also benefits the documentation by enforcing human-readable filter names.
+ condition: Optional[str] = None
+ def __post_init__(self):
+ if self.condition:
+ self.filter = filter_from_string(self.condition)
else:
- m = re.compile(pattern)
-
- def _preceding_text():
- app = get_app()
- before_cursor = app.current_buffer.document.current_line_before_cursor
- return bool(m.match(before_cursor))
-
- _preceding_text.__name__ = f"preceding_text({pattern!r})"
-
- condition = Condition(_preceding_text)
- _preceding_text_cache[pattern] = condition
- return condition
-
- def following_text(pattern):
- try:
- return _following_text_cache[pattern]
- except KeyError:
- pass
- m = re.compile(pattern)
-
- def _following_text():
- app = get_app()
- return bool(m.match(app.current_buffer.document.current_line_after_cursor))
-
- _following_text.__name__ = f"following_text({pattern!r})"
+ self.filter = None
- condition = Condition(_following_text)
- _following_text_cache[pattern] = condition
- return condition
- @Condition
- def not_inside_unclosed_string():
- app = get_app()
- s = app.current_buffer.document.text_before_cursor
- # remove escaped quotes
- s = s.replace('\\"', "").replace("\\'", "")
- # remove triple-quoted string literals
- s = re.sub(r"(?:\"\"\"[\s\S]*\"\"\"|'''[\s\S]*''')", "", s)
- # remove single-quoted string literals
- s = re.sub(r"""(?:"[^"]*["\n]|'[^']*['\n])""", "", s)
- return not ('"' in s or "'" in s)
-
- # auto match
- for key, cmd in match.auto_match_parens.items():
- kb.add(key, filter=focused_insert & auto_match & following_text(r"[,)}\]]|$"))(
- cmd
- )
+def create_identifier(handler: Callable):
+ parts = handler.__module__.split(".")
+ name = handler.__name__
+ package = parts[0]
+ if len(parts) > 1:
+ final_module = parts[-1]
+ return f"{package}:{final_module}.{name}"
+ else:
+ return f"{package}:{name}"
- # raw string
- for key, cmd in match.auto_match_parens_raw_string.items():
- kb.add(
- key,
- filter=focused_insert & auto_match & preceding_text(r".*(r|R)[\"'](-*)$"),
- )(cmd)
-
- kb.add(
- '"',
- filter=focused_insert
- & auto_match
- & not_inside_unclosed_string
- & preceding_text(lambda line: all_quotes_paired('"', line))
- & following_text(r"[,)}\]]|$"),
- )(match.double_quote)
-
- kb.add(
- "'",
- filter=focused_insert
- & auto_match
- & not_inside_unclosed_string
- & preceding_text(lambda line: all_quotes_paired("'", line))
- & following_text(r"[,)}\]]|$"),
- )(match.single_quote)
-
- kb.add(
- '"',
- filter=focused_insert
- & auto_match
- & not_inside_unclosed_string
- & preceding_text(r'^.*""$'),
- )(match.docstring_double_quotes)
-
- kb.add(
- "'",
- filter=focused_insert
- & auto_match
- & not_inside_unclosed_string
- & preceding_text(r"^.*''$"),
- )(match.docstring_single_quotes)
-
- # just move cursor
- kb.add(")", filter=focused_insert & auto_match & following_text(r"^\)"))(
- match.skip_over
- )
- kb.add("]", filter=focused_insert & auto_match & following_text(r"^\]"))(
- match.skip_over
- )
- kb.add("}", filter=focused_insert & auto_match & following_text(r"^\}"))(
- match.skip_over
- )
- kb.add('"', filter=focused_insert & auto_match & following_text('^"'))(
- match.skip_over
- )
- kb.add("'", filter=focused_insert & auto_match & following_text("^'"))(
- match.skip_over
- )
- kb.add(
- "backspace",
- filter=focused_insert
- & preceding_text(r".*\($")
- & auto_match
- & following_text(r"^\)"),
- )(match.delete_pair)
- kb.add(
- "backspace",
- filter=focused_insert
- & preceding_text(r".*\[$")
- & auto_match
- & following_text(r"^\]"),
- )(match.delete_pair)
- kb.add(
- "backspace",
- filter=focused_insert
- & preceding_text(r".*\{$")
- & auto_match
- & following_text(r"^\}"),
- )(match.delete_pair)
- kb.add(
- "backspace",
- filter=focused_insert
- & preceding_text('.*"$')
- & auto_match
- & following_text('^"'),
- )(match.delete_pair)
- kb.add(
- "backspace",
- filter=focused_insert
- & preceding_text(r".*'$")
- & auto_match
- & following_text(r"^'"),
- )(match.delete_pair)
-
- if shell.display_completions == "readlinelike":
- kb.add(
- "c-i",
- filter=(
- has_focus(DEFAULT_BUFFER)
- & ~has_selection
- & insert_mode
- & ~cursor_in_leading_ws
- ),
- )(display_completions_like_readline)
-
- if sys.platform == "win32" or for_all_platforms:
- kb.add("c-v", filter=(has_focus(DEFAULT_BUFFER) & ~vi_mode))(win_paste)
-
- focused_insert_vi = has_focus(DEFAULT_BUFFER) & vi_insert_mode
-
- # autosuggestions
- @Condition
- def navigable_suggestions():
- return isinstance(
- shell.auto_suggest, auto_suggest.NavigableAutoSuggestFromHistory
+AUTO_MATCH_BINDINGS = [
+ *[
+ Binding(
+ cmd, [key], "focused_insert & auto_match & followed_by_closing_paren_or_end"
)
-
- kb.add("end", filter=has_focus(DEFAULT_BUFFER) & (ebivim | ~vi_insert_mode))(
- auto_suggest.accept_in_vi_insert_mode
- )
- kb.add("c-e", filter=focused_insert_vi & ebivim)(
- auto_suggest.accept_in_vi_insert_mode
- )
- kb.add("c-f", filter=focused_insert_vi)(auto_suggest.accept)
- kb.add("escape", "f", filter=focused_insert_vi & ebivim)(auto_suggest.accept_word)
- kb.add("c-right", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
- auto_suggest.accept_token
- )
- kb.add(
- "escape", filter=has_suggestion & has_focus(DEFAULT_BUFFER) & emacs_insert_mode
- )(auto_suggest.discard)
- kb.add(
- "up",
- filter=navigable_suggestions
- & ~has_line_above
- & has_suggestion
- & has_focus(DEFAULT_BUFFER),
- )(auto_suggest.swap_autosuggestion_up(shell.auto_suggest))
- kb.add(
- "down",
- filter=navigable_suggestions
- & ~has_line_below
- & has_suggestion
- & has_focus(DEFAULT_BUFFER),
- )(auto_suggest.swap_autosuggestion_down(shell.auto_suggest))
- kb.add(
- "up", filter=has_line_above & navigable_suggestions & has_focus(DEFAULT_BUFFER)
- )(auto_suggest.up_and_update_hint)
- kb.add(
- "down",
- filter=has_line_below & navigable_suggestions & has_focus(DEFAULT_BUFFER),
- )(auto_suggest.down_and_update_hint)
- kb.add("right", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
- auto_suggest.accept_character
- )
- kb.add("c-left", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
- auto_suggest.accept_and_move_cursor_left
- )
- kb.add("c-down", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
- auto_suggest.accept_and_keep_cursor
- )
- kb.add("backspace", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
- auto_suggest.backspace_and_resume_hint
- )
-
- # Simple Control keybindings
- key_cmd_dict = {
+ for key, cmd in match.auto_match_parens.items()
+ ],
+ *[
+ # raw string
+ Binding(cmd, [key], "focused_insert & auto_match & preceded_by_raw_str_prefix")
+ for key, cmd in match.auto_match_parens_raw_string.items()
+ ],
+ Binding(
+ match.double_quote,
+ ['"'],
+ "focused_insert"
+ " & auto_match"
+ " & not_inside_unclosed_string"
+ " & preceded_by_paired_double_quotes"
+ " & followed_by_closing_paren_or_end",
+ ),
+ Binding(
+ match.single_quote,
+ ["'"],
+ "focused_insert"
+ " & auto_match"
+ " & not_inside_unclosed_string"
+ " & preceded_by_paired_single_quotes"
+ " & followed_by_closing_paren_or_end",
+ ),
+ Binding(
+ match.docstring_double_quotes,
+ ['"'],
+ "focused_insert"
+ " & auto_match"
+ " & not_inside_unclosed_string"
+ " & preceded_by_two_double_quotes",
+ ),
+ Binding(
+ match.docstring_single_quotes,
+ ["'"],
+ "focused_insert"
+ " & auto_match"
+ " & not_inside_unclosed_string"
+ " & preceded_by_two_single_quotes",
+ ),
+ Binding(
+ match.skip_over,
+ [")"],
+ "focused_insert & auto_match & followed_by_closing_round_paren",
+ ),
+ Binding(
+ match.skip_over,
+ ["]"],
+ "focused_insert & auto_match & followed_by_closing_bracket",
+ ),
+ Binding(
+ match.skip_over,
+ ["}"],
+ "focused_insert & auto_match & followed_by_closing_brace",
+ ),
+ Binding(
+ match.skip_over, ['"'], "focused_insert & auto_match & followed_by_double_quote"
+ ),
+ Binding(
+ match.skip_over, ["'"], "focused_insert & auto_match & followed_by_single_quote"
+ ),
+ Binding(
+ match.delete_pair,
+ ["backspace"],
+ "focused_insert"
+ " & preceded_by_opening_round_paren"
+ " & auto_match"
+ " & followed_by_closing_round_paren",
+ ),
+ Binding(
+ match.delete_pair,
+ ["backspace"],
+ "focused_insert"
+ " & preceded_by_opening_bracket"
+ " & auto_match"
+ " & followed_by_closing_bracket",
+ ),
+ Binding(
+ match.delete_pair,
+ ["backspace"],
+ "focused_insert"
+ " & preceded_by_opening_brace"
+ " & auto_match"
+ " & followed_by_closing_brace",
+ ),
+ Binding(
+ match.delete_pair,
+ ["backspace"],
+ "focused_insert"
+ " & preceded_by_double_quote"
+ " & auto_match"
+ " & followed_by_double_quote",
+ ),
+ Binding(
+ match.delete_pair,
+ ["backspace"],
+ "focused_insert"
+ " & preceded_by_single_quote"
+ " & auto_match"
+ " & followed_by_single_quote",
+ ),
+]
+
+AUTO_SUGGEST_BINDINGS = [
+ Binding(
+ auto_suggest.accept_in_vi_insert_mode,
+ ["end"],
+ "default_buffer_focused & (ebivim | ~vi_insert_mode)",
+ ),
+ Binding(
+ auto_suggest.accept_in_vi_insert_mode,
+ ["c-e"],
+ "vi_insert_mode & default_buffer_focused & ebivim",
+ ),
+ Binding(auto_suggest.accept, ["c-f"], "vi_insert_mode & default_buffer_focused"),
+ Binding(
+ auto_suggest.accept_word,
+ ["escape", "f"],
+ "vi_insert_mode & default_buffer_focused & ebivim",
+ ),
+ Binding(
+ auto_suggest.accept_token,
+ ["c-right"],
+ "has_suggestion & default_buffer_focused",
+ ),
+ Binding(
+ auto_suggest.discard,
+ ["escape"],
+ "has_suggestion & default_buffer_focused & emacs_insert_mode",
+ ),
+ Binding(
+ auto_suggest.swap_autosuggestion_up,
+ ["up"],
+ "navigable_suggestions"
+ " & ~has_line_above"
+ " & has_suggestion"
+ " & default_buffer_focused",
+ ),
+ Binding(
+ auto_suggest.swap_autosuggestion_down,
+ ["down"],
+ "navigable_suggestions"
+ " & ~has_line_below"
+ " & has_suggestion"
+ " & default_buffer_focused",
+ ),
+ Binding(
+ auto_suggest.up_and_update_hint,
+ ["up"],
+ "has_line_above & navigable_suggestions & default_buffer_focused",
+ ),
+ Binding(
+ auto_suggest.down_and_update_hint,
+ ["down"],
+ "has_line_below & navigable_suggestions & default_buffer_focused",
+ ),
+ Binding(
+ auto_suggest.accept_character,
+ ["escape", "right"],
+ "has_suggestion & default_buffer_focused",
+ ),
+ Binding(
+ auto_suggest.accept_and_move_cursor_left,
+ ["c-left"],
+ "has_suggestion & default_buffer_focused",
+ ),
+ Binding(
+ auto_suggest.accept_and_keep_cursor,
+ ["c-down"],
+ "has_suggestion & default_buffer_focused",
+ ),
+ Binding(
+ auto_suggest.backspace_and_resume_hint,
+ ["backspace"],
+ "has_suggestion & default_buffer_focused",
+ ),
+]
+
+
+SIMPLE_CONTROL_BINDINGS = [
+ Binding(cmd, [key], "vi_insert_mode & default_buffer_focused & ebivim")
+ for key, cmd in {
"c-a": nc.beginning_of_line,
"c-b": nc.backward_char,
"c-k": nc.kill_line,
"c-w": nc.backward_kill_word,
"c-y": nc.yank,
"c-_": nc.undo,
- }
+ }.items()
+]
- for key, cmd in key_cmd_dict.items():
- kb.add(key, filter=focused_insert_vi & ebivim)(cmd)
- # Alt and Combo Control keybindings
- keys_cmd_dict = {
+ALT_AND_COMOBO_CONTROL_BINDINGS = [
+ Binding(cmd, list(keys), "vi_insert_mode & default_buffer_focused & ebivim")
+ for keys, cmd in {
# Control Combos
("c-x", "c-e"): nc.edit_and_execute,
("c-x", "e"): nc.edit_and_execute,
@@ -427,10 +282,48 @@ def navigable_suggestions():
("escape", "u"): nc.uppercase_word,
("escape", "y"): nc.yank_pop,
("escape", "."): nc.yank_last_arg,
- }
+ }.items()
+]
+
+
+def add_binding(bindings: KeyBindings, binding: Binding):
+ bindings.add(
+ *binding.keys,
+ **({"filter": binding.filter} if binding.filter is not None else {}),
+ )(binding.command)
+
+
+def create_ipython_shortcuts(shell, skip=None) -> KeyBindings:
+ """Set up the prompt_toolkit keyboard shortcuts for IPython.
- for keys, cmd in keys_cmd_dict.items():
- kb.add(*keys, filter=focused_insert_vi & ebivim)(cmd)
+ Parameters
+ ----------
+ shell: InteractiveShell
+ The current IPython shell Instance
+ skip: List[Binding]
+ Bindings to skip.
+
+ Returns
+ -------
+ KeyBindings
+ the keybinding instance for prompt toolkit.
+
+ """
+ kb = KeyBindings()
+ skip = skip or []
+ for binding in KEY_BINDINGS:
+ skip_this_one = False
+ for to_skip in skip:
+ if (
+ to_skip.command == binding.command
+ and to_skip.filter == binding.filter
+ and to_skip.keys == binding.keys
+ ):
+ skip_this_one = True
+ break
+ if skip_this_one:
+ continue
+ add_binding(kb, binding)
def get_input_mode(self):
app = get_app()
@@ -451,9 +344,19 @@ def set_input_mode(self, mode):
if shell.editing_mode == "vi" and shell.modal_cursor:
ViState._input_mode = InputMode.INSERT # type: ignore
ViState.input_mode = property(get_input_mode, set_input_mode) # type: ignore
+
return kb
+def reformat_and_execute(event):
+ """Reformat code and execute it"""
+ shell = get_ipython()
+ reformat_text_before_cursor(
+ event.current_buffer, event.current_buffer.document, shell
+ )
+ event.current_buffer.validate_and_handle()
+
+
def reformat_text_before_cursor(buffer, document, shell):
text = buffer.delete_before_cursor(len(document.text[: document.cursor_position]))
try:
@@ -463,6 +366,14 @@ def reformat_text_before_cursor(buffer, document, shell):
buffer.insert_text(text)
+def handle_return_or_newline_or_execute(event):
+ shell = get_ipython()
+ if getattr(shell, "handle_return", None):
+ return shell.handle_return(shell)(event)
+ else:
+ return newline_or_execute_outer(shell)(event)
+
+
def newline_or_execute_outer(shell):
def newline_or_execute(event):
"""When the user presses return, insert a newline or execute the code."""
@@ -512,8 +423,6 @@ def newline_or_execute(event):
else:
b.insert_text("\n")
- newline_or_execute.__qualname__ = "newline_or_execute"
-
return newline_or_execute
@@ -610,30 +519,24 @@ def newline_with_copy_margin(event):
b.cursor_right(count=pos_diff)
-def newline_autoindent_outer(inputsplitter) -> Callable[..., None]:
- """
- Return a function suitable for inserting a indented newline after the cursor.
+def newline_autoindent(event):
+ """Insert a newline after the cursor indented appropriately.
Fancier version of deprecated ``newline_with_copy_margin`` which should
compute the correct indentation of the inserted line. That is to say, indent
by 4 extra space after a function definition, class definition, context
manager... And dedent by 4 space after ``pass``, ``return``, ``raise ...``.
"""
+ shell = get_ipython()
+ inputsplitter = shell.input_transformer_manager
+ b = event.current_buffer
+ d = b.document
- def newline_autoindent(event):
- """Insert a newline after the cursor indented appropriately."""
- b = event.current_buffer
- d = b.document
-
- if b.complete_state:
- b.cancel_completion()
- text = d.text[: d.cursor_position] + "\n"
- _, indent = inputsplitter.check_complete(text)
- b.insert_text("\n" + (" " * (indent or 0)), move_cursor=False)
-
- newline_autoindent.__qualname__ = "newline_autoindent"
-
- return newline_autoindent
+ if b.complete_state:
+ b.cancel_completion()
+ text = d.text[: d.cursor_position] + "\n"
+ _, indent = inputsplitter.check_complete(text)
+ b.insert_text("\n" + (" " * (indent or 0)), move_cursor=False)
def open_input_in_editor(event):
@@ -666,5 +569,58 @@ def win_paste(event):
@undoc
def win_paste(event):
- """Stub used when auto-generating shortcuts for documentation"""
+ """Stub used on other platforms"""
pass
+
+
+KEY_BINDINGS = [
+ Binding(
+ handle_return_or_newline_or_execute,
+ ["enter"],
+ "default_buffer_focused & ~has_selection & insert_mode",
+ ),
+ Binding(
+ reformat_and_execute,
+ ["escape", "enter"],
+ "default_buffer_focused & ~has_selection & insert_mode & ebivim",
+ ),
+ Binding(quit, ["c-\\"]),
+ Binding(
+ previous_history_or_previous_completion,
+ ["c-p"],
+ "vi_insert_mode & default_buffer_focused",
+ ),
+ Binding(
+ next_history_or_next_completion,
+ ["c-n"],
+ "vi_insert_mode & default_buffer_focused",
+ ),
+ Binding(dismiss_completion, ["c-g"], "default_buffer_focused & has_completions"),
+ Binding(reset_buffer, ["c-c"], "default_buffer_focused"),
+ Binding(reset_search_buffer, ["c-c"], "search_buffer_focused"),
+ Binding(suspend_to_bg, ["c-z"], "supports_suspend"),
+ Binding(
+ indent_buffer,
+ ["tab"], # Ctrl+I == Tab
+ "default_buffer_focused"
+ " & ~has_selection"
+ " & insert_mode"
+ " & cursor_in_leading_ws",
+ ),
+ Binding(newline_autoindent, ["c-o"], "default_buffer_focused & emacs_insert_mode"),
+ Binding(open_input_in_editor, ["f2"], "default_buffer_focused"),
+ *AUTO_MATCH_BINDINGS,
+ *AUTO_SUGGEST_BINDINGS,
+ Binding(
+ display_completions_like_readline,
+ ["c-i"],
+ "readline_like_completions"
+ " & default_buffer_focused"
+ " & ~has_selection"
+ " & insert_mode"
+ " & ~cursor_in_leading_ws",
+ ),
+ Binding(win_paste, ["c-v"], "default_buffer_focused & ~vi_mode & is_windows_os"),
+ *SIMPLE_CONTROL_BINDINGS,
+ *ALT_AND_COMOBO_CONTROL_BINDINGS,
+]
diff --git a/IPython/terminal/shortcuts/auto_match.py b/IPython/terminal/shortcuts/auto_match.py
index 46cb1bd8754..6c2b1ef70c9 100644
--- a/IPython/terminal/shortcuts/auto_match.py
+++ b/IPython/terminal/shortcuts/auto_match.py
@@ -1,7 +1,7 @@
"""
-Utilities function for keybinding with prompt toolkit.
+Utilities function for keybinding with prompt toolkit.
-This will be bound to specific key press and filter modes,
+This will be bound to specific key press and filter modes,
like whether we are in edit mode, and whether the completer is open.
"""
import re
@@ -84,9 +84,9 @@ def raw_string_braces(event: KeyPressEvent):
def skip_over(event: KeyPressEvent):
- """Skip over automatically added parenthesis.
+ """Skip over automatically added parenthesis/quote.
- (rather than adding another parenthesis)"""
+ (rather than adding another parenthesis/quote)"""
event.current_buffer.cursor_right()
diff --git a/IPython/terminal/shortcuts/auto_suggest.py b/IPython/terminal/shortcuts/auto_suggest.py
index 3bfd6d54b83..0c193d9cec0 100644
--- a/IPython/terminal/shortcuts/auto_suggest.py
+++ b/IPython/terminal/shortcuts/auto_suggest.py
@@ -1,7 +1,7 @@
import re
import tokenize
from io import StringIO
-from typing import Callable, List, Optional, Union, Generator, Tuple, Sequence
+from typing import Callable, List, Optional, Union, Generator, Tuple
from prompt_toolkit.buffer import Buffer
from prompt_toolkit.key_binding import KeyPressEvent
@@ -16,6 +16,7 @@
TransformationInput,
)
+from IPython.core.getipython import get_ipython
from IPython.utils.tokenutil import generate_tokens
@@ -346,33 +347,29 @@ def _swap_autosuggestion(
buffer.suggestion = new_suggestion
-def swap_autosuggestion_up(provider: Provider):
- def swap_autosuggestion_up(event: KeyPressEvent):
- """Get next autosuggestion from history."""
- if not isinstance(provider, NavigableAutoSuggestFromHistory):
- return
+def swap_autosuggestion_up(event: KeyPressEvent):
+ """Get next autosuggestion from history."""
+ shell = get_ipython()
+ provider = shell.auto_suggest
- return _swap_autosuggestion(
- buffer=event.current_buffer, provider=provider, direction_method=provider.up
- )
+ if not isinstance(provider, NavigableAutoSuggestFromHistory):
+ return
- swap_autosuggestion_up.__name__ = "swap_autosuggestion_up"
- return swap_autosuggestion_up
+ return _swap_autosuggestion(
+ buffer=event.current_buffer, provider=provider, direction_method=provider.up
+ )
-def swap_autosuggestion_down(
- provider: Union[AutoSuggestFromHistory, NavigableAutoSuggestFromHistory, None]
-):
- def swap_autosuggestion_down(event: KeyPressEvent):
- """Get previous autosuggestion from history."""
- if not isinstance(provider, NavigableAutoSuggestFromHistory):
- return
+def swap_autosuggestion_down(event: KeyPressEvent):
+ """Get previous autosuggestion from history."""
+ shell = get_ipython()
+ provider = shell.auto_suggest
- return _swap_autosuggestion(
- buffer=event.current_buffer,
- provider=provider,
- direction_method=provider.down,
- )
+ if not isinstance(provider, NavigableAutoSuggestFromHistory):
+ return
- swap_autosuggestion_down.__name__ = "swap_autosuggestion_down"
- return swap_autosuggestion_down
+ return _swap_autosuggestion(
+ buffer=event.current_buffer,
+ provider=provider,
+ direction_method=provider.down,
+ )
diff --git a/IPython/terminal/shortcuts/filters.py b/IPython/terminal/shortcuts/filters.py
new file mode 100644
index 00000000000..a4a6213079d
--- /dev/null
+++ b/IPython/terminal/shortcuts/filters.py
@@ -0,0 +1,256 @@
+"""
+Filters restricting scope of IPython Terminal shortcuts.
+"""
+
+# Copyright (c) IPython Development Team.
+# Distributed under the terms of the Modified BSD License.
+
+import ast
+import re
+import signal
+import sys
+from typing import Callable, Dict, Union
+
+from prompt_toolkit.application.current import get_app
+from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
+from prompt_toolkit.filters import Condition, emacs_insert_mode, has_completions
+from prompt_toolkit.filters import has_focus as has_focus_impl
+from prompt_toolkit.filters import (
+ Always,
+ has_selection,
+ has_suggestion,
+ vi_insert_mode,
+ vi_mode,
+)
+from prompt_toolkit.layout.layout import FocusableElement
+
+from IPython.core.getipython import get_ipython
+from IPython.core.guarded_eval import _find_dunder, BINARY_OP_DUNDERS, UNARY_OP_DUNDERS
+from IPython.terminal.shortcuts import auto_suggest
+from IPython.utils.decorators import undoc
+
+
+@undoc
+@Condition
+def cursor_in_leading_ws():
+ before = get_app().current_buffer.document.current_line_before_cursor
+ return (not before) or before.isspace()
+
+
+def has_focus(value: FocusableElement):
+ """Wrapper around has_focus adding a nice `__name__` to tester function"""
+ tester = has_focus_impl(value).func
+ tester.__name__ = f"is_focused({value})"
+ return Condition(tester)
+
+
+@undoc
+@Condition
+def has_line_below() -> bool:
+ document = get_app().current_buffer.document
+ return document.cursor_position_row < len(document.lines) - 1
+
+
+@undoc
+@Condition
+def has_line_above() -> bool:
+ document = get_app().current_buffer.document
+ return document.cursor_position_row != 0
+
+
+@Condition
+def ebivim():
+ shell = get_ipython()
+ return shell.emacs_bindings_in_vi_insert_mode
+
+
+@Condition
+def supports_suspend():
+ return hasattr(signal, "SIGTSTP")
+
+
+@Condition
+def auto_match():
+ shell = get_ipython()
+ return shell.auto_match
+
+
+def all_quotes_paired(quote, buf):
+ paired = True
+ i = 0
+ while i < len(buf):
+ c = buf[i]
+ if c == quote:
+ paired = not paired
+ elif c == "\\":
+ i += 1
+ i += 1
+ return paired
+
+
+_preceding_text_cache: Dict[Union[str, Callable], Condition] = {}
+_following_text_cache: Dict[Union[str, Callable], Condition] = {}
+
+
+def preceding_text(pattern: Union[str, Callable]):
+ if pattern in _preceding_text_cache:
+ return _preceding_text_cache[pattern]
+
+ if callable(pattern):
+
+ def _preceding_text():
+ app = get_app()
+ before_cursor = app.current_buffer.document.current_line_before_cursor
+ # mypy can't infer if(callable): https://github.com/python/mypy/issues/3603
+ return bool(pattern(before_cursor)) # type: ignore[operator]
+
+ else:
+ m = re.compile(pattern)
+
+ def _preceding_text():
+ app = get_app()
+ before_cursor = app.current_buffer.document.current_line_before_cursor
+ return bool(m.match(before_cursor))
+
+ _preceding_text.__name__ = f"preceding_text({pattern!r})"
+
+ condition = Condition(_preceding_text)
+ _preceding_text_cache[pattern] = condition
+ return condition
+
+
+def following_text(pattern):
+ try:
+ return _following_text_cache[pattern]
+ except KeyError:
+ pass
+ m = re.compile(pattern)
+
+ def _following_text():
+ app = get_app()
+ return bool(m.match(app.current_buffer.document.current_line_after_cursor))
+
+ _following_text.__name__ = f"following_text({pattern!r})"
+
+ condition = Condition(_following_text)
+ _following_text_cache[pattern] = condition
+ return condition
+
+
+@Condition
+def not_inside_unclosed_string():
+ app = get_app()
+ s = app.current_buffer.document.text_before_cursor
+ # remove escaped quotes
+ s = s.replace('\\"', "").replace("\\'", "")
+ # remove triple-quoted string literals
+ s = re.sub(r"(?:\"\"\"[\s\S]*\"\"\"|'''[\s\S]*''')", "", s)
+ # remove single-quoted string literals
+ s = re.sub(r"""(?:"[^"]*["\n]|'[^']*['\n])""", "", s)
+ return not ('"' in s or "'" in s)
+
+
+@Condition
+def navigable_suggestions():
+ shell = get_ipython()
+ return isinstance(shell.auto_suggest, auto_suggest.NavigableAutoSuggestFromHistory)
+
+
+@Condition
+def readline_like_completions():
+ shell = get_ipython()
+ return shell.display_completions == "readlinelike"
+
+
+@Condition
+def is_windows_os():
+ return sys.platform == "win32"
+
+
+# these one is callable and re-used multiple times hence needs to be
+# only defined once beforhand so that transforming back to human-readable
+# names works well in the documentation.
+default_buffer_focused = has_focus(DEFAULT_BUFFER)
+
+KEYBINDING_FILTERS = {
+ "always": Always(),
+ "has_line_below": has_line_below,
+ "has_line_above": has_line_above,
+ "has_selection": has_selection,
+ "has_suggestion": has_suggestion,
+ "vi_mode": vi_mode,
+ "vi_insert_mode": vi_insert_mode,
+ "emacs_insert_mode": emacs_insert_mode,
+ "has_completions": has_completions,
+ "insert_mode": vi_insert_mode | emacs_insert_mode,
+ "default_buffer_focused": default_buffer_focused,
+ "search_buffer_focused": has_focus(SEARCH_BUFFER),
+ "ebivim": ebivim,
+ "supports_suspend": supports_suspend,
+ "is_windows_os": is_windows_os,
+ "auto_match": auto_match,
+ "focused_insert": (vi_insert_mode | emacs_insert_mode) & default_buffer_focused,
+ "not_inside_unclosed_string": not_inside_unclosed_string,
+ "readline_like_completions": readline_like_completions,
+ "preceded_by_paired_double_quotes": preceding_text(
+ lambda line: all_quotes_paired('"', line)
+ ),
+ "preceded_by_paired_single_quotes": preceding_text(
+ lambda line: all_quotes_paired("'", line)
+ ),
+ "preceded_by_raw_str_prefix": preceding_text(r".*(r|R)[\"'](-*)$"),
+ "preceded_by_two_double_quotes": preceding_text(r'^.*""$'),
+ "preceded_by_two_single_quotes": preceding_text(r"^.*''$"),
+ "followed_by_closing_paren_or_end": following_text(r"[,)}\]]|$"),
+ "preceded_by_opening_round_paren": preceding_text(r".*\($"),
+ "preceded_by_opening_bracket": preceding_text(r".*\[$"),
+ "preceded_by_opening_brace": preceding_text(r".*\{$"),
+ "preceded_by_double_quote": preceding_text('.*"$'),
+ "preceded_by_single_quote": preceding_text(r".*'$"),
+ "followed_by_closing_round_paren": following_text(r"^\)"),
+ "followed_by_closing_bracket": following_text(r"^\]"),
+ "followed_by_closing_brace": following_text(r"^\}"),
+ "followed_by_double_quote": following_text('^"'),
+ "followed_by_single_quote": following_text("^'"),
+ "navigable_suggestions": navigable_suggestions,
+ "cursor_in_leading_ws": cursor_in_leading_ws,
+}
+
+
+def eval_node(node: Union[ast.AST, None]):
+ if node is None:
+ return None
+ if isinstance(node, ast.Expression):
+ return eval_node(node.body)
+ if isinstance(node, ast.BinOp):
+ left = eval_node(node.left)
+ right = eval_node(node.right)
+ dunders = _find_dunder(node.op, BINARY_OP_DUNDERS)
+ if dunders:
+ return getattr(left, dunders[0])(right)
+ raise ValueError(f"Unknown binary operation: {node.op}")
+ if isinstance(node, ast.UnaryOp):
+ value = eval_node(node.operand)
+ dunders = _find_dunder(node.op, UNARY_OP_DUNDERS)
+ if dunders:
+ return getattr(value, dunders[0])()
+ raise ValueError(f"Unknown unary operation: {node.op}")
+ if isinstance(node, ast.Name):
+ if node.id in KEYBINDING_FILTERS:
+ return KEYBINDING_FILTERS[node.id]
+ else:
+ sep = "\n - "
+ known_filters = sep.join(sorted(KEYBINDING_FILTERS))
+ raise NameError(
+ f"{node.id} is not a known shortcut filter."
+ f" Known filters are: {sep}{known_filters}."
+ )
+ raise ValueError("Unhandled node", ast.dump(node))
+
+
+def filter_from_string(code: str):
+ expression = ast.parse(code, mode="eval")
+ return eval_node(expression)
+
+
+__all__ = ["KEYBINDING_FILTERS", "filter_from_string"]
diff --git a/docs/autogen_shortcuts.py b/docs/autogen_shortcuts.py
index f8fd17bb51f..15bb0eed6cc 100755
--- a/docs/autogen_shortcuts.py
+++ b/docs/autogen_shortcuts.py
@@ -1,7 +1,7 @@
from dataclasses import dataclass
from inspect import getsource
from pathlib import Path
-from typing import cast, Callable, List, Union
+from typing import cast, List, Union
from html import escape as html_escape
import re
@@ -10,7 +10,8 @@
from prompt_toolkit.filters import Filter, Condition
from prompt_toolkit.shortcuts import PromptSession
-from IPython.terminal.shortcuts import create_ipython_shortcuts
+from IPython.terminal.shortcuts import create_ipython_shortcuts, create_identifier
+from IPython.terminal.shortcuts.filters import KEYBINDING_FILTERS
@dataclass
@@ -44,11 +45,16 @@ class _Invert(Filter):
filter: Filter
-conjunctions_labels = {"_AndList": "and", "_OrList": "or"}
+conjunctions_labels = {"_AndList": "&", "_OrList": "|"}
ATOMIC_CLASSES = {"Never", "Always", "Condition"}
+HUMAN_NAMES_FOR_FILTERS = {
+ filter_: name for name, filter_ in KEYBINDING_FILTERS.items()
+}
+
+
def format_filter(
filter_: Union[Filter, _NestedFilter, Condition, _Invert],
is_top_level=True,
@@ -58,6 +64,8 @@ def format_filter(
s = filter_.__class__.__name__
if s == "Condition":
func = cast(Condition, filter_).func
+ if filter_ in HUMAN_NAMES_FOR_FILTERS:
+ return HUMAN_NAMES_FOR_FILTERS[filter_]
name = func.__name__
if name == "<lambda>":
source = getsource(func)
@@ -66,10 +74,12 @@ def format_filter(
elif s == "_Invert":
operand = cast(_Invert, filter_).filter
if operand.__class__.__name__ in ATOMIC_CLASSES:
- return f"not {format_filter(operand, is_top_level=False)}"
- return f"not ({format_filter(operand, is_top_level=False)})"
+ return f"~{format_filter(operand, is_top_level=False)}"
+ return f"~({format_filter(operand, is_top_level=False)})"
elif s in conjunctions_labels:
filters = cast(_NestedFilter, filter_).filters
+ if filter_ in HUMAN_NAMES_FOR_FILTERS:
+ return HUMAN_NAMES_FOR_FILTERS[filter_]
conjunction = conjunctions_labels[s]
glue = f" {conjunction} "
result = glue.join(format_filter(x, is_top_level=False) for x in filters)
@@ -104,17 +114,6 @@ class _DummyTerminal:
auto_suggest = None
-def create_identifier(handler: Callable):
- parts = handler.__module__.split(".")
- name = handler.__name__
- package = parts[0]
- if len(parts) > 1:
- final_module = parts[-1]
- return f"{package}:{final_module}.{name}"
- else:
- return f"{package}:{name}"
-
-
def bindings_from_prompt_toolkit(prompt_bindings: KeyBindingsBase) -> List[Binding]:
"""Collect bindings to a simple format that does not depend on prompt-toolkit internals"""
bindings: List[Binding] = []
@@ -178,11 +177,12 @@ def to_rst(key):
return result
+
if __name__ == '__main__':
here = Path(__file__).parent
dest = here / "source" / "config" / "shortcuts"
- ipy_bindings = create_ipython_shortcuts(_DummyTerminal(), for_all_platforms=True)
+ ipy_bindings = create_ipython_shortcuts(_DummyTerminal())
session = PromptSession(key_bindings=ipy_bindings)
prompt_bindings = session.app.key_bindings
diff --git a/docs/environment.yml b/docs/environment.yml
index 9961253138a..9fe7d4a9cce 100644
--- a/docs/environment.yml
+++ b/docs/environment.yml
@@ -16,3 +16,4 @@ dependencies:
- prompt_toolkit
- ipykernel
- stack_data
+ - -e ..
diff --git a/docs/source/config/details.rst b/docs/source/config/details.rst
index 3cc310a4b96..c002d9a923a 100644
--- a/docs/source/config/details.rst
+++ b/docs/source/config/details.rst
@@ -200,10 +200,20 @@ With (X)EMacs >= 24, You can enable IPython in python-mode with:
Keyboard Shortcuts
==================
+.. versionadded:: 8.11
+
+You can modify, disable or modify keyboard shortcuts for IPython Terminal using
+:std:configtrait:`TerminalInteractiveShell.shortcuts` traitlet.
+
+The list of shortcuts is available in the Configuring IPython :ref:`terminal-shortcuts-list` section.
+
+Advanced configuration
+----------------------
+
.. versionchanged:: 5.0
-You can customise keyboard shortcuts for terminal IPython. Put code like this in
-a :ref:`startup file <startup_files>`::
+Creating custom commands requires adding custom code to a
+:ref:`startup file <startup_files>`::
from IPython import get_ipython
from prompt_toolkit.enums import DEFAULT_BUFFER
diff --git a/docs/source/config/shortcuts/index.rst b/docs/source/config/shortcuts/index.rst
index e361ec26c5d..42fd6acfd33 100755
--- a/docs/source/config/shortcuts/index.rst
+++ b/docs/source/config/shortcuts/index.rst
@@ -1,8 +1,10 @@
+.. _terminal-shortcuts-list:
+
=================
IPython shortcuts
=================
-Available shortcuts in an IPython terminal.
+Shortcuts available in an IPython terminal.
.. note::
@@ -12,7 +14,10 @@ Available shortcuts in an IPython terminal.
* Comma-separated keys, e.g. :kbd:`Esc`, :kbd:`f`, indicate a sequence which can be activated by pressing the listed keys in succession.
* Plus-separated keys, e.g. :kbd:`Esc` + :kbd:`f` indicate a combination which requires pressing all keys simultaneously.
-* Hover over the ⓘ icon in the filter column to see when the shortcut is active.g
+* Hover over the ⓘ icon in the filter column to see when the shortcut is active.
+
+You can use :std:configtrait:`TerminalInteractiveShell.shortcuts` configuration
+to modify, disable or add shortcuts.
.. role:: raw-html(raw)
:format: html
diff --git a/docs/source/whatsnew/pr/shortcuts-config-traitlet.rst b/docs/source/whatsnew/pr/shortcuts-config-traitlet.rst
new file mode 100644
index 00000000000..8d3ce11d889
--- /dev/null
+++ b/docs/source/whatsnew/pr/shortcuts-config-traitlet.rst
@@ -0,0 +1,21 @@
+Terminal shortcuts customization
+================================
+
+Previously modifying shortcuts was only possible by hooking into startup files
+and practically limited to adding new shortcuts or removing all shortcuts bound
+to a specific key. This release enables users to override existing terminal
+shortcuts, disable them or add new keybindings.
+
+For example, to set the :kbd:`right` to accept a single character of auto-suggestion
+you could use::
+
+ my_shortcuts = [
+ {
+ "command": "IPython:auto_suggest.accept_character",
+ "new_keys": ["right"]
+ }
+ ]
+ %config TerminalInteractiveShell.shortcuts = my_shortcuts
+
+You can learn more in :std:configtrait:`TerminalInteractiveShell.shortcuts`
+configuration reference.
\ No newline at end of file
| diff --git a/IPython/terminal/tests/test_interactivshell.py b/IPython/terminal/tests/test_interactivshell.py
index 01008d78369..ae7da217f1d 100644
--- a/IPython/terminal/tests/test_interactivshell.py
+++ b/IPython/terminal/tests/test_interactivshell.py
@@ -9,9 +9,8 @@
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory
-from IPython.core.inputtransformer import InputTransformer
+
from IPython.testing import tools as tt
-from IPython.utils.capture import capture_output
from IPython.terminal.ptutils import _elide, _adjust_completion_text_based_on_context
from IPython.terminal.shortcuts.auto_suggest import NavigableAutoSuggestFromHistory
diff --git a/IPython/terminal/tests/test_shortcuts.py b/IPython/terminal/tests/test_shortcuts.py
index 309205d4f54..18c9daba929 100644
--- a/IPython/terminal/tests/test_shortcuts.py
+++ b/IPython/terminal/tests/test_shortcuts.py
@@ -11,6 +11,8 @@
swap_autosuggestion_up,
swap_autosuggestion_down,
)
+from IPython.terminal.shortcuts.auto_match import skip_over
+from IPython.terminal.shortcuts import create_ipython_shortcuts
from prompt_toolkit.history import InMemoryHistory
from prompt_toolkit.buffer import Buffer
@@ -192,18 +194,20 @@ def test_autosuggest_token_empty():
def test_other_providers():
"""Ensure that swapping autosuggestions does not break with other providers"""
provider = AutoSuggestFromHistory()
- up = swap_autosuggestion_up(provider)
- down = swap_autosuggestion_down(provider)
+ ip = get_ipython()
+ ip.auto_suggest = provider
event = Mock()
event.current_buffer = Buffer()
- assert up(event) is None
- assert down(event) is None
+ assert swap_autosuggestion_up(event) is None
+ assert swap_autosuggestion_down(event) is None
async def test_navigable_provider():
provider = NavigableAutoSuggestFromHistory()
history = InMemoryHistory(history_strings=["very_a", "very", "very_b", "very_c"])
buffer = Buffer(history=history)
+ ip = get_ipython()
+ ip.auto_suggest = provider
async for _ in history.load():
pass
@@ -211,8 +215,8 @@ async def test_navigable_provider():
buffer.cursor_position = 5
buffer.text = "very"
- up = swap_autosuggestion_up(provider)
- down = swap_autosuggestion_down(provider)
+ up = swap_autosuggestion_up
+ down = swap_autosuggestion_down
event = Mock()
event.current_buffer = buffer
@@ -254,14 +258,16 @@ async def test_navigable_provider_multiline_entries():
provider = NavigableAutoSuggestFromHistory()
history = InMemoryHistory(history_strings=["very_a\nvery_b", "very_c"])
buffer = Buffer(history=history)
+ ip = get_ipython()
+ ip.auto_suggest = provider
async for _ in history.load():
pass
buffer.cursor_position = 5
buffer.text = "very"
- up = swap_autosuggestion_up(provider)
- down = swap_autosuggestion_down(provider)
+ up = swap_autosuggestion_up
+ down = swap_autosuggestion_down
event = Mock()
event.current_buffer = buffer
@@ -316,3 +322,140 @@ def test_navigable_provider_connection():
session_1.default_buffer.on_text_insert.fire()
session_2.default_buffer.on_text_insert.fire()
assert provider.skip_lines == 3
+
+
[email protected]
+def ipython_with_prompt():
+ ip = get_ipython()
+ ip.pt_app = Mock()
+ ip.pt_app.key_bindings = create_ipython_shortcuts(ip)
+ try:
+ yield ip
+ finally:
+ ip.pt_app = None
+
+
+def find_bindings_by_command(command):
+ ip = get_ipython()
+ return [
+ binding
+ for binding in ip.pt_app.key_bindings.bindings
+ if binding.handler == command
+ ]
+
+
+def test_modify_unique_shortcut(ipython_with_prompt):
+ original = find_bindings_by_command(accept_token)
+ assert len(original) == 1
+
+ ipython_with_prompt.shortcuts = [
+ {"command": "IPython:auto_suggest.accept_token", "new_keys": ["a", "b", "c"]}
+ ]
+ matched = find_bindings_by_command(accept_token)
+ assert len(matched) == 1
+ assert list(matched[0].keys) == ["a", "b", "c"]
+ assert list(matched[0].keys) != list(original[0].keys)
+ assert matched[0].filter == original[0].filter
+
+ ipython_with_prompt.shortcuts = [
+ {"command": "IPython:auto_suggest.accept_token", "new_filter": "always"}
+ ]
+ matched = find_bindings_by_command(accept_token)
+ assert len(matched) == 1
+ assert list(matched[0].keys) != ["a", "b", "c"]
+ assert list(matched[0].keys) == list(original[0].keys)
+ assert matched[0].filter != original[0].filter
+
+
+def test_disable_shortcut(ipython_with_prompt):
+ matched = find_bindings_by_command(accept_token)
+ assert len(matched) == 1
+
+ ipython_with_prompt.shortcuts = [
+ {"command": "IPython:auto_suggest.accept_token", "new_keys": []}
+ ]
+ matched = find_bindings_by_command(accept_token)
+ assert len(matched) == 0
+
+ ipython_with_prompt.shortcuts = []
+ matched = find_bindings_by_command(accept_token)
+ assert len(matched) == 1
+
+
+def test_modify_shortcut_with_filters(ipython_with_prompt):
+ matched = find_bindings_by_command(skip_over)
+ matched_keys = {m.keys[0] for m in matched}
+ assert matched_keys == {")", "]", "}", "'", '"'}
+
+ with pytest.raises(ValueError, match="Multiple shortcuts matching"):
+ ipython_with_prompt.shortcuts = [
+ {"command": "IPython:auto_match.skip_over", "new_keys": ["x"]}
+ ]
+
+ ipython_with_prompt.shortcuts = [
+ {
+ "command": "IPython:auto_match.skip_over",
+ "new_keys": ["x"],
+ "match_filter": "focused_insert & auto_match & followed_by_single_quote",
+ }
+ ]
+ matched = find_bindings_by_command(skip_over)
+ matched_keys = {m.keys[0] for m in matched}
+ assert matched_keys == {")", "]", "}", "x", '"'}
+
+
+def example_command():
+ pass
+
+
+def test_add_shortcut_for_new_command(ipython_with_prompt):
+ matched = find_bindings_by_command(example_command)
+ assert len(matched) == 0
+
+ with pytest.raises(ValueError, match="example_command is not a known"):
+ ipython_with_prompt.shortcuts = [
+ {"command": "example_command", "new_keys": ["x"]}
+ ]
+ matched = find_bindings_by_command(example_command)
+ assert len(matched) == 0
+
+
+def test_modify_shortcut_failure(ipython_with_prompt):
+ with pytest.raises(ValueError, match="No shortcuts matching"):
+ ipython_with_prompt.shortcuts = [
+ {
+ "command": "IPython:auto_match.skip_over",
+ "match_keys": ["x"],
+ "new_keys": ["y"],
+ }
+ ]
+
+
+def test_add_shortcut_for_existing_command(ipython_with_prompt):
+ matched = find_bindings_by_command(skip_over)
+ assert len(matched) == 5
+
+ with pytest.raises(ValueError, match="Cannot add a shortcut without keys"):
+ ipython_with_prompt.shortcuts = [
+ {"command": "IPython:auto_match.skip_over", "new_keys": [], "create": True}
+ ]
+
+ ipython_with_prompt.shortcuts = [
+ {"command": "IPython:auto_match.skip_over", "new_keys": ["x"], "create": True}
+ ]
+ matched = find_bindings_by_command(skip_over)
+ assert len(matched) == 6
+
+ ipython_with_prompt.shortcuts = []
+ matched = find_bindings_by_command(skip_over)
+ assert len(matched) == 5
+
+
+def test_setting_shortcuts_before_pt_app_init():
+ ipython = get_ipython()
+ assert ipython.pt_app is None
+ shortcuts = [
+ {"command": "IPython:auto_match.skip_over", "new_keys": ["x"], "create": True}
+ ]
+ ipython.shortcuts = shortcuts
+ assert ipython.shortcuts == shortcuts
| Improve autocomplete UX
Hi,
IPython recently introduced hinted suggestions as input is being typed. The user can accept the suggestion by pressing END or RIGHT. Alternatively, the user can scroll through other prefix matches in the history by pressing UP (and DOWN). However, all these modes of navigation move the cursor to the end of the line. It is impossible to accept a prefix of a hinted suggestion.
We would like to propose keeping the cursor in place and naturally supporting the cursor movement with the logic of “accept anything that is on the LHS of the cursor”. This would allow reusing long prefixes without the need to accept the entire line and make edits from its end.
For example, suppose the history includes
very.long.module.foo.func()
very.long.module.bar.Baz()
The user types the prefix “very.”. The hinted suggestion would be “long.module.bar.Baz()”. The user can now press:
1. RIGHT/CTRL-RIGHT to accept letters/words from the hinted completion. This would make it easier to type “very.long.module.bar.Zap()”.
2. END to accept the entire suggestion.
3. UP to replace the hinted suggestion with “long.module.foo.func()” (cursor stays in place).
4. BACKSPACE to delete last character and resume hinting from the new prefix (currently, it aborts hinting).
5. LEFT to accept the hint and move the cursor to the left.
6. New key binding to accept the suggestion but keep cursor in place.
Thoughts?
| I like this proposal, especially suggestions (1), (2), (3), (4).
Currently accepting word-by-word is possible using <kbd>Alt</kbd> + <kbd>f</kbd> shortcut (or <kbd>Esc</kbd> followed by <kbd>f</kbd>), but the behaviour could be improved and better documented. Currently the definition of "word" is very simplistic (based on spaces only), e.g. `def output_many_nodes(tag: str, n=50000):` completes in order:
- `def `
- `output_many_nodes(tag: `
- `str, `
- `n=50000):`
To achieve property-by-property completion (`very.long.module.foo.func()`) we should use a proper Python tokenizer instead, possibly merging consecutive 1-character tokens together, so that `n=`, `):` and `()` are completed together.
> (5) LEFT to accept the hint and move the cursor to the left.
This might not always what the user wants and even annoying outside the happy path. If the user makes a typo left to the cursor and get incorrect hint as a consequence, they may want to edit the typo and then get resumed hinting rather than get the (incorrect) hint accepted (and then need to fix both the typo and remove incorrect hint)
> (6) New key binding to accept the suggestion but keep cursor in place.
There are already many key bindings for this feature and more were proposed (https://github.com/ipython/ipython/pull/12589). It would be fine if we can find something which is intuitive for most users, but otherwise maybe this could be behind a setting to avoid adding too many default key bindings?
Fish-shell also uses <kbd>Alt</kbd> + <kbd>→</kbd> (in addition to <kbd>Alt</kbd> + <kbd>f</kbd>) for word-by-word suggestions ([ref](https://fishshell.com/docs/current/interactive.html#autosuggestions)).
> This might not always what the user wants and even annoying outside the happy path.
That makes sense, let's drop 5.
> It would be fine if we can find something which is intuitive for most users, but otherwise maybe this could be behind a setting to avoid adding too many default key bindings?
Yes. Similar to https://github.com/ipython/ipython/issues/13879#issuecomment-1371270698, maybe we should allow for much greater user customization of key-bindings.
Trying @krassowski implementation the main problem I feel with `UP to replace the hinted suggestion with “long.module.foo.func()” (cursor stays in place).` Is that it becomes hard to navigate to previous line as it's not obvious how to dismiss the autosuggestion.
One of the question we can add is what difference do you see between the completer and autosuggest in practice (right now, completer inspect and autosuggest is from history).
Should we extend the completion pop up to also have suggestion from history ?
I was about to make a "regression in 8.9" issue until I saw this in the release notes. It's really awesome to see work being done on this, but very much looking forward to having these settings be configurable. Using <kbd>→</kbd> to autocomplete the entire line is very hard-wired into my brain, and zsh's autocomplete also uses <kbd>→</kbd> to autocomplete the entire line, so it's pretty hard to deal with the context switching of different commands to use in different terminals.
Not being able to autocomplete the suggestion with a single `→` in IPython 8.9.0 is pretty annoying, especially https://github.com/zsh-users/zsh-autosuggestions also completes the entire suggestion with a single `→`.
How about changing the default behavior of `→` to accept the full suggestion or make it configurable instead?
Temporary workaround:
Change
https://github.com/ipython/ipython/blob/14faa28ac6fe61efab730e87a965c44038869c4c/IPython/terminal/shortcuts/__init__.py#L390-L392
to
```python
kb.add("right", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
auto_suggest.accept
)
```
It might be necessary to delete `__pycache__` too if you are editing files under `/usr/lib/python3.10/site-packages/IPython`.
Thank you all for the feedback! Reopening to make this issue easier to find.
I plan to work on enabling shortcut customisation this weekend. In the meantime, you do not need to modify IPython code to revert to the previous behaviour - it is sufficient to hook in the following line:
```python
get_ipython().pt_app.key_bindings.remove('right')
```
Please also note that you can use <kbd>Ctrl</kbd> + <kbd>Right</kbd> to complete token-by-token.
> it is sufficient to hook in the following line:
>
> ```python
> get_ipython().pt_app.key_bindings.remove('right')
> ```
Thanks. The one I was looking for is
```
get_ipython().pt_app.key_bindings.remove('up')
```
Is there a way to make that setting persistent?
The behaviour that I use a lot is to type the first character(s) of a previously entered line and then push `up` (potentially more than once) and then `enter` to rerun the line (usually without any modifications). For example the line might be `edit temp.py` and I probably end up running it repeatedly which I can do very quickly with `e`, `up`, `enter` but sometimes it will be more like `e`, `up`, `up`, `enter` or perhaps a bit of `up` and `down` to find the line I want.
Now the most recent match is shown automatically after `e` and when I press `up` the previous matches are shown but `enter` will not run the whole line unless I first press the `end` key. Now it's `e`, `end`, `enter` for the most recent match or `e`, `up`, `end`, `enter` and going from `up` to `end` is awkward on this keyboard. It also means I have to choose whether to press `e`, `up` or `e`, `end` depending on whether I want the most recent match because if you press `e`, `end` then it's too late to try pressing `up` afterwards and if you press `e`, `up` then you've already skipped the most likely match. Previously it was a very quick `e`, `up` then I have a split second to see if it's the right line and I can choose between `enter` or pressing `up` again.
Also not all keyboards have an `end` key e.g. I have a Mac laptop which does not. Ctrl-e works there instead but that's also a more awkward key combination to aim for than just `enter`.
Thank you for a very detailed example. As mentioned before, I am working on enabling persistent shortcut customisation (including disabling shortcuts). You can also use <kbd>esc</kbd> to dismiss the autosuggestions, this will allow you to use up/down.
I see complaints about the `right` behavior change, which I also bother with.
I use `right` to accept a suggested command quite often as well.
Since the large amount of users who may be used to this, I recommend the old behavior to be set as default.
> Thank you for a very detailed example. As mentioned before, I am working on enabling persistent shortcut customisation (including disabling shortcuts). You can also use esc to dismiss the autosuggestions, this will allow you to use up/down.
Great! I hope all the cranky people like me don't dissuade you too much from contributing. It's always a pain making changes to structure to heavily used and important projects precisely because of the humans who have baked in certain muscle memory for usage. Thanks for all the work. | 2023-02-05T22:56:36Z | 2023-02-13T09:29:11Z | ["IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=50)-:-:]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[d-ef out(tag: str, n=50):-e]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def ou-t(tag: str, n=50):-t(]", "IPython/terminal/tests/test_interactivshell.py::TestElide::test_elide", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(t-ag: str, n=50):-ag: ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str,- n=50):- n]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def -out(tag: str, n=50):-out(]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n-=50):-=]", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[de-f out(tag: str, n=50):-f ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[d-ef out(tag: str, n=50):-ef ]", "IPython/terminal/tests/test_interactivshell.py::TestElide::test_elide_typed_normal", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[-def out(tag: str, n=50):-def ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, -n=50):-n=]", "IPython/terminal/tests/test_interactivshell.py::TestElide::test_elide_typed_no_match", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str-, n=50):-, n]", "IPython/terminal/tests/test_shortcuts.py::test_discard[-def out(tag: str, n=50):]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: -str, n=50):-str, ]", "IPython/terminal/tests/test_interactivshell.py::TestAutoSuggest::test_changing_provider", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: s-tr, n=50):-tr, ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[-def out(tag: str, n=50):-def ]", "IPython/terminal/tests/test_shortcuts.py::test_accept_and_keep_cursor[-def out(tag: str, n=50):-def out(tag: str, n=50):-0]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[-def out(tag: str, n=50):-d]", "IPython/terminal/tests/test_shortcuts.py::test_accept[def -out(tag: str, n=50):-out(tag: str, n=50):]", "IPython/terminal/tests/test_interactivshell.py::InteractiveShellTestCase::test_repl_not_plain_text", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out-(tag: str, n=50):-(]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(-tag: str, n=50):-tag: ]", "IPython/terminal/tests/test_shortcuts.py::test_discard[def -out(tag: str, n=50):]", "IPython/terminal/tests/test_interactivshell.py::TestElide::test_elide_typed_short_match", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[d-ef out(tag: str, n=50):-ef ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-3-123456789-False]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[de -f out(tag: str, n=50):-f]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def- out(tag: str, n=50):- ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=-50):-50)]", "IPython/terminal/tests/test_shortcuts.py::test_accept[-def out(tag: str, n=50):-def out(tag: str, n=50):]", "IPython/terminal/tests/test_interactivshell.py::TestContextAwareCompletion::test_adjust_completion_text_based_on_context", "IPython/terminal/tests/test_interactivshell.py::InteractiveShellTestCase::test_inputtransformer_syntaxerror", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def o-ut(tag: str, n=50):-ut(]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(ta-g: str, n=50):-g: ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: st-r, n=50):-r, ]", "IPython/terminal/tests/test_interactivshell.py::TerminalMagicsTestCase::test_paste_magics_blankline", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456 \\n789-6-123456789-True]", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[def- out(tag: str, n=50):- ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-6-123456789-True]", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider_connection", "IPython/terminal/tests/test_shortcuts.py::test_accept_and_keep_cursor[def -out(tag: str, n=50):-out(tag: str, n=50):-4]", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[def- out(tag: str, n=50):- ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[de -f out(tag: str, n=50):-f ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=50-):-):]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=5-0):-0)]", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[def -out(tag: str, n=50):-out(tag: ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag:- str, n=50):- ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag-: str, n=50):-: ]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token_empty"] | [] | ["IPython/terminal/tests/test_shortcuts.py::test_other_providers", "IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters", "IPython/terminal/tests/test_shortcuts.py::test_add_shortcut_for_new_command", "IPython/terminal/tests/test_shortcuts.py::test_add_shortcut_for_existing_command", "IPython/terminal/tests/test_shortcuts.py::test_disable_shortcut", "IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_failure", "IPython/terminal/tests/test_shortcuts.py::test_modify_unique_shortcut", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries", "IPython/terminal/tests/test_shortcuts.py::test_setting_shortcuts_before_pt_app_init"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==23.0", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.0.0", "prompt-toolkit==3.0.36", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.14.0", "pytest==7.0.1", "pytest-asyncio==0.20.3", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.2", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.9.0", "wcwidth==0.2.6", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13888 | 5d26cb25bb454d538ebe9db77afd3661aed2a3c5 | diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml
index 52f3e79ab9c..c7fa22c7210 100644
--- a/.github/workflows/mypy.yml
+++ b/.github/workflows/mypy.yml
@@ -29,11 +29,13 @@ jobs:
pip install mypy pyflakes flake8
- name: Lint with mypy
run: |
+ set -e
mypy -p IPython.terminal
mypy -p IPython.core.magics
mypy -p IPython.core.guarded_eval
mypy -p IPython.core.completer
- name: Lint with pyflakes
run: |
+ set -e
flake8 IPython/core/magics/script.py
flake8 IPython/core/magics/packaging.py
diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py
index c867b553f2e..c61024c124d 100644
--- a/IPython/terminal/interactiveshell.py
+++ b/IPython/terminal/interactiveshell.py
@@ -4,6 +4,7 @@
import os
import sys
from warnings import warn
+from typing import Union as UnionType
from IPython.core.async_helpers import get_asyncio_loop
from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC
@@ -49,6 +50,10 @@
from .prompts import Prompts, ClassicPrompts, RichPromptDisplayHook
from .ptutils import IPythonPTCompleter, IPythonPTLexer
from .shortcuts import create_ipython_shortcuts
+from .shortcuts.auto_suggest import (
+ NavigableAutoSuggestFromHistory,
+ AppendAutoSuggestionInAnyLine,
+)
PTK3 = ptk_version.startswith('3.')
@@ -142,6 +147,10 @@ class PtkHistoryAdapter(History):
"""
+ auto_suggest: UnionType[
+ AutoSuggestFromHistory, NavigableAutoSuggestFromHistory, None
+ ]
+
def __init__(self, shell):
super().__init__()
self.shell = shell
@@ -183,7 +192,7 @@ class TerminalInteractiveShell(InteractiveShell):
'menus, decrease for short and wide.'
).tag(config=True)
- pt_app = None
+ pt_app: UnionType[PromptSession, None] = None
debugger_history = None
debugger_history_file = Unicode(
@@ -376,18 +385,27 @@ def _displayhook_class_default(self):
).tag(config=True)
autosuggestions_provider = Unicode(
- "AutoSuggestFromHistory",
+ "NavigableAutoSuggestFromHistory",
help="Specifies from which source automatic suggestions are provided. "
- "Can be set to `'AutoSuggestFromHistory`' or `None` to disable"
- "automatic suggestions. Default is `'AutoSuggestFromHistory`'.",
+ "Can be set to ``'NavigableAutoSuggestFromHistory'`` (:kbd:`up` and "
+ ":kbd:`down` swap suggestions), ``'AutoSuggestFromHistory'``, "
+ " or ``None`` to disable automatic suggestions. "
+ "Default is `'NavigableAutoSuggestFromHistory`'.",
allow_none=True,
).tag(config=True)
def _set_autosuggestions(self, provider):
+ # disconnect old handler
+ if self.auto_suggest and isinstance(
+ self.auto_suggest, NavigableAutoSuggestFromHistory
+ ):
+ self.auto_suggest.disconnect()
if provider is None:
self.auto_suggest = None
elif provider == "AutoSuggestFromHistory":
self.auto_suggest = AutoSuggestFromHistory()
+ elif provider == "NavigableAutoSuggestFromHistory":
+ self.auto_suggest = NavigableAutoSuggestFromHistory()
else:
raise ValueError("No valid provider.")
if self.pt_app:
@@ -462,6 +480,8 @@ def prompt():
tempfile_suffix=".py",
**self._extra_prompt_options()
)
+ if isinstance(self.auto_suggest, NavigableAutoSuggestFromHistory):
+ self.auto_suggest.connect(self.pt_app)
def _make_style_from_name_or_cls(self, name_or_cls):
"""
@@ -560,23 +580,39 @@ def get_message():
get_message = get_message()
options = {
- 'complete_in_thread': False,
- 'lexer':IPythonPTLexer(),
- 'reserve_space_for_menu':self.space_for_menu,
- 'message': get_message,
- 'prompt_continuation': (
- lambda width, lineno, is_soft_wrap:
- PygmentsTokens(self.prompts.continuation_prompt_tokens(width))),
- 'multiline': True,
- 'complete_style': self.pt_complete_style,
-
+ "complete_in_thread": False,
+ "lexer": IPythonPTLexer(),
+ "reserve_space_for_menu": self.space_for_menu,
+ "message": get_message,
+ "prompt_continuation": (
+ lambda width, lineno, is_soft_wrap: PygmentsTokens(
+ self.prompts.continuation_prompt_tokens(width)
+ )
+ ),
+ "multiline": True,
+ "complete_style": self.pt_complete_style,
+ "input_processors": [
# Highlight matching brackets, but only when this setting is
# enabled, and only when the DEFAULT_BUFFER has the focus.
- 'input_processors': [ConditionalProcessor(
- processor=HighlightMatchingBracketProcessor(chars='[](){}'),
- filter=HasFocus(DEFAULT_BUFFER) & ~IsDone() &
- Condition(lambda: self.highlight_matching_brackets))],
- }
+ ConditionalProcessor(
+ processor=HighlightMatchingBracketProcessor(chars="[](){}"),
+ filter=HasFocus(DEFAULT_BUFFER)
+ & ~IsDone()
+ & Condition(lambda: self.highlight_matching_brackets),
+ ),
+ # Show auto-suggestion in lines other than the last line.
+ ConditionalProcessor(
+ processor=AppendAutoSuggestionInAnyLine(),
+ filter=HasFocus(DEFAULT_BUFFER)
+ & ~IsDone()
+ & Condition(
+ lambda: isinstance(
+ self.auto_suggest, NavigableAutoSuggestFromHistory
+ )
+ ),
+ ),
+ ],
+ }
if not PTK3:
options['inputhook'] = self.inputhook
@@ -647,8 +683,9 @@ def init_alias(self):
self.alias_manager.soft_define_alias(cmd, cmd)
- def __init__(self, *args, **kwargs):
+ def __init__(self, *args, **kwargs) -> None:
super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
+ self.auto_suggest = None
self._set_autosuggestions(self.autosuggestions_provider)
self.init_prompt_toolkit_cli()
self.init_term_title()
diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py
index df4648b8914..6280bce3b20 100755
--- a/IPython/terminal/ipapp.py
+++ b/IPython/terminal/ipapp.py
@@ -156,7 +156,7 @@ def make_report(self,traceback):
flags.update(frontend_flags)
aliases = dict(base_aliases)
-aliases.update(shell_aliases)
+aliases.update(shell_aliases) # type: ignore[arg-type]
#-----------------------------------------------------------------------------
# Main classes and functions
@@ -180,7 +180,7 @@ def start(self):
class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):
name = u'ipython'
description = usage.cl_usage
- crash_handler_class = IPAppCrashHandler
+ crash_handler_class = IPAppCrashHandler # typing: ignore[assignment]
examples = _examples
flags = flags
diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts/__init__.py
similarity index 57%
rename from IPython/terminal/shortcuts.py
rename to IPython/terminal/shortcuts/__init__.py
index 6ca91ec31ba..6d68c17824d 100644
--- a/IPython/terminal/shortcuts.py
+++ b/IPython/terminal/shortcuts/__init__.py
@@ -6,25 +6,38 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
-import warnings
+import os
+import re
import signal
import sys
-import re
-import os
-from typing import Callable
-
+import warnings
+from typing import Callable, Dict, Union
from prompt_toolkit.application.current import get_app
from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
-from prompt_toolkit.filters import (has_focus, has_selection, Condition,
- vi_insert_mode, emacs_insert_mode, has_completions, vi_mode)
-from prompt_toolkit.key_binding.bindings.completion import display_completions_like_readline
+from prompt_toolkit.filters import Condition, emacs_insert_mode, has_completions
+from prompt_toolkit.filters import has_focus as has_focus_impl
+from prompt_toolkit.filters import (
+ has_selection,
+ has_suggestion,
+ vi_insert_mode,
+ vi_mode,
+)
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.key_binding.bindings import named_commands as nc
+from prompt_toolkit.key_binding.bindings.completion import (
+ display_completions_like_readline,
+)
from prompt_toolkit.key_binding.vi_state import InputMode, ViState
+from prompt_toolkit.layout.layout import FocusableElement
+from IPython.terminal.shortcuts import auto_match as match
+from IPython.terminal.shortcuts import auto_suggest
from IPython.utils.decorators import undoc
+__all__ = ["create_ipython_shortcuts"]
+
+
@undoc
@Condition
def cursor_in_leading_ws():
@@ -32,80 +45,114 @@ def cursor_in_leading_ws():
return (not before) or before.isspace()
-# Needed for to accept autosuggestions in vi insert mode
-def _apply_autosuggest(event):
- """
- Apply autosuggestion if at end of line.
- """
- b = event.current_buffer
- d = b.document
- after_cursor = d.text[d.cursor_position :]
- lines = after_cursor.split("\n")
- end_of_current_line = lines[0].strip()
- suggestion = b.suggestion
- if (suggestion is not None) and (suggestion.text) and (end_of_current_line == ""):
- b.insert_text(suggestion.text)
- else:
- nc.end_of_line(event)
+def has_focus(value: FocusableElement):
+ """Wrapper around has_focus adding a nice `__name__` to tester function"""
+ tester = has_focus_impl(value).func
+ tester.__name__ = f"is_focused({value})"
+ return Condition(tester)
+
+
+@undoc
+@Condition
+def has_line_below() -> bool:
+ document = get_app().current_buffer.document
+ return document.cursor_position_row < len(document.lines) - 1
+
+
+@undoc
+@Condition
+def has_line_above() -> bool:
+ document = get_app().current_buffer.document
+ return document.cursor_position_row != 0
+
+
+def create_ipython_shortcuts(shell, for_all_platforms: bool = False) -> KeyBindings:
+ """Set up the prompt_toolkit keyboard shortcuts for IPython.
+
+ Parameters
+ ----------
+ shell: InteractiveShell
+ The current IPython shell Instance
+ for_all_platforms: bool (default false)
+ This parameter is mostly used in generating the documentation
+ to create the shortcut binding for all the platforms, and export
+ them.
-def create_ipython_shortcuts(shell):
- """Set up the prompt_toolkit keyboard shortcuts for IPython"""
+ Returns
+ -------
+ KeyBindings
+ the keybinding instance for prompt toolkit.
+
+ """
+ # Warning: if possible, do NOT define handler functions in the locals
+ # scope of this function, instead define functions in the global
+ # scope, or a separate module, and include a user-friendly docstring
+ # describing the action.
kb = KeyBindings()
insert_mode = vi_insert_mode | emacs_insert_mode
- if getattr(shell, 'handle_return', None):
+ if getattr(shell, "handle_return", None):
return_handler = shell.handle_return(shell)
else:
return_handler = newline_or_execute_outer(shell)
- kb.add('enter', filter=(has_focus(DEFAULT_BUFFER)
- & ~has_selection
- & insert_mode
- ))(return_handler)
-
- def reformat_and_execute(event):
- reformat_text_before_cursor(event.current_buffer, event.current_buffer.document, shell)
- event.current_buffer.validate_and_handle()
+ kb.add("enter", filter=(has_focus(DEFAULT_BUFFER) & ~has_selection & insert_mode))(
+ return_handler
+ )
@Condition
def ebivim():
return shell.emacs_bindings_in_vi_insert_mode
- kb.add(
+ @kb.add(
"escape",
"enter",
filter=(has_focus(DEFAULT_BUFFER) & ~has_selection & insert_mode & ebivim),
- )(reformat_and_execute)
+ )
+ def reformat_and_execute(event):
+ """Reformat code and execute it"""
+ reformat_text_before_cursor(
+ event.current_buffer, event.current_buffer.document, shell
+ )
+ event.current_buffer.validate_and_handle()
kb.add("c-\\")(quit)
- kb.add('c-p', filter=(vi_insert_mode & has_focus(DEFAULT_BUFFER))
- )(previous_history_or_previous_completion)
+ kb.add("c-p", filter=(vi_insert_mode & has_focus(DEFAULT_BUFFER)))(
+ previous_history_or_previous_completion
+ )
- kb.add('c-n', filter=(vi_insert_mode & has_focus(DEFAULT_BUFFER))
- )(next_history_or_next_completion)
+ kb.add("c-n", filter=(vi_insert_mode & has_focus(DEFAULT_BUFFER)))(
+ next_history_or_next_completion
+ )
- kb.add('c-g', filter=(has_focus(DEFAULT_BUFFER) & has_completions)
- )(dismiss_completion)
+ kb.add("c-g", filter=(has_focus(DEFAULT_BUFFER) & has_completions))(
+ dismiss_completion
+ )
- kb.add('c-c', filter=has_focus(DEFAULT_BUFFER))(reset_buffer)
+ kb.add("c-c", filter=has_focus(DEFAULT_BUFFER))(reset_buffer)
- kb.add('c-c', filter=has_focus(SEARCH_BUFFER))(reset_search_buffer)
+ kb.add("c-c", filter=has_focus(SEARCH_BUFFER))(reset_search_buffer)
- supports_suspend = Condition(lambda: hasattr(signal, 'SIGTSTP'))
- kb.add('c-z', filter=supports_suspend)(suspend_to_bg)
+ supports_suspend = Condition(lambda: hasattr(signal, "SIGTSTP"))
+ kb.add("c-z", filter=supports_suspend)(suspend_to_bg)
# Ctrl+I == Tab
- kb.add('tab', filter=(has_focus(DEFAULT_BUFFER)
- & ~has_selection
- & insert_mode
- & cursor_in_leading_ws
- ))(indent_buffer)
- kb.add('c-o', filter=(has_focus(DEFAULT_BUFFER) & emacs_insert_mode)
- )(newline_autoindent_outer(shell.input_transformer_manager))
+ kb.add(
+ "tab",
+ filter=(
+ has_focus(DEFAULT_BUFFER)
+ & ~has_selection
+ & insert_mode
+ & cursor_in_leading_ws
+ ),
+ )(indent_buffer)
+ kb.add("c-o", filter=(has_focus(DEFAULT_BUFFER) & emacs_insert_mode))(
+ newline_autoindent_outer(shell.input_transformer_manager)
+ )
- kb.add('f2', filter=has_focus(DEFAULT_BUFFER))(open_input_in_editor)
+ kb.add("f2", filter=has_focus(DEFAULT_BUFFER))(open_input_in_editor)
@Condition
def auto_match():
@@ -124,10 +171,10 @@ def all_quotes_paired(quote, buf):
return paired
focused_insert = (vi_insert_mode | emacs_insert_mode) & has_focus(DEFAULT_BUFFER)
- _preceding_text_cache = {}
- _following_text_cache = {}
+ _preceding_text_cache: Dict[Union[str, Callable], Condition] = {}
+ _following_text_cache: Dict[Union[str, Callable], Condition] = {}
- def preceding_text(pattern):
+ def preceding_text(pattern: Union[str, Callable]):
if pattern in _preceding_text_cache:
return _preceding_text_cache[pattern]
@@ -136,7 +183,8 @@ def preceding_text(pattern):
def _preceding_text():
app = get_app()
before_cursor = app.current_buffer.document.current_line_before_cursor
- return bool(pattern(before_cursor))
+ # mypy can't infer if(callable): https://github.com/python/mypy/issues/3603
+ return bool(pattern(before_cursor)) # type: ignore[operator]
else:
m = re.compile(pattern)
@@ -146,6 +194,8 @@ def _preceding_text():
before_cursor = app.current_buffer.document.current_line_before_cursor
return bool(m.match(before_cursor))
+ _preceding_text.__name__ = f"preceding_text({pattern!r})"
+
condition = Condition(_preceding_text)
_preceding_text_cache[pattern] = condition
return condition
@@ -161,6 +211,8 @@ def _following_text():
app = get_app()
return bool(m.match(app.current_buffer.document.current_line_after_cursor))
+ _following_text.__name__ = f"following_text({pattern!r})"
+
condition = Condition(_following_text)
_following_text_cache[pattern] = condition
return condition
@@ -178,151 +230,104 @@ def not_inside_unclosed_string():
return not ('"' in s or "'" in s)
# auto match
- @kb.add("(", filter=focused_insert & auto_match & following_text(r"[,)}\]]|$"))
- def _(event):
- event.current_buffer.insert_text("()")
- event.current_buffer.cursor_left()
-
- @kb.add("[", filter=focused_insert & auto_match & following_text(r"[,)}\]]|$"))
- def _(event):
- event.current_buffer.insert_text("[]")
- event.current_buffer.cursor_left()
+ for key, cmd in match.auto_match_parens.items():
+ kb.add(key, filter=focused_insert & auto_match & following_text(r"[,)}\]]|$"))(
+ cmd
+ )
- @kb.add("{", filter=focused_insert & auto_match & following_text(r"[,)}\]]|$"))
- def _(event):
- event.current_buffer.insert_text("{}")
- event.current_buffer.cursor_left()
+ # raw string
+ for key, cmd in match.auto_match_parens_raw_string.items():
+ kb.add(
+ key,
+ filter=focused_insert & auto_match & preceding_text(r".*(r|R)[\"'](-*)$"),
+ )(cmd)
- @kb.add(
+ kb.add(
'"',
filter=focused_insert
& auto_match
& not_inside_unclosed_string
& preceding_text(lambda line: all_quotes_paired('"', line))
& following_text(r"[,)}\]]|$"),
- )
- def _(event):
- event.current_buffer.insert_text('""')
- event.current_buffer.cursor_left()
+ )(match.double_quote)
- @kb.add(
+ kb.add(
"'",
filter=focused_insert
& auto_match
& not_inside_unclosed_string
& preceding_text(lambda line: all_quotes_paired("'", line))
& following_text(r"[,)}\]]|$"),
- )
- def _(event):
- event.current_buffer.insert_text("''")
- event.current_buffer.cursor_left()
+ )(match.single_quote)
- @kb.add(
+ kb.add(
'"',
filter=focused_insert
& auto_match
& not_inside_unclosed_string
& preceding_text(r'^.*""$'),
- )
- def _(event):
- event.current_buffer.insert_text('""""')
- event.current_buffer.cursor_left(3)
+ )(match.docstring_double_quotes)
- @kb.add(
+ kb.add(
"'",
filter=focused_insert
& auto_match
& not_inside_unclosed_string
& preceding_text(r"^.*''$"),
- )
- def _(event):
- event.current_buffer.insert_text("''''")
- event.current_buffer.cursor_left(3)
+ )(match.docstring_single_quotes)
- # raw string
- @kb.add(
- "(", filter=focused_insert & auto_match & preceding_text(r".*(r|R)[\"'](-*)$")
+ # just move cursor
+ kb.add(")", filter=focused_insert & auto_match & following_text(r"^\)"))(
+ match.skip_over
)
- def _(event):
- matches = re.match(
- r".*(r|R)[\"'](-*)",
- event.current_buffer.document.current_line_before_cursor,
- )
- dashes = matches.group(2) or ""
- event.current_buffer.insert_text("()" + dashes)
- event.current_buffer.cursor_left(len(dashes) + 1)
-
- @kb.add(
- "[", filter=focused_insert & auto_match & preceding_text(r".*(r|R)[\"'](-*)$")
+ kb.add("]", filter=focused_insert & auto_match & following_text(r"^\]"))(
+ match.skip_over
)
- def _(event):
- matches = re.match(
- r".*(r|R)[\"'](-*)",
- event.current_buffer.document.current_line_before_cursor,
- )
- dashes = matches.group(2) or ""
- event.current_buffer.insert_text("[]" + dashes)
- event.current_buffer.cursor_left(len(dashes) + 1)
-
- @kb.add(
- "{", filter=focused_insert & auto_match & preceding_text(r".*(r|R)[\"'](-*)$")
+ kb.add("}", filter=focused_insert & auto_match & following_text(r"^\}"))(
+ match.skip_over
+ )
+ kb.add('"', filter=focused_insert & auto_match & following_text('^"'))(
+ match.skip_over
+ )
+ kb.add("'", filter=focused_insert & auto_match & following_text("^'"))(
+ match.skip_over
)
- def _(event):
- matches = re.match(
- r".*(r|R)[\"'](-*)",
- event.current_buffer.document.current_line_before_cursor,
- )
- dashes = matches.group(2) or ""
- event.current_buffer.insert_text("{}" + dashes)
- event.current_buffer.cursor_left(len(dashes) + 1)
-
- # just move cursor
- @kb.add(")", filter=focused_insert & auto_match & following_text(r"^\)"))
- @kb.add("]", filter=focused_insert & auto_match & following_text(r"^\]"))
- @kb.add("}", filter=focused_insert & auto_match & following_text(r"^\}"))
- @kb.add('"', filter=focused_insert & auto_match & following_text('^"'))
- @kb.add("'", filter=focused_insert & auto_match & following_text("^'"))
- def _(event):
- event.current_buffer.cursor_right()
- @kb.add(
+ kb.add(
"backspace",
filter=focused_insert
& preceding_text(r".*\($")
& auto_match
& following_text(r"^\)"),
- )
- @kb.add(
+ )(match.delete_pair)
+ kb.add(
"backspace",
filter=focused_insert
& preceding_text(r".*\[$")
& auto_match
& following_text(r"^\]"),
- )
- @kb.add(
+ )(match.delete_pair)
+ kb.add(
"backspace",
filter=focused_insert
& preceding_text(r".*\{$")
& auto_match
& following_text(r"^\}"),
- )
- @kb.add(
+ )(match.delete_pair)
+ kb.add(
"backspace",
filter=focused_insert
& preceding_text('.*"$')
& auto_match
& following_text('^"'),
- )
- @kb.add(
+ )(match.delete_pair)
+ kb.add(
"backspace",
filter=focused_insert
& preceding_text(r".*'$")
& auto_match
& following_text(r"^'"),
- )
- def _(event):
- event.current_buffer.delete()
- event.current_buffer.delete_before_cursor()
+ )(match.delete_pair)
if shell.display_completions == "readlinelike":
kb.add(
@@ -335,37 +340,65 @@ def _(event):
),
)(display_completions_like_readline)
- if sys.platform == "win32":
+ if sys.platform == "win32" or for_all_platforms:
kb.add("c-v", filter=(has_focus(DEFAULT_BUFFER) & ~vi_mode))(win_paste)
focused_insert_vi = has_focus(DEFAULT_BUFFER) & vi_insert_mode
- @kb.add("end", filter=has_focus(DEFAULT_BUFFER) & (ebivim | ~vi_insert_mode))
- def _(event):
- _apply_autosuggest(event)
-
- @kb.add("c-e", filter=focused_insert_vi & ebivim)
- def _(event):
- _apply_autosuggest(event)
-
- @kb.add("c-f", filter=focused_insert_vi)
- def _(event):
- b = event.current_buffer
- suggestion = b.suggestion
- if suggestion:
- b.insert_text(suggestion.text)
- else:
- nc.forward_char(event)
+ # autosuggestions
+ @Condition
+ def navigable_suggestions():
+ return isinstance(
+ shell.auto_suggest, auto_suggest.NavigableAutoSuggestFromHistory
+ )
- @kb.add("escape", "f", filter=focused_insert_vi & ebivim)
- def _(event):
- b = event.current_buffer
- suggestion = b.suggestion
- if suggestion:
- t = re.split(r"(\S+\s+)", suggestion.text)
- b.insert_text(next((x for x in t if x), ""))
- else:
- nc.forward_word(event)
+ kb.add("end", filter=has_focus(DEFAULT_BUFFER) & (ebivim | ~vi_insert_mode))(
+ auto_suggest.accept_in_vi_insert_mode
+ )
+ kb.add("c-e", filter=focused_insert_vi & ebivim)(
+ auto_suggest.accept_in_vi_insert_mode
+ )
+ kb.add("c-f", filter=focused_insert_vi)(auto_suggest.accept)
+ kb.add("escape", "f", filter=focused_insert_vi & ebivim)(auto_suggest.accept_word)
+ kb.add("c-right", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
+ auto_suggest.accept_token
+ )
+ kb.add("escape", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
+ auto_suggest.discard
+ )
+ kb.add(
+ "up",
+ filter=navigable_suggestions
+ & ~has_line_above
+ & has_suggestion
+ & has_focus(DEFAULT_BUFFER),
+ )(auto_suggest.swap_autosuggestion_up(shell.auto_suggest))
+ kb.add(
+ "down",
+ filter=navigable_suggestions
+ & ~has_line_below
+ & has_suggestion
+ & has_focus(DEFAULT_BUFFER),
+ )(auto_suggest.swap_autosuggestion_down(shell.auto_suggest))
+ kb.add(
+ "up", filter=has_line_above & navigable_suggestions & has_focus(DEFAULT_BUFFER)
+ )(auto_suggest.up_and_update_hint)
+ kb.add(
+ "down",
+ filter=has_line_below & navigable_suggestions & has_focus(DEFAULT_BUFFER),
+ )(auto_suggest.down_and_update_hint)
+ kb.add("right", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
+ auto_suggest.accept_character
+ )
+ kb.add("c-left", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
+ auto_suggest.accept_and_move_cursor_left
+ )
+ kb.add("c-down", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
+ auto_suggest.accept_and_keep_cursor
+ )
+ kb.add("backspace", filter=has_suggestion & has_focus(DEFAULT_BUFFER))(
+ auto_suggest.backspace_and_resume_hint
+ )
# Simple Control keybindings
key_cmd_dict = {
@@ -416,14 +449,14 @@ def set_input_mode(self, mode):
self._input_mode = mode
if shell.editing_mode == "vi" and shell.modal_cursor:
- ViState._input_mode = InputMode.INSERT
- ViState.input_mode = property(get_input_mode, set_input_mode)
+ ViState._input_mode = InputMode.INSERT # type: ignore
+ ViState.input_mode = property(get_input_mode, set_input_mode) # type: ignore
return kb
def reformat_text_before_cursor(buffer, document, shell):
- text = buffer.delete_before_cursor(len(document.text[:document.cursor_position]))
+ text = buffer.delete_before_cursor(len(document.text[: document.cursor_position]))
try:
formatted_text = shell.reformat_handler(text)
buffer.insert_text(formatted_text)
@@ -432,7 +465,6 @@ def reformat_text_before_cursor(buffer, document, shell):
def newline_or_execute_outer(shell):
-
def newline_or_execute(event):
"""When the user presses return, insert a newline or execute the code."""
b = event.current_buffer
@@ -451,34 +483,38 @@ def newline_or_execute(event):
if d.line_count == 1:
check_text = d.text
else:
- check_text = d.text[:d.cursor_position]
+ check_text = d.text[: d.cursor_position]
status, indent = shell.check_complete(check_text)
-
+
# if all we have after the cursor is whitespace: reformat current text
# before cursor
- after_cursor = d.text[d.cursor_position:]
+ after_cursor = d.text[d.cursor_position :]
reformatted = False
if not after_cursor.strip():
reformat_text_before_cursor(b, d, shell)
reformatted = True
- if not (d.on_last_line or
- d.cursor_position_row >= d.line_count - d.empty_line_count_at_the_end()
- ):
+ if not (
+ d.on_last_line
+ or d.cursor_position_row >= d.line_count - d.empty_line_count_at_the_end()
+ ):
if shell.autoindent:
- b.insert_text('\n' + indent)
+ b.insert_text("\n" + indent)
else:
- b.insert_text('\n')
+ b.insert_text("\n")
return
- if (status != 'incomplete') and b.accept_handler:
+ if (status != "incomplete") and b.accept_handler:
if not reformatted:
reformat_text_before_cursor(b, d, shell)
b.validate_and_handle()
else:
if shell.autoindent:
- b.insert_text('\n' + indent)
+ b.insert_text("\n" + indent)
else:
- b.insert_text('\n')
+ b.insert_text("\n")
+
+ newline_or_execute.__qualname__ = "newline_or_execute"
+
return newline_or_execute
@@ -501,12 +537,14 @@ def next_history_or_next_completion(event):
def dismiss_completion(event):
+ """Dismiss completion"""
b = event.current_buffer
if b.complete_state:
b.cancel_completion()
def reset_buffer(event):
+ """Reset buffer"""
b = event.current_buffer
if b.complete_state:
b.cancel_completion()
@@ -515,16 +553,22 @@ def reset_buffer(event):
def reset_search_buffer(event):
+ """Reset search buffer"""
if event.current_buffer.document.text:
event.current_buffer.reset()
else:
event.app.layout.focus(DEFAULT_BUFFER)
+
def suspend_to_bg(event):
+ """Suspend to background"""
event.app.suspend_to_background()
+
def quit(event):
"""
+ Quit application with ``SIGQUIT`` if supported or ``sys.exit`` otherwise.
+
On platforms that support SIGQUIT, send SIGQUIT to the current process.
On other platforms, just exit the process with a message.
"""
@@ -534,8 +578,11 @@ def quit(event):
else:
sys.exit("Quit")
+
def indent_buffer(event):
- event.current_buffer.insert_text(' ' * 4)
+ """Indent buffer"""
+ event.current_buffer.insert_text(" " * 4)
+
@undoc
def newline_with_copy_margin(event):
@@ -547,9 +594,12 @@ def newline_with_copy_margin(event):
Preserve margin and cursor position when using
Control-O to insert a newline in EMACS mode
"""
- warnings.warn("`newline_with_copy_margin(event)` is deprecated since IPython 6.0. "
- "see `newline_autoindent_outer(shell)(event)` for a replacement.",
- DeprecationWarning, stacklevel=2)
+ warnings.warn(
+ "`newline_with_copy_margin(event)` is deprecated since IPython 6.0. "
+ "see `newline_autoindent_outer(shell)(event)` for a replacement.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
b = event.current_buffer
cursor_start_pos = b.document.cursor_position_col
@@ -560,6 +610,7 @@ def newline_with_copy_margin(event):
pos_diff = cursor_start_pos - cursor_end_pos
b.cursor_right(count=pos_diff)
+
def newline_autoindent_outer(inputsplitter) -> Callable[..., None]:
"""
Return a function suitable for inserting a indented newline after the cursor.
@@ -571,28 +622,33 @@ def newline_autoindent_outer(inputsplitter) -> Callable[..., None]:
"""
def newline_autoindent(event):
- """insert a newline after the cursor indented appropriately."""
+ """Insert a newline after the cursor indented appropriately."""
b = event.current_buffer
d = b.document
if b.complete_state:
b.cancel_completion()
- text = d.text[:d.cursor_position] + '\n'
+ text = d.text[: d.cursor_position] + "\n"
_, indent = inputsplitter.check_complete(text)
- b.insert_text('\n' + (' ' * (indent or 0)), move_cursor=False)
+ b.insert_text("\n" + (" " * (indent or 0)), move_cursor=False)
+
+ newline_autoindent.__qualname__ = "newline_autoindent"
return newline_autoindent
def open_input_in_editor(event):
+ """Open code from input in external editor"""
event.app.current_buffer.open_in_editor()
-if sys.platform == 'win32':
+if sys.platform == "win32":
from IPython.core.error import TryNext
- from IPython.lib.clipboard import (ClipboardEmpty,
- win32_clipboard_get,
- tkinter_clipboard_get)
+ from IPython.lib.clipboard import (
+ ClipboardEmpty,
+ tkinter_clipboard_get,
+ win32_clipboard_get,
+ )
@undoc
def win_paste(event):
@@ -606,3 +662,10 @@ def win_paste(event):
except ClipboardEmpty:
return
event.current_buffer.insert_text(text.replace("\t", " " * 4))
+
+else:
+
+ @undoc
+ def win_paste(event):
+ """Stub used when auto-generating shortcuts for documentation"""
+ pass
diff --git a/IPython/terminal/shortcuts/auto_match.py b/IPython/terminal/shortcuts/auto_match.py
new file mode 100644
index 00000000000..46cb1bd8754
--- /dev/null
+++ b/IPython/terminal/shortcuts/auto_match.py
@@ -0,0 +1,104 @@
+"""
+Utilities function for keybinding with prompt toolkit.
+
+This will be bound to specific key press and filter modes,
+like whether we are in edit mode, and whether the completer is open.
+"""
+import re
+from prompt_toolkit.key_binding import KeyPressEvent
+
+
+def parenthesis(event: KeyPressEvent):
+ """Auto-close parenthesis"""
+ event.current_buffer.insert_text("()")
+ event.current_buffer.cursor_left()
+
+
+def brackets(event: KeyPressEvent):
+ """Auto-close brackets"""
+ event.current_buffer.insert_text("[]")
+ event.current_buffer.cursor_left()
+
+
+def braces(event: KeyPressEvent):
+ """Auto-close braces"""
+ event.current_buffer.insert_text("{}")
+ event.current_buffer.cursor_left()
+
+
+def double_quote(event: KeyPressEvent):
+ """Auto-close double quotes"""
+ event.current_buffer.insert_text('""')
+ event.current_buffer.cursor_left()
+
+
+def single_quote(event: KeyPressEvent):
+ """Auto-close single quotes"""
+ event.current_buffer.insert_text("''")
+ event.current_buffer.cursor_left()
+
+
+def docstring_double_quotes(event: KeyPressEvent):
+ """Auto-close docstring (double quotes)"""
+ event.current_buffer.insert_text('""""')
+ event.current_buffer.cursor_left(3)
+
+
+def docstring_single_quotes(event: KeyPressEvent):
+ """Auto-close docstring (single quotes)"""
+ event.current_buffer.insert_text("''''")
+ event.current_buffer.cursor_left(3)
+
+
+def raw_string_parenthesis(event: KeyPressEvent):
+ """Auto-close parenthesis in raw strings"""
+ matches = re.match(
+ r".*(r|R)[\"'](-*)",
+ event.current_buffer.document.current_line_before_cursor,
+ )
+ dashes = matches.group(2) if matches else ""
+ event.current_buffer.insert_text("()" + dashes)
+ event.current_buffer.cursor_left(len(dashes) + 1)
+
+
+def raw_string_bracket(event: KeyPressEvent):
+ """Auto-close bracker in raw strings"""
+ matches = re.match(
+ r".*(r|R)[\"'](-*)",
+ event.current_buffer.document.current_line_before_cursor,
+ )
+ dashes = matches.group(2) if matches else ""
+ event.current_buffer.insert_text("[]" + dashes)
+ event.current_buffer.cursor_left(len(dashes) + 1)
+
+
+def raw_string_braces(event: KeyPressEvent):
+ """Auto-close braces in raw strings"""
+ matches = re.match(
+ r".*(r|R)[\"'](-*)",
+ event.current_buffer.document.current_line_before_cursor,
+ )
+ dashes = matches.group(2) if matches else ""
+ event.current_buffer.insert_text("{}" + dashes)
+ event.current_buffer.cursor_left(len(dashes) + 1)
+
+
+def skip_over(event: KeyPressEvent):
+ """Skip over automatically added parenthesis.
+
+ (rather than adding another parenthesis)"""
+ event.current_buffer.cursor_right()
+
+
+def delete_pair(event: KeyPressEvent):
+ """Delete auto-closed parenthesis"""
+ event.current_buffer.delete()
+ event.current_buffer.delete_before_cursor()
+
+
+auto_match_parens = {"(": parenthesis, "[": brackets, "{": braces}
+auto_match_parens_raw_string = {
+ "(": raw_string_parenthesis,
+ "[": raw_string_bracket,
+ "{": raw_string_braces,
+}
diff --git a/IPython/terminal/shortcuts/auto_suggest.py b/IPython/terminal/shortcuts/auto_suggest.py
new file mode 100644
index 00000000000..7898a5514d6
--- /dev/null
+++ b/IPython/terminal/shortcuts/auto_suggest.py
@@ -0,0 +1,374 @@
+import re
+import tokenize
+from io import StringIO
+from typing import Callable, List, Optional, Union, Generator, Tuple, Sequence
+
+from prompt_toolkit.buffer import Buffer
+from prompt_toolkit.key_binding import KeyPressEvent
+from prompt_toolkit.key_binding.bindings import named_commands as nc
+from prompt_toolkit.auto_suggest import AutoSuggestFromHistory, Suggestion
+from prompt_toolkit.document import Document
+from prompt_toolkit.history import History
+from prompt_toolkit.shortcuts import PromptSession
+from prompt_toolkit.layout.processors import (
+ Processor,
+ Transformation,
+ TransformationInput,
+)
+
+from IPython.utils.tokenutil import generate_tokens
+
+
+def _get_query(document: Document):
+ return document.lines[document.cursor_position_row]
+
+
+class AppendAutoSuggestionInAnyLine(Processor):
+ """
+ Append the auto suggestion to lines other than the last (appending to the
+ last line is natively supported by the prompt toolkit).
+ """
+
+ def __init__(self, style: str = "class:auto-suggestion") -> None:
+ self.style = style
+
+ def apply_transformation(self, ti: TransformationInput) -> Transformation:
+ is_last_line = ti.lineno == ti.document.line_count - 1
+ is_active_line = ti.lineno == ti.document.cursor_position_row
+
+ if not is_last_line and is_active_line:
+ buffer = ti.buffer_control.buffer
+
+ if buffer.suggestion and ti.document.is_cursor_at_the_end_of_line:
+ suggestion = buffer.suggestion.text
+ else:
+ suggestion = ""
+
+ return Transformation(fragments=ti.fragments + [(self.style, suggestion)])
+ else:
+ return Transformation(fragments=ti.fragments)
+
+
+class NavigableAutoSuggestFromHistory(AutoSuggestFromHistory):
+ """
+ A subclass of AutoSuggestFromHistory that allow navigation to next/previous
+ suggestion from history. To do so it remembers the current position, but it
+ state need to carefully be cleared on the right events.
+ """
+
+ def __init__(
+ self,
+ ):
+ self.skip_lines = 0
+ self._connected_apps = []
+
+ def reset_history_position(self, _: Buffer):
+ self.skip_lines = 0
+
+ def disconnect(self):
+ for pt_app in self._connected_apps:
+ text_insert_event = pt_app.default_buffer.on_text_insert
+ text_insert_event.remove_handler(self.reset_history_position)
+
+ def connect(self, pt_app: PromptSession):
+ self._connected_apps.append(pt_app)
+ # note: `on_text_changed` could be used for a bit different behaviour
+ # on character deletion (i.e. reseting history position on backspace)
+ pt_app.default_buffer.on_text_insert.add_handler(self.reset_history_position)
+
+ def get_suggestion(
+ self, buffer: Buffer, document: Document
+ ) -> Optional[Suggestion]:
+ text = _get_query(document)
+
+ if text.strip():
+ for suggestion, _ in self._find_next_match(
+ text, self.skip_lines, buffer.history
+ ):
+ return Suggestion(suggestion)
+
+ return None
+
+ def _find_match(
+ self, text: str, skip_lines: float, history: History, previous: bool
+ ) -> Generator[Tuple[str, float], None, None]:
+ """
+ text : str
+ Text content to find a match for, the user cursor is most of the
+ time at the end of this text.
+ skip_lines : float
+ number of items to skip in the search, this is used to indicate how
+ far in the list the user has navigated by pressing up or down.
+ The float type is used as the base value is +inf
+ history : History
+ prompt_toolkit History instance to fetch previous entries from.
+ previous : bool
+ Direction of the search, whether we are looking previous match
+ (True), or next match (False).
+
+ Yields
+ ------
+ Tuple with:
+ str:
+ current suggestion.
+ float:
+ will actually yield only ints, which is passed back via skip_lines,
+ which may be a +inf (float)
+
+
+ """
+ line_number = -1
+ for string in reversed(list(history.get_strings())):
+ for line in reversed(string.splitlines()):
+ line_number += 1
+ if not previous and line_number < skip_lines:
+ continue
+ # do not return empty suggestions as these
+ # close the auto-suggestion overlay (and are useless)
+ if line.startswith(text) and len(line) > len(text):
+ yield line[len(text) :], line_number
+ if previous and line_number >= skip_lines:
+ return
+
+ def _find_next_match(
+ self, text: str, skip_lines: float, history: History
+ ) -> Generator[Tuple[str, float], None, None]:
+ return self._find_match(text, skip_lines, history, previous=False)
+
+ def _find_previous_match(self, text: str, skip_lines: float, history: History):
+ return reversed(
+ list(self._find_match(text, skip_lines, history, previous=True))
+ )
+
+ def up(self, query: str, other_than: str, history: History) -> None:
+ for suggestion, line_number in self._find_next_match(
+ query, self.skip_lines, history
+ ):
+ # if user has history ['very.a', 'very', 'very.b'] and typed 'very'
+ # we want to switch from 'very.b' to 'very.a' because a) if the
+ # suggestion equals current text, prompt-toolkit aborts suggesting
+ # b) user likely would not be interested in 'very' anyways (they
+ # already typed it).
+ if query + suggestion != other_than:
+ self.skip_lines = line_number
+ break
+ else:
+ # no matches found, cycle back to beginning
+ self.skip_lines = 0
+
+ def down(self, query: str, other_than: str, history: History) -> None:
+ for suggestion, line_number in self._find_previous_match(
+ query, self.skip_lines, history
+ ):
+ if query + suggestion != other_than:
+ self.skip_lines = line_number
+ break
+ else:
+ # no matches found, cycle to end
+ for suggestion, line_number in self._find_previous_match(
+ query, float("Inf"), history
+ ):
+ if query + suggestion != other_than:
+ self.skip_lines = line_number
+ break
+
+
+# Needed for to accept autosuggestions in vi insert mode
+def accept_in_vi_insert_mode(event: KeyPressEvent):
+ """Apply autosuggestion if at end of line."""
+ buffer = event.current_buffer
+ d = buffer.document
+ after_cursor = d.text[d.cursor_position :]
+ lines = after_cursor.split("\n")
+ end_of_current_line = lines[0].strip()
+ suggestion = buffer.suggestion
+ if (suggestion is not None) and (suggestion.text) and (end_of_current_line == ""):
+ buffer.insert_text(suggestion.text)
+ else:
+ nc.end_of_line(event)
+
+
+def accept(event: KeyPressEvent):
+ """Accept autosuggestion"""
+ buffer = event.current_buffer
+ suggestion = buffer.suggestion
+ if suggestion:
+ buffer.insert_text(suggestion.text)
+ else:
+ nc.forward_char(event)
+
+
+def discard(event: KeyPressEvent):
+ """Discard autosuggestion"""
+ buffer = event.current_buffer
+ buffer.suggestion = None
+
+
+def accept_word(event: KeyPressEvent):
+ """Fill partial autosuggestion by word"""
+ buffer = event.current_buffer
+ suggestion = buffer.suggestion
+ if suggestion:
+ t = re.split(r"(\S+\s+)", suggestion.text)
+ buffer.insert_text(next((x for x in t if x), ""))
+ else:
+ nc.forward_word(event)
+
+
+def accept_character(event: KeyPressEvent):
+ """Fill partial autosuggestion by character"""
+ b = event.current_buffer
+ suggestion = b.suggestion
+ if suggestion and suggestion.text:
+ b.insert_text(suggestion.text[0])
+
+
+def accept_and_keep_cursor(event: KeyPressEvent):
+ """Accept autosuggestion and keep cursor in place"""
+ buffer = event.current_buffer
+ old_position = buffer.cursor_position
+ suggestion = buffer.suggestion
+ if suggestion:
+ buffer.insert_text(suggestion.text)
+ buffer.cursor_position = old_position
+
+
+def accept_and_move_cursor_left(event: KeyPressEvent):
+ """Accept autosuggestion and move cursor left in place"""
+ accept_and_keep_cursor(event)
+ nc.backward_char(event)
+
+
+def _update_hint(buffer: Buffer):
+ if buffer.auto_suggest:
+ suggestion = buffer.auto_suggest.get_suggestion(buffer, buffer.document)
+ buffer.suggestion = suggestion
+
+
+def backspace_and_resume_hint(event: KeyPressEvent):
+ """Resume autosuggestions after deleting last character"""
+ current_buffer = event.current_buffer
+
+ def resume_hinting(buffer: Buffer):
+ _update_hint(buffer)
+ current_buffer.on_text_changed.remove_handler(resume_hinting)
+
+ current_buffer.on_text_changed.add_handler(resume_hinting)
+ nc.backward_delete_char(event)
+
+
+def up_and_update_hint(event: KeyPressEvent):
+ """Go up and update hint"""
+ current_buffer = event.current_buffer
+
+ current_buffer.auto_up(count=event.arg)
+ _update_hint(current_buffer)
+
+
+def down_and_update_hint(event: KeyPressEvent):
+ """Go down and update hint"""
+ current_buffer = event.current_buffer
+
+ current_buffer.auto_down(count=event.arg)
+ _update_hint(current_buffer)
+
+
+def accept_token(event: KeyPressEvent):
+ """Fill partial autosuggestion by token"""
+ b = event.current_buffer
+ suggestion = b.suggestion
+
+ if suggestion:
+ prefix = _get_query(b.document)
+ text = prefix + suggestion.text
+
+ tokens: List[Optional[str]] = [None, None, None]
+ substrings = [""]
+ i = 0
+
+ for token in generate_tokens(StringIO(text).readline):
+ if token.type == tokenize.NEWLINE:
+ index = len(text)
+ else:
+ index = text.index(token[1], len(substrings[-1]))
+ substrings.append(text[:index])
+ tokenized_so_far = substrings[-1]
+ if tokenized_so_far.startswith(prefix):
+ if i == 0 and len(tokenized_so_far) > len(prefix):
+ tokens[0] = tokenized_so_far[len(prefix) :]
+ substrings.append(tokenized_so_far)
+ i += 1
+ tokens[i] = token[1]
+ if i == 2:
+ break
+ i += 1
+
+ if tokens[0]:
+ to_insert: str
+ insert_text = substrings[-2]
+ if tokens[1] and len(tokens[1]) == 1:
+ insert_text = substrings[-1]
+ to_insert = insert_text[len(prefix) :]
+ b.insert_text(to_insert)
+ return
+
+ nc.forward_word(event)
+
+
+Provider = Union[AutoSuggestFromHistory, NavigableAutoSuggestFromHistory, None]
+
+
+def _swap_autosuggestion(
+ buffer: Buffer,
+ provider: NavigableAutoSuggestFromHistory,
+ direction_method: Callable,
+):
+ """
+ We skip most recent history entry (in either direction) if it equals the
+ current autosuggestion because if user cycles when auto-suggestion is shown
+ they most likely want something else than what was suggested (otherwise
+ they would have accepted the suggestion).
+ """
+ suggestion = buffer.suggestion
+ if not suggestion:
+ return
+
+ query = _get_query(buffer.document)
+ current = query + suggestion.text
+
+ direction_method(query=query, other_than=current, history=buffer.history)
+
+ new_suggestion = provider.get_suggestion(buffer, buffer.document)
+ buffer.suggestion = new_suggestion
+
+
+def swap_autosuggestion_up(provider: Provider):
+ def swap_autosuggestion_up(event: KeyPressEvent):
+ """Get next autosuggestion from history."""
+ if not isinstance(provider, NavigableAutoSuggestFromHistory):
+ return
+
+ return _swap_autosuggestion(
+ buffer=event.current_buffer, provider=provider, direction_method=provider.up
+ )
+
+ swap_autosuggestion_up.__name__ = "swap_autosuggestion_up"
+ return swap_autosuggestion_up
+
+
+def swap_autosuggestion_down(
+ provider: Union[AutoSuggestFromHistory, NavigableAutoSuggestFromHistory, None]
+):
+ def swap_autosuggestion_down(event: KeyPressEvent):
+ """Get previous autosuggestion from history."""
+ if not isinstance(provider, NavigableAutoSuggestFromHistory):
+ return
+
+ return _swap_autosuggestion(
+ buffer=event.current_buffer,
+ provider=provider,
+ direction_method=provider.down,
+ )
+
+ swap_autosuggestion_down.__name__ = "swap_autosuggestion_down"
+ return swap_autosuggestion_down
diff --git a/docs/autogen_shortcuts.py b/docs/autogen_shortcuts.py
index db7fe8d4917..f8fd17bb51f 100755
--- a/docs/autogen_shortcuts.py
+++ b/docs/autogen_shortcuts.py
@@ -1,45 +1,98 @@
+from dataclasses import dataclass
+from inspect import getsource
from pathlib import Path
+from typing import cast, Callable, List, Union
+from html import escape as html_escape
+import re
+
+from prompt_toolkit.keys import KEY_ALIASES
+from prompt_toolkit.key_binding import KeyBindingsBase
+from prompt_toolkit.filters import Filter, Condition
+from prompt_toolkit.shortcuts import PromptSession
from IPython.terminal.shortcuts import create_ipython_shortcuts
-def name(c):
- s = c.__class__.__name__
- if s == '_Invert':
- return '(Not: %s)' % name(c.filter)
- if s in log_filters.keys():
- return '(%s: %s)' % (log_filters[s], ', '.join(name(x) for x in c.filters))
- return log_filters[s] if s in log_filters.keys() else s
+@dataclass
+class Shortcut:
+ #: a sequence of keys (each element on the list corresponds to pressing one or more keys)
+ keys_sequence: list[str]
+ filter: str
-def sentencize(s):
- """Extract first sentence
- """
- s = s.replace('\n', ' ').strip().split('.')
- s = s[0] if len(s) else s
- try:
- return " ".join(s.split())
- except AttributeError:
- return s
+@dataclass
+class Handler:
+ description: str
+ identifier: str
-def most_common(lst, n=3):
- """Most common elements occurring more then `n` times
- """
- from collections import Counter
- c = Counter(lst)
- return [k for (k, v) in c.items() if k and v > n]
+@dataclass
+class Binding:
+ handler: Handler
+ shortcut: Shortcut
-def multi_filter_str(flt):
- """Yield readable conditional filter
- """
- assert hasattr(flt, 'filters'), 'Conditional filter required'
- yield name(flt)
+class _NestedFilter(Filter):
+ """Protocol reflecting non-public prompt_toolkit's `_AndList` and `_OrList`."""
+
+ filters: List[Filter]
+
+
+class _Invert(Filter):
+ """Protocol reflecting non-public prompt_toolkit's `_Invert`."""
+
+ filter: Filter
+
+
+conjunctions_labels = {"_AndList": "and", "_OrList": "or"}
+ATOMIC_CLASSES = {"Never", "Always", "Condition"}
+
+
+def format_filter(
+ filter_: Union[Filter, _NestedFilter, Condition, _Invert],
+ is_top_level=True,
+ skip=None,
+) -> str:
+ """Create easily readable description of the filter."""
+ s = filter_.__class__.__name__
+ if s == "Condition":
+ func = cast(Condition, filter_).func
+ name = func.__name__
+ if name == "<lambda>":
+ source = getsource(func)
+ return source.split("=")[0].strip()
+ return func.__name__
+ elif s == "_Invert":
+ operand = cast(_Invert, filter_).filter
+ if operand.__class__.__name__ in ATOMIC_CLASSES:
+ return f"not {format_filter(operand, is_top_level=False)}"
+ return f"not ({format_filter(operand, is_top_level=False)})"
+ elif s in conjunctions_labels:
+ filters = cast(_NestedFilter, filter_).filters
+ conjunction = conjunctions_labels[s]
+ glue = f" {conjunction} "
+ result = glue.join(format_filter(x, is_top_level=False) for x in filters)
+ if len(filters) > 1 and not is_top_level:
+ result = f"({result})"
+ return result
+ elif s in ["Never", "Always"]:
+ return s.lower()
+ else:
+ raise ValueError(f"Unknown filter type: {filter_}")
+
+
+def sentencize(s) -> str:
+ """Extract first sentence"""
+ s = re.split(r"\.\W", s.replace("\n", " ").strip())
+ s = s[0] if len(s) else ""
+ if not s.endswith("."):
+ s += "."
+ try:
+ return " ".join(s.split())
+ except AttributeError:
+ return s
-log_filters = {'_AndList': 'And', '_OrList': 'Or'}
-log_invert = {'_Invert'}
class _DummyTerminal:
"""Used as a buffer to get prompt_toolkit bindings
@@ -48,49 +101,121 @@ class _DummyTerminal:
input_transformer_manager = None
display_completions = None
editing_mode = "emacs"
+ auto_suggest = None
-ipy_bindings = create_ipython_shortcuts(_DummyTerminal()).bindings
-
-dummy_docs = [] # ignore bindings without proper documentation
-
-common_docs = most_common([kb.handler.__doc__ for kb in ipy_bindings])
-if common_docs:
- dummy_docs.extend(common_docs)
+def create_identifier(handler: Callable):
+ parts = handler.__module__.split(".")
+ name = handler.__name__
+ package = parts[0]
+ if len(parts) > 1:
+ final_module = parts[-1]
+ return f"{package}:{final_module}.{name}"
+ else:
+ return f"{package}:{name}"
+
+
+def bindings_from_prompt_toolkit(prompt_bindings: KeyBindingsBase) -> List[Binding]:
+ """Collect bindings to a simple format that does not depend on prompt-toolkit internals"""
+ bindings: List[Binding] = []
+
+ for kb in prompt_bindings.bindings:
+ bindings.append(
+ Binding(
+ handler=Handler(
+ description=kb.handler.__doc__ or "",
+ identifier=create_identifier(kb.handler),
+ ),
+ shortcut=Shortcut(
+ keys_sequence=[
+ str(k.value) if hasattr(k, "value") else k for k in kb.keys
+ ],
+ filter=format_filter(kb.filter, skip={"has_focus_filter"}),
+ ),
+ )
+ )
+ return bindings
+
+
+INDISTINGUISHABLE_KEYS = {**KEY_ALIASES, **{v: k for k, v in KEY_ALIASES.items()}}
+
+
+def format_prompt_keys(keys: str, add_alternatives=True) -> str:
+ """Format prompt toolkit key with modifier into an RST representation."""
+
+ def to_rst(key):
+ escaped = key.replace("\\", "\\\\")
+ return f":kbd:`{escaped}`"
+
+ keys_to_press: list[str]
+
+ prefixes = {
+ "c-s-": [to_rst("ctrl"), to_rst("shift")],
+ "s-c-": [to_rst("ctrl"), to_rst("shift")],
+ "c-": [to_rst("ctrl")],
+ "s-": [to_rst("shift")],
+ }
+
+ for prefix, modifiers in prefixes.items():
+ if keys.startswith(prefix):
+ remainder = keys[len(prefix) :]
+ keys_to_press = [*modifiers, to_rst(remainder)]
+ break
+ else:
+ keys_to_press = [to_rst(keys)]
-dummy_docs = list(set(dummy_docs))
+ result = " + ".join(keys_to_press)
-single_filter = {}
-multi_filter = {}
-for kb in ipy_bindings:
- doc = kb.handler.__doc__
- if not doc or doc in dummy_docs:
- continue
+ if keys in INDISTINGUISHABLE_KEYS and add_alternatives:
+ alternative = INDISTINGUISHABLE_KEYS[keys]
- shortcut = ' '.join([k if isinstance(k, str) else k.name for k in kb.keys])
- shortcut += shortcut.endswith('\\') and '\\' or ''
- if hasattr(kb.filter, 'filters'):
- flt = ' '.join(multi_filter_str(kb.filter))
- multi_filter[(shortcut, flt)] = sentencize(doc)
- else:
- single_filter[(shortcut, name(kb.filter))] = sentencize(doc)
+ result = (
+ result
+ + " (or "
+ + format_prompt_keys(alternative, add_alternatives=False)
+ + ")"
+ )
+ return result
if __name__ == '__main__':
here = Path(__file__).parent
dest = here / "source" / "config" / "shortcuts"
- def sort_key(item):
- k, v = item
- shortcut, flt = k
- return (str(shortcut), str(flt))
-
- for filters, output_filename in [
- (single_filter, "single_filtered"),
- (multi_filter, "multi_filtered"),
- ]:
- with (dest / "{}.csv".format(output_filename)).open(
- "w", encoding="utf-8"
- ) as csv:
- for (shortcut, flt), v in sorted(filters.items(), key=sort_key):
- csv.write(":kbd:`{}`\t{}\t{}\n".format(shortcut, flt, v))
+ ipy_bindings = create_ipython_shortcuts(_DummyTerminal(), for_all_platforms=True)
+
+ session = PromptSession(key_bindings=ipy_bindings)
+ prompt_bindings = session.app.key_bindings
+
+ assert prompt_bindings
+ # Ensure that we collected the default shortcuts
+ assert len(prompt_bindings.bindings) > len(ipy_bindings.bindings)
+
+ bindings = bindings_from_prompt_toolkit(prompt_bindings)
+
+ def sort_key(binding: Binding):
+ return binding.handler.identifier, binding.shortcut.filter
+
+ filters = []
+ with (dest / "table.tsv").open("w", encoding="utf-8") as csv:
+ for binding in sorted(bindings, key=sort_key):
+ sequence = ", ".join(
+ [format_prompt_keys(keys) for keys in binding.shortcut.keys_sequence]
+ )
+ if binding.shortcut.filter == "always":
+ condition_label = "-"
+ else:
+ # we cannot fit all the columns as the filters got too complex over time
+ condition_label = "ⓘ"
+
+ csv.write(
+ "\t".join(
+ [
+ sequence,
+ sentencize(binding.handler.description)
+ + f" :raw-html:`<br>` `{binding.handler.identifier}`",
+ f':raw-html:`<span title="{html_escape(binding.shortcut.filter)}" style="cursor: help">{condition_label}</span>`',
+ ]
+ )
+ + "\n"
+ )
diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css
new file mode 100644
index 00000000000..156db8c24b0
--- /dev/null
+++ b/docs/source/_static/theme_overrides.css
@@ -0,0 +1,7 @@
+/*
+ Needed to revert problematic lack of wrapping in sphinx_rtd_theme, see:
+ https://github.com/readthedocs/sphinx_rtd_theme/issues/117
+*/
+.wy-table-responsive table.shortcuts td, .wy-table-responsive table.shortcuts th {
+ white-space: normal!important;
+}
diff --git a/docs/source/conf.py b/docs/source/conf.py
index d04d4637ba7..868c0d0e346 100755
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -211,7 +211,6 @@ def filter(self, record):
# given in html_static_path.
# html_style = 'default.css'
-
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
@@ -327,6 +326,10 @@ def filter(self, record):
modindex_common_prefix = ['IPython.']
+def setup(app):
+ app.add_css_file("theme_overrides.css")
+
+
# Cleanup
# -------
# delete release info to avoid pickling errors from sphinx
diff --git a/docs/source/config/shortcuts/index.rst b/docs/source/config/shortcuts/index.rst
index 4103d92a7bd..e361ec26c5d 100755
--- a/docs/source/config/shortcuts/index.rst
+++ b/docs/source/config/shortcuts/index.rst
@@ -4,28 +4,23 @@ IPython shortcuts
Available shortcuts in an IPython terminal.
-.. warning::
+.. note::
- This list is automatically generated, and may not hold all available
- shortcuts. In particular, it may depend on the version of ``prompt_toolkit``
- installed during the generation of this page.
+ This list is automatically generated. Key bindings defined in ``prompt_toolkit`` may differ
+ between installations depending on the ``prompt_toolkit`` version.
-Single Filtered shortcuts
-=========================
-
-.. csv-table::
- :header: Shortcut,Filter,Description
- :widths: 30, 30, 100
- :delim: tab
- :file: single_filtered.csv
+* Comma-separated keys, e.g. :kbd:`Esc`, :kbd:`f`, indicate a sequence which can be activated by pressing the listed keys in succession.
+* Plus-separated keys, e.g. :kbd:`Esc` + :kbd:`f` indicate a combination which requires pressing all keys simultaneously.
+* Hover over the ⓘ icon in the filter column to see when the shortcut is active.g
+.. role:: raw-html(raw)
+ :format: html
-Multi Filtered shortcuts
-========================
.. csv-table::
- :header: Shortcut,Filter,Description
- :widths: 30, 30, 100
+ :header: Shortcut,Description and identifier,Filter
:delim: tab
- :file: multi_filtered.csv
+ :class: shortcuts
+ :file: table.tsv
+ :widths: 20 75 5
diff --git a/setup.cfg b/setup.cfg
index de327aba545..d196214d19a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -37,7 +37,7 @@ install_requires =
matplotlib-inline
pexpect>4.3; sys_platform != "win32"
pickleshare
- prompt_toolkit>=3.0.11,<3.1.0
+ prompt_toolkit>=3.0.30,<3.1.0
pygments>=2.4.0
stack_data
traitlets>=5
| diff --git a/IPython/terminal/tests/test_shortcuts.py b/IPython/terminal/tests/test_shortcuts.py
new file mode 100644
index 00000000000..309205d4f54
--- /dev/null
+++ b/IPython/terminal/tests/test_shortcuts.py
@@ -0,0 +1,318 @@
+import pytest
+from IPython.terminal.shortcuts.auto_suggest import (
+ accept,
+ accept_in_vi_insert_mode,
+ accept_token,
+ accept_character,
+ accept_word,
+ accept_and_keep_cursor,
+ discard,
+ NavigableAutoSuggestFromHistory,
+ swap_autosuggestion_up,
+ swap_autosuggestion_down,
+)
+
+from prompt_toolkit.history import InMemoryHistory
+from prompt_toolkit.buffer import Buffer
+from prompt_toolkit.document import Document
+from prompt_toolkit.auto_suggest import AutoSuggestFromHistory
+
+from unittest.mock import patch, Mock
+
+
+def make_event(text, cursor, suggestion):
+ event = Mock()
+ event.current_buffer = Mock()
+ event.current_buffer.suggestion = Mock()
+ event.current_buffer.text = text
+ event.current_buffer.cursor_position = cursor
+ event.current_buffer.suggestion.text = suggestion
+ event.current_buffer.document = Document(text=text, cursor_position=cursor)
+ return event
+
+
[email protected](
+ "text, suggestion, expected",
+ [
+ ("", "def out(tag: str, n=50):", "def out(tag: str, n=50):"),
+ ("def ", "out(tag: str, n=50):", "out(tag: str, n=50):"),
+ ],
+)
+def test_accept(text, suggestion, expected):
+ event = make_event(text, len(text), suggestion)
+ buffer = event.current_buffer
+ buffer.insert_text = Mock()
+ accept(event)
+ assert buffer.insert_text.called
+ assert buffer.insert_text.call_args[0] == (expected,)
+
+
[email protected](
+ "text, suggestion",
+ [
+ ("", "def out(tag: str, n=50):"),
+ ("def ", "out(tag: str, n=50):"),
+ ],
+)
+def test_discard(text, suggestion):
+ event = make_event(text, len(text), suggestion)
+ buffer = event.current_buffer
+ buffer.insert_text = Mock()
+ discard(event)
+ assert not buffer.insert_text.called
+ assert buffer.suggestion is None
+
+
[email protected](
+ "text, cursor, suggestion, called",
+ [
+ ("123456", 6, "123456789", True),
+ ("123456", 3, "123456789", False),
+ ("123456 \n789", 6, "123456789", True),
+ ],
+)
+def test_autosuggest_at_EOL(text, cursor, suggestion, called):
+ """
+ test that autosuggest is only applied at end of line.
+ """
+
+ event = make_event(text, cursor, suggestion)
+ event.current_buffer.insert_text = Mock()
+ accept_in_vi_insert_mode(event)
+ if called:
+ event.current_buffer.insert_text.assert_called()
+ else:
+ event.current_buffer.insert_text.assert_not_called()
+ # event.current_buffer.document.get_end_of_line_position.assert_called()
+
+
[email protected](
+ "text, suggestion, expected",
+ [
+ ("", "def out(tag: str, n=50):", "def "),
+ ("d", "ef out(tag: str, n=50):", "ef "),
+ ("de ", "f out(tag: str, n=50):", "f "),
+ ("def", " out(tag: str, n=50):", " "),
+ ("def ", "out(tag: str, n=50):", "out("),
+ ("def o", "ut(tag: str, n=50):", "ut("),
+ ("def ou", "t(tag: str, n=50):", "t("),
+ ("def out", "(tag: str, n=50):", "("),
+ ("def out(", "tag: str, n=50):", "tag: "),
+ ("def out(t", "ag: str, n=50):", "ag: "),
+ ("def out(ta", "g: str, n=50):", "g: "),
+ ("def out(tag", ": str, n=50):", ": "),
+ ("def out(tag:", " str, n=50):", " "),
+ ("def out(tag: ", "str, n=50):", "str, "),
+ ("def out(tag: s", "tr, n=50):", "tr, "),
+ ("def out(tag: st", "r, n=50):", "r, "),
+ ("def out(tag: str", ", n=50):", ", n"),
+ ("def out(tag: str,", " n=50):", " n"),
+ ("def out(tag: str, ", "n=50):", "n="),
+ ("def out(tag: str, n", "=50):", "="),
+ ("def out(tag: str, n=", "50):", "50)"),
+ ("def out(tag: str, n=5", "0):", "0)"),
+ ("def out(tag: str, n=50", "):", "):"),
+ ("def out(tag: str, n=50)", ":", ":"),
+ ],
+)
+def test_autosuggest_token(text, suggestion, expected):
+ event = make_event(text, len(text), suggestion)
+ event.current_buffer.insert_text = Mock()
+ accept_token(event)
+ assert event.current_buffer.insert_text.called
+ assert event.current_buffer.insert_text.call_args[0] == (expected,)
+
+
[email protected](
+ "text, suggestion, expected",
+ [
+ ("", "def out(tag: str, n=50):", "d"),
+ ("d", "ef out(tag: str, n=50):", "e"),
+ ("de ", "f out(tag: str, n=50):", "f"),
+ ("def", " out(tag: str, n=50):", " "),
+ ],
+)
+def test_accept_character(text, suggestion, expected):
+ event = make_event(text, len(text), suggestion)
+ event.current_buffer.insert_text = Mock()
+ accept_character(event)
+ assert event.current_buffer.insert_text.called
+ assert event.current_buffer.insert_text.call_args[0] == (expected,)
+
+
[email protected](
+ "text, suggestion, expected",
+ [
+ ("", "def out(tag: str, n=50):", "def "),
+ ("d", "ef out(tag: str, n=50):", "ef "),
+ ("de", "f out(tag: str, n=50):", "f "),
+ ("def", " out(tag: str, n=50):", " "),
+ # (this is why we also have accept_token)
+ ("def ", "out(tag: str, n=50):", "out(tag: "),
+ ],
+)
+def test_accept_word(text, suggestion, expected):
+ event = make_event(text, len(text), suggestion)
+ event.current_buffer.insert_text = Mock()
+ accept_word(event)
+ assert event.current_buffer.insert_text.called
+ assert event.current_buffer.insert_text.call_args[0] == (expected,)
+
+
[email protected](
+ "text, suggestion, expected, cursor",
+ [
+ ("", "def out(tag: str, n=50):", "def out(tag: str, n=50):", 0),
+ ("def ", "out(tag: str, n=50):", "out(tag: str, n=50):", 4),
+ ],
+)
+def test_accept_and_keep_cursor(text, suggestion, expected, cursor):
+ event = make_event(text, cursor, suggestion)
+ buffer = event.current_buffer
+ buffer.insert_text = Mock()
+ accept_and_keep_cursor(event)
+ assert buffer.insert_text.called
+ assert buffer.insert_text.call_args[0] == (expected,)
+ assert buffer.cursor_position == cursor
+
+
+def test_autosuggest_token_empty():
+ full = "def out(tag: str, n=50):"
+ event = make_event(full, len(full), "")
+ event.current_buffer.insert_text = Mock()
+
+ with patch(
+ "prompt_toolkit.key_binding.bindings.named_commands.forward_word"
+ ) as forward_word:
+ accept_token(event)
+ assert not event.current_buffer.insert_text.called
+ assert forward_word.called
+
+
+def test_other_providers():
+ """Ensure that swapping autosuggestions does not break with other providers"""
+ provider = AutoSuggestFromHistory()
+ up = swap_autosuggestion_up(provider)
+ down = swap_autosuggestion_down(provider)
+ event = Mock()
+ event.current_buffer = Buffer()
+ assert up(event) is None
+ assert down(event) is None
+
+
+async def test_navigable_provider():
+ provider = NavigableAutoSuggestFromHistory()
+ history = InMemoryHistory(history_strings=["very_a", "very", "very_b", "very_c"])
+ buffer = Buffer(history=history)
+
+ async for _ in history.load():
+ pass
+
+ buffer.cursor_position = 5
+ buffer.text = "very"
+
+ up = swap_autosuggestion_up(provider)
+ down = swap_autosuggestion_down(provider)
+
+ event = Mock()
+ event.current_buffer = buffer
+
+ def get_suggestion():
+ suggestion = provider.get_suggestion(buffer, buffer.document)
+ buffer.suggestion = suggestion
+ return suggestion
+
+ assert get_suggestion().text == "_c"
+
+ # should go up
+ up(event)
+ assert get_suggestion().text == "_b"
+
+ # should skip over 'very' which is identical to buffer content
+ up(event)
+ assert get_suggestion().text == "_a"
+
+ # should cycle back to beginning
+ up(event)
+ assert get_suggestion().text == "_c"
+
+ # should cycle back through end boundary
+ down(event)
+ assert get_suggestion().text == "_a"
+
+ down(event)
+ assert get_suggestion().text == "_b"
+
+ down(event)
+ assert get_suggestion().text == "_c"
+
+ down(event)
+ assert get_suggestion().text == "_a"
+
+
+async def test_navigable_provider_multiline_entries():
+ provider = NavigableAutoSuggestFromHistory()
+ history = InMemoryHistory(history_strings=["very_a\nvery_b", "very_c"])
+ buffer = Buffer(history=history)
+
+ async for _ in history.load():
+ pass
+
+ buffer.cursor_position = 5
+ buffer.text = "very"
+ up = swap_autosuggestion_up(provider)
+ down = swap_autosuggestion_down(provider)
+
+ event = Mock()
+ event.current_buffer = buffer
+
+ def get_suggestion():
+ suggestion = provider.get_suggestion(buffer, buffer.document)
+ buffer.suggestion = suggestion
+ return suggestion
+
+ assert get_suggestion().text == "_c"
+
+ up(event)
+ assert get_suggestion().text == "_b"
+
+ up(event)
+ assert get_suggestion().text == "_a"
+
+ down(event)
+ assert get_suggestion().text == "_b"
+
+ down(event)
+ assert get_suggestion().text == "_c"
+
+
+def create_session_mock():
+ session = Mock()
+ session.default_buffer = Buffer()
+ return session
+
+
+def test_navigable_provider_connection():
+ provider = NavigableAutoSuggestFromHistory()
+ provider.skip_lines = 1
+
+ session_1 = create_session_mock()
+ provider.connect(session_1)
+
+ assert provider.skip_lines == 1
+ session_1.default_buffer.on_text_insert.fire()
+ assert provider.skip_lines == 0
+
+ session_2 = create_session_mock()
+ provider.connect(session_2)
+ provider.skip_lines = 2
+
+ assert provider.skip_lines == 2
+ session_2.default_buffer.on_text_insert.fire()
+ assert provider.skip_lines == 0
+
+ provider.skip_lines = 3
+ provider.disconnect()
+ session_1.default_buffer.on_text_insert.fire()
+ session_2.default_buffer.on_text_insert.fire()
+ assert provider.skip_lines == 3
diff --git a/IPython/tests/test_shortcuts.py b/IPython/tests/test_shortcuts.py
deleted file mode 100644
index 42edb92ba58..00000000000
--- a/IPython/tests/test_shortcuts.py
+++ /dev/null
@@ -1,40 +0,0 @@
-import pytest
-from IPython.terminal.shortcuts import _apply_autosuggest
-
-from unittest.mock import Mock
-
-
-def make_event(text, cursor, suggestion):
- event = Mock()
- event.current_buffer = Mock()
- event.current_buffer.suggestion = Mock()
- event.current_buffer.cursor_position = cursor
- event.current_buffer.suggestion.text = suggestion
- event.current_buffer.document = Mock()
- event.current_buffer.document.get_end_of_line_position = Mock(return_value=0)
- event.current_buffer.document.text = text
- event.current_buffer.document.cursor_position = cursor
- return event
-
-
[email protected](
- "text, cursor, suggestion, called",
- [
- ("123456", 6, "123456789", True),
- ("123456", 3, "123456789", False),
- ("123456 \n789", 6, "123456789", True),
- ],
-)
-def test_autosuggest_at_EOL(text, cursor, suggestion, called):
- """
- test that autosuggest is only applied at end of line.
- """
-
- event = make_event(text, cursor, suggestion)
- event.current_buffer.insert_text = Mock()
- _apply_autosuggest(event)
- if called:
- event.current_buffer.insert_text.assert_called()
- else:
- event.current_buffer.insert_text.assert_not_called()
- # event.current_buffer.document.get_end_of_line_position.assert_called()
| Improve autocomplete UX
Hi,
IPython recently introduced hinted suggestions as input is being typed. The user can accept the suggestion by pressing END or RIGHT. Alternatively, the user can scroll through other prefix matches in the history by pressing UP (and DOWN). However, all these modes of navigation move the cursor to the end of the line. It is impossible to accept a prefix of a hinted suggestion.
We would like to propose keeping the cursor in place and naturally supporting the cursor movement with the logic of “accept anything that is on the LHS of the cursor”. This would allow reusing long prefixes without the need to accept the entire line and make edits from its end.
For example, suppose the history includes
very.long.module.foo.func()
very.long.module.bar.Baz()
The user types the prefix “very.”. The hinted suggestion would be “long.module.bar.Baz()”. The user can now press:
1. RIGHT/CTRL-RIGHT to accept letters/words from the hinted completion. This would make it easier to type “very.long.module.bar.Zap()”.
2. END to accept the entire suggestion.
3. UP to replace the hinted suggestion with “long.module.foo.func()” (cursor stays in place).
4. BACKSPACE to delete last character and resume hinting from the new prefix (currently, it aborts hinting).
5. LEFT to accept the hint and move the cursor to the left.
6. New key binding to accept the suggestion but keep cursor in place.
Thoughts?
Missing keyboard shortcuts documentation after v6.5.0
It looks like something went wrong with the keyboard shortcuts documentation generation after version 6.5.0:
Here in v6.5.0, the full list of shortcuts is documented:
https://ipython.readthedocs.io/en/6.5.0/config/shortcuts/index.html
In the next version, and **all newer versions** (to current 7.5.0), it's missing almost all of them:
https://ipython.readthedocs.io/en/7.1.0/config/shortcuts/index.html
| I like this proposal, especially suggestions (1), (2), (3), (4).
Currently accepting word-by-word is possible using <kbd>Alt</kbd> + <kbd>f</kbd> shortcut (or <kbd>Esc</kbd> followed by <kbd>f</kbd>), but the behaviour could be improved and better documented. Currently the definition of "word" is very simplistic (based on spaces only), e.g. `def output_many_nodes(tag: str, n=50000):` completes in order:
- `def `
- `output_many_nodes(tag: `
- `str, `
- `n=50000):`
To achieve property-by-property completion (`very.long.module.foo.func()`) we should use a proper Python tokenizer instead, possibly merging consecutive 1-character tokens together, so that `n=`, `):` and `()` are completed together.
> (5) LEFT to accept the hint and move the cursor to the left.
This might not always what the user wants and even annoying outside the happy path. If the user makes a typo left to the cursor and get incorrect hint as a consequence, they may want to edit the typo and then get resumed hinting rather than get the (incorrect) hint accepted (and then need to fix both the typo and remove incorrect hint)
> (6) New key binding to accept the suggestion but keep cursor in place.
There are already many key bindings for this feature and more were proposed (https://github.com/ipython/ipython/pull/12589). It would be fine if we can find something which is intuitive for most users, but otherwise maybe this could be behind a setting to avoid adding too many default key bindings?
Fish-shell also uses <kbd>Alt</kbd> + <kbd>→</kbd> (in addition to <kbd>Alt</kbd> + <kbd>f</kbd>) for word-by-word suggestions ([ref](https://fishshell.com/docs/current/interactive.html#autosuggestions)).
> This might not always what the user wants and even annoying outside the happy path.
That makes sense, let's drop 5.
> It would be fine if we can find something which is intuitive for most users, but otherwise maybe this could be behind a setting to avoid adding too many default key bindings?
Yes. Similar to https://github.com/ipython/ipython/issues/13879#issuecomment-1371270698, maybe we should allow for much greater user customization of key-bindings.
That's likely because we change version of prompt_toolkit, and should figure out how to get the default bindings to appear on this page.
I'd imagine:
[./ipython/docs/autogen_shortcuts.py](../ipython/blob/master/docs/autogen_shortcuts.py)
is the relevant code if that helps at all.
This is still very much relevant in 8.x stream. | 2023-01-08T23:32:31Z | 2023-01-23T08:36:38Z | [] | [] | ["IPython/core/tests/test_magic.py::test_magic_parse_options", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push_accepts_more3", "IPython/core/tests/test_inputtransformer.py::test_cellmagic", "IPython/core/tests/test_interactiveshell.py::test_run_cell_async", "IPython/utils/tests/test_path.py::test_unescape_glob[\\\\*\\\\[\\\\!\\\\]\\\\?-*[!]?]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_can_pickle", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def -out(tag: str, n=50):-out(]", "IPython/core/tests/test_iplib.py::IPython.core.tests.test_iplib.doctest_tb_sysexit", "IPython/lib/tests/test_display.py::TestAudioDataWithoutNumpy::test_audio_data_without_normalization_raises_for_invalid_data", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[de-f out(tag: str, n=50):-f ]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 in [1] in [[2]]-False]", "IPython/core/tests/test_completer.py::TestCompleter::test_default_arguments_from_docstring", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-True-True]", "IPython/core/tests/test_ultratb.py::SyntaxErrorTest::test_non_syntaxerror", "IPython/testing/plugin/dtexample.py::IPython.testing.plugin.dtexample.iprand", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_dedent_continue", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 < 2 > 1 > 0 > -1 < 1-True]", "IPython/core/tests/test_magic.py::test_config_print_class", "IPython/core/tests/test_formatters.py::test_bad_precision", "IPython/core/tests/test_oinspect.py::test_pinfo_nonascii", "IPython/utils/tests/test_sysinfo.py::test_num_cpus", "IPython/core/tests/test_history.py::test_get_tail_session_awareness", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, -n=50):-n=]", "IPython/core/tests/test_guarded_eval.py::test_object", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 < 1-False]", "IPython/core/tests/test_ultratb.py::SyntaxErrorTest::test_changing_py_file", "IPython/lib/tests/test_backgroundjobs.py::test_flush", "IPython/core/tests/test_inputtransformer2_line.py::test_classic_prompt", "IPython/core/tests/test_inputsplitter.py::LineModeCellMagics::test_whole_cell", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-class C: pass]", "IPython/core/tests/test_guarded_eval.py::test_set_literal", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_check_complete", "IPython/core/tests/test_guarded_eval.py::test_access_builtins_fails", "IPython/core/tests/test_inputtransformer.py::test_escaped_paren", "IPython/utils/tests/test_path.py::TestLinkOrCopy::test_link_into_dir", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_class_attributes", "IPython/utils/tests/test_path.py::test_get_home_dir_4", "IPython/utils/tests/test_dir2.py::test_SubClass", "IPython/testing/plugin/test_example.txt::test_example.txt", "IPython/core/tests/test_magic.py::test_timeit_return_quiet", "IPython/testing/tests/test_tools.py::test_full_path_posix", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[.1.-None]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 in [1]-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 in [1] in [[2]]-False]", "IPython/core/tests/test_magic.py::TestEnv::test_env", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_silent_postexec", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 < 1-False]", "IPython/core/tests/test_magic.py::test_run_module_from_import_hook", "IPython/core/tests/test_magic.py::test_script_bg_err", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_showtraceback_with_surrogates", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[, 1 + 1-None]", "IPython/core/tests/test_run.py::TestMagicRunWithPackage::test_module_options_with_separator", "IPython/core/tests/test_compilerop.py::test_proper_default_encoding", "IPython/testing/tests/test_decorators.py::test_osx", "IPython/utils/tests/test_text.py::test_dollar_formatter", "IPython/core/tests/test_autocall.py::test_autocall_should_ignore_raw_strings", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 in [1]-True]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_II[def foo():\\n \"\"\"-expected0]", "IPython/core/tests/test_oinspect.py::test_render_signature_long", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=50-):-):]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-5 / 2-2.5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-True is False-False]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_open_standard_error_stream", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-1 + 1-2]", "IPython/core/tests/test_formatters.py::test_pretty", "IPython/lib/tests/test_display.py::test_existing_path_FileLinks_repr", "IPython/core/tests/test_oinspect.py::test_bool_raise", "IPython/core/tests/test_interactiveshell.py::test_custom_exc_count", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 <= 2-True]", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste", "IPython/core/tests/test_splitinput.py::test_split_user_input", "IPython/utils/tests/test_capture.py::test_rich_output_metadata[method_mime1]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[a \\\\ -invalid-None]", "IPython/core/tests/test_formatters.py::test_nowarn_notimplemented", "IPython/core/tests/test_paths.py::test_get_ipython_dir_3", "IPython/core/tests/test_display.py::test_display_id", "IPython/core/tests/test_oinspect.py::test_find_file_magic", "IPython/utils/tests/test_module_paths.py::test_tempdir", "IPython/utils/tests/test_imports.py::test_import_wildcard", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.merge", "IPython/lib/tests/test_imports.py::test_import_backgroundjobs", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[.1 -None]", "IPython/terminal/tests/test_interactivshell.py::TestElide::test_elide", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_var_expand", "IPython/core/tests/test_inputsplitter.py::NoInputEncodingTestCase::test", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_push_accepts_more5", "IPython/core/tests/test_run.py::TestMagicRunPass::test_builtins_id", "IPython/core/tests/test_guarded_eval.py::test_guards_binary_operations", "IPython/core/tests/test_magic.py::CellMagicTestCase::test_cell_magic_reg", "IPython/core/tests/test_application.py::test_unicode_cwd", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[())(-expected7]", "IPython/lib/tests/test_pretty.py::test_mappingproxy", "IPython/core/tests/test_guarded_eval.py::test_guards_unary_operations", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_bytes", "IPython/lib/tests/test_pretty.py::test_really_bad_repr", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_email2", "IPython/core/tests/test_history.py::test_magic_rerun", "IPython/core/history.py::IPython.core.history.extract_hist_ranges", "IPython/core/tests/test_guarded_eval.py::test_evaluates_if_expression", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_invalids", "IPython/core/tests/test_page.py::test_detect_screen_size", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_II[async with example:\\n pass\\n -expected2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-1.0-1.0]", "IPython/core/tests/test_formatters.py::test_error_pretty_method", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-False is False-True]", "IPython/core/tests/test_magic.py::test_macro_run", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-del x]", "IPython/testing/tests/test_tools.py::test_parser", "IPython/core/tests/test_guarded_eval.py::test_rejects_forbidden", "IPython/core/tests/test_debugger.py::test_where_erase_value", "IPython/utils/tests/test_process.py::test_arg_split[h\\u01cello-argv2]", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression_with_iterator", "IPython/core/tests/test_completer.py::TestCompleter::test_latex_no_results", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-[]-expected6]", "IPython/lib/tests/test_pretty.py::test_pprint_break_repr", "IPython/utils/tests/test_path.py::TestLinkOrCopy::test_target_exists", "IPython/core/tests/test_magic.py::test_extract_symbols_raises_exception_with_non_python_code", "IPython/core/tests/test_async_helpers.py::AsyncTest::test_nonlocal", "IPython/utils/tests/test_text.py::test_columnize_long[True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 == 2-False]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=-50):-50)]", "IPython/core/tests/test_formatters.py::test_error_method", "IPython/core/tests/test_interactiveshell.py::test_should_run_async", "IPython/core/tests/test_ultratb.py::Python3ChainedExceptionsTest::test_plain_direct_cause_error", "IPython/terminal/tests/test_interactivshell.py::TestContextAwareCompletion::test_adjust_completion_text_based_on_context", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_var_expand_self", "IPython/core/tests/test_imports.py::test_import_oinspect", "IPython/lib/tests/test_latextools.py::test_latex_to_png_invalid_hex_colors", "IPython/core/tests/test_display.py::test_retina_jpeg", "IPython/core/tests/test_interactiveshell.py::TestSafeExecfileNonAsciiPath::test_1", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 <= 2-True]", "IPython/core/tests/test_hooks.py::test_command_chain_dispatcher_fofo", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[def- out(tag: str, n=50):- ]", "IPython/core/tests/test_history.py::test_history", "IPython/core/tests/test_compilerop.py::test_code_name", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider_connection", "IPython/core/tests/test_magic.py::test_doctest_mode", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push_accepts_more2", "IPython/testing/plugin/dtexample.py::IPython.testing.plugin.dtexample.ipfunc", "IPython/lib/tests/test_display.py::TestAudioDataWithNumpy::test_audio_data_without_normalization_raises_for_invalid_data", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-None-None]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[, 1-1]", "IPython/core/tests/test_prefilter.py::test_prefilter_shadowed", "IPython/utils/tests/test_text.py::test_LSString", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[for a in range(5):\\n if a > 0:-incomplete-8]", "IPython/utils/tests/test_pycolorize.py::test_parse_error[Linux]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_source", "IPython/utils/tests/test_path.py::test_ensure_dir_exists", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_email_py", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-3 - 1-2]", "IPython/core/tests/test_oinspect.py::test_getsource", "IPython/core/tests/test_magic.py::TestXdel::test_xdel", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_indent", "IPython/core/tests/test_ultratb.py::NonAsciiTest::test_iso8859_5", "IPython/core/tests/test_async_helpers.py::AsyncTest::test_in_func_no_error", "IPython/core/tests/test_magic.py::test_time_last_not_expression", "IPython/core/tests/test_inputsplitter.py::LineModeCellMagics::test_cellmagic_help", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_push2", "IPython/core/tests/test_completer.py::test_line_split", "IPython/core/tests/test_interactiveshell.py::ExitCodeChecks::test_exit_code_ok", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-False is not True-True]", "IPython/core/tests/test_formatters.py::test_pdf_formatter", "IPython/core/tests/test_magic.py::TestEnv::test_env_get_set_simple", "IPython/core/tests/test_oinspect.py::test_property_sources", "IPython/utils/tests/test_module_paths.py::test_find_mod_3", "IPython/core/tests/test_guarded_eval.py::test_access_builtins[context2]", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_simpledef", "IPython/core/tests/test_magic.py::test_magic_not_found", "IPython/lib/tests/test_deepreload.py::test_not_in_sys_modules", "IPython/core/tests/test_completer.py::TestCompleter::test_aimport_module_completer", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[)-expected0]", "IPython/core/tests/test_completer.py::TestCompleter::test_back_unicode_completion", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_trailing_newline", "IPython/core/tests/test_magic.py::test_ls_magic", "IPython/utils/tests/test_capture.py::test_rich_output_no_metadata[method_mime4]", "IPython/utils/tests/test_sysinfo.py::test_json_getsysinfo", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression", "IPython/core/tests/test_guarded_eval.py::test_guards_locals_and_globals", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes3", "IPython/core/tests/test_interactiveshell.py::TestSystemRaw::test_1", "IPython/core/tests/test_inputtransformer.py::test_escaped_shell", "IPython/core/tests/test_prompts.py::PromptTests::test_lazy_eval_unicode", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[-1.--1.]", "IPython/utils/tests/test_pycolorize.py::test_parse_sample[Linux]", "IPython/terminal/tests/test_shortcuts.py::test_discard[-def out(tag: str, n=50):]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_push_accepts_more2", "IPython/lib/tests/test_pretty.py::test_indentation", "IPython/core/tests/test_oinspect.py::test_definition_kwonlyargs", "IPython/utils/tests/test_path.py::test_get_xdg_dir_2", "IPython/utils/tests/test_dir2.py::test_SubClass_with_trait_names_attr", "IPython/utils/tests/test_path.py::test_get_xdg_dir_1", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-2 * 3-6]", "IPython/core/tests/test_imports.py::test_import_excolors", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[-def out(tag: str, n=50):-d]", "IPython/core/tests/test_ultratb.py::IndentationErrorTest::test_indentationerror_shows_line", "IPython/core/tests/test_guarded_eval.py::test_evaluates_calls[data0-data.index(2)-data.append(4)-1]", "IPython/utils/tests/test_path.py::test_get_home_dir_3", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-0 in [1]-False]", "IPython/core/tests/test_events.py::CallbackTests::test_ignore_event_arguments_if_no_argument_required", "IPython/testing/plugin/test_refs.py::IPython.testing.plugin.test_refs.doctest_ivars", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_custom_exception", "IPython/testing/plugin/test_ipdoctest.py::IPython.testing.plugin.test_ipdoctest.doctest_builtin_underscore", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.hasattr", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-4 > 3 > 2 > 1-True]", "IPython/core/tests/test_formatters.py::test_lookup_by_type", "IPython/core/tests/test_interactiveshell.py::test_set_custom_completer", "IPython/core/excolors.py::IPython.core.excolors.exception_colors", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context1-list(range(10))[-1:]-expected1]", "IPython/core/tests/test_async_helpers.py::AsyncTest::test_execute", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-2 << 1-4]", "IPython/terminal/tests/test_interactivshell.py::InteractiveShellTestCase::test_inputtransformer_syntaxerror", "IPython/core/tests/test_events.py::CallbackTests::test_register_unregister", "IPython/core/tests/test_async_helpers.py::AsyncTest::test_top_level_return_error", "IPython/core/tests/test_guarded_eval.py::test_access_builtins[context3]", "IPython/core/tests/test_completer.py::TestCompleter::test_get__all__entries_no__all__ok", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-5 / 2-2.5]", "IPython/core/tests/test_guarded_eval.py::test_method_descriptor", "IPython/core/tests/test_magic.py::test_script_bg_out_err", "IPython/core/tests/test_magic.py::test_extract_symbols", "IPython/core/tests/test_logger.py::test_logstart_unicode", "IPython/core/tests/test_logger.py::test_logstart_inaccessible_file", "IPython/core/tests/test_ultratb.py::RecursionTest::test_recursion_three_frames", "IPython/testing/plugin/test_ipdoctest.py::IPython.testing.plugin.test_ipdoctest.doctest_multiline2", "IPython/lib/tests/test_pretty.py::test_collections_deque", "IPython/lib/tests/test_display.py::test_error_on_file_to_FileLinks", "IPython/utils/tests/test_wildcard.py::Tests::test_nocase_showall", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing_explicit", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.__setitem__", "IPython/core/tests/test_async_helpers.py::AsyncTest::test_autoawait", "IPython/core/tests/test_magic.py::test_config", "IPython/core/tests/test_extension.py::test_non_extension", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=5-0):-0)]", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_run_ipy_file_attribute", "IPython/core/tests/test_run.py::TestMagicRunWithPackage::test_prun_submodule_with_relative_import", "IPython/core/tests/test_guarded_eval.py::test_assumption_instance_attr_do_not_matter", "IPython/core/tests/test_completerlib.py::test_import_invalid_module", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_obj_del", "IPython/testing/plugin/dtexample.py::IPython.testing.plugin.dtexample.pyfunc", "IPython/core/tests/test_iplib.py::test_run_cell", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 == 2-True]", "IPython/utils/tests/test_path.py::test_get_xdg_dir_3", "IPython/core/tests/test_interactiveshell.py::TestAstTransform2::test_run_cell", "IPython/core/tests/test_inputtransformer2.py::test_find_magic_escape", "IPython/core/tests/test_inputsplitter.py::test_find_next_indent", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[()](-expected9]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[0b_0011_1111_0100_1110-0b_0011_1111_0100_1110]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 in [1] in [[2]]-False]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def ou-t(tag: str, n=50):-t(]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-1 & 2-0]", "IPython/core/tests/test_magic.py::test_time3", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context0-list(range(20))[3:-2:3]-expected2]", "IPython/utils/tests/test_pycolorize.py::test_parse_sample[LightBG]", "IPython/core/tests/test_interactiveshell.py::TestAstTransformError::test_unregistering", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 >= 2-True]", "IPython/core/magics/code.py::IPython.core.magics.code.extract_symbols", "IPython/testing/tests/test_tools.py::Test_ipexec_validate::test_exception_path2", "IPython/core/tests/test_paths.py::test_get_ipython_dir_4", "IPython/lib/tests/test_pretty.py::test_dispatch", "IPython/utils/tests/test_path.py::test_get_long_path_name", "IPython/core/tests/test_imports.py::test_import_hooks", "IPython/core/tests/test_display.py::test_geojson", "IPython/core/tests/test_guarded_eval.py::test_list_literal", "IPython/utils/tests/test_process.py::SubProcessTestCase::test_system", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push_accepts_more", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[20-int]", "IPython/core/tests/test_interactiveshell.py::TestSystemRaw::test_exit_code_error", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_reset", "IPython/core/tests/test_formatters.py::test_repr_mime_failure", "IPython/core/tests/test_completer.py::TestCompleter::test_unicode_completions", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-True-True]", "IPython/core/tests/test_completer.py::TestCompleter::test_forward_unicode_completion", "IPython/core/tests/test_inputtransformer2.py::test_transform_assign_system", "IPython/core/tests/test_magic.py::test_config_available_configs", "IPython/core/tests/test_completer.py::TestCompleter::test_quoted_file_completions", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-del x]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_ofind_cell_magic", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[+1.-+1.]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_push_accepts_more4", "IPython/core/tests/test_guarded_eval.py::test_set", "IPython/core/tests/test_run.py::TestMagicRunWithPackage::test_run_submodule_with_absolute_import", "IPython/core/tests/test_history.py::test_extract_hist_ranges", "IPython/lib/tests/test_lexers.py::TestLexers::testIPythonLexer", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-None-None]", "IPython/core/tests/test_history.py::test_histmanager_disabled", "IPython/core/tests/test_shellapp.py::TestFileToRun::test_ipy_script_file_attribute", "IPython/testing/plugin/dtexample.py::IPython.testing.plugin.dtexample.ipos", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[1\\\\\\n+2-complete-None]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-5**2-25]", "IPython/utils/tests/test_text.py::test_full_eval_formatter", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_config", "IPython/core/tests/test_completer.py::TestCompleter::test_func_kw_completions", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context1--5--5]", "IPython/core/tests/test_interactiveshell.py::TestMiscTransform::test_transform_only_once", "IPython/core/tests/test_magic.py::test_script_out_err", "IPython/core/tests/test_completer.py::TestCompleter::test_percent_symbol_restrict_to_magic_completions", "IPython/core/tests/test_inputtransformer2_line.py::test_leading_indent", "IPython/core/tests/test_run.py::TestMagicRunWithPackage::test_run_submodule_with_relative_import", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[raise = 2-invalid-None]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[a = [1,\\n2,-incomplete-0]", "IPython/utils/tests/test_module_paths.py::test_find_mod_1", "IPython/core/tests/test_completer.py::TestCompleter::test_custom_completion_ordering", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.__getattr__", "IPython/core/tests/test_oinspect.py::test_info_awkward", "IPython/core/tests/test_magic.py::test_save_with_no_args", "IPython/core/tests/test_events.py::CallbackTests::test_unregister_during_callback", "IPython/utils/tests/test_tokenutil.py::test_attrs", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-6-123456789-True]", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[22-map]", "IPython/terminal/tests/test_help.py::test_profile_help", "IPython/core/tests/test_interactiveshell.py::TestWarningSuppression::test_warning_suppression", "IPython/utils/tests/test_pycolorize.py::test_parse_error[Neutral]", "IPython/core/tests/test_debugger.py::IPython.core.tests.test_debugger.can_exit", "IPython/core/tests/test_guarded_eval.py::test_assumption_named_tuples_share_getitem", "IPython/core/tests/test_inputtransformer2.py::test_continued_line", "IPython/core/tests/test_imports.py::test_import_debugger", "IPython/utils/tests/test_path.py::test_unescape_glob[\\\\\\\\a-\\\\a]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-True is True-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 < 4 < 3-False]", "IPython/core/tests/test_completer.py::TestCompleter::test_omit__names", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_mktempfile", "IPython/lib/tests/test_latextools.py::test_genelatex_wrap_with_breqn", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.__isub__", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_future_flags", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-0xXXXXXXXXX-3740122863]", "IPython/core/tests/test_prompts.py::PromptTests::test_lazy_eval_float", "IPython/core/tests/test_run.py::IPython.core.tests.test_run.doctest_reset_del", "IPython/core/tests/test_iplib.py::test_reset", "IPython/core/tests/test_completerlib.py::Test_magic_run_completer_nonascii::test_3", "IPython/testing/tests/test_ipunittest.py::ipdt_indented_test::test", "IPython/core/tests/test_imports.py::test_import_ultratb", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_push_accepts_more", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context2-(1\\n+\\n1)-2]", "IPython/core/tests/test_shellapp.py::TestFileToRun::test_py_script_file_attribute", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-2 << 1-4]", "IPython/core/tests/test_inputsplitter.py::test_last_blank", "IPython/core/tests/test_guarded_eval.py::test_external_not_installed", "IPython/core/tests/test_interactiveshell.py::TestAstTransform2::test_timeit", "IPython/core/tests/test_formatters.py::test_pretty_max_seq_length", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[1 + 1-None]", "IPython/core/tests/test_imports.py::test_import_magic", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-1-1]", "IPython/utils/tests/test_capture.py::test_rich_output", "IPython/core/tests/test_formatters.py::test_for_type", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 <= 1-False]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-def func(): pass]", "IPython/utils/tests/test_importstring.py::test_import_plain", "IPython/core/tests/test_completerlib.py::test_bad_module_all", "IPython/utils/sysinfo.py::IPython.utils.sysinfo.sys_info", "IPython/testing/tests/test_decorators.py::test_win32", "IPython/core/tests/test_paths.py::test_get_ipython_dir_2", "IPython/core/tests/test_inputtransformer.py::test_escaped_help", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str-, n=50):-, n]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-1.0-1.0]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_ofind_slotted_attributes", "IPython/core/tests/test_application.py::test_cli_priority", "IPython/core/tests/test_displayhook.py::test_capture_display_hook_format", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_check_complete", "IPython/lib/tests/test_pretty.py::test_function_pretty", "IPython/core/tests/test_inputsplitter.py::CellModeCellMagics::test_incremental", "IPython/core/tests/test_oinspect.py::test_pdef", "IPython/core/tests/test_magic.py::test_script_out", "IPython/core/tests/test_profile.py::test_list_bundled_profiles", "IPython/core/tests/test_compilerop.py::test_cache", "IPython/core/tests/test_magic.py::test_edit_cell", "IPython/utils/tests/test_capture.py::test_capture_output", "IPython/lib/tests/test_display.py::test_warning_on_non_existent_path_FileLinks", "IPython/testing/tools.py::IPython.testing.tools.AssertPrints", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-3 - 1-2]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-def func(): pass]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-2 >> 1-1]", "IPython/utils/tests/test_module_paths.py::test_find_mod_2", "IPython/core/tests/test_inputtransformer.py::test_assign_system", "IPython/testing/plugin/test_combo.txt::test_combo.txt", "IPython/core/tests/test_magic.py::test_logging_magic_quiet_from_arg", "IPython/utils/tests/test_imports.py::test_import_PyColorize", "IPython/core/magics/script.py::IPython.core.magics.script.ScriptMagics.shebang", "IPython/core/tests/test_magic.py::IPython.core.tests.test_magic.test_debug_magic", "IPython/core/tests/test_paths.py::test_get_ipython_cache_dir", "IPython/core/tests/test_imports.py::test_import_macro", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-2 >> 1-1]", "IPython/core/tests/test_display.py::test_image_filename_defaults", "IPython/lib/tests/test_display.py::test_recursive_FileLinks", "IPython/core/tests/test_prefilter.py::test_prefilter", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-class C: pass]", "IPython/core/tests/test_formatters.py::test_ipython_display_formatter", "IPython/core/tests/test_completer.py::TestCompleter::test_cell_magics", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[+1-+1]", "IPython/utils/tests/test_capture.py::test_rich_output_display", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_file_options", "IPython/core/tests/test_autocall.py::IPython.core.tests.test_autocall.doctest_autocall", "IPython/utils/tests/test_process.py::SubProcessTestCase::test_getoutput_error", "IPython/core/tests/test_completer.py::TestCompleter::test_jedi", "IPython/core/tests/test_displayhook.py::test_output_displayed", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 in [1]-True]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_reset", "IPython/core/tests/test_magic.py::test_lazy_magics", "IPython/core/tests/test_paths.py::test_get_ipython_dir_1", "IPython/core/tests/test_completerlib.py::Test_magic_run_completer::test_completion_in_dir", "IPython/core/tests/test_magic.py::test_script_config", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token_empty", "IPython/core/tests/test_run.py::test_script_tb", "IPython/core/tests/test_inputtransformer.py::test_classic_prompt", "IPython/core/tests/test_alias.py::test_alias_lifecycle", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 == 2-True]", "IPython/core/tests/test_inputtransformer.py::test_assemble_python_lines", "IPython/lib/tests/test_backgroundjobs.py::test_longer", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 in [1] in [[1]]-True]", "IPython/lib/tests/test_pretty.py::test_bad_repr", "IPython/core/tests/test_history.py::test_hist_file_config", "IPython/core/tests/test_debugger.py::IPython.core.tests.test_debugger.test_ipdb_magics", "IPython/core/tests/test_magic.py::test_reset_dhist", "IPython/core/tests/test_inputtransformer2.py::test_transform_magic_escape", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[d-ef out(tag: str, n=50):-ef ]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 != 2-True]", "IPython/core/tests/test_async_helpers.py::AsyncTest::test_should_be_async", "IPython/core/tests/test_magic.py::test_debug_magic", "IPython/core/tests/test_inputtransformer.py::test_assemble_logical_lines", "IPython/core/tests/test_prefilter.py::test_autocall_should_support_unicode", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-9 < 2 < 3 < 4-False]", "IPython/core/tests/test_magic.py::test_file_amend", "IPython/core/tests/test_magic.py::test_dirops", "IPython/core/tests/test_inputtransformer2_line.py::test_crlf_magic", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 not in [1]-False]", "IPython/core/tests/test_display.py::test_textdisplayobj_pretty_repr", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(-tag: str, n=50):-tag: ]", "IPython/core/tests/test_completer.py::test_unicode_range", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-1 + 1-2]", "IPython/terminal/tests/test_interactivshell.py::TestElide::test_elide_typed_short_match", "IPython/core/tests/test_completer.py::TestCompleter::test_tryimport", "IPython/lib/tests/test_pretty.py::test_collections_defaultdict", "IPython/core/tests/test_inputsplitter.py::InteractiveLoopTestCase::test_simple2", "IPython/core/tests/test_interactiveshell.py::TestSystemPipedExitCode::test_exit_code_error", "IPython/core/tests/test_interactiveshell.py::TestModules::test_extraneous_loads", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 not in [1]-False]", "IPython/testing/tests/test_tools.py::Test_ipexec_validate::test_main_path2", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[-1--1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-1 & 1-1]", "IPython/core/tests/test_inputtransformer.py::test_escaped_quote", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_II[async with example:\\n pass-expected1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-1.0-1.0]", "IPython/core/tests/test_ultratb.py::Python3ChainedExceptionsTest::test_direct_cause_error", "IPython/lib/tests/test_deepreload.py::test_not_module", "IPython/utils/tests/test_openpy.py::test_detect_encoding", "IPython/lib/tests/test_pretty.py::test_sets[obj2-{1}]", "IPython/testing/tests/test_ipunittest.py::IPython.testing.tests.test_ipunittest.Foo.normaldt_method", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context0--5--5]", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_autoload_newly_added_objects", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[def -out(tag: str, n=50):-out(tag: ]", "IPython/lib/tests/test_display.py::test_instantiation_FileLinks", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression_with_jedi", "IPython/core/tests/test_oinspect.py::test_find_file", "IPython/utils/tests/test_pycolorize.py::test_parse_sample[Neutral]", "IPython/core/tests/test_prompts.py::PromptTests::test_lazy_eval_nonascii_bytes", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context1-+5-5]", "IPython/core/tests/test_oinspect.py::test_pinfo_type", "IPython/utils/contexts.py::IPython.utils.contexts.preserve_keys", "IPython/core/display_functions.py::IPython.core.display_functions.display", "IPython/utils/tests/test_tempdir.py::test_temporary_working_directory", "IPython/core/tests/test_display.py::test_image_alt_tag", "IPython/core/tests/test_oinspect.py::test_info_serialliar", "IPython/lib/tests/test_latextools.py::test_genelatex_no_wrap", "IPython/core/tests/test_completer.py::TestCompleter::test_import_module_completer", "IPython/core/tests/test_guarded_eval.py::test_named_tuple", "IPython/core/tests/test_hooks.py::test_command_chain_dispatcher_ff", "IPython/core/tests/test_magic.py::test_file_unicode", "IPython/lib/tests/test_backgroundjobs.py::test_result", "IPython/core/tests/test_completer.py::test_protect_filename", "IPython/core/tests/test_displayhook.py::test_underscore_no_overwrite_builtins", "IPython/core/tests/test_display.py::test_image_mimes", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_py_multi_r", "IPython/core/tests/test_ultratb.py::Python3ChainedExceptionsTest::test_suppress_exception_chaining", "IPython/testing/plugin/test_ipdoctest.py::IPython.testing.plugin.test_ipdoctest.doctest_multiline1", "IPython/utils/tests/test_path.py::test_unescape_glob[\\\\a-\\\\a]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-1-1]", "IPython/core/tests/test_completer.py::TestCompleter::test_completions_have_type", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-True-True]", "IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython]", "IPython/utils/tests/test_process.py::SubProcessTestCase::test_getoutput", "IPython/lib/tests/test_display.py::test_error_on_directory_to_FileLink", "IPython/core/tests/test_magic.py::TestResetErrors::test_reset_redefine", "IPython/core/tests/test_run.py::TestMagicRunWithPackage::test_prun_submodule_with_absolute_import", "IPython/core/tests/test_display.py::test_encourage_iframe_over_html", "IPython/core/tests/test_completer.py::TestCompleter::test_custom_completion_error", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[24-map]", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_line_continuation", "IPython/core/tests/test_magic.py::CellMagicTestCase::test_cell_magic_class2", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[27-map]", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_restrict_to_dicts", "IPython/core/tests/test_paths.py::test_get_ipython_dir_6", "IPython/utils/tests/test_text.py::test_SList", "IPython/utils/tests/test_tokenutil.py::test_multiline", "IPython/lib/tests/test_editorhooks.py::test_install_editor", "IPython/core/tests/test_extension.py::test_extension_loading", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 >= 2-True]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_dedent_continue", "IPython/core/tests/test_magic.py::IPython.core.tests.test_magic.doctest_precision", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_run_i_after_reset", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-1 + 1-2]", "IPython/core/tests/test_interactiveshell.py::TestAstTransformInputRejection::test_input_rejection", "IPython/external/tests/test_qt_loaders.py::test_import_denier", "IPython/utils/tests/test_deprecated.py::test_append_deprecated", "IPython/utils/tests/test_capture.py::test_rich_output_no_metadata[method_mime3]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 >= 2-False]", "IPython/utils/tests/test_path.py::TestLinkOrCopy::test_no_link", "IPython/utils/tests/test_tokenutil.py::test_line_at_cursor", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_cellmagic_preempt", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-{}-expected5]", "IPython/lib/tests/test_display.py::test_existing_path_FileLinks_alt_formatter", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_py_multi", "IPython/utils/tests/test_path.py::TestShellGlob::test_match_posix", "IPython/terminal/tests/test_interactivshell.py::TerminalMagicsTestCase::test_paste_magics_blankline", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_dedent_raise", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 == 2-True]", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_trailing_question", "IPython/core/tests/test_events.py::CallbackTests::test_cb_error", "IPython/utils/tests/test_imports.py::test_import_generics", "IPython/core/tests/test_formatters.py::test_repr_mime_meta", "IPython/utils/tests/test_pycolorize.py::test_parse_error[NoColor]", "IPython/utils/tests/test_text.py::test_eval_formatter", "IPython/core/tests/test_shellapp.py::TestFileToRun::test_py_script_file_attribute_interactively", "IPython/core/tests/test_oinspect.py::test_find_file_decorated1", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 in [1] in [[1]]-True]", "IPython/utils/tests/test_path.py::TestLinkOrCopy::test_link_twice", "IPython/core/tests/test_oinspect.py::test_pinfo_no_docstring_if_source", "IPython/lib/tests/test_pretty.py::test_metaclass_repr", "IPython/core/tests/test_completer.py::TestCompleter::test_get__all__entries_ok", "IPython/core/display.py::IPython.core.display.Image.__init__", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[17-int]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-x = 1]", "IPython/core/tests/test_magic.py::test_bookmark", "IPython/lib/tests/test_pretty.py::test_simplenamespace", "IPython/core/tests/test_magic.py::test_multiline_time", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 > 1-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context0-list(range(10))[-1:]-expected1]", "IPython/core/tests/test_magic.py::test_multiple_magics", "IPython/core/tests/test_debugger.py::test_interruptible_core_debugger", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-{}-expected5]", "IPython/core/tests/test_magic.py::test_timeit_arguments", "IPython/utils/tests/test_text.py::test_columnize_random", "IPython/utils/tests/test_process.py::SubProcessTestCase::test_get_output_error_code", "IPython/utils/tests/test_capture.py::test_capture_output_no_display", "IPython/utils/tests/test_imports.py::test_import_ipstruct", "IPython/core/tests/test_imports.py::test_import_usage", "IPython/core/tests/test_magic.py::test_timeit_special_syntax", "IPython/core/tests/test_imports.py::test_import_crashhandler", "IPython/core/interactiveshell.py::IPython.core.interactiveshell.InteractiveShell.get_path_links", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_dedent_raise", "IPython/core/tests/test_magic.py::test_reset_out", "IPython/core/tests/test_inputtransformer.py::test_has_comment", "IPython/terminal/tests/test_help.py::test_ipython_help", "IPython/core/tests/test_completer.py::TestCompleter::test_delim_setting", "IPython/lib/tests/test_imports.py::test_import_demo", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[\\\\\\r\\n-incomplete-0]", "IPython/testing/plugin/test_ipdoctest.py::IPython.testing.plugin.test_ipdoctest.doctest_simple", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_var_expand_local", "IPython/testing/tools.py::IPython.testing.tools.full_path", "IPython/utils/text.py::IPython.utils.text.list_strings", "IPython/core/tests/test_inputsplitter.py::InteractiveLoopTestCase::test_simple", "IPython/testing/plugin/test_refs.py::test_trivial", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context3-[]-expected6]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_last_execution_result", "IPython/utils/tests/test_process.py::test_find_cmd_fail", "IPython/core/tests/test_guarded_eval.py::test_number_attributes[complex.real-real]", "IPython/core/tests/test_interactiveshell.py::TestAstTransform::test_run_cell", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 != 2-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 < 1-False]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_dedent_break", "IPython/core/tests/test_completer.py::TestCompleter::test_abspath_file_completions", "IPython/terminal/tests/test_interactivshell.py::TestElide::test_elide_typed_normal", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-x += 1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 in [1] in [[1]]-True]", "IPython/core/tests/test_interactiveshell.py::TestSyntaxErrorTransformer::test_syntaxerror_input_transformer", "IPython/core/tests/test_imports.py::test_import_getipython", "IPython/utils/tests/test_path.py::test_get_home_dir_5", "IPython/core/tests/test_imports.py::test_import_release", "IPython/lib/tests/test_pretty.py::TestsPretty::test_unbound_method", "IPython/core/tests/test_alias.py::test_alias_args_error", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 >= 2-False]", "IPython/core/tests/test_formatters.py::test_repr_mime", "IPython/utils/text.py::IPython.utils.text.get_text_list", "IPython/core/tests/test_profile.py::ProfileStartupTest::test_startup_ipy", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_syntax_multiline_cell", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-class C: pass]", "IPython/core/tests/test_magic.py::test_extension", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.__iadd__", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_indent4", "IPython/core/tests/test_inputtransformer.py::test_help_end", "IPython/terminal/tests/test_help.py::test_locate_help", "IPython/utils/text.py::IPython.utils.text.marquee", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[de -f out(tag: str, n=50):-f]", "IPython/core/tests/test_run.py::TestMagicRunWithPackage::test_module_options", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-1 | 2-3]", "IPython/core/tests/test_inputsplitter.py::InteractiveLoopTestCase::test_xy", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_syntax", "IPython/core/tests/test_paths.py::test_get_ipython_dir_8", "IPython/core/tests/test_inputtransformer.py::test_assign_magic", "IPython/core/tests/test_display.py::test_displayobject_repr", "IPython/core/tests/test_inputtransformer2_line.py::test_leading_empty_lines", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_get_exception_only", "IPython/utils/text.py::IPython.utils.text.compute_item_matrix", "IPython/core/tests/test_handlers.py::test_handlers", "IPython/core/tests/test_inputsplitter.py::InteractiveLoopTestCase::test_abc", "IPython/core/tests/test_interactiveshell.py::ExitCodeChecks::test_exit_code_signal", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context2-+5-5]", "IPython/core/tests/test_interactiveshell.py::TestAstTransform::test_non_int_const", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-5 / 2-2.5]", "IPython/core/tests/test_magic.py::test_cell_magic_not_found", "IPython/utils/tests/test_path.py::test_get_py_filename", "IPython/core/tests/test_magic.py::test_timeit_invalid_return", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[}-expected2]", "IPython/utils/tests/test_capture.py::test_rich_output_metadata[method_mime0]", "IPython/utils/tests/test_pycolorize.py::test_parse_error[LightBG]", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push2", "IPython/utils/tests/test_tempdir.py::test_named_file_in_temporary_directory", "IPython/core/tests/test_display.py::test_display_available", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 < 2 > 1 > 0 > -1 < 1-True]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[1.234-1.234]", "IPython/core/tests/test_inputtransformer2.py::test_check_make_token_by_line_never_ends_empty", "IPython/core/tests/test_magic.py::IPython.core.tests.test_magic.doctest_hist_op", "IPython/core/tests/test_magic.py::test_edit_interactive", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.copy", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_indent3", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.__add__", "IPython/core/tests/test_completerlib.py::Test_magic_run_completer::test_completion_more_args", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[.1-.1]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-x += 1]", "IPython/lib/tests/test_pretty.py::TestsPretty::test_long_set", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_magic_names_in_string", "IPython/core/tests/test_guarded_eval.py::test_access_builtins[context0]", "IPython/core/display.py::IPython.core.display.GeoJSON.__init__", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_color", "IPython/lib/lexers.py::IPython.lib.lexers.IPythonConsoleLexer", "IPython/utils/text.py::IPython.utils.text.DollarFormatter", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-True is True-True]", "IPython/core/tests/test_completer.py::TestCompleter::test_object_key_completion", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-1 & 1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-True is not True-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-(1 < 4) < 3-True]", "IPython/testing/tests/test_decorators.py::IPython.testing.tests.test_decorators.FooClass", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_line_continuation", "IPython/utils/tests/test_module_paths.py::test_find_mod_4", "IPython/core/tests/test_debugger.py::test_xmode_skip", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_class_type", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_new_main_mod", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_push_accepts_more3", "IPython/testing/plugin/test_refs.py::IPython.testing.plugin.test_refs.doctest_runvars", "IPython/testing/plugin/dtexample.py::IPython.testing.plugin.dtexample.iprand_all", "IPython/lib/tests/test_pretty.py::test_collections_ordereddict", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-True is False-False]", "IPython/core/tests/test_magic.py::test_reset_hard", "IPython/testing/tests/test_ipunittest.py::IPython.testing.tests.test_ipunittest.Foo.ipdt_method", "IPython/core/tests/test_displayhook.py::test_underscore_no_overwrite_user", "IPython/utils/tests/test_text.py::test_columnize_medium[True]", "IPython/core/tests/test_completerlib.py::test_module_without_init", "IPython/core/tests/test_interactiveshell.py::test__IPYTHON__", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-x = 1]", "IPython/core/tests/test_display.py::test_retina_png", "IPython/lib/tests/test_pretty.py::test_sets[obj1-frozenset()]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context1-~5--6]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-0 in [1]-False]", "IPython/core/tests/test_completer.py::TestCompleter::test_all_completions_dups", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_indent2", "IPython/terminal/tests/test_shortcuts.py::test_accept_and_keep_cursor[-def out(tag: str, n=50):-def out(tag: str, n=50):-0]", "IPython/utils/tests/test_tokenutil.py::test_function", "IPython/terminal/tests/test_shortcuts.py::test_accept[def -out(tag: str, n=50):-out(tag: str, n=50):]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 < 4 < 3-False]", "IPython/core/tests/test_oinspect.py::test_qmark_getindex", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-9 < 2 < 3 < 4-False]", "IPython/core/tests/test_prefilter.py::test_autocall_binops", "IPython/core/tests/test_display.py::test_image_size", "IPython/core/tests/test_magic.py::test_script_bg_out", "IPython/core/tests/test_oinspect.py::test_getdoc", "IPython/lib/tests/test_pretty.py::test_unicode_repr", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[][-expected4]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[0b_1110_0101-0b_1110_0101]", "IPython/core/tests/test_formatters.py::test_lookup_by_type_string", "IPython/utils/tests/test_text.py::test_columnize_medium[False]", "IPython/core/tests/test_inputtransformer2.py::test_find_assign_op_dedent", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_dedent_return", "IPython/core/tests/test_magic.py::test_magic_magic", "IPython/core/tests/test_oinspect.py::test_calldef_none", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-3-123456789-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-2 * 3-6]", "IPython/lib/tests/test_latextools.py::test_genelatex_wrap_without_breqn", "IPython/core/tests/test_display.py::test_json", "IPython/core/tests/test_inputtransformer.py::test_token_input_transformer", "IPython/core/tests/test_magic.py::test_timeit_quiet", "IPython/utils/tests/test_path.py::TestLinkOrCopy::test_link_successful", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[(\\n))-incomplete-0]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: st-r, n=50):-r, ]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_multiline_string_cells", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-5 // 2-2]", "IPython/core/tests/test_application.py::test_unicode_ipdir", "IPython/core/tests/test_magic.py::test_time2", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-True-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-1 | 2-3]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[, .1-.1]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_syntax_error", "IPython/core/tests/test_display.py::test_display_handle", "IPython/core/magics/namespace.py::IPython.core.magics.namespace.NamespaceMagics.reset", "IPython/core/tests/test_magic_terminal.py::test_cpaste", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 != 1-False]", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_unicode", "IPython/testing/tests/test_tools.py::Test_ipexec_validate::test_main_path", "IPython/core/tests/test_run.py::test_run_tb", "IPython/core/tests/test_magic.py::test_time", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[-1.0--1.0]", "IPython/core/tests/test_oinspect.py::test_init_colors", "IPython/core/tests/test_completer.py::TestCompleter::test_local_file_completions", "IPython/core/tests/test_magic.py::test_extract_code_ranges", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-False is False-True]", "IPython/core/tests/test_oinspect.py::test_find_source_lines", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_smoketest_autoreload", "IPython/utils/tests/test_capture.py::test_rich_output_metadata[method_mime3]", "IPython/core/tests/test_inputsplitter.py::test_last_two_blanks", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag:- str, n=50):- ]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_reset_aliasing", "IPython/lib/tests/test_pretty.py::TestsPretty::test_long_list", "IPython/core/tests/test_magic.py::TestEnv::test_env_set_bad_input", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-2 >> 1-1]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_unicode", "IPython/core/tests/test_run.py::TestMagicRunPass::test_run_profile", "IPython/core/tests/test_interactiveshell.py::TestSystemRaw::test_exit_code_signal", "IPython/core/tests/test_magic.py::test_logging_magic_not_quiet", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_order", "IPython/core/tests/test_display.py::test_embed_svg_url", "IPython/core/tests/test_completer.py::TestCompleter::test_nested_import_module_completer", "IPython/utils/tests/test_wildcard.py::Tests::test_dict_attributes", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_silent_nodisplayhook", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_continuation", "IPython/core/tests/test_display.py::test_html_metadata", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_In_variable", "IPython/testing/plugin/test_exampleip.txt::test_exampleip.txt", "IPython/core/tests/test_formatters.py::test_lookup_string", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_run_cell_multiline", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-4 > 3 > 2 > 9-False]", "IPython/core/tests/test_interactiveshell.py::test_run_cell_asyncio_run", "IPython/lib/tests/test_pretty.py::test_pprint_nomod", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_syntax_error", "IPython/testing/tests/test_decorators.py::test_skip_dt_decorator", "IPython/core/tests/test_oinspect.py::test_class_signature", "IPython/core/tests/test_display.py::test_progress", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-5 // 2-2]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-2 * 3-6]", "IPython/core/tests/test_interactiveshell.py::TestSystemPipedExitCode::test_exit_code_ok", "IPython/core/tests/test_guarded_eval.py::test_guards_attributes", "IPython/core/tests/test_completer.py::TestCompleter::test_greedy_completions", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 > 1-True]", "IPython/core/tests/test_displayhook.py::test_interactivehooks_ast_modes_semi_suppress", "IPython/core/tests/test_formatters.py::test_warn_error_for_type", "IPython/utils/tests/test_dir2.py::test_base", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 != 1-False]", "IPython/utils/text.py::IPython.utils.text.FullEvalFormatter", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_pyprompt", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-9 < 2 < 3 < 4-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context0-+5-5]", "IPython/core/tests/test_magic.py::test_tb_syntaxerror", "IPython/core/tests/test_oinspect.py::test_info", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-[]-expected6]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 == 2-False]", "IPython/terminal/tests/test_debug_magic.py::test_debug_magic_passes_through_generators", "IPython/core/tests/test_oinspect.py::test_empty_property_has_no_source", "IPython/core/tests/test_hooks.py::test_command_chain_dispatcher_eq_priority", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out-(tag: str, n=50):-(]", "IPython/terminal/tests/test_shortcuts.py::test_discard[def -out(tag: str, n=50):]", "IPython/utils/tests/test_module_paths.py::test_find_mod_5", "IPython/core/tests/test_oinspect.py::test_pinfo_magic", "IPython/core/tests/test_oinspect.py::test_pinfo_getindex", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-import ast]", "IPython/core/tests/test_interactiveshell.py::TestImportNoDeprecate::test_no_dep", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-x = 1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-3 - 1-2]", "IPython/core/tests/test_compilerop.py::test_compiler_check_cache", "IPython/core/tests/test_guarded_eval.py::test_dict_literal", "IPython/core/tests/test_guarded_eval.py::test_evaluates_calls[data1-data.keys().isdisjoint({})-data.update()-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-4 > 3 > 2 > 1-True]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[a = '''\\n hi-incomplete-3]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_indent", "IPython/core/tests/test_interactiveshell.py::ExitCodeChecks::test_exit_code_error", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[for a in range(5):-incomplete-4]", "IPython/core/tests/test_ultratb.py::SyntaxErrorTest::test_syntaxerror_no_stacktrace_at_compile_time", "IPython/testing/tests/test_tools.py::Test_ipexec_validate::test_exception_path", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-4 > 3 > 2 > 9-False]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_silent_noadvance", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-(1 < 4) < 3-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-2 << 1-4]", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push_accepts_more5", "IPython/core/tests/test_inputtransformer.py::test_escaped_noesc", "IPython/utils/tests/test_capture.py::test_rich_output_empty[method_mime0]", "IPython/core/tests/test_oinspect.py::test_qmark_getindex_negatif", "IPython/utils/tests/test_capture.py::test_rich_output_no_metadata[method_mime5]", "IPython/core/tests/test_completer.py::TestCompleter::test_match_dict_keys", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_push3", "IPython/utils/tests/test_importstring.py::test_import_raises", "IPython/core/tests/test_magic.py::test_strip_initial_indent", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_continuation", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_dedent_pass", "IPython/core/tests/test_profile.py::test_profile_create_ipython_dir", "IPython/lib/tests/test_pretty.py::test_sets[obj0-set()]", "IPython/lib/tests/test_imports.py::test_import_deepreload", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_leading_commas", "IPython/core/tests/test_interactiveshell.py::TestAstTransform::test_macro", "IPython/core/tests/test_interactiveshell.py::test_user_variables", "IPython/terminal/tests/test_embed.py::test_nest_embed", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context1-list(range(20))[3:-2:3]-expected2]", "IPython/core/tests/test_inputtransformer.py::test_ipy_prompt", "IPython/lib/tests/test_pretty.py::test_pprint_heap_allocated_type", "IPython/testing/plugin/test_ipdoctest.py::IPython.testing.plugin.test_ipdoctest.doctest_multiline3", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing", "IPython/testing/tests/test_ipunittest.py::ipdt_flush::test", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context1-(1\\n+\\n1)-2]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n=50)-:-:]", "IPython/core/tests/test_completerlib.py::Test_magic_run_completer::test_2", "IPython/core/tests/test_ultratb.py::ChangedPyFileTest::test_changing_py_file", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str,- n=50):- n]", "IPython/core/tests/test_magic.py::CellMagicTestCase::test_cell_magic_class", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_ofind_property_with_error", "IPython/core/tests/test_magic.py::test_script_defaults", "IPython/terminal/tests/test_help.py::test_profile_create_help", "IPython/core/tests/test_interactiveshell.py::TestSystemRaw::test_exit_code_ok", "IPython/utils/tests/test_process.py::SubProcessTestCase::test_system_quotes", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[16-int]", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[21-int]", "IPython/core/tests/test_imports.py::test_import_history", "IPython/core/tests/test_run.py::TestMagicRunPass::test_run_debug_twice", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-1 < 2 < 3 < 4-True]", "IPython/core/tests/test_inputtransformer2.py::test_find_help", "IPython/core/tests/test_inputtransformer2.py::test_transform_assign_magic", "IPython/core/tests/test_ultratb.py::test_handlers", "IPython/utils/tests/test_process.py::SubProcessTestCase::test_system_interrupt", "IPython/core/tests/test_formatters.py::test_print_method_weird", "IPython/core/tests/test_completerlib.py::Test_magic_run_completer::test_3", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-True is not True-False]", "IPython/core/tests/test_inputsplitter.py::CellModeCellMagics::test_no_strip_coding", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[-def out(tag: str, n=50):-def ]", "IPython/core/tests/test_debugger.py::IPython.core.tests.test_debugger.test_ipdb_magics2", "IPython/utils/tests/test_text.py::test_columnize", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-x += 1]", "IPython/utils/tests/test_path.py::test_filefind", "IPython/core/tests/test_formatters.py::test_format_config", "IPython/utils/tests/test_capture.py::test_rich_output_empty[method_mime2]", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_indent3", "IPython/core/tests/test_magic.py::test_line_cell_info", "IPython/core/tests/test_ultratb.py::Python3ChainedExceptionsTest::test_exception_during_handling_error", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push3", "IPython/utils/tests/test_capture.py::test_capture_output_no_stdout", "IPython/lib/tests/test_pretty.py::test_basic_class", "IPython/core/tests/test_run.py::test_multiprocessing_run", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context2-import ast]", "IPython/core/tests/test_magic.py::test_script_err", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.__sub__", "IPython/utils/tests/test_io.py::TeeTestCase::test", "IPython/core/tests/test_magic.py::test_time_local_ns", "IPython/core/tests/test_guarded_eval.py::test_access_locals_and_globals", "IPython/utils/tests/test_text.py::test_strip_email2", "IPython/core/tests/test_formatters.py::test_for_type_by_name", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[]()(-expected6]", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_ignore_sys_exit", "IPython/lib/tests/test_pretty.py::test_sets[obj4-{1, 2}]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_ofind_multiple_attribute_lookups", "IPython/core/tests/test_magic.py::test_macro", "IPython/utils/tests/test_capture.py::test_rich_output_no_metadata[method_mime0]", "IPython/core/tests/test_imports.py::test_import_logger", "IPython/lib/tests/test_pretty.py::test_pretty_environ", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context2--5--5]", "IPython/core/tests/test_completer.py::TestCompleter::test_class_key_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_closures", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_disabling", "IPython/core/tests/test_formatters.py::test_pop", "IPython/core/tests/test_inputtransformer2.py::test_transform_autocall", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_unicode", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-[]-expected6]", "IPython/core/tests/test_magic.py::test_prun_special_syntax", "IPython/testing/tests/test_decorators.py::IPython.testing.tests.test_decorators.call_doctest_bad", "IPython/utils/tests/test_dir2.py::test_misbehaving_object_without_trait_names", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes2", "IPython/core/tests/test_oinspect.py::test_property_docstring_is_in_info_for_detail_level_0", "IPython/core/tests/test_prefilter.py::test_issue_114", "IPython/core/tests/test_oinspect.py::test_builtin_init", "IPython/lib/tests/test_pretty.py::test_collections_userlist", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 <= 2-True]", "IPython/lib/tests/test_pretty.py::TestsPretty::test_long_dict", "IPython/core/tests/test_magic.py::test_cd_force_quiet", "IPython/core/tests/test_formatters.py::test_string_in_formatter", "IPython/core/tests/test_guarded_eval.py::test_list", "IPython/core/tests/test_interactiveshell.py::TestAstTransform2::test_run_cell_non_int", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 not in [1]-False]", "IPython/core/tests/test_events.py::CallbackTests::test_cb_keyboard_interrupt", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[d-ef out(tag: str, n=50):-e]", "IPython/utils/tests/test_path.py::test_unicode_in_filename", "IPython/core/tests/test_run.py::TestMagicRunPass::test_run_debug_twice_with_breakpoint", "IPython/core/tests/test_display.py::test_progress_iter", "IPython/utils/tests/test_path.py::test_unescape_glob[\\\\\\\\*-\\\\*]", "IPython/utils/tests/test_wildcard.py::Tests::test_case", "IPython/utils/tests/test_shimmodule.py::test_shimmodule_repr_does_not_fail_on_import_error", "IPython/core/tests/test_interactiveshell.py::TestSystemPipedExitCode::test_exit_code_signal", "IPython/core/tests/test_magic.py::test_prun_quotes", "IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython3]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[, +.1-+.1]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_bad_custom_tb", "IPython/utils/tests/test_process.py::test_find_cmd_ls", "IPython/core/tests/test_interactiveshell.py::TestWarningSuppression::test_deprecation_warning", "IPython/core/tests/test_displayhook.py::test_output_quiet", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_indent2", "IPython/core/tests/test_completerlib.py::Test_magic_run_completer_nonascii::test_2", "IPython/lib/tests/test_pretty.py::TestsPretty::test_super_repr", "IPython/lib/tests/test_display.py::test_existing_path_FileLinks_repr_alt_formatter", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[19-int]", "IPython/core/tests/test_magic.py::test_file_var_expand", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_unicode_py3", "IPython/core/tests/test_formatters.py::test_in_formatter", "IPython/core/tests/test_run.py::IPython.core.tests.test_run.doctest_run_option_parser", "IPython/lib/tests/test_pretty.py::test_callability_checking", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_run_py_file_attribute", "IPython/core/tests/test_guarded_eval.py::test_dict", "IPython/core/tests/test_magic.py::test_magic_error_status", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-5 // 2-2]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[)[](-expected8]", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_aggressive_namespace_cleanup", "IPython/core/tests/test_run.py::TestMagicRunWithPackage::test_debug_run_submodule_with_absolute_import", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def- out(tag: str, n=50):- ]", "IPython/core/tests/test_magic.py::test_reset_in", "IPython/utils/tests/test_pycolorize.py::test_parse_sample[NoColor]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[0xXXXXXXXXX-0xXXXXXXXXX]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 <= 1-False]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[def a():\\n x=1\\n global x-invalid-None]", "IPython/core/tests/test_prefilter.py::test_prefilter_attribute_errors", "IPython/core/tests/test_guarded_eval.py::test_unbind_method", "IPython/terminal/tests/test_embed.py::test_ipython_embed", "IPython/utils/tests/test_imports.py::test_import_coloransi", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_indent4", "IPython/core/tests/test_magic.py::test_file", "IPython/testing/tests/test_decorators.py::trivial::test", "IPython/core/tests/test_magic.py::test_rehashx", "IPython/testing/tests/test_tools.py::TestAssertPrints::test_passing", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_run_second", "IPython/utils/tests/test_capture.py::test_rich_output_empty[method_mime1]", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider", "IPython/core/tests/test_formatters.py::test_bad_repr_traceback", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_drop_by_id", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_ofind_line_magic", "IPython/utils/tests/test_wildcard.py::Tests::test_case_showall", "IPython/core/tests/test_completer.py::TestCompleter::test_latex_completions", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag-: str, n=50):-: ]", "IPython/core/tests/test_magic.py::test_psearch", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_open_standard_input_stream", "IPython/utils/tests/test_openpy.py::test_source_to_unicode", "IPython/core/tests/test_profile.py::ProfileStartupTest::test_startup_py", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-{}-expected5]", "IPython/core/tests/test_imports.py::test_import_interactiveshell", "IPython/lib/tests/test_pretty.py::TestsPretty::test_long_tuple", "IPython/lib/tests/test_latextools.py::test_check_latex_to_png_dvipng_fails_when_no_cmd[latex]", "IPython/core/tests/test_interactiveshell.py::TestAstTransform::test_time", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-True is False-False]", "IPython/utils/tests/test_path.py::test_get_xdg_dir_0", "IPython/core/tests/test_iplib.py::IPython.core.tests.test_iplib.doctest_tb_verbose", "IPython/utils/tests/test_capture.py::test_rich_output_empty[method_mime5]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_bad_custom_tb_return", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-2 <= 1-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-0 in [1]-False]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-1-1]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-import ast]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[]-expected1]", "IPython/terminal/tests/test_help.py::test_profile_list_help", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_smoketest_aimport", "IPython/core/tests/test_magic.py::test_file_double_quote", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_global_ns", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_gh_597", "IPython/core/tests/test_debugger.py::test_ipdb_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_spaces", "IPython/lib/tests/test_display.py::test_existing_path_FileLinks", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context2-list(range(20))[3:-2:3]-expected2]", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_dedent_pass", "IPython/core/tests/test_paths.py::test_get_ipython_package_dir", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-2 >= 2-True]", "IPython/core/tests/test_guarded_eval.py::test_number_attributes[int.numerator-numerator]", "IPython/core/tests/test_history.py::test_timestamp_type", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-(1 < 4) < 3-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-1 & 1-1]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-False is not True-True]", "IPython/testing/plugin/simple.py::IPython.testing.plugin.simple.pyfunc", "IPython/core/tests/test_inputtransformer2.py::test_transform_help", "IPython/core/tests/test_formatters.py::test_deferred", "IPython/utils/tests/test_process.py::test_arg_split[hello there-argv1]", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_numbers", "IPython/core/tests/test_inputtransformer2.py::test_check_complete", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[d-ef out(tag: str, n=50):-ef ]", "IPython/core/tests/test_inputtransformer2.py::test_null_cleanup_transformer", "IPython/core/tests/test_magic_arguments.py::test_magic_arguments", "IPython/core/tests/test_inputsplitter.py::test_remove_comments", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 < 2 < 3 < 4-True]", "IPython/core/tests/test_inputtransformer2.py::test_find_autocalls", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(ta-g: str, n=50):-g: ]", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_syntax_error", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 >= 2-False]", "IPython/core/interactiveshell.py::IPython.core.interactiveshell.InteractiveShell.clear_main_mod_cache", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push_accepts_more4", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 < 2 < 3 < 4-True]", "IPython/utils/tests/test_io.py::test_tee_simple", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456 \\n789-6-123456789-True]", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[18-int]", "IPython/lib/tests/test_display.py::test_audio_from_file", "IPython/terminal/tests/test_help.py::test_locate_profile_help", "IPython/utils/tests/test_tokenutil.py::test_simple", "IPython/core/tests/test_interactiveshell.py::TestSystemRaw::test_magic_warnings", "IPython/core/tests/test_debugger.py::test_ipdb_magics2", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_contexts", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-False is not True-True]", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context1-del x]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-4 > 3 > 2 > 9-False]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_inspect_text", "IPython/core/tests/test_magic.py::test_parse_options", "IPython/testing/tests/test_decorators.py::test_skip_dt_decorator2", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-1 & 2-0]", "IPython/core/tests/test_profile.py::test_list_profiles_in", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-2 > 1-True]", "IPython/core/tests/test_run.py::TestMagicRunWithPackage::test_debug_run_submodule_with_relative_import", "IPython/core/tests/test_inputtransformer2.py::test_side_effects_I", "IPython/lib/tests/test_pretty.py::test_custom_repr", "IPython/core/tests/test_formatters.py::test_for_type_string", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.__setattr__", "IPython/terminal/tests/test_shortcuts.py::test_navigable_provider_multiline_entries", "IPython/core/tests/test_inputtransformer2_line.py::test_ipython_prompt", "IPython/core/tests/test_run.py::IPython.core.tests.test_run.doctest_run_option_parser_for_posix", "IPython/core/tests/test_interactiveshell.py::test_run_cell_await", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_multiline_passthrough", "IPython/core/tests/test_imports.py::test_import_prefilter", "IPython/core/tests/test_iplib.py::IPython.core.tests.test_iplib.doctest_tb_context", "IPython/testing/tests/test_tools.py::test_temp_pyfile", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context0-5**2-25]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-True is not True-False]", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_tclass", "IPython/lib/tests/test_display.py::test_code_from_file", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-0 not in [1]-True]", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[26-map]", "IPython/utils/tests/test_shimmodule.py::test_shimmodule_repr_forwards_to_module", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-1 & 2-0]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_run_empty_cell", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_dedent_break", "IPython/testing/plugin/dtexample.py::IPython.testing.plugin.dtexample.random_all", "IPython/core/tests/test_magic.py::test_logging_magic_quiet_from_config", "IPython/utils/tests/test_tokenutil.py::test_nested_call", "IPython/core/tests/test_magic.py::TestEnv::test_env_secret", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-False is False-True]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-1-1]", "IPython/utils/tests/test_capture.py::test_rich_output_no_metadata[method_mime1]", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_dont_cache_with_semicolon", "IPython/core/magics/namespace.py::IPython.core.magics.namespace.NamespaceMagics.reset_selective", "IPython/utils/tests/test_tokenutil.py::test_multiline_token", "IPython/core/tests/test_events.py::CallbackTests::test_bare_function_missed_unregister", "IPython/core/tests/test_paths.py::test_get_ipython_dir_7", "IPython/core/tests/test_guarded_eval.py::test_rejects_side_effect_syntax[context0-def func(): pass]", "IPython/core/tests/test_paths.py::test_get_ipython_module_path", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context1-5**2-25]", "IPython/core/tests/test_inputsplitter.py::InteractiveLoopTestCase::test_multi", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_syntax_multiline", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[a = 1-complete-None]", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_priority", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: s-tr, n=50):-tr, ]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_binary_operations[context2-1 | 2-3]", "IPython/core/tests/test_completer.py::TestCompleter::test_from_module_completer", "IPython/core/tests/test_magic.py::test_whos", "IPython/core/tests/test_magic.py::test_edit_fname", "IPython/utils/tests/test_importstring.py::test_import_nested", "IPython/utils/text.py::IPython.utils.text.EvalFormatter", "IPython/utils/tests/test_openpy.py::test_read_file", "IPython/core/tests/test_magic.py::test_store", "IPython/core/tests/test_run.py::TestMagicRunPass::test_builtins_type", "IPython/core/tests/test_interactiveshell.py::TestSystemRaw::test_control_c", "IPython/core/tests/test_magic.py::TestEnv::test_env_get_set_complex", "IPython/core/tests/test_magic.py::test_timeit_shlex", "IPython/core/tests/test_guarded_eval.py::test_guards_comparisons", "IPython/lib/tests/test_display.py::test_existing_path_FileLink", "IPython/core/tests/test_completer.py::TestCompleter::test_line_cell_magics", "IPython/lib/tests/test_display.py::test_existing_path_FileLink_repr", "IPython/core/tests/test_compilerop.py::test_code_name2", "IPython/lib/tests/test_latextools.py::test_check_latex_to_png_dvipng_fails_when_no_cmd[dvipng]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context2-list(range(10))[-1:]-expected1]", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_echo", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_naked_string_cells", "IPython/core/tests/test_inputtransformer.py::test_escaped_magic", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_push", "IPython/core/tests/test_oinspect.py::test_pinfo_docstring_if_detail_and_no_source", "IPython/core/tests/test_magic.py::test_hist_pof", "IPython/core/tests/test_ultratb.py::RecursionTest::test_no_recursion", "IPython/core/tests/test_guarded_eval.py::test_access_builtins[context1]", "IPython/lib/tests/test_pretty.py::test_collections_counter", "IPython/core/tests/test_completer.py::TestCompleter::test_fwd_unicode_restricts", "IPython/terminal/tests/test_shortcuts.py::test_accept_and_keep_cursor[def -out(tag: str, n=50):-out(tag: str, n=50):-4]", "IPython/core/tests/test_magic.py::test_parse_options_preserve_non_option_string", "IPython/terminal/tests/test_shortcuts.py::test_accept_character[def- out(tag: str, n=50):- ]", "IPython/utils/text.py::IPython.utils.text.strip_email_quotes", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_push", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-1.0-1.0]", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes1", "IPython/lib/tests/test_display.py::test_instantiation_FileLink", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[23-map]", "IPython/utils/tests/test_io.py::TestIOStream::test_capture_output", "IPython/core/tests/test_alias.py::test_alias_args_commented_nargs", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_string", "IPython/lib/tests/test_display.py::test_warning_on_non_existent_path_FileLink", "IPython/terminal/tests/test_shortcuts.py::test_other_providers", "IPython/core/tests/test_completerlib.py::Test_magic_run_completer::test_1", "IPython/core/tests/test_magic.py::test_alias_magic", "IPython/core/tests/test_interactiveshell.py::test_user_expression", "IPython/core/tests/test_inputtransformer2_line.py::test_cell_magic", "IPython/core/tests/test_magic.py::test_reset_in_length", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_ofind_prefers_property_to_instance_level_attribute", "IPython/lib/tests/test_pretty.py::test_sets[obj6-{-3, -2, -1}]", "IPython/core/tests/test_magic.py::test_file_single_quote", "IPython/core/tests/test_extension.py::test_extension_builtins", "IPython/core/tests/test_ultratb.py::SyntaxErrorTest::test_syntaxerror_stacktrace_when_running_compiled_code", "IPython/lib/tests/test_deepreload.py::test_deepreload", "IPython/utils/tests/test_capture.py::test_rich_output_metadata[method_mime5]", "IPython/core/tests/test_magic.py::test_xmode", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes4", "IPython/core/tests/test_magic.py::IPython.core.tests.test_magic.doctest_hist_f", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-None-None]", "IPython/core/tests/test_completer.py::TestCompleter::test_back_latex_completion", "IPython/extensions/tests/test_storemagic.py::test_store_restore", "IPython/utils/tests/test_capture.py::test_rich_output_metadata[method_mime4]", "IPython/testing/tests/test_tools.py::TestAssertPrints::test_failing", "IPython/core/tests/test_ultratb.py::NonAsciiTest::test_nonascii_path", "IPython/core/tests/test_alias.py::test_alias_args_commented", "IPython/core/tests/test_inputsplitter.py::InputSplitterTestCase::test_dedent_return", "IPython/core/tests/test_run.py::TestMagicRunSimple::test_run_formatting", "IPython/core/tests/test_completer.py::TestCompleter::test_line_magics", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: -str, n=50):-str, ]", "IPython/core/tests/test_ultratb.py::Python3ChainedExceptionsTest::test_plain_suppress_exception_chaining", "IPython/lib/tests/test_backgroundjobs.py::test_dead", "IPython/core/tests/test_guarded_eval.py::test_evaluates_complex_cases[context0-(1\\n+\\n1)-2]", "IPython/core/tests/test_iplib.py::test_db", "IPython/core/tests/test_magic.py::test_time_no_var_expand", "IPython/core/tests/test_splitinput.py::test_LineInfo", "IPython/core/tests/test_completerlib.py::Test_magic_run_completer_nonascii::test_1", "IPython/core/tests/test_formatters.py::test_precision", "IPython/core/tests/test_history.py::test_proper_default_encoding", "IPython/utils/tests/test_capture.py::test_rich_output_no_metadata[method_mime2]", "IPython/terminal/tests/test_interactivshell.py::InteractiveShellTestCase::test_repl_not_plain_text", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-4 > 3 > 2 > 1-True]", "IPython/core/tests/test_displayhook.py::test_interactivehooks_ast_modes", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 < 4 < 3-False]", "IPython/core/tests/test_display.py::test_video_embedding", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-0xXXXXXXXXX-3740122863]", "IPython/utils/tests/test_text.py::test_columnize_long[False]", "IPython/utils/tests/test_process.py::SubProcessTestCase::test_getoutput_quoted", "IPython/core/tests/test_magic.py::test_run_magic_preserve_code_block", "IPython/core/tests/test_inputsplitter.py::CellModeCellMagics::test_whole_cell", "IPython/core/tests/test_inputtransformer2.py::test_find_assign_magic", "IPython/core/tests/test_iplib.py::IPython.core.tests.test_iplib.doctest_tb_plain", "IPython/core/tests/test_inputsplitter.py::IPythonInputTestCase::test_source", "IPython/utils/frame.py::IPython.utils.frame.extract_vars", "IPython/terminal/tests/test_shortcuts.py::test_accept[-def out(tag: str, n=50):-def out(tag: str, n=50):]", "IPython/core/tests/test_run.py::IPython.core.tests.test_run.doctest_refbug", "IPython/core/tests/test_interactiveshell.py::TestAstTransform::test_timeit", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_open_standard_output_stream", "IPython/testing/plugin/simple.py::IPython.testing.plugin.simple.ipyfunc", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context1-{}-expected5]", "IPython/utils/tests/test_capture.py::test_rich_output_empty[method_mime4]", "IPython/utils/ipstruct.py::IPython.utils.ipstruct.Struct.__init__", "IPython/core/tests/test_guarded_eval.py::test_rejects_custom_properties", "IPython/core/tests/test_completerlib.py::test_valid_exported_submodules", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 == 2-False]", "IPython/lib/tests/test_pretty.py::test_sets[obj3-frozenset({1})]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-0 not in [1]-True]", "IPython/core/tests/test_inputsplitter.py::CellModeCellMagics::test_cellmagic_help", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-0xXXXXXXXXX-3740122863]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-1 < 2 > 1 > 0 > -1 < 1-True]", "IPython/utils/tests/test_capture.py::test_rich_output_metadata[method_mime2]", "IPython/lib/tests/test_pretty.py::test_sets[obj5-frozenset({1, 2})]", "IPython/testing/tests/test_ipunittest.py::simple_dt::test", "IPython/core/tests/test_magic.py::test_magic_parse_long_options", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context2-0xXXXXXXXXX-3740122863]", "IPython/core/tests/test_magic.py::test_timeit_return", "IPython/utils/tests/test_imports.py::test_import_strdispatch", "IPython/core/tests/test_magic.py::CellMagicTestCase::test_cell_magic_func_deco", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context2-0 not in [1]-True]", "IPython/core/tests/test_debugger.py::IPython.core.tests.test_debugger.can_quit", "IPython/core/tests/test_guarded_eval.py::test_evaluates_literals[context0-None-None]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context0-~5--6]", "IPython/utils/tests/test_decorators.py::test_flag_calls", "IPython/core/tests/test_inputtransformer2.py::test_side_effects_II", "IPython/core/magics/config.py::IPython.core.magics.config.ConfigMagics.config", "IPython/testing/tests/test_decorators.py::IPython.testing.tests.test_decorators.FooClass.baz", "IPython/extensions/tests/test_storemagic.py::test_autorestore", "IPython/utils/tests/test_process.py::SubProcessTestCase::test_getoutput_quoted2", "IPython/utils/tests/test_wildcard.py::Tests::test_nocase", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(t-ag: str, n=50):-ag: ]", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[1..-None]", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def out(tag: str, n-=50):-=]", "IPython/core/tests/test_formatters.py::test_lookup", "IPython/utils/tests/test_process.py::test_arg_split[something \"with quotes\"-argv3]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 != 1-False]", "IPython/core/tests/test_display.py::test_image_bad_filename_raises_proper_exception", "IPython/core/tests/test_completer.py::TestCompleter::test_match_dict_keys_tuple", "IPython/core/tests/test_imports.py::test_import_completer", "IPython/core/tests/test_magic.py::test_file_spaces", "IPython/utils/tests/test_tokenutil.py::test_multiline_statement[25-map]", "IPython/core/tests/test_oinspect.py::test_pinfo_docstring_no_source", "IPython/core/tests/test_completer.py::TestCompleter::test_limit_to__all__False_ok", "IPython/core/tests/test_display.py::test_base64image", "IPython/core/tests/test_paths.py::test_get_ipython_dir_5", "IPython/core/tests/test_iplib.py::IPython.core.tests.test_iplib.doctest_tb_sysexit_verbose_stack_data_06", "IPython/terminal/tests/test_shortcuts.py::test_accept_word[-def out(tag: str, n=50):-def ]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_unary_operations[context2-~5--6]", "IPython/core/tests/test_magic_terminal.py::PasteTestCase::test_paste_email", "IPython/terminal/tests/test_interactivshell.py::TestElide::test_elide_typed_no_match", "IPython/core/tests/test_completer.py::TestCompleter::test_snake_case_completion", "IPython/core/tests/test_guarded_eval.py::test_subscript", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[}{-expected5]", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context1-True is True-True]", "IPython/core/tests/test_formatters.py::test_pass_correct_include_exclude", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[..-None]", "IPython/core/tests/test_completer.py::TestCompleter::test_mix_terms", "IPython/core/tests/test_run.py::test_run__name__", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[)(-expected3]", "IPython/core/tests/test_compilerop.py::test_cache_unicode", "IPython/core/tests/test_inputsplitter.py::test_get_input_encoding", "IPython/utils/tests/test_capture.py::test_capture_output_no_stderr", "IPython/core/tests/test_formatters.py::test_print_method_bound", "IPython/core/tests/test_ultratb.py::RecursionTest::test_recursion_one_frame", "IPython/core/tests/test_history.py::test_extract_hist_ranges_empty_str", "IPython/core/tests/test_oinspect.py::test_render_signature_short", "IPython/core/tests/test_inputsplitter.py::test_spaces", "IPython/core/tests/test_ultratb.py::Python3ChainedExceptionsTest::test_plain_exception_during_handling_error", "IPython/core/tests/test_oinspect.py::test_find_file_decorated2", "IPython/utils/tests/test_wildcard.py::Tests::test_dict_dir", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[def o-ut(tag: str, n=50):-ut(]", "IPython/utils/tests/test_path.py::test_unescape_glob[\\\\\\\\\\\\*-\\\\*]", "IPython/core/tests/test_oinspect.py::test_inspect_getfile_raises_exception", "IPython/core/tests/test_ultratb.py::NonAsciiTest::test_nonascii_msg", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_bad_var_expand", "IPython/core/tests/test_guarded_eval.py::test_number_attributes[float.is_integer-is_integer]", "IPython/core/tests/test_inputsplitter.py::LineModeCellMagics::test_incremental", "IPython/testing/plugin/dtexample.py::IPython.testing.plugin.dtexample.ranfunc", "IPython/utils/strdispatch.py::IPython.utils.strdispatch.StrDispatch", "IPython/core/tests/test_completer.py::TestCompleter::test_completion_have_signature", "IPython/core/tests/test_interactiveshell.py::InteractiveShellTestCase::test_custom_syntaxerror_exception", "IPython/core/tests/test_display.py::test_update_display", "IPython/lib/tests/test_pretty.py::test_pprint_break", "IPython/utils/tests/test_capture.py::test_rich_output_empty[method_mime3]", "IPython/core/tests/test_inputtransformer.py::test_escaped_quote2", "IPython/core/tests/test_magic.py::IPython.core.tests.test_magic.doctest_who", "IPython/core/tests/test_run.py::IPython.core.tests.test_run.doctest_run_builtins", "IPython/core/tests/test_magic.py::test_save", "IPython/core/tests/test_ultratb.py::NestedGenExprTestCase::test_nested_genexpr", "IPython/core/tests/test_formatters.py::test_pop_string", "IPython/terminal/tests/test_shortcuts.py::test_autosuggest_token[de -f out(tag: str, n=50):-f ]", "IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython console session]", "IPython/utils/tests/test_text.py::test_strip_email", "IPython/core/tests/test_guarded_eval.py::test_evaluates_comparisons[context0-1 != 2-True]", "IPython/utils/tests/test_process.py::test_arg_split[hi-argv0]", "IPython/extensions/tests/test_autoreload.py::TestAutoreload::test_reload_enums", "IPython/core/tests/test_inputtransformer2.py::test_find_assign_system", "IPython/core/tests/test_completer.py::test_match_numeric_literal_for_dict_key[,1-1]", "IPython/core/tests/test_magic.py::TestEnv::test_env_set_whitespace", "IPython/utils/path.py::IPython.utils.path.expand_path", "IPython/core/tests/test_imports.py::test_import_prompts", "IPython/testing/plugin/test_refs.py::IPython.testing.plugin.test_refs.doctest_run", "IPython/core/tests/test_magic.py::test_script_bg_proc"] | ["IPython/core/tests/test_debugger.py::test_decorator_skip_with_breakpoint", "IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions Known failure on jedi<=0.18.0"] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==2.0.0", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==23.0", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.0.0", "prompt-toolkit==3.0.36", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.14.0", "pytest==7.0.1", "pytest-asyncio==0.20.3", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.2", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.8.1", "wcwidth==0.2.6", "wheel==0.44.0"]} | null | ["pytest --tb=no -rA -p no:cacheprovider"] | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13848 | 3f0bf05f072a91b2a3042d23ce250e5e906183fd | diff --git a/setup.cfg b/setup.cfg
index 226506f08f0..769bfda14a1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -105,12 +105,6 @@ IPython.core.tests = *.png, *.jpg, daft_extension/*.py
IPython.lib.tests = *.wav
IPython.testing.plugin = *.txt
-[options.entry_points]
-pygments.lexers =
- ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer
- ipython = IPython.lib.lexers:IPythonLexer
- ipython3 = IPython.lib.lexers:IPython3Lexer
-
[velin]
ignore_patterns =
IPython/core/tests
diff --git a/setup.py b/setup.py
index 4939ca53836..3f7cd6da664 100644
--- a/setup.py
+++ b/setup.py
@@ -139,7 +139,15 @@
'install_scripts_sym': install_scripts_for_symlink,
'unsymlink': unsymlink,
}
-setup_args["entry_points"] = {"console_scripts": find_entry_points()}
+
+setup_args["entry_points"] = {
+ "console_scripts": find_entry_points(),
+ "pygments.lexers": [
+ "ipythonconsole = IPython.lib.lexers:IPythonConsoleLexer",
+ "ipython = IPython.lib.lexers:IPythonLexer",
+ "ipython3 = IPython.lib.lexers:IPython3Lexer",
+ ],
+}
#---------------------------------------------------------------------------
# Do the actual setup now
| diff --git a/IPython/lib/tests/test_pygments.py b/IPython/lib/tests/test_pygments.py
new file mode 100644
index 00000000000..877b4221ffe
--- /dev/null
+++ b/IPython/lib/tests/test_pygments.py
@@ -0,0 +1,26 @@
+from typing import List
+
+import pytest
+import pygments.lexers
+import pygments.lexer
+
+from IPython.lib.lexers import IPythonConsoleLexer, IPythonLexer, IPython3Lexer
+
+#: the human-readable names of the IPython lexers with ``entry_points``
+EXPECTED_LEXER_NAMES = [
+ cls.name for cls in [IPythonConsoleLexer, IPythonLexer, IPython3Lexer]
+]
+
+
[email protected]
+def all_pygments_lexer_names() -> List[str]:
+ """Get all lexer names registered in pygments."""
+ return {l[0] for l in pygments.lexers.get_all_lexers()}
+
+
[email protected]("expected_lexer", EXPECTED_LEXER_NAMES)
+def test_pygments_entry_points(
+ expected_lexer: str, all_pygments_lexer_names: List[str]
+) -> None:
+ """Check whether the ``entry_points`` for ``pygments.lexers`` are correct."""
+ assert expected_lexer in all_pygments_lexer_names
| BUG: 8.7.0 removes `code-block:: ipython` pygment lexer support
Installed via pip / PyPI -- previously this RST worked:
```
.. code-block:: ipython
In [1]: %matplotlib qt
```
but now we get:
```
/home/circleci/project/doc/install/advanced.rst:33: WARNING: Pygments lexer name 'ipython' is not known
```
At least this is what I think is happening in our CircleCI build today (which fails because we treat warnings as errors), we haven't changed the RST lines in question at all recently:
https://app.circleci.com/pipelines/github/mne-tools/mne-python/17137/workflows/27c6f253-b7a7-4b67-9c2e-db9aa4e925fc/jobs/50745?invite=true#step-112-532
And 8.7.0 is being installed properly in the env:
https://app.circleci.com/pipelines/github/mne-tools/mne-python/17137/workflows/27c6f253-b7a7-4b67-9c2e-db9aa4e925fc/jobs/50745?invite=true#step-112-532
Changing this to `.. code-block:: ipythonconsole` does not seem to help.
Is this an intentional change? Or is this lexer meant to be installed a different way? I didn't see anything in these pages at least:
- https://ipython.readthedocs.io/en/stable/whatsnew/version8.html#ipython-8-7-0
- https://ipython.readthedocs.io/en/stable/development/lexer.html
| I ran into the same problem. I think this is due to the Pygments entry points not being correctly installed with 8.6.0
Compare
```
Python 3.10.8 | packaged by conda-forge | (main, Nov 4 2022, 13:42:51) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.6.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from importlib.metadata import entry_points
In [2]: entry_points(group="pygments.lexers")
Out[2]:
[EntryPoint(name='ipython', value='IPython.lib.lexers:IPythonLexer', group='pygments.lexers'),
EntryPoint(name='ipython3', value='IPython.lib.lexers:IPython3Lexer', group='pygments.lexers'),
EntryPoint(name='ipythonconsole', value='IPython.lib.lexers:IPythonConsoleLexer', group='pygments.lexers')]
```
to this
```
Python 3.10.8 | packaged by conda-forge | (main, Nov 4 2022, 13:42:51) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.7.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from importlib.metadata import entry_points
In [2]: entry_points(group="pygments.lexers")
Out[2]: []
```
I suspect this is related to https://github.com/ipython/ipython/pull/13842 as setuptools probably doesn't merge the entry points configured in setup.py with the ones configured in setup.cfg
Agree that this seems to be a bug that snuck into `v8.7.0` (it happens!), but we can easily get around this for the time being by just having
```
ipython!=8.7.0
```
in our `setup.{py,cfg}` files and build `requirements.txt`s to disallow this version. As this will get fixed by the next release (I would assume) then you're basically done as you don't have to uncap later. :+1:
I also have the same problem because the not available lexer breaks the build of TestSlide package. Unfortunately, it seems that I won't be able to update ipython in Fedora Linux to 8.7.0 because of this issue.
I want to prepare a fix for this issue. What should be the single point of truth for the entrypoints? Setup.cfg or setup.py?
@frenzymadness I think it needs to be setup.py https://github.com/ipython/ipython/pull/13842 moved some of the entry points to setup.py since they are dynamically generated and that is apparently only supported in setup.py | 2022-12-01T13:24:40Z | 2022-12-21T11:19:53Z | [] | [] | ["IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython console session]", "IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython3]", "IPython/lib/tests/test_pygments.py::test_pygments_entry_points[IPython]"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.2.1", "attrs==22.2.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==1.1.1", "jedi==0.18.2", "matplotlib-inline==0.1.6", "packaging==22.0", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.0.0", "prompt-toolkit==3.0.36", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.13.0", "pytest==7.0.1", "pytest-asyncio==0.20.3", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.2", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.8.0", "wcwidth==0.2.5", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13825 | f3a9322efdbacc6cdb99b025574ff63cb3a0ebc8 | diff --git a/IPython/core/completer.py b/IPython/core/completer.py
index fc3aea7b611..25b780be3da 100644
--- a/IPython/core/completer.py
+++ b/IPython/core/completer.py
@@ -671,6 +671,19 @@ def __call__(self, context: CompletionContext) -> MatcherResult:
Matcher: TypeAlias = Union[MatcherAPIv1, MatcherAPIv2]
+def has_any_completions(result: MatcherResult) -> bool:
+ """Check if any result includes any completions."""
+ if hasattr(result["completions"], "__len__"):
+ return len(result["completions"]) != 0
+ try:
+ old_iterator = result["completions"]
+ first = next(old_iterator)
+ result["completions"] = itertools.chain([first], old_iterator)
+ return True
+ except StopIteration:
+ return False
+
+
def completion_matcher(
*, priority: float = None, identifier: str = None, api_version: int = 1
):
@@ -1952,7 +1965,7 @@ def _jedi_matches(
else:
return []
- def python_matches(self, text:str)->List[str]:
+ def python_matches(self, text: str) -> Iterable[str]:
"""Match attributes or global python names"""
if "." in text:
try:
@@ -2807,7 +2820,7 @@ def _complete(self, *, cursor_line, cursor_pos, line_buffer=None, text=None,
should_suppress = (
(suppression_config is True)
or (suppression_recommended and (suppression_config is not False))
- ) and len(result["completions"])
+ ) and has_any_completions(result)
if should_suppress:
suppression_exceptions = result.get("do_not_suppress", set())
| diff --git a/IPython/core/tests/test_completer.py b/IPython/core/tests/test_completer.py
index fd72cf7d57a..98ec814a769 100644
--- a/IPython/core/tests/test_completer.py
+++ b/IPython/core/tests/test_completer.py
@@ -1396,6 +1396,65 @@ def configure(suppression_config):
configure({"b_matcher": True})
_("do not suppress", ["completion_b"])
+ configure(True)
+ _("do not suppress", ["completion_a"])
+
+ def test_matcher_suppression_with_iterator(self):
+ @completion_matcher(identifier="matcher_returning_iterator")
+ def matcher_returning_iterator(text):
+ return iter(["completion_iter"])
+
+ @completion_matcher(identifier="matcher_returning_list")
+ def matcher_returning_list(text):
+ return ["completion_list"]
+
+ with custom_matchers([matcher_returning_iterator, matcher_returning_list]):
+ ip = get_ipython()
+ c = ip.Completer
+
+ def _(text, expected):
+ c.use_jedi = False
+ s, matches = c.complete(text)
+ self.assertEqual(expected, matches)
+
+ def configure(suppression_config):
+ cfg = Config()
+ cfg.IPCompleter.suppress_competing_matchers = suppression_config
+ c.update_config(cfg)
+
+ configure(False)
+ _("---", ["completion_iter", "completion_list"])
+
+ configure(True)
+ _("---", ["completion_iter"])
+
+ configure(None)
+ _("--", ["completion_iter", "completion_list"])
+
+ def test_matcher_suppression_with_jedi(self):
+ ip = get_ipython()
+ c = ip.Completer
+ c.use_jedi = True
+
+ def configure(suppression_config):
+ cfg = Config()
+ cfg.IPCompleter.suppress_competing_matchers = suppression_config
+ c.update_config(cfg)
+
+ def _():
+ with provisionalcompleter():
+ matches = [completion.text for completion in c.completions("dict.", 5)]
+ self.assertIn("keys", matches)
+
+ configure(False)
+ _()
+
+ configure(True)
+ _()
+
+ configure(None)
+ _()
+
def test_matcher_disabling(self):
@completion_matcher(identifier="a_matcher")
def a_matcher(text):
| TypeError on completions using version "8.6.0"
I was using `IPCompleter.merge_completions = False` configuration, and after update to version `8.6.0` I got an error.
I created a fresh virtual environment:
```
poetry init
poetry add ipython
```
and still got the error:
```
Traceback (most recent call last):
File "/tmp/foobar/.venv/lib/python3.10/site-packages/IPython/terminal/ptutils.py", line 122, in get_completions
yield from self._get_completions(body, offset, cursor_position, self.ipy_completer)
File "/tmp/foobar/.venv/lib/python3.10/site-packages/IPython/terminal/ptutils.py", line 138, in _get_completions
for c in completions:
File "/tmp/foobar/.venv/lib/python3.10/site-packages/IPython/core/completer.py", line 753, in _deduplicate_completions
completions = list(completions)
File "/tmp/foobar/.venv/lib/python3.10/site-packages/IPython/core/completer.py", line 2449, in completions
for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000):
File "/tmp/foobar/.venv/lib/python3.10/site-packages/IPython/core/completer.py", line 2499, in _completions
results = self._complete(
File "/tmp/foobar/.venv/lib/python3.10/site-packages/IPython/core/completer.py", line 2810, in _complete
) and len(result["completions"])
TypeError: object of type 'filter' has no len()
```
In the [documentation](https://ipython.readthedocs.io/en/stable/config/options/terminal.html) I read that as of version `8.6.0`, setting `IPCompleter.merge_completions` to False is an alias for: `IPCompleter.suppress_competing_matchers = True`. I used the new option and the error still happens.
After commented this line (to use the default value) the error stopped to happen.
| 2022-11-11T20:23:20Z | 2022-11-16T16:09:09Z | ["IPython/core/tests/test_completer.py::TestCompleter::test_import_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_order", "IPython/core/tests/test_completer.py::TestCompleter::test_nested_import_module_completer", "IPython/core/tests/test_completer.py::test_line_split", "IPython/core/tests/test_completer.py::test_protect_filename", "IPython/core/tests/test_completer.py::TestCompleter::test_object_key_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_delim_setting", "IPython/core/tests/test_completer.py::TestCompleter::test_completions_have_type", "IPython/core/tests/test_completer.py::TestCompleter::test_default_arguments_from_docstring", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes4", "IPython/core/tests/test_completer.py::TestCompleter::test_match_dict_keys_tuple", "IPython/core/tests/test_completer.py::TestCompleter::test_aimport_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_bytes", "IPython/core/tests/test_completer.py::TestCompleter::test_back_unicode_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_limit_to__all__False_ok", "IPython/core/tests/test_completer.py::TestCompleter::test_back_latex_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_greedy_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_abspath_file_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes3", "IPython/core/tests/test_completer.py::TestCompleter::test_spaces", "IPython/core/tests/test_completer.py::TestCompleter::test_custom_completion_error", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_invalids", "IPython/core/tests/test_completer.py::TestCompleter::test_line_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_snake_case_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_unicode_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_forward_unicode_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_priority", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_restrict_to_dicts", "IPython/core/tests/test_completer.py::TestCompleter::test_all_completions_dups", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_unicode_py3", "IPython/core/tests/test_completer.py::TestCompleter::test_from_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_latex_no_results", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression_with_iterator", "IPython/core/tests/test_completer.py::test_unicode_range", "IPython/core/tests/test_completer.py::TestCompleter::test_tryimport", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_config", "IPython/core/tests/test_completer.py::TestCompleter::test_func_kw_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_percent_symbol_restrict_to_magic_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_line_cell_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_custom_completion_ordering", "IPython/core/tests/test_completer.py::TestCompleter::test_get__all__entries_no__all__ok", "IPython/core/tests/test_completer.py::TestCompleter::test_completion_have_signature", "IPython/core/tests/test_completer.py::TestCompleter::test_class_key_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_contexts", "IPython/core/tests/test_completer.py::TestCompleter::test_fwd_unicode_restricts", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing_explicit", "IPython/core/tests/test_completer.py::TestCompleter::test_match_dict_keys", "IPython/core/tests/test_completer.py::TestCompleter::test_cell_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_local_file_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_disabling", "IPython/core/tests/test_completer.py::TestCompleter::test_get__all__entries_ok", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes1", "IPython/core/tests/test_completer.py::TestCompleter::test_latex_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes2", "IPython/core/tests/test_completer.py::TestCompleter::test_jedi", "IPython/core/tests/test_completer.py::TestCompleter::test_omit__names", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_string", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_color"] | [] | ["IPython/core/tests/test_completer.py::TestCompleter::test_mix_terms", "IPython/core/tests/test_completer.py::TestCompleter::test_quoted_file_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression_with_jedi"] | ["IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions Known failure on jedi<=0.18.0"] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.11", "pip_packages": ["asttokens==2.1.0", "attrs==22.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.2.0", "iniconfig==1.1.1", "jedi==0.18.1", "matplotlib-inline==0.1.6", "packaging==21.3", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.0.0", "prompt-toolkit==3.0.32", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.13.0", "pyparsing==3.0.9", "pytest==7.0.1", "pytest-asyncio==0.20.2", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.6.1", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.5.0", "wcwidth==0.2.5", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
ipython/ipython | ipython__ipython-13745 | ae0dfcd9d4fb221f0278f07b022f9837b0e51e67 | diff --git a/IPython/core/completer.py b/IPython/core/completer.py
index cffd0866f42..fc3aea7b611 100644
--- a/IPython/core/completer.py
+++ b/IPython/core/completer.py
@@ -100,6 +100,73 @@
Be sure to update :any:`jedi` to the latest stable version or to try the
current development version to get better completions.
+
+Matchers
+========
+
+All completions routines are implemented using unified *Matchers* API.
+The matchers API is provisional and subject to change without notice.
+
+The built-in matchers include:
+
+- :any:`IPCompleter.dict_key_matcher`: dictionary key completions,
+- :any:`IPCompleter.magic_matcher`: completions for magics,
+- :any:`IPCompleter.unicode_name_matcher`,
+ :any:`IPCompleter.fwd_unicode_matcher`
+ and :any:`IPCompleter.latex_name_matcher`: see `Forward latex/unicode completion`_,
+- :any:`back_unicode_name_matcher` and :any:`back_latex_name_matcher`: see `Backward latex completion`_,
+- :any:`IPCompleter.file_matcher`: paths to files and directories,
+- :any:`IPCompleter.python_func_kw_matcher` - function keywords,
+- :any:`IPCompleter.python_matches` - globals and attributes (v1 API),
+- ``IPCompleter.jedi_matcher`` - static analysis with Jedi,
+- :any:`IPCompleter.custom_completer_matcher` - pluggable completer with a default
+ implementation in :any:`InteractiveShell` which uses IPython hooks system
+ (`complete_command`) with string dispatch (including regular expressions).
+ Differently to other matchers, ``custom_completer_matcher`` will not suppress
+ Jedi results to match behaviour in earlier IPython versions.
+
+Custom matchers can be added by appending to ``IPCompleter.custom_matchers`` list.
+
+Matcher API
+-----------
+
+Simplifying some details, the ``Matcher`` interface can described as
+
+.. code-block::
+
+ MatcherAPIv1 = Callable[[str], list[str]]
+ MatcherAPIv2 = Callable[[CompletionContext], SimpleMatcherResult]
+
+ Matcher = MatcherAPIv1 | MatcherAPIv2
+
+The ``MatcherAPIv1`` reflects the matcher API as available prior to IPython 8.6.0
+and remains supported as a simplest way for generating completions. This is also
+currently the only API supported by the IPython hooks system `complete_command`.
+
+To distinguish between matcher versions ``matcher_api_version`` attribute is used.
+More precisely, the API allows to omit ``matcher_api_version`` for v1 Matchers,
+and requires a literal ``2`` for v2 Matchers.
+
+Once the API stabilises future versions may relax the requirement for specifying
+``matcher_api_version`` by switching to :any:`functools.singledispatch`, therefore
+please do not rely on the presence of ``matcher_api_version`` for any purposes.
+
+Suppression of competing matchers
+---------------------------------
+
+By default results from all matchers are combined, in the order determined by
+their priority. Matchers can request to suppress results from subsequent
+matchers by setting ``suppress`` to ``True`` in the ``MatcherResult``.
+
+When multiple matchers simultaneously request surpression, the results from of
+the matcher with higher priority will be returned.
+
+Sometimes it is desirable to suppress most but not all other matchers;
+this can be achieved by adding a list of identifiers of matchers which
+should not be suppressed to ``MatcherResult`` under ``do_not_suppress`` key.
+
+The suppression behaviour can is user-configurable via
+:any:`IPCompleter.suppress_competing_matchers`.
"""
@@ -109,7 +176,7 @@
# Some of this code originated from rlcompleter in the Python standard library
# Copyright (C) 2001 Python Software Foundation, www.python.org
-
+from __future__ import annotations
import builtins as builtin_mod
import glob
import inspect
@@ -124,9 +191,26 @@
import uuid
import warnings
from contextlib import contextmanager
+from dataclasses import dataclass
+from functools import cached_property, partial
from importlib import import_module
from types import SimpleNamespace
-from typing import Iterable, Iterator, List, Tuple, Union, Any, Sequence, Dict, NamedTuple, Pattern, Optional
+from typing import (
+ Iterable,
+ Iterator,
+ List,
+ Tuple,
+ Union,
+ Any,
+ Sequence,
+ Dict,
+ NamedTuple,
+ Pattern,
+ Optional,
+ TYPE_CHECKING,
+ Set,
+ Literal,
+)
from IPython.core.error import TryNext
from IPython.core.inputtransformer2 import ESC_MAGIC
@@ -134,10 +218,22 @@
from IPython.core.oinspect import InspectColors
from IPython.testing.skipdoctest import skip_doctest
from IPython.utils import generics
+from IPython.utils.decorators import sphinx_options
from IPython.utils.dir2 import dir2, get_real_method
+from IPython.utils.docs import GENERATING_DOCUMENTATION
from IPython.utils.path import ensure_dir_exists
from IPython.utils.process import arg_split
-from traitlets import Bool, Enum, Int, List as ListTrait, Unicode, default, observe
+from traitlets import (
+ Bool,
+ Enum,
+ Int,
+ List as ListTrait,
+ Unicode,
+ Dict as DictTrait,
+ Union as UnionTrait,
+ default,
+ observe,
+)
from traitlets.config.configurable import Configurable
import __main__
@@ -145,6 +241,7 @@
# skip module docstests
__skip_doctest__ = True
+
try:
import jedi
jedi.settings.case_insensitive_completion = False
@@ -153,7 +250,26 @@
JEDI_INSTALLED = True
except ImportError:
JEDI_INSTALLED = False
-#-----------------------------------------------------------------------------
+
+
+if TYPE_CHECKING or GENERATING_DOCUMENTATION:
+ from typing import cast
+ from typing_extensions import TypedDict, NotRequired, Protocol, TypeAlias
+else:
+
+ def cast(obj, type_):
+ """Workaround for `TypeError: MatcherAPIv2() takes no arguments`"""
+ return obj
+
+ # do not require on runtime
+ NotRequired = Tuple # requires Python >=3.11
+ TypedDict = Dict # by extension of `NotRequired` requires 3.11 too
+ Protocol = object # requires Python >=3.8
+ TypeAlias = Any # requires Python >=3.10
+if GENERATING_DOCUMENTATION:
+ from typing import TypedDict
+
+# -----------------------------------------------------------------------------
# Globals
#-----------------------------------------------------------------------------
@@ -166,7 +282,7 @@
_UNICODE_RANGES = [(32, 0x3134b), (0xe0001, 0xe01f0)]
# Public API
-__all__ = ['Completer','IPCompleter']
+__all__ = ["Completer", "IPCompleter"]
if sys.platform == 'win32':
PROTECTABLES = ' '
@@ -177,6 +293,8 @@
# may have trouble processing.
MATCHES_LIMIT = 500
+# Completion type reported when no type can be inferred.
+_UNKNOWN_TYPE = "<unknown>"
class ProvisionalCompleterWarning(FutureWarning):
"""
@@ -355,9 +473,12 @@ def __repr__(self):
return '<Fake completion object jedi has crashed>'
+_JediCompletionLike = Union[jedi.api.Completion, _FakeJediCompletion]
+
+
class Completion:
"""
- Completion object used and return by IPython completers.
+ Completion object used and returned by IPython completers.
.. warning::
@@ -417,6 +538,188 @@ def __hash__(self):
return hash((self.start, self.end, self.text))
+class SimpleCompletion:
+ """Completion item to be included in the dictionary returned by new-style Matcher (API v2).
+
+ .. warning::
+
+ Provisional
+
+ This class is used to describe the currently supported attributes of
+ simple completion items, and any additional implementation details
+ should not be relied on. Additional attributes may be included in
+ future versions, and meaning of text disambiguated from the current
+ dual meaning of "text to insert" and "text to used as a label".
+ """
+
+ __slots__ = ["text", "type"]
+
+ def __init__(self, text: str, *, type: str = None):
+ self.text = text
+ self.type = type
+
+ def __repr__(self):
+ return f"<SimpleCompletion text={self.text!r} type={self.type!r}>"
+
+
+class _MatcherResultBase(TypedDict):
+ """Definition of dictionary to be returned by new-style Matcher (API v2)."""
+
+ #: Suffix of the provided ``CompletionContext.token``, if not given defaults to full token.
+ matched_fragment: NotRequired[str]
+
+ #: Whether to suppress results from all other matchers (True), some
+ #: matchers (set of identifiers) or none (False); default is False.
+ suppress: NotRequired[Union[bool, Set[str]]]
+
+ #: Identifiers of matchers which should NOT be suppressed when this matcher
+ #: requests to suppress all other matchers; defaults to an empty set.
+ do_not_suppress: NotRequired[Set[str]]
+
+ #: Are completions already ordered and should be left as-is? default is False.
+ ordered: NotRequired[bool]
+
+
+@sphinx_options(show_inherited_members=True, exclude_inherited_from=["dict"])
+class SimpleMatcherResult(_MatcherResultBase, TypedDict):
+ """Result of new-style completion matcher."""
+
+ # note: TypedDict is added again to the inheritance chain
+ # in order to get __orig_bases__ for documentation
+
+ #: List of candidate completions
+ completions: Sequence[SimpleCompletion]
+
+
+class _JediMatcherResult(_MatcherResultBase):
+ """Matching result returned by Jedi (will be processed differently)"""
+
+ #: list of candidate completions
+ completions: Iterable[_JediCompletionLike]
+
+
+@dataclass
+class CompletionContext:
+ """Completion context provided as an argument to matchers in the Matcher API v2."""
+
+ # rationale: many legacy matchers relied on completer state (`self.text_until_cursor`)
+ # which was not explicitly visible as an argument of the matcher, making any refactor
+ # prone to errors; by explicitly passing `cursor_position` we can decouple the matchers
+ # from the completer, and make substituting them in sub-classes easier.
+
+ #: Relevant fragment of code directly preceding the cursor.
+ #: The extraction of token is implemented via splitter heuristic
+ #: (following readline behaviour for legacy reasons), which is user configurable
+ #: (by switching the greedy mode).
+ token: str
+
+ #: The full available content of the editor or buffer
+ full_text: str
+
+ #: Cursor position in the line (the same for ``full_text`` and ``text``).
+ cursor_position: int
+
+ #: Cursor line in ``full_text``.
+ cursor_line: int
+
+ #: The maximum number of completions that will be used downstream.
+ #: Matchers can use this information to abort early.
+ #: The built-in Jedi matcher is currently excepted from this limit.
+ # If not given, return all possible completions.
+ limit: Optional[int]
+
+ @cached_property
+ def text_until_cursor(self) -> str:
+ return self.line_with_cursor[: self.cursor_position]
+
+ @cached_property
+ def line_with_cursor(self) -> str:
+ return self.full_text.split("\n")[self.cursor_line]
+
+
+#: Matcher results for API v2.
+MatcherResult = Union[SimpleMatcherResult, _JediMatcherResult]
+
+
+class _MatcherAPIv1Base(Protocol):
+ def __call__(self, text: str) -> list[str]:
+ """Call signature."""
+
+
+class _MatcherAPIv1Total(_MatcherAPIv1Base, Protocol):
+ #: API version
+ matcher_api_version: Optional[Literal[1]]
+
+ def __call__(self, text: str) -> list[str]:
+ """Call signature."""
+
+
+#: Protocol describing Matcher API v1.
+MatcherAPIv1: TypeAlias = Union[_MatcherAPIv1Base, _MatcherAPIv1Total]
+
+
+class MatcherAPIv2(Protocol):
+ """Protocol describing Matcher API v2."""
+
+ #: API version
+ matcher_api_version: Literal[2] = 2
+
+ def __call__(self, context: CompletionContext) -> MatcherResult:
+ """Call signature."""
+
+
+Matcher: TypeAlias = Union[MatcherAPIv1, MatcherAPIv2]
+
+
+def completion_matcher(
+ *, priority: float = None, identifier: str = None, api_version: int = 1
+):
+ """Adds attributes describing the matcher.
+
+ Parameters
+ ----------
+ priority : Optional[float]
+ The priority of the matcher, determines the order of execution of matchers.
+ Higher priority means that the matcher will be executed first. Defaults to 0.
+ identifier : Optional[str]
+ identifier of the matcher allowing users to modify the behaviour via traitlets,
+ and also used to for debugging (will be passed as ``origin`` with the completions).
+ Defaults to matcher function ``__qualname__``.
+ api_version: Optional[int]
+ version of the Matcher API used by this matcher.
+ Currently supported values are 1 and 2.
+ Defaults to 1.
+ """
+
+ def wrapper(func: Matcher):
+ func.matcher_priority = priority or 0
+ func.matcher_identifier = identifier or func.__qualname__
+ func.matcher_api_version = api_version
+ if TYPE_CHECKING:
+ if api_version == 1:
+ func = cast(func, MatcherAPIv1)
+ elif api_version == 2:
+ func = cast(func, MatcherAPIv2)
+ return func
+
+ return wrapper
+
+
+def _get_matcher_priority(matcher: Matcher):
+ return getattr(matcher, "matcher_priority", 0)
+
+
+def _get_matcher_id(matcher: Matcher):
+ return getattr(matcher, "matcher_identifier", matcher.__qualname__)
+
+
+def _get_matcher_api_version(matcher):
+ return getattr(matcher, "matcher_api_version", 1)
+
+
+context_matcher = partial(completion_matcher, api_version=2)
+
+
_IC = Iterable[Completion]
@@ -924,7 +1227,20 @@ def _safe_isinstance(obj, module, class_name):
return (module in sys.modules and
isinstance(obj, getattr(import_module(module), class_name)))
-def back_unicode_name_matches(text:str) -> Tuple[str, Sequence[str]]:
+
+@context_matcher()
+def back_unicode_name_matcher(context: CompletionContext):
+ """Match Unicode characters back to Unicode name
+
+ Same as :any:`back_unicode_name_matches`, but adopted to new Matcher API.
+ """
+ fragment, matches = back_unicode_name_matches(context.text_until_cursor)
+ return _convert_matcher_v1_result_to_v2(
+ matches, type="unicode", fragment=fragment, suppress_if_matches=True
+ )
+
+
+def back_unicode_name_matches(text: str) -> Tuple[str, Sequence[str]]:
"""Match Unicode characters back to Unicode name
This does ``☃`` -> ``\\snowman``
@@ -934,6 +1250,9 @@ def back_unicode_name_matches(text:str) -> Tuple[str, Sequence[str]]:
This will not either back-complete standard sequences like \\n, \\b ...
+ .. deprecated:: 8.6
+ You can use :meth:`back_unicode_name_matcher` instead.
+
Returns
=======
@@ -943,7 +1262,6 @@ def back_unicode_name_matches(text:str) -> Tuple[str, Sequence[str]]:
empty string,
- a sequence (of 1), name for the match Unicode character, preceded by
backslash, or empty if no match.
-
"""
if len(text)<2:
return '', ()
@@ -963,11 +1281,26 @@ def back_unicode_name_matches(text:str) -> Tuple[str, Sequence[str]]:
pass
return '', ()
-def back_latex_name_matches(text:str) -> Tuple[str, Sequence[str]] :
+
+@context_matcher()
+def back_latex_name_matcher(context: CompletionContext):
+ """Match latex characters back to unicode name
+
+ Same as :any:`back_latex_name_matches`, but adopted to new Matcher API.
+ """
+ fragment, matches = back_latex_name_matches(context.text_until_cursor)
+ return _convert_matcher_v1_result_to_v2(
+ matches, type="latex", fragment=fragment, suppress_if_matches=True
+ )
+
+
+def back_latex_name_matches(text: str) -> Tuple[str, Sequence[str]]:
"""Match latex characters back to unicode name
This does ``\\ℵ`` -> ``\\aleph``
+ .. deprecated:: 8.6
+ You can use :meth:`back_latex_name_matcher` instead.
"""
if len(text)<2:
return '', ()
@@ -1042,11 +1375,23 @@ def _make_signature(completion)-> str:
for p in signature.defined_names()) if f])
-class _CompleteResult(NamedTuple):
- matched_text : str
- matches: Sequence[str]
- matches_origin: Sequence[str]
- jedi_matches: Any
+_CompleteResult = Dict[str, MatcherResult]
+
+
+def _convert_matcher_v1_result_to_v2(
+ matches: Sequence[str],
+ type: str,
+ fragment: str = None,
+ suppress_if_matches: bool = False,
+) -> SimpleMatcherResult:
+ """Utility to help with transition"""
+ result = {
+ "completions": [SimpleCompletion(text=match, type=type) for match in matches],
+ "suppress": (True if matches else False) if suppress_if_matches else False,
+ }
+ if fragment is not None:
+ result["matched_fragment"] = fragment
+ return result
class IPCompleter(Completer):
@@ -1062,17 +1407,59 @@ def _greedy_changed(self, change):
else:
self.splitter.delims = DELIMS
- dict_keys_only = Bool(False,
- help="""Whether to show dict key matches only""")
+ dict_keys_only = Bool(
+ False,
+ help="""
+ Whether to show dict key matches only.
+
+ (disables all matchers except for `IPCompleter.dict_key_matcher`).
+ """,
+ )
+
+ suppress_competing_matchers = UnionTrait(
+ [Bool(allow_none=True), DictTrait(Bool(None, allow_none=True))],
+ default_value=None,
+ help="""
+ Whether to suppress completions from other *Matchers*.
+
+ When set to ``None`` (default) the matchers will attempt to auto-detect
+ whether suppression of other matchers is desirable. For example, at
+ the beginning of a line followed by `%` we expect a magic completion
+ to be the only applicable option, and after ``my_dict['`` we usually
+ expect a completion with an existing dictionary key.
+
+ If you want to disable this heuristic and see completions from all matchers,
+ set ``IPCompleter.suppress_competing_matchers = False``.
+ To disable the heuristic for specific matchers provide a dictionary mapping:
+ ``IPCompleter.suppress_competing_matchers = {'IPCompleter.dict_key_matcher': False}``.
+
+ Set ``IPCompleter.suppress_competing_matchers = True`` to limit
+ completions to the set of matchers with the highest priority;
+ this is equivalent to ``IPCompleter.merge_completions`` and
+ can be beneficial for performance, but will sometimes omit relevant
+ candidates from matchers further down the priority list.
+ """,
+ ).tag(config=True)
- merge_completions = Bool(True,
+ merge_completions = Bool(
+ True,
help="""Whether to merge completion results into a single list
If False, only the completion results from the first non-empty
completer will be returned.
- """
+
+ As of version 8.6.0, setting the value to ``False`` is an alias for:
+ ``IPCompleter.suppress_competing_matchers = True.``.
+ """,
+ ).tag(config=True)
+
+ disable_matchers = ListTrait(
+ Unicode(), help="""List of matchers to disable."""
).tag(config=True)
- omit__names = Enum((0,1,2), default_value=2,
+
+ omit__names = Enum(
+ (0, 1, 2),
+ default_value=2,
help="""Instruct the completer to omit private method names
Specifically, when completing on ``object.<tab>``.
@@ -1148,7 +1535,7 @@ def __init__(
namespace=namespace,
global_namespace=global_namespace,
config=config,
- **kwargs
+ **kwargs,
)
# List where completion matches will be stored
@@ -1177,8 +1564,8 @@ def __init__(
#= re.compile(r'[\s|\[]*(\w+)(?:\s*=?\s*.*)')
self.magic_arg_matchers = [
- self.magic_config_matches,
- self.magic_color_matches,
+ self.magic_config_matcher,
+ self.magic_color_matcher,
]
# This is set externally by InteractiveShell
@@ -1190,27 +1577,50 @@ def __init__(
# attribute through the `@unicode_names` property.
self._unicode_names = None
+ self._backslash_combining_matchers = [
+ self.latex_name_matcher,
+ self.unicode_name_matcher,
+ back_latex_name_matcher,
+ back_unicode_name_matcher,
+ self.fwd_unicode_matcher,
+ ]
+
+ if not self.backslash_combining_completions:
+ for matcher in self._backslash_combining_matchers:
+ self.disable_matchers.append(matcher.matcher_identifier)
+
+ if not self.merge_completions:
+ self.suppress_competing_matchers = True
+
@property
- def matchers(self) -> List[Any]:
+ def matchers(self) -> List[Matcher]:
"""All active matcher routines for completion"""
if self.dict_keys_only:
- return [self.dict_key_matches]
+ return [self.dict_key_matcher]
if self.use_jedi:
return [
*self.custom_matchers,
- self.dict_key_matches,
- self.file_matches,
- self.magic_matches,
+ *self._backslash_combining_matchers,
+ *self.magic_arg_matchers,
+ self.custom_completer_matcher,
+ self.magic_matcher,
+ self._jedi_matcher,
+ self.dict_key_matcher,
+ self.file_matcher,
]
else:
return [
*self.custom_matchers,
- self.dict_key_matches,
+ *self._backslash_combining_matchers,
+ *self.magic_arg_matchers,
+ self.custom_completer_matcher,
+ self.dict_key_matcher,
+ # TODO: convert python_matches to v2 API
+ self.magic_matcher,
self.python_matches,
- self.file_matches,
- self.magic_matches,
- self.python_func_kw_matches,
+ self.file_matcher,
+ self.python_func_kw_matcher,
]
def all_completions(self, text:str) -> List[str]:
@@ -1231,7 +1641,15 @@ def _clean_glob_win32(self, text:str):
return [f.replace("\\","/")
for f in self.glob("%s*" % text)]
- def file_matches(self, text:str)->List[str]:
+ @context_matcher()
+ def file_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
+ """Same as :any:`file_matches`, but adopted to new Matcher API."""
+ matches = self.file_matches(context.token)
+ # TODO: add a heuristic for suppressing (e.g. if it has OS-specific delimiter,
+ # starts with `/home/`, `C:\`, etc)
+ return _convert_matcher_v1_result_to_v2(matches, type="path")
+
+ def file_matches(self, text: str) -> List[str]:
"""Match filenames, expanding ~USER type strings.
Most of the seemingly convoluted logic in this completer is an
@@ -1243,7 +1661,11 @@ def file_matches(self, text:str)->List[str]:
only the parts after what's already been typed (instead of the
full completions, as is normally done). I don't think with the
current (as of Python 2.3) Python readline it's possible to do
- better."""
+ better.
+
+ .. deprecated:: 8.6
+ You can use :meth:`file_matcher` instead.
+ """
# chars that require escaping with backslash - i.e. chars
# that readline treats incorrectly as delimiters, but we
@@ -1313,8 +1735,22 @@ def file_matches(self, text:str)->List[str]:
# Mark directories in input list by appending '/' to their names.
return [x+'/' if os.path.isdir(x) else x for x in matches]
- def magic_matches(self, text:str):
- """Match magics"""
+ @context_matcher()
+ def magic_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
+ """Match magics."""
+ text = context.token
+ matches = self.magic_matches(text)
+ result = _convert_matcher_v1_result_to_v2(matches, type="magic")
+ is_magic_prefix = len(text) > 0 and text[0] == "%"
+ result["suppress"] = is_magic_prefix and bool(result["completions"])
+ return result
+
+ def magic_matches(self, text: str):
+ """Match magics.
+
+ .. deprecated:: 8.6
+ You can use :meth:`magic_matcher` instead.
+ """
# Get all shell magics now rather than statically, so magics loaded at
# runtime show up too.
lsm = self.shell.magics_manager.lsmagic()
@@ -1355,8 +1791,19 @@ def matches(magic):
return comp
- def magic_config_matches(self, text:str) -> List[str]:
- """ Match class names and attributes for %config magic """
+ @context_matcher()
+ def magic_config_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
+ """Match class names and attributes for %config magic."""
+ # NOTE: uses `line_buffer` equivalent for compatibility
+ matches = self.magic_config_matches(context.line_with_cursor)
+ return _convert_matcher_v1_result_to_v2(matches, type="param")
+
+ def magic_config_matches(self, text: str) -> List[str]:
+ """Match class names and attributes for %config magic.
+
+ .. deprecated:: 8.6
+ You can use :meth:`magic_config_matcher` instead.
+ """
texts = text.strip().split()
if len(texts) > 0 and (texts[0] == 'config' or texts[0] == '%config'):
@@ -1390,8 +1837,19 @@ def magic_config_matches(self, text:str) -> List[str]:
if attr.startswith(texts[1]) ]
return []
- def magic_color_matches(self, text:str) -> List[str] :
- """ Match color schemes for %colors magic"""
+ @context_matcher()
+ def magic_color_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
+ """Match color schemes for %colors magic."""
+ # NOTE: uses `line_buffer` equivalent for compatibility
+ matches = self.magic_color_matches(context.line_with_cursor)
+ return _convert_matcher_v1_result_to_v2(matches, type="param")
+
+ def magic_color_matches(self, text: str) -> List[str]:
+ """Match color schemes for %colors magic.
+
+ .. deprecated:: 8.6
+ You can use :meth:`magic_color_matcher` instead.
+ """
texts = text.split()
if text.endswith(' '):
# .split() strips off the trailing whitespace. Add '' back
@@ -1404,9 +1862,24 @@ def magic_color_matches(self, text:str) -> List[str] :
if color.startswith(prefix) ]
return []
- def _jedi_matches(self, cursor_column:int, cursor_line:int, text:str) -> Iterable[Any]:
+ @context_matcher(identifier="IPCompleter.jedi_matcher")
+ def _jedi_matcher(self, context: CompletionContext) -> _JediMatcherResult:
+ matches = self._jedi_matches(
+ cursor_column=context.cursor_position,
+ cursor_line=context.cursor_line,
+ text=context.full_text,
+ )
+ return {
+ "completions": matches,
+ # static analysis should not suppress other matchers
+ "suppress": False,
+ }
+
+ def _jedi_matches(
+ self, cursor_column: int, cursor_line: int, text: str
+ ) -> Iterable[_JediCompletionLike]:
"""
- Return a list of :any:`jedi.api.Completions` object from a ``text`` and
+ Return a list of :any:`jedi.api.Completion`s object from a ``text`` and
cursor position.
Parameters
@@ -1422,6 +1895,9 @@ def _jedi_matches(self, cursor_column:int, cursor_line:int, text:str) -> Iterabl
-----
If ``IPCompleter.debug`` is ``True`` may return a :any:`_FakeJediCompletion`
object containing a string with the Jedi debug information attached.
+
+ .. deprecated:: 8.6
+ You can use :meth:`_jedi_matcher` instead.
"""
namespaces = [self.namespace]
if self.global_namespace is not None:
@@ -1558,8 +2034,18 @@ def _default_arguments(self, obj):
return list(set(ret))
+ @context_matcher()
+ def python_func_kw_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
+ """Match named parameters (kwargs) of the last open function."""
+ matches = self.python_func_kw_matches(context.token)
+ return _convert_matcher_v1_result_to_v2(matches, type="param")
+
def python_func_kw_matches(self, text):
- """Match named parameters (kwargs) of the last open function"""
+ """Match named parameters (kwargs) of the last open function.
+
+ .. deprecated:: 8.6
+ You can use :meth:`python_func_kw_matcher` instead.
+ """
if "." in text: # a parameter cannot be dotted
return []
@@ -1654,9 +2140,20 @@ def _get_keys(obj: Any) -> List[Any]:
return obj.dtype.names or []
return []
- def dict_key_matches(self, text:str) -> List[str]:
- "Match string keys in a dictionary, after e.g. 'foo[' "
+ @context_matcher()
+ def dict_key_matcher(self, context: CompletionContext) -> SimpleMatcherResult:
+ """Match string keys in a dictionary, after e.g. ``foo[``."""
+ matches = self.dict_key_matches(context.token)
+ return _convert_matcher_v1_result_to_v2(
+ matches, type="dict key", suppress_if_matches=True
+ )
+
+ def dict_key_matches(self, text: str) -> List[str]:
+ """Match string keys in a dictionary, after e.g. ``foo[``.
+ .. deprecated:: 8.6
+ You can use :meth:`dict_key_matcher` instead.
+ """
if self.__dict_key_regexps is not None:
regexps = self.__dict_key_regexps
@@ -1758,8 +2255,16 @@ def dict_key_matches(self, text:str) -> List[str]:
return [leading + k + suf for k in matches]
+ @context_matcher()
+ def unicode_name_matcher(self, context: CompletionContext):
+ """Same as :any:`unicode_name_matches`, but adopted to new Matcher API."""
+ fragment, matches = self.unicode_name_matches(context.text_until_cursor)
+ return _convert_matcher_v1_result_to_v2(
+ matches, type="unicode", fragment=fragment, suppress_if_matches=True
+ )
+
@staticmethod
- def unicode_name_matches(text:str) -> Tuple[str, List[str]] :
+ def unicode_name_matches(text: str) -> Tuple[str, List[str]]:
"""Match Latex-like syntax for unicode characters base
on the name of the character.
@@ -1780,11 +2285,24 @@ def unicode_name_matches(text:str) -> Tuple[str, List[str]] :
pass
return '', []
+ @context_matcher()
+ def latex_name_matcher(self, context: CompletionContext):
+ """Match Latex syntax for unicode characters.
- def latex_matches(self, text:str) -> Tuple[str, Sequence[str]]:
+ This does both ``\\alp`` -> ``\\alpha`` and ``\\alpha`` -> ``α``
+ """
+ fragment, matches = self.latex_matches(context.text_until_cursor)
+ return _convert_matcher_v1_result_to_v2(
+ matches, type="latex", fragment=fragment, suppress_if_matches=True
+ )
+
+ def latex_matches(self, text: str) -> Tuple[str, Sequence[str]]:
"""Match Latex syntax for unicode characters.
This does both ``\\alp`` -> ``\\alpha`` and ``\\alpha`` -> ``α``
+
+ .. deprecated:: 8.6
+ You can use :meth:`latex_name_matcher` instead.
"""
slashpos = text.rfind('\\')
if slashpos > -1:
@@ -1801,7 +2319,25 @@ def latex_matches(self, text:str) -> Tuple[str, Sequence[str]]:
return s, matches
return '', ()
+ @context_matcher()
+ def custom_completer_matcher(self, context):
+ """Dispatch custom completer.
+
+ If a match is found, suppresses all other matchers except for Jedi.
+ """
+ matches = self.dispatch_custom_completer(context.token) or []
+ result = _convert_matcher_v1_result_to_v2(
+ matches, type=_UNKNOWN_TYPE, suppress_if_matches=True
+ )
+ result["ordered"] = True
+ result["do_not_suppress"] = {_get_matcher_id(self._jedi_matcher)}
+ return result
+
def dispatch_custom_completer(self, text):
+ """
+ .. deprecated:: 8.6
+ You can use :meth:`custom_completer_matcher` instead.
+ """
if not self.custom_completers:
return
@@ -1955,12 +2491,25 @@ def _completions(self, full_text: str, offset: int, *, _timeout) -> Iterator[Com
"""
deadline = time.monotonic() + _timeout
-
before = full_text[:offset]
cursor_line, cursor_column = position_to_cursor(full_text, offset)
- matched_text, matches, matches_origin, jedi_matches = self._complete(
- full_text=full_text, cursor_line=cursor_line, cursor_pos=cursor_column)
+ jedi_matcher_id = _get_matcher_id(self._jedi_matcher)
+
+ results = self._complete(
+ full_text=full_text, cursor_line=cursor_line, cursor_pos=cursor_column
+ )
+ non_jedi_results: Dict[str, SimpleMatcherResult] = {
+ identifier: result
+ for identifier, result in results.items()
+ if identifier != jedi_matcher_id
+ }
+
+ jedi_matches = (
+ cast(results[jedi_matcher_id], _JediMatcherResult)["completions"]
+ if jedi_matcher_id in results
+ else ()
+ )
iter_jm = iter(jedi_matches)
if _timeout:
@@ -1988,28 +2537,57 @@ def _completions(self, full_text: str, offset: int, *, _timeout) -> Iterator[Com
for jm in iter_jm:
delta = len(jm.name_with_symbols) - len(jm.complete)
- yield Completion(start=offset - delta,
- end=offset,
- text=jm.name_with_symbols,
- type='<unknown>', # don't compute type for speed
- _origin='jedi',
- signature='')
-
-
- start_offset = before.rfind(matched_text)
+ yield Completion(
+ start=offset - delta,
+ end=offset,
+ text=jm.name_with_symbols,
+ type=_UNKNOWN_TYPE, # don't compute type for speed
+ _origin="jedi",
+ signature="",
+ )
# TODO:
# Suppress this, right now just for debug.
- if jedi_matches and matches and self.debug:
- yield Completion(start=start_offset, end=offset, text='--jedi/ipython--',
- _origin='debug', type='none', signature='')
+ if jedi_matches and non_jedi_results and self.debug:
+ some_start_offset = before.rfind(
+ next(iter(non_jedi_results.values()))["matched_fragment"]
+ )
+ yield Completion(
+ start=some_start_offset,
+ end=offset,
+ text="--jedi/ipython--",
+ _origin="debug",
+ type="none",
+ signature="",
+ )
- # I'm unsure if this is always true, so let's assert and see if it
- # crash
- assert before.endswith(matched_text)
- for m, t in zip(matches, matches_origin):
- yield Completion(start=start_offset, end=offset, text=m, _origin=t, signature='', type='<unknown>')
+ ordered = []
+ sortable = []
+
+ for origin, result in non_jedi_results.items():
+ matched_text = result["matched_fragment"]
+ start_offset = before.rfind(matched_text)
+ is_ordered = result.get("ordered", False)
+ container = ordered if is_ordered else sortable
+
+ # I'm unsure if this is always true, so let's assert and see if it
+ # crash
+ assert before.endswith(matched_text)
+
+ for simple_completion in result["completions"]:
+ completion = Completion(
+ start=start_offset,
+ end=offset,
+ text=simple_completion.text,
+ _origin=origin,
+ signature="",
+ type=simple_completion.type or _UNKNOWN_TYPE,
+ )
+ container.append(completion)
+ yield from list(self._deduplicate(ordered + self._sort(sortable)))[
+ :MATCHES_LIMIT
+ ]
def complete(self, text=None, line_buffer=None, cursor_pos=None) -> Tuple[str, Sequence[str]]:
"""Find completions for the given text and line context.
@@ -2050,7 +2628,56 @@ def complete(self, text=None, line_buffer=None, cursor_pos=None) -> Tuple[str, S
PendingDeprecationWarning)
# potential todo, FOLD the 3rd throw away argument of _complete
# into the first 2 one.
- return self._complete(line_buffer=line_buffer, cursor_pos=cursor_pos, text=text, cursor_line=0)[:2]
+ # TODO: Q: does the above refer to jedi completions (i.e. 0-indexed?)
+ # TODO: should we deprecate now, or does it stay?
+
+ results = self._complete(
+ line_buffer=line_buffer, cursor_pos=cursor_pos, text=text, cursor_line=0
+ )
+
+ jedi_matcher_id = _get_matcher_id(self._jedi_matcher)
+
+ return self._arrange_and_extract(
+ results,
+ # TODO: can we confirm that excluding Jedi here was a deliberate choice in previous version?
+ skip_matchers={jedi_matcher_id},
+ # this API does not support different start/end positions (fragments of token).
+ abort_if_offset_changes=True,
+ )
+
+ def _arrange_and_extract(
+ self,
+ results: Dict[str, MatcherResult],
+ skip_matchers: Set[str],
+ abort_if_offset_changes: bool,
+ ):
+
+ sortable = []
+ ordered = []
+ most_recent_fragment = None
+ for identifier, result in results.items():
+ if identifier in skip_matchers:
+ continue
+ if not result["completions"]:
+ continue
+ if not most_recent_fragment:
+ most_recent_fragment = result["matched_fragment"]
+ if (
+ abort_if_offset_changes
+ and result["matched_fragment"] != most_recent_fragment
+ ):
+ break
+ if result.get("ordered", False):
+ ordered.extend(result["completions"])
+ else:
+ sortable.extend(result["completions"])
+
+ if not most_recent_fragment:
+ most_recent_fragment = "" # to satisfy typechecker (and just in case)
+
+ return most_recent_fragment, [
+ m.text for m in self._deduplicate(ordered + self._sort(sortable))
+ ]
def _complete(self, *, cursor_line, cursor_pos, line_buffer=None, text=None,
full_text=None) -> _CompleteResult:
@@ -2085,14 +2712,10 @@ def _complete(self, *, cursor_line, cursor_pos, line_buffer=None, text=None,
Returns
-------
- A tuple of N elements which are (likely):
- matched_text: ? the text that the complete matched
- matches: list of completions ?
- matches_origin: ? list same length as matches, and where each completion came from
- jedi_matches: list of Jedi matches, have it's own structure.
+ An ordered dictionary where keys are identifiers of completion
+ matchers and values are ``MatcherResult``s.
"""
-
# if the cursor position isn't given, the only sane assumption we can
# make is that it's at the end of the line (the common case)
if cursor_pos is None:
@@ -2104,98 +2727,156 @@ def _complete(self, *, cursor_line, cursor_pos, line_buffer=None, text=None,
# if text is either None or an empty string, rely on the line buffer
if (not line_buffer) and full_text:
line_buffer = full_text.split('\n')[cursor_line]
- if not text: # issue #11508: check line_buffer before calling split_line
- text = self.splitter.split_line(line_buffer, cursor_pos) if line_buffer else ''
-
- if self.backslash_combining_completions:
- # allow deactivation of these on windows.
- base_text = text if not line_buffer else line_buffer[:cursor_pos]
-
- for meth in (self.latex_matches,
- self.unicode_name_matches,
- back_latex_name_matches,
- back_unicode_name_matches,
- self.fwd_unicode_match):
- name_text, name_matches = meth(base_text)
- if name_text:
- return _CompleteResult(name_text, name_matches[:MATCHES_LIMIT], \
- [meth.__qualname__]*min(len(name_matches), MATCHES_LIMIT), ())
-
+ if not text: # issue #11508: check line_buffer before calling split_line
+ text = (
+ self.splitter.split_line(line_buffer, cursor_pos) if line_buffer else ""
+ )
# If no line buffer is given, assume the input text is all there was
if line_buffer is None:
line_buffer = text
+ # deprecated - do not use `line_buffer` in new code.
self.line_buffer = line_buffer
self.text_until_cursor = self.line_buffer[:cursor_pos]
- # Do magic arg matches
- for matcher in self.magic_arg_matchers:
- matches = list(matcher(line_buffer))[:MATCHES_LIMIT]
- if matches:
- origins = [matcher.__qualname__] * len(matches)
- return _CompleteResult(text, matches, origins, ())
+ if not full_text:
+ full_text = line_buffer
+
+ context = CompletionContext(
+ full_text=full_text,
+ cursor_position=cursor_pos,
+ cursor_line=cursor_line,
+ token=text,
+ limit=MATCHES_LIMIT,
+ )
# Start with a clean slate of completions
- matches = []
+ results = {}
- # FIXME: we should extend our api to return a dict with completions for
- # different types of objects. The rlcomplete() method could then
- # simply collapse the dict into a list for readline, but we'd have
- # richer completion semantics in other environments.
- is_magic_prefix = len(text) > 0 and text[0] == "%"
- completions: Iterable[Any] = []
- if self.use_jedi and not is_magic_prefix:
- if not full_text:
- full_text = line_buffer
- completions = self._jedi_matches(
- cursor_pos, cursor_line, full_text)
-
- if self.merge_completions:
- matches = []
- for matcher in self.matchers:
- try:
- matches.extend([(m, matcher.__qualname__)
- for m in matcher(text)])
- except:
- # Show the ugly traceback if the matcher causes an
- # exception, but do NOT crash the kernel!
- sys.excepthook(*sys.exc_info())
- else:
- for matcher in self.matchers:
- matches = [(m, matcher.__qualname__)
- for m in matcher(text)]
- if matches:
- break
-
- seen = set()
- filtered_matches = set()
- for m in matches:
- t, c = m
- if t not in seen:
- filtered_matches.add(m)
- seen.add(t)
+ jedi_matcher_id = _get_matcher_id(self._jedi_matcher)
- _filtered_matches = sorted(filtered_matches, key=lambda x: completions_sorting_key(x[0]))
+ suppressed_matchers = set()
- custom_res = [(m, 'custom') for m in self.dispatch_custom_completer(text) or []]
-
- _filtered_matches = custom_res or _filtered_matches
-
- _filtered_matches = _filtered_matches[:MATCHES_LIMIT]
- _matches = [m[0] for m in _filtered_matches]
- origins = [m[1] for m in _filtered_matches]
+ matchers = {
+ _get_matcher_id(matcher): matcher
+ for matcher in sorted(
+ self.matchers, key=_get_matcher_priority, reverse=True
+ )
+ }
- self.matches = _matches
+ for matcher_id, matcher in matchers.items():
+ api_version = _get_matcher_api_version(matcher)
+ matcher_id = _get_matcher_id(matcher)
- return _CompleteResult(text, _matches, origins, completions)
-
- def fwd_unicode_match(self, text:str) -> Tuple[str, Sequence[str]]:
+ if matcher_id in self.disable_matchers:
+ continue
+
+ if matcher_id in results:
+ warnings.warn(f"Duplicate matcher ID: {matcher_id}.")
+
+ if matcher_id in suppressed_matchers:
+ continue
+
+ try:
+ if api_version == 1:
+ result = _convert_matcher_v1_result_to_v2(
+ matcher(text), type=_UNKNOWN_TYPE
+ )
+ elif api_version == 2:
+ result = cast(matcher, MatcherAPIv2)(context)
+ else:
+ raise ValueError(f"Unsupported API version {api_version}")
+ except:
+ # Show the ugly traceback if the matcher causes an
+ # exception, but do NOT crash the kernel!
+ sys.excepthook(*sys.exc_info())
+ continue
+
+ # set default value for matched fragment if suffix was not selected.
+ result["matched_fragment"] = result.get("matched_fragment", context.token)
+
+ if not suppressed_matchers:
+ suppression_recommended = result.get("suppress", False)
+
+ suppression_config = (
+ self.suppress_competing_matchers.get(matcher_id, None)
+ if isinstance(self.suppress_competing_matchers, dict)
+ else self.suppress_competing_matchers
+ )
+ should_suppress = (
+ (suppression_config is True)
+ or (suppression_recommended and (suppression_config is not False))
+ ) and len(result["completions"])
+
+ if should_suppress:
+ suppression_exceptions = result.get("do_not_suppress", set())
+ try:
+ to_suppress = set(suppression_recommended)
+ except TypeError:
+ to_suppress = set(matchers)
+ suppressed_matchers = to_suppress - suppression_exceptions
+
+ new_results = {}
+ for previous_matcher_id, previous_result in results.items():
+ if previous_matcher_id not in suppressed_matchers:
+ new_results[previous_matcher_id] = previous_result
+ results = new_results
+
+ results[matcher_id] = result
+
+ _, matches = self._arrange_and_extract(
+ results,
+ # TODO Jedi completions non included in legacy stateful API; was this deliberate or omission?
+ # if it was omission, we can remove the filtering step, otherwise remove this comment.
+ skip_matchers={jedi_matcher_id},
+ abort_if_offset_changes=False,
+ )
+
+ # populate legacy stateful API
+ self.matches = matches
+
+ return results
+
+ @staticmethod
+ def _deduplicate(
+ matches: Sequence[SimpleCompletion],
+ ) -> Iterable[SimpleCompletion]:
+ filtered_matches = {}
+ for match in matches:
+ text = match.text
+ if (
+ text not in filtered_matches
+ or filtered_matches[text].type == _UNKNOWN_TYPE
+ ):
+ filtered_matches[text] = match
+
+ return filtered_matches.values()
+
+ @staticmethod
+ def _sort(matches: Sequence[SimpleCompletion]):
+ return sorted(matches, key=lambda x: completions_sorting_key(x.text))
+
+ @context_matcher()
+ def fwd_unicode_matcher(self, context: CompletionContext):
+ """Same as :any:`fwd_unicode_match`, but adopted to new Matcher API."""
+ # TODO: use `context.limit` to terminate early once we matched the maximum
+ # number that will be used downstream; can be added as an optional to
+ # `fwd_unicode_match(text: str, limit: int = None)` or we could re-implement here.
+ fragment, matches = self.fwd_unicode_match(context.text_until_cursor)
+ return _convert_matcher_v1_result_to_v2(
+ matches, type="unicode", fragment=fragment, suppress_if_matches=True
+ )
+
+ def fwd_unicode_match(self, text: str) -> Tuple[str, Sequence[str]]:
"""
Forward match a string starting with a backslash with a list of
potential Unicode completions.
- Will compute list list of Unicode character names on first call and cache it.
+ Will compute list of Unicode character names on first call and cache it.
+
+ .. deprecated:: 8.6
+ You can use :meth:`fwd_unicode_matcher` instead.
Returns
-------
diff --git a/IPython/core/magics/config.py b/IPython/core/magics/config.py
index c1387b601b8..f442ba15259 100644
--- a/IPython/core/magics/config.py
+++ b/IPython/core/magics/config.py
@@ -80,6 +80,9 @@ def config(self, s):
Enable debug for the Completer. Mostly print extra information for
experimental jedi integration.
Current: False
+ IPCompleter.disable_matchers=<list-item-1>...
+ List of matchers to disable.
+ Current: []
IPCompleter.greedy=<Bool>
Activate greedy completion
PENDING DEPRECATION. this is now mostly taken care of with Jedi.
@@ -102,6 +105,8 @@ def config(self, s):
Whether to merge completion results into a single list
If False, only the completion results from the first non-empty
completer will be returned.
+ As of version 8.6.0, setting the value to ``False`` is an alias for:
+ ``IPCompleter.suppress_competing_matchers = True.``.
Current: True
IPCompleter.omit__names=<Enum>
Instruct the completer to omit private method names
@@ -117,6 +122,24 @@ def config(self, s):
IPCompleter.profiler_output_dir=<Unicode>
Template for path at which to output profile data for completions.
Current: '.completion_profiles'
+ IPCompleter.suppress_competing_matchers=<Union>
+ Whether to suppress completions from other *Matchers*.
+ When set to ``None`` (default) the matchers will attempt to auto-detect
+ whether suppression of other matchers is desirable. For example, at the
+ beginning of a line followed by `%` we expect a magic completion to be the
+ only applicable option, and after ``my_dict['`` we usually expect a
+ completion with an existing dictionary key.
+ If you want to disable this heuristic and see completions from all matchers,
+ set ``IPCompleter.suppress_competing_matchers = False``. To disable the
+ heuristic for specific matchers provide a dictionary mapping:
+ ``IPCompleter.suppress_competing_matchers = {'IPCompleter.dict_key_matcher':
+ False}``.
+ Set ``IPCompleter.suppress_competing_matchers = True`` to limit completions
+ to the set of matchers with the highest priority; this is equivalent to
+ ``IPCompleter.merge_completions`` and can be beneficial for performance, but
+ will sometimes omit relevant candidates from matchers further down the
+ priority list.
+ Current: None
IPCompleter.use_jedi=<Bool>
Experimental: Use Jedi to generate autocompletions. Default to True if jedi
is installed.
diff --git a/IPython/utils/decorators.py b/IPython/utils/decorators.py
index 47791d7ca65..bc7589cd35c 100644
--- a/IPython/utils/decorators.py
+++ b/IPython/utils/decorators.py
@@ -2,7 +2,7 @@
"""Decorators that don't go anywhere else.
This module contains misc. decorators that don't really go with another module
-in :mod:`IPython.utils`. Beore putting something here please see if it should
+in :mod:`IPython.utils`. Before putting something here please see if it should
go into another topical module in :mod:`IPython.utils`.
"""
@@ -16,6 +16,10 @@
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
+from typing import Sequence
+
+from IPython.utils.docs import GENERATING_DOCUMENTATION
+
#-----------------------------------------------------------------------------
# Code
@@ -48,6 +52,7 @@ def wrapper(*args,**kw):
wrapper.__doc__ = func.__doc__
return wrapper
+
def undoc(func):
"""Mark a function or class as undocumented.
@@ -56,3 +61,23 @@ def undoc(func):
"""
return func
+
+def sphinx_options(
+ show_inheritance: bool = True,
+ show_inherited_members: bool = False,
+ exclude_inherited_from: Sequence[str] = tuple(),
+):
+ """Set sphinx options"""
+
+ def wrapper(func):
+ if not GENERATING_DOCUMENTATION:
+ return func
+
+ func._sphinx_options = dict(
+ show_inheritance=show_inheritance,
+ show_inherited_members=show_inherited_members,
+ exclude_inherited_from=exclude_inherited_from,
+ )
+ return func
+
+ return wrapper
diff --git a/IPython/utils/docs.py b/IPython/utils/docs.py
new file mode 100644
index 00000000000..6a97815cdc7
--- /dev/null
+++ b/IPython/utils/docs.py
@@ -0,0 +1,3 @@
+import os
+
+GENERATING_DOCUMENTATION = os.environ.get("IN_SPHINX_RUN", None) == "True"
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 29212af8bf7..d04d4637ba7 100755
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -41,6 +41,14 @@
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+# Allow Python scripts to change behaviour during sphinx run
+os.environ["IN_SPHINX_RUN"] = "True"
+
+autodoc_type_aliases = {
+ "Matcher": " IPython.core.completer.Matcher",
+ "MatcherAPIv1": " IPython.core.completer.MatcherAPIv1",
+}
+
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
diff --git a/docs/sphinxext/apigen.py b/docs/sphinxext/apigen.py
index e58493b17fd..47dc1101933 100644
--- a/docs/sphinxext/apigen.py
+++ b/docs/sphinxext/apigen.py
@@ -24,14 +24,9 @@
import os
import re
from importlib import import_module
+from types import SimpleNamespace as Obj
-class Obj(object):
- '''Namespace to hold arbitrary information.'''
- def __init__(self, **kwargs):
- for k, v in kwargs.items():
- setattr(self, k, v)
-
class FuncClsScanner(ast.NodeVisitor):
"""Scan a module for top-level functions and classes.
@@ -42,7 +37,7 @@ def __init__(self):
self.classes = []
self.classes_seen = set()
self.functions = []
-
+
@staticmethod
def has_undoc_decorator(node):
return any(isinstance(d, ast.Name) and d.id == 'undoc' \
@@ -62,11 +57,15 @@ def visit_FunctionDef(self, node):
self.functions.append(node.name)
def visit_ClassDef(self, node):
- if not (node.name.startswith('_') or self.has_undoc_decorator(node)) \
- and node.name not in self.classes_seen:
- cls = Obj(name=node.name)
- cls.has_init = any(isinstance(n, ast.FunctionDef) and \
- n.name=='__init__' for n in node.body)
+ if (
+ not (node.name.startswith("_") or self.has_undoc_decorator(node))
+ and node.name not in self.classes_seen
+ ):
+ cls = Obj(name=node.name, sphinx_options={})
+ cls.has_init = any(
+ isinstance(n, ast.FunctionDef) and n.name == "__init__"
+ for n in node.body
+ )
self.classes.append(cls)
self.classes_seen.add(node.name)
@@ -221,7 +220,11 @@ def _import_funcs_classes(self, uri):
funcs, classes = [], []
for name, obj in ns.items():
if inspect.isclass(obj):
- cls = Obj(name=name, has_init='__init__' in obj.__dict__)
+ cls = Obj(
+ name=name,
+ has_init="__init__" in obj.__dict__,
+ sphinx_options=getattr(obj, "_sphinx_options", {}),
+ )
classes.append(cls)
elif inspect.isfunction(obj):
funcs.append(name)
@@ -279,10 +282,18 @@ def generate_api_doc(self, uri):
self.rst_section_levels[2] * len(subhead) + '\n'
for c in classes:
- ad += '\n.. autoclass:: ' + c.name + '\n'
+ opts = c.sphinx_options
+ ad += "\n.. autoclass:: " + c.name + "\n"
# must NOT exclude from index to keep cross-refs working
- ad += ' :members:\n' \
- ' :show-inheritance:\n'
+ ad += " :members:\n"
+ if opts.get("show_inheritance", True):
+ ad += " :show-inheritance:\n"
+ if opts.get("show_inherited_members", False):
+ exclusions_list = opts.get("exclude_inherited_from", [])
+ exclusions = (
+ (" " + " ".join(exclusions_list)) if exclusions_list else ""
+ )
+ ad += f" :inherited-members:{exclusions}\n"
if c.has_init:
ad += '\n .. automethod:: __init__\n'
diff --git a/setup.cfg b/setup.cfg
index 6004f3a4d3d..72cb30ce9b6 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -54,6 +54,7 @@ doc =
matplotlib
stack_data
pytest<7
+ typing_extensions
%(test)s
kernel =
ipykernel
| diff --git a/IPython/core/tests/test_completer.py b/IPython/core/tests/test_completer.py
index 746a1e68261..fd72cf7d57a 100644
--- a/IPython/core/tests/test_completer.py
+++ b/IPython/core/tests/test_completer.py
@@ -24,6 +24,9 @@
provisionalcompleter,
match_dict_keys,
_deduplicate_completions,
+ completion_matcher,
+ SimpleCompletion,
+ CompletionContext,
)
# -----------------------------------------------------------------------------
@@ -109,6 +112,16 @@ def greedy_completion():
ip.Completer.greedy = greedy_original
+@contextmanager
+def custom_matchers(matchers):
+ ip = get_ipython()
+ try:
+ ip.Completer.custom_matchers.extend(matchers)
+ yield
+ finally:
+ ip.Completer.custom_matchers.clear()
+
+
def test_protect_filename():
if sys.platform == "win32":
pairs = [
@@ -298,7 +311,7 @@ def test_back_unicode_completion(self):
ip = get_ipython()
name, matches = ip.complete("\\Ⅴ")
- self.assertEqual(matches, ("\\ROMAN NUMERAL FIVE",))
+ self.assertEqual(matches, ["\\ROMAN NUMERAL FIVE"])
def test_forward_unicode_completion(self):
ip = get_ipython()
@@ -379,6 +392,12 @@ def test_local_file_completions(self):
def test_quoted_file_completions(self):
ip = get_ipython()
+
+ def _(text):
+ return ip.Completer._complete(
+ cursor_line=0, cursor_pos=len(text), full_text=text
+ )["IPCompleter.file_matcher"]["completions"]
+
with TemporaryWorkingDirectory():
name = "foo'bar"
open(name, "w", encoding="utf-8").close()
@@ -387,25 +406,16 @@ def test_quoted_file_completions(self):
escaped = name if sys.platform == "win32" else "foo\\'bar"
# Single quote matches embedded single quote
- text = "open('foo"
- c = ip.Completer._complete(
- cursor_line=0, cursor_pos=len(text), full_text=text
- )[1]
- self.assertEqual(c, [escaped])
+ c = _("open('foo")[0]
+ self.assertEqual(c.text, escaped)
# Double quote requires no escape
- text = 'open("foo'
- c = ip.Completer._complete(
- cursor_line=0, cursor_pos=len(text), full_text=text
- )[1]
- self.assertEqual(c, [name])
+ c = _('open("foo')[0]
+ self.assertEqual(c.text, name)
# No quote requires an escape
- text = "%ls foo"
- c = ip.Completer._complete(
- cursor_line=0, cursor_pos=len(text), full_text=text
- )[1]
- self.assertEqual(c, [escaped])
+ c = _("%ls foo")[0]
+ self.assertEqual(c.text, escaped)
def test_all_completions_dups(self):
"""
@@ -475,6 +485,17 @@ def test_completion_have_signature(self):
"encoding" in c.signature
), "Signature of function was not found by completer"
+ def test_completions_have_type(self):
+ """
+ Lets make sure matchers provide completion type.
+ """
+ ip = get_ipython()
+ with provisionalcompleter():
+ ip.Completer.use_jedi = False
+ completions = ip.Completer.completions("%tim", 3)
+ c = next(completions) # should be `%time` or similar
+ assert c.type == "magic", "Type of magic was not assigned by completer"
+
@pytest.mark.xfail(reason="Known failure on jedi<=0.18.0")
def test_deduplicate_completions(self):
"""
@@ -1273,3 +1294,153 @@ def test_percent_symbol_restrict_to_magic_completions(self):
completions = completer.completions(text, len(text))
for c in completions:
self.assertEqual(c.text[0], "%")
+
+ def test_fwd_unicode_restricts(self):
+ ip = get_ipython()
+ completer = ip.Completer
+ text = "\\ROMAN NUMERAL FIVE"
+
+ with provisionalcompleter():
+ completer.use_jedi = True
+ completions = [
+ completion.text for completion in completer.completions(text, len(text))
+ ]
+ self.assertEqual(completions, ["\u2164"])
+
+ def test_dict_key_restrict_to_dicts(self):
+ """Test that dict key suppresses non-dict completion items"""
+ ip = get_ipython()
+ c = ip.Completer
+ d = {"abc": None}
+ ip.user_ns["d"] = d
+
+ text = 'd["a'
+
+ def _():
+ with provisionalcompleter():
+ c.use_jedi = True
+ return [
+ completion.text for completion in c.completions(text, len(text))
+ ]
+
+ completions = _()
+ self.assertEqual(completions, ["abc"])
+
+ # check that it can be disabled in granular manner:
+ cfg = Config()
+ cfg.IPCompleter.suppress_competing_matchers = {
+ "IPCompleter.dict_key_matcher": False
+ }
+ c.update_config(cfg)
+
+ completions = _()
+ self.assertIn("abc", completions)
+ self.assertGreater(len(completions), 1)
+
+ def test_matcher_suppression(self):
+ @completion_matcher(identifier="a_matcher")
+ def a_matcher(text):
+ return ["completion_a"]
+
+ @completion_matcher(identifier="b_matcher", api_version=2)
+ def b_matcher(context: CompletionContext):
+ text = context.token
+ result = {"completions": [SimpleCompletion("completion_b")]}
+
+ if text == "suppress c":
+ result["suppress"] = {"c_matcher"}
+
+ if text.startswith("suppress all"):
+ result["suppress"] = True
+ if text == "suppress all but c":
+ result["do_not_suppress"] = {"c_matcher"}
+ if text == "suppress all but a":
+ result["do_not_suppress"] = {"a_matcher"}
+
+ return result
+
+ @completion_matcher(identifier="c_matcher")
+ def c_matcher(text):
+ return ["completion_c"]
+
+ with custom_matchers([a_matcher, b_matcher, c_matcher]):
+ ip = get_ipython()
+ c = ip.Completer
+
+ def _(text, expected):
+ c.use_jedi = False
+ s, matches = c.complete(text)
+ self.assertEqual(expected, matches)
+
+ _("do not suppress", ["completion_a", "completion_b", "completion_c"])
+ _("suppress all", ["completion_b"])
+ _("suppress all but a", ["completion_a", "completion_b"])
+ _("suppress all but c", ["completion_b", "completion_c"])
+
+ def configure(suppression_config):
+ cfg = Config()
+ cfg.IPCompleter.suppress_competing_matchers = suppression_config
+ c.update_config(cfg)
+
+ # test that configuration takes priority over the run-time decisions
+
+ configure(False)
+ _("suppress all", ["completion_a", "completion_b", "completion_c"])
+
+ configure({"b_matcher": False})
+ _("suppress all", ["completion_a", "completion_b", "completion_c"])
+
+ configure({"a_matcher": False})
+ _("suppress all", ["completion_b"])
+
+ configure({"b_matcher": True})
+ _("do not suppress", ["completion_b"])
+
+ def test_matcher_disabling(self):
+ @completion_matcher(identifier="a_matcher")
+ def a_matcher(text):
+ return ["completion_a"]
+
+ @completion_matcher(identifier="b_matcher")
+ def b_matcher(text):
+ return ["completion_b"]
+
+ def _(expected):
+ s, matches = c.complete("completion_")
+ self.assertEqual(expected, matches)
+
+ with custom_matchers([a_matcher, b_matcher]):
+ ip = get_ipython()
+ c = ip.Completer
+
+ _(["completion_a", "completion_b"])
+
+ cfg = Config()
+ cfg.IPCompleter.disable_matchers = ["b_matcher"]
+ c.update_config(cfg)
+
+ _(["completion_a"])
+
+ cfg.IPCompleter.disable_matchers = []
+ c.update_config(cfg)
+
+ def test_matcher_priority(self):
+ @completion_matcher(identifier="a_matcher", priority=0, api_version=2)
+ def a_matcher(text):
+ return {"completions": [SimpleCompletion("completion_a")], "suppress": True}
+
+ @completion_matcher(identifier="b_matcher", priority=2, api_version=2)
+ def b_matcher(text):
+ return {"completions": [SimpleCompletion("completion_b")], "suppress": True}
+
+ def _(expected):
+ s, matches = c.complete("completion_")
+ self.assertEqual(expected, matches)
+
+ with custom_matchers([a_matcher, b_matcher]):
+ ip = get_ipython()
+ c = ip.Completer
+
+ _(["completion_b"])
+ a_matcher.matcher_priority = 3
+ _(["completion_a"])
| Add completion type (_jupyter_types_experimental) for dictionary keys, file paths, etc
I would very much like the IPython to return completion type for all completions, not just for the completions from Jedi. This would not only make it possible to display the type ot the user in frontends, but also allow users to create custom rules (e.g. show paths first or show paths last). I am happy to work on a PR and maintain this part of the codebase afterwards. Would you consider a refactor of the current completions to allow for returning type in scope for IPython current plans?
Currently completions are being passed around in three forms:
- the new (unstable) [Completion](https://github.com/ipython/ipython/blob/167f683f56a900200f5bc13227639c2ebdfb1925/IPython/core/completer.py#L355) class mostly used downstream of Jedi
- the Jedi Completion class which is an implementation detail of Jedi
- the [match tuples](https://github.com/ipython/ipython/blob/167f683f56a900200f5bc13227639c2ebdfb1925/IPython/core/completer.py#L2149-L2154) as generated from the results of _matchers_
Interestingly the match tuple contains `origin` which could _almost_ be used as a type for the completions (except that this is an identifier for debug purposes and not a user-friendly name). I would propose that in a similar fashion to how the [origin is being discovered from the name of the matcher method](https://github.com/ipython/ipython/blob/167f683f56a900200f5bc13227639c2ebdfb1925/IPython/core/completer.py#L2119-L2131), each of the non-jedi [completion matchers](https://github.com/ipython/ipython/blob/167f683f56a900200f5bc13227639c2ebdfb1925/IPython/core/completer.py#L1180-L1198) would get a "type" property. This could be set by a decorator, like so:
```python
def matcher(type):
def decorate(func):
func.completion_type = type
return func
class IPCompleter(Completer):
# [...]
@matcher(type="magic")
def magic_matches(self, text:str):
"""Match magics"""
```
Then the match could get formalized as a named tuple (so that the benefits of the current lightweight approach are kept but an additional benefit of readability and ability to annotate types is obtained):
```python
from typing import NamedTuple
# could be also named CompletionMatch or SimpleCompletion
class SimpleMatch(NamedTuple):
text: str
origin: str
type: str
```
I am not sure what should happen next though. The logic appears quite complex to me. I wonder if some of it could be also refactored to simplify `_CompleteResult` and what happens with it. I am sure that more than one good solution exists. I wonder if you have any suggestions or thoughts.
Improving dict autocomplete
We have found the dict autocomplete to show too many option at times. As an example, given this:
```
$ ls
a-dir-name a-file
$ ipython
```
The following is appears:

Here you can see a number of things are suggested that are not helpful including:
1. Files
2. Magics
This is made much worse by something like [pyflyby](https://github.com/deshaw/pyflyby) where all possible imports that start with `a` are also listed.
Ideas:
1. Only show valid keys of the dict (when possible)
2. Sort to show dict keys first and all other options after
Provisional Completer API Thoughts
I've been using the provisional completion API for an Emacs mode targeting inferior-iPython. The docs mention interest in feedback on the API, so I thought to open an issue to discuss. Some thoughts and suggestions:
- The current provisional API was put in place 5 years ago. Are there any plans to change it in the near term? If not, perhaps the provisional context requirement should be dropped, and the docs should no longer indicate the functionality as experimental. After all, `[Tab]` has been providing these completions for 5 years, so they are pretty well vetted!
- It's very useful that the completion API provides the bounds of the string which it is completing. What would also be very helpful is to also get the bounds of the full expression iPython + jedi are evaluating for the completion itself. For example, in `x.y[0].z[Tab]` IPCompleter will indicate `z` as the completion text to alter, but presumably iPython knows that it's evaluating an entire expression `x.y[0].z___`. This would be very useful for users of the API that want to query functions for docstrings, etc. during completion.
Thanks for iPython.
| An alternative approach would be to modify the matcher functions to return either a string representing text (as today) or a (named) tuple (text, origin, type). This alternative has a benefit of allowing to return multiple types per matcher function, but this is not what most of the built-in matchers were designed for.
A notable exception is the `python_matches` aggregator which return results from:
- `attr_matches` (which can return completions of type method, property, module, class, instance),
- `global_matches` (which can return anything).
Downstream, these appear to be indirectly modified by `pyflyby`. Therefore, specifying matchers to return either a sequence of strings or a SimpleCompletion object might be a better solution.
From commit history it appears that the intent was on one hand to drop python_matches (description of https://github.com/ipython/ipython/commit/3ff1be2ea8ef180a6f17a6a03a3f8452303b9abe) and on the other to adopt this alternative approach (though dicts were envisioned as the vehicle rather than named tuples):
https://github.com/ipython/ipython/blob/7f51a0332edd0c675c2d314ca3e62df7ef041281/IPython/core/completer.py#L2139-L2145
This is similar to a previous request to only show magics after `%` (https://github.com/ipython/ipython/issues/12959) which was solved by a simple check for `%` prefix in https://github.com/ipython/ipython/pull/13483. A similar issue about magics showing up in import completions was raised in https://github.com/ipython/ipython/issues/12987.
I was recently thinking about adding more capabilities to matchers in backward compatible way (https://github.com/ipython/ipython/issues/12820).
On high level, the solution can be implemented by (expanding upon ideas proposed above):
1. adding a method to check whether all other matchers should be suppressed. If two or more matchers say "suppress all other matchers", then we could take the union of completions from those.
2. adding `priority`/`rank` to each matcher or each completion item to be used for sorting (or `sort_text` if following LSP; this appears sub-optimal though and we can always convert to `sortText` downstream from a numeric rank)
On implementation level, approach (A):
(1) Suppressing can be performed as a matcher-level function. Matcher would start to resemble a proper class with methods (not just a function). We could introduce this while maintaining backward-compatibility by adding an optional `should_suppress_others` method via a decorator:
<details>
```python
def matcher(*, should_suppress_others: Callable):
def wrapper(func):
func.should_suppress_others = should_suppress_others
return func
return wrapper
class IPCompleter:
# ...
@matcher(should_suppress_others=lambda text: does_it_look_like_I_am_in_a_dict(text))
def dict_key_matches(self):
```
</details>
The new `Matcher` could be typed as follows:
```python
class LegacyMatcher(Protocol):
__call__: Callable[[str], list[str]]
class MatcherSupressionProtocol(Protocol):
should_suppress_others: Callable[[str], bool]
Matcher = Union[LegacyMatcher, MatcherSupressionProtocol]
```
(2) Currently sorting is governed by hard-coded [`completions_sorting_key`](https://github.com/ipython/ipython/blob/7f51a0332edd0c675c2d314ca3e62df7ef041281/IPython/core/completer.py#L304-L333); it would be difficult to recognise a dictionary key using this existing approach alone.
Matcher-level priority/rank could be a solution if it took the request text in and return a number depending on situation (here answering "how likely it seems that we are in a dict"):
```python
class MatcherPrioritySystemDynamic(Protocol):
priority: Callable[[str], float]
Matcher = Union[LegacyMatcher, MatcherSupressionProtocol, MatcherPrioritySystemDynamic]
```
Completion-level priority/rank would enable more granular control for matcher developers and could expand the API proposed in my [earlier comment](https://github.com/ipython/ipython/issues/12820#issuecomment-1222788271):
```python
class SimpleCompletion(NamedTuple): # or TypedDict with NotRequired
__slots__ = ('text', 'origin', 'type', 'priority')
text: str
origin: Optional[str]
type: Optional[str]
priority: Optional[float]
class LegacyMatcher(Protocol):
__call__: Callable[[str], Union[list[str], list[SimpleCompletion]]]
```
However, what follows from my comment above is an observation that the information about priority and suppression is context-specific (both `matcher.should_suppress_others(text: str)` and `matcher.priority(text: str)` require `text` argument). Maybe we should reconsider whether instead of trying to gradually turn matchers into classes as suggested in approach (A), we should instead use:
**Approach (B)**: matchers are just simple functions, but (optionally) return an extensible structure with metadata. In this scenario matchers would comply with the following typing:
```python
class MatchingResult(TypedDict):
matches: list[SimpleCompletion]
suppress_others: NotRequired[bool]
priority: NotRequired[float]
LegacyMatcher = Callable[[str], list[str]]
NewMatcher = Callable[[str], MatchingResult] # TODO: find better code name
Matcher = Union[LegacyMatcher, NewMatcher]
```
> Using `TypedDict` + `NotRequired`, or `Protocol` corresponds to implementation which will require duck typing or key checking respectively but will allow us to add more properties in the future without breaking compatibility.
| 2022-09-05T06:47:45Z | 2022-10-05T10:35:44Z | [] | [] | ["IPython/core/tests/test_completer.py::TestCompleter::test_import_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_order", "IPython/core/tests/test_completer.py::TestCompleter::test_nested_import_module_completer", "IPython/core/tests/test_completer.py::test_line_split", "IPython/core/tests/test_completer.py::test_protect_filename", "IPython/core/tests/test_completer.py::TestCompleter::test_object_key_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_delim_setting", "IPython/core/tests/test_completer.py::TestCompleter::test_completions_have_type", "IPython/core/tests/test_completer.py::TestCompleter::test_default_arguments_from_docstring", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes4", "IPython/core/tests/test_completer.py::TestCompleter::test_match_dict_keys_tuple", "IPython/core/tests/test_completer.py::TestCompleter::test_aimport_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_bytes", "IPython/core/tests/test_completer.py::TestCompleter::test_back_unicode_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_limit_to__all__False_ok", "IPython/core/tests/test_completer.py::TestCompleter::test_back_latex_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_greedy_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_abspath_file_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_suppression", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes3", "IPython/core/tests/test_completer.py::TestCompleter::test_spaces", "IPython/core/tests/test_completer.py::TestCompleter::test_custom_completion_error", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_invalids", "IPython/core/tests/test_completer.py::TestCompleter::test_line_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_snake_case_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_unicode_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_forward_unicode_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_priority", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_restrict_to_dicts", "IPython/core/tests/test_completer.py::TestCompleter::test_all_completions_dups", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_unicode_py3", "IPython/core/tests/test_completer.py::TestCompleter::test_from_module_completer", "IPython/core/tests/test_completer.py::TestCompleter::test_latex_no_results", "IPython/core/tests/test_completer.py::TestCompleter::test_mix_terms", "IPython/core/tests/test_completer.py::TestCompleter::test_quoted_file_completions", "IPython/core/tests/test_completer.py::test_unicode_range", "IPython/core/tests/test_completer.py::TestCompleter::test_tryimport", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_config", "IPython/core/tests/test_completer.py::TestCompleter::test_func_kw_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_percent_symbol_restrict_to_magic_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_line_cell_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_custom_completion_ordering", "IPython/core/tests/test_completer.py::TestCompleter::test_get__all__entries_no__all__ok", "IPython/core/tests/test_completer.py::TestCompleter::test_completion_have_signature", "IPython/core/tests/test_completer.py::TestCompleter::test_class_key_completion", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_contexts", "IPython/core/tests/test_completer.py::TestCompleter::test_fwd_unicode_restricts", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_completion_shadowing_explicit", "IPython/core/tests/test_completer.py::TestCompleter::test_match_dict_keys", "IPython/core/tests/test_completer.py::TestCompleter::test_cell_magics", "IPython/core/tests/test_completer.py::TestCompleter::test_local_file_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_matcher_disabling", "IPython/core/tests/test_completer.py::TestCompleter::test_get__all__entries_ok", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes1", "IPython/core/tests/test_completer.py::TestCompleter::test_latex_completions", "IPython/core/tests/test_completer.py::TestCompleter::test_has_open_quotes2", "IPython/core/tests/test_completer.py::TestCompleter::test_jedi", "IPython/core/tests/test_completer.py::TestCompleter::test_omit__names", "IPython/core/tests/test_completer.py::TestCompleter::test_dict_key_completion_string", "IPython/core/tests/test_completer.py::TestCompleter::test_magic_color"] | ["IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions Known failure on jedi<=0.18.0"] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.10", "pip_packages": ["asttokens==2.0.8", "attrs==22.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==1.1.0", "iniconfig==1.1.1", "jedi==0.18.1", "matplotlib-inline==0.1.6", "packaging==21.3", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.0.0", "prompt-toolkit==3.0.31", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.13.0", "pyparsing==3.0.9", "pytest==7.0.1", "pytest-asyncio==0.19.0", "setuptools==75.1.0", "six==1.16.0", "stack-data==0.5.1", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.4.0", "wcwidth==0.2.5", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
ipython/ipython | ipython__ipython-13730 | b9c796a6a3a32f510c235041813ccb904888f14a | diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts.py
index 615397abc5f..6c1ba0418bc 100644
--- a/IPython/terminal/shortcuts.py
+++ b/IPython/terminal/shortcuts.py
@@ -32,6 +32,22 @@ def cursor_in_leading_ws():
return (not before) or before.isspace()
+# Needed for to accept autosuggestions in vi insert mode
+def _apply_autosuggest(event):
+ """
+ Apply autosuggestion if at end of line.
+ """
+ b = event.current_buffer
+ d = b.document
+ after_cursor = d.text[d.cursor_position :]
+ lines = after_cursor.split("\n")
+ end_of_current_line = lines[0].strip()
+ suggestion = b.suggestion
+ if (suggestion is not None) and (suggestion.text) and (end_of_current_line == ""):
+ b.insert_text(suggestion.text)
+ else:
+ nc.end_of_line(event)
+
def create_ipython_shortcuts(shell):
"""Set up the prompt_toolkit keyboard shortcuts for IPython"""
@@ -267,15 +283,6 @@ def ebivim():
focused_insert_vi = has_focus(DEFAULT_BUFFER) & vi_insert_mode
- # Needed for to accept autosuggestions in vi insert mode
- def _apply_autosuggest(event):
- b = event.current_buffer
- suggestion = b.suggestion
- if suggestion is not None and suggestion.text:
- b.insert_text(suggestion.text)
- else:
- nc.end_of_line(event)
-
@kb.add("end", filter=has_focus(DEFAULT_BUFFER) & (ebivim | ~vi_insert_mode))
def _(event):
_apply_autosuggest(event)
diff --git a/tools/retar.py b/tools/retar.py
index ccf1a1328a1..f8da2908fbe 100644
--- a/tools/retar.py
+++ b/tools/retar.py
@@ -4,6 +4,8 @@
usage:
$ export SOURCE_DATE_EPOCH=$(date +%s)
+ # or
+ $ export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)
...
$ python retar.py <tarfile.gz>
| diff --git a/IPython/tests/test_shortcuts.py b/IPython/tests/test_shortcuts.py
new file mode 100644
index 00000000000..42edb92ba58
--- /dev/null
+++ b/IPython/tests/test_shortcuts.py
@@ -0,0 +1,40 @@
+import pytest
+from IPython.terminal.shortcuts import _apply_autosuggest
+
+from unittest.mock import Mock
+
+
+def make_event(text, cursor, suggestion):
+ event = Mock()
+ event.current_buffer = Mock()
+ event.current_buffer.suggestion = Mock()
+ event.current_buffer.cursor_position = cursor
+ event.current_buffer.suggestion.text = suggestion
+ event.current_buffer.document = Mock()
+ event.current_buffer.document.get_end_of_line_position = Mock(return_value=0)
+ event.current_buffer.document.text = text
+ event.current_buffer.document.cursor_position = cursor
+ return event
+
+
[email protected](
+ "text, cursor, suggestion, called",
+ [
+ ("123456", 6, "123456789", True),
+ ("123456", 3, "123456789", False),
+ ("123456 \n789", 6, "123456789", True),
+ ],
+)
+def test_autosuggest_at_EOL(text, cursor, suggestion, called):
+ """
+ test that autosuggest is only applied at end of line.
+ """
+
+ event = make_event(text, cursor, suggestion)
+ event.current_buffer.insert_text = Mock()
+ _apply_autosuggest(event)
+ if called:
+ event.current_buffer.insert_text.assert_called()
+ else:
+ event.current_buffer.insert_text.assert_not_called()
+ # event.current_buffer.document.get_end_of_line_position.assert_called()
| END key inserts autosuggestion in the middle of a line
Hitting END in the middle of a line inserts an autosuggestion at the cursor instead of the end of the line.
From a new IPython profile (hence ensuring no history), type these keystrokes:
```
123456789<Enter>
123456<End><Enter>
123456<Left arrow><Left arrow><Left arrow><End><Enter>
```
This produces the transcript:
```
In [1]: 123456789
Out[1]: 123456789
In [2]: 123456789
Out[2]: 123456789
In [3]: 123789456
Out[3]: 123789456
```
Actual behavior: The final input is "123789456", which wasn't present in the history before.
Expected behavior: Hitting END when the cursor is in the middle of "123456" should either leave the input as-is, or transform it to "123456789".
@meeseeksdev autosuggestions
| 2022-08-15T13:42:10Z | 2022-08-16T08:15:38Z | [] | [] | ["IPython/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456 \\n789-6-123456789-True]", "IPython/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-6-123456789-True]", "IPython/tests/test_shortcuts.py::test_autosuggest_at_EOL[123456-3-123456789-False]"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": [], "python": "3.10", "pip_packages": ["asttokens==2.0.8", "attrs==22.1.0", "backcall==0.2.0", "decorator==5.1.1", "executing==0.10.0", "iniconfig==1.1.1", "jedi==0.18.1", "matplotlib-inline==0.1.5", "packaging==21.3", "parso==0.8.3", "pexpect==4.8.0", "pickleshare==0.7.5", "pluggy==1.0.0", "prompt-toolkit==3.0.30", "ptyprocess==0.7.0", "pure-eval==0.2.2", "py==1.11.0", "pygments==2.13.0", "pyparsing==3.0.9", "pytest==7.0.1", "pytest-asyncio==0.19.0", "setuptools==65.0.1", "six==1.16.0", "stack-data==0.4.0", "testpath==0.6.0", "tomli==2.0.1", "traitlets==5.3.0", "wcwidth==0.2.5", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
ipython/ipython | ipython__ipython-13625 | 4d73f5c6919c1140b0f908595728beddf97bb1df | diff --git a/IPython/core/inputtransformer.py b/IPython/core/inputtransformer.py
index f668f466aae..77f69f388f8 100644
--- a/IPython/core/inputtransformer.py
+++ b/IPython/core/inputtransformer.py
@@ -193,7 +193,7 @@ def assemble_logical_lines():
line = ''.join(parts)
# Utilities
-def _make_help_call(target, esc, lspace, next_input=None):
+def _make_help_call(target, esc, lspace):
"""Prepares a pinfo(2)/psearch call from a target name and the escape
(i.e. ? or ??)"""
method = 'pinfo2' if esc == '??' \
@@ -203,12 +203,13 @@ def _make_help_call(target, esc, lspace, next_input=None):
#Prepare arguments for get_ipython().run_line_magic(magic_name, magic_args)
t_magic_name, _, t_magic_arg_s = arg.partition(' ')
t_magic_name = t_magic_name.lstrip(ESC_MAGIC)
- if next_input is None:
- return '%sget_ipython().run_line_magic(%r, %r)' % (lspace, t_magic_name, t_magic_arg_s)
- else:
- return '%sget_ipython().set_next_input(%r);get_ipython().run_line_magic(%r, %r)' % \
- (lspace, next_input, t_magic_name, t_magic_arg_s)
-
+ return "%sget_ipython().run_line_magic(%r, %r)" % (
+ lspace,
+ t_magic_name,
+ t_magic_arg_s,
+ )
+
+
# These define the transformations for the different escape characters.
def _tr_system(line_info):
"Translate lines escaped with: !"
@@ -349,10 +350,7 @@ def help_end(line):
esc = m.group(3)
lspace = _initial_space_re.match(line).group(0)
- # If we're mid-command, put it back on the next prompt for the user.
- next_input = line.rstrip('?') if line.strip() != m.group(0) else None
-
- return _make_help_call(target, esc, lspace, next_input)
+ return _make_help_call(target, esc, lspace)
@CoroutineInputTransformer.wrap
diff --git a/IPython/core/inputtransformer2.py b/IPython/core/inputtransformer2.py
index 3a560073b22..a8f676f4952 100644
--- a/IPython/core/inputtransformer2.py
+++ b/IPython/core/inputtransformer2.py
@@ -325,7 +325,7 @@ def transform(self, lines: List[str]):
ESCAPE_SINGLES = {'!', '?', '%', ',', ';', '/'}
ESCAPE_DOUBLES = {'!!', '??'} # %% (cell magic) is handled separately
-def _make_help_call(target, esc, next_input=None):
+def _make_help_call(target, esc):
"""Prepares a pinfo(2)/psearch call from a target name and the escape
(i.e. ? or ??)"""
method = 'pinfo2' if esc == '??' \
@@ -335,11 +335,8 @@ def _make_help_call(target, esc, next_input=None):
#Prepare arguments for get_ipython().run_line_magic(magic_name, magic_args)
t_magic_name, _, t_magic_arg_s = arg.partition(' ')
t_magic_name = t_magic_name.lstrip(ESC_MAGIC)
- if next_input is None:
- return 'get_ipython().run_line_magic(%r, %r)' % (t_magic_name, t_magic_arg_s)
- else:
- return 'get_ipython().set_next_input(%r);get_ipython().run_line_magic(%r, %r)' % \
- (next_input, t_magic_name, t_magic_arg_s)
+ return "get_ipython().run_line_magic(%r, %r)" % (t_magic_name, t_magic_arg_s)
+
def _tr_help(content):
"""Translate lines escaped with: ?
@@ -480,13 +477,8 @@ def transform(self, lines):
target = m.group(1)
esc = m.group(3)
- # If we're mid-command, put it back on the next prompt for the user.
- next_input = None
- if (not lines_before) and (not lines_after) \
- and content.strip() != m.group(0):
- next_input = content.rstrip('?\n')
- call = _make_help_call(target, esc, next_input=next_input)
+ call = _make_help_call(target, esc)
new_line = indent + call + '\n'
return lines_before + [new_line] + lines_after
diff --git a/docs/source/whatsnew/version8.rst b/docs/source/whatsnew/version8.rst
index b557eb1935b..24fed4b2f71 100644
--- a/docs/source/whatsnew/version8.rst
+++ b/docs/source/whatsnew/version8.rst
@@ -8,6 +8,11 @@
IPython 8.3.0
-------------
+ - :ghpull:`13625`, using ``?``, ``??``, ``*?`` will not call
+ ``set_next_input`` as most frontend allow proper multiline editing and it was
+ causing issues for many users of multi-cell frontends.
+
+
- :ghpull:`13600`, ``pre_run_*``-hooks will now have a ``cell_id`` attribute on
the info object when frontend provide it.
| diff --git a/IPython/core/tests/test_inputtransformer.py b/IPython/core/tests/test_inputtransformer.py
index 4de97b87cb8..bfc936d3176 100644
--- a/IPython/core/tests/test_inputtransformer.py
+++ b/IPython/core/tests/test_inputtransformer.py
@@ -59,108 +59,93 @@ def transform_checker(tests, transformer, **kwargs):
('x=1', 'x=1'), # normal input is unmodified
(' ',' '), # blank lines are kept intact
("a, b = %foo", "a, b = get_ipython().run_line_magic('foo', '')"),
- ],
-
- classic_prompt =
- [('>>> x=1', 'x=1'),
- ('x=1', 'x=1'), # normal input is unmodified
- (' ', ' '), # blank lines are kept intact
- ],
-
- ipy_prompt =
- [('In [1]: x=1', 'x=1'),
- ('x=1', 'x=1'), # normal input is unmodified
- (' ',' '), # blank lines are kept intact
- ],
-
- # Tests for the escape transformer to leave normal code alone
- escaped_noesc =
- [ (' ', ' '),
- ('x=1', 'x=1'),
- ],
-
- # System calls
- escaped_shell =
- [ ('!ls', "get_ipython().system('ls')"),
- # Double-escape shell, this means to capture the output of the
- # subprocess and return it
- ('!!ls', "get_ipython().getoutput('ls')"),
- ],
-
- # Help/object info
- escaped_help =
- [ ('?', 'get_ipython().show_usage()'),
- ('?x1', "get_ipython().run_line_magic('pinfo', 'x1')"),
- ('??x2', "get_ipython().run_line_magic('pinfo2', 'x2')"),
- ('?a.*s', "get_ipython().run_line_magic('psearch', 'a.*s')"),
- ('?%hist1', "get_ipython().run_line_magic('pinfo', '%hist1')"),
- ('?%%hist2', "get_ipython().run_line_magic('pinfo', '%%hist2')"),
- ('?abc = qwe', "get_ipython().run_line_magic('pinfo', 'abc')"),
- ],
-
- end_help =
- [ ('x3?', "get_ipython().run_line_magic('pinfo', 'x3')"),
- ('x4??', "get_ipython().run_line_magic('pinfo2', 'x4')"),
- ('%hist1?', "get_ipython().run_line_magic('pinfo', '%hist1')"),
- ('%hist2??', "get_ipython().run_line_magic('pinfo2', '%hist2')"),
- ('%%hist3?', "get_ipython().run_line_magic('pinfo', '%%hist3')"),
- ('%%hist4??', "get_ipython().run_line_magic('pinfo2', '%%hist4')"),
- ('π.foo?', "get_ipython().run_line_magic('pinfo', 'π.foo')"),
- ('f*?', "get_ipython().run_line_magic('psearch', 'f*')"),
- ('ax.*aspe*?', "get_ipython().run_line_magic('psearch', 'ax.*aspe*')"),
- ('a = abc?', "get_ipython().set_next_input('a = abc');"
- "get_ipython().run_line_magic('pinfo', 'abc')"),
- ('a = abc.qe??', "get_ipython().set_next_input('a = abc.qe');"
- "get_ipython().run_line_magic('pinfo2', 'abc.qe')"),
- ('a = *.items?', "get_ipython().set_next_input('a = *.items');"
- "get_ipython().run_line_magic('psearch', '*.items')"),
- ('plot(a?', "get_ipython().set_next_input('plot(a');"
- "get_ipython().run_line_magic('pinfo', 'a')"),
- ('a*2 #comment?', 'a*2 #comment?'),
- ],
-
- # Explicit magic calls
- escaped_magic =
- [ ('%cd', "get_ipython().run_line_magic('cd', '')"),
- ('%cd /home', "get_ipython().run_line_magic('cd', '/home')"),
- # Backslashes need to be escaped.
- ('%cd C:\\User', "get_ipython().run_line_magic('cd', 'C:\\\\User')"),
- (' %magic', " get_ipython().run_line_magic('magic', '')"),
- ],
-
- # Quoting with separate arguments
- escaped_quote =
- [ (',f', 'f("")'),
- (',f x', 'f("x")'),
- (' ,f y', ' f("y")'),
- (',f a b', 'f("a", "b")'),
- ],
-
- # Quoting with single argument
- escaped_quote2 =
- [ (';f', 'f("")'),
- (';f x', 'f("x")'),
- (' ;f y', ' f("y")'),
- (';f a b', 'f("a b")'),
- ],
-
- # Simply apply parens
- escaped_paren =
- [ ('/f', 'f()'),
- ('/f x', 'f(x)'),
- (' /f y', ' f(y)'),
- ('/f a b', 'f(a, b)'),
- ],
-
- # Check that we transform prompts before other transforms
- mixed =
- [ ('In [1]: %lsmagic', "get_ipython().run_line_magic('lsmagic', '')"),
- ('>>> %lsmagic', "get_ipython().run_line_magic('lsmagic', '')"),
- ('In [2]: !ls', "get_ipython().system('ls')"),
- ('In [3]: abs?', "get_ipython().run_line_magic('pinfo', 'abs')"),
- ('In [4]: b = %who', "b = get_ipython().run_line_magic('who', '')"),
- ],
- )
+ ],
+ classic_prompt=[
+ (">>> x=1", "x=1"),
+ ("x=1", "x=1"), # normal input is unmodified
+ (" ", " "), # blank lines are kept intact
+ ],
+ ipy_prompt=[
+ ("In [1]: x=1", "x=1"),
+ ("x=1", "x=1"), # normal input is unmodified
+ (" ", " "), # blank lines are kept intact
+ ],
+ # Tests for the escape transformer to leave normal code alone
+ escaped_noesc=[
+ (" ", " "),
+ ("x=1", "x=1"),
+ ],
+ # System calls
+ escaped_shell=[
+ ("!ls", "get_ipython().system('ls')"),
+ # Double-escape shell, this means to capture the output of the
+ # subprocess and return it
+ ("!!ls", "get_ipython().getoutput('ls')"),
+ ],
+ # Help/object info
+ escaped_help=[
+ ("?", "get_ipython().show_usage()"),
+ ("?x1", "get_ipython().run_line_magic('pinfo', 'x1')"),
+ ("??x2", "get_ipython().run_line_magic('pinfo2', 'x2')"),
+ ("?a.*s", "get_ipython().run_line_magic('psearch', 'a.*s')"),
+ ("?%hist1", "get_ipython().run_line_magic('pinfo', '%hist1')"),
+ ("?%%hist2", "get_ipython().run_line_magic('pinfo', '%%hist2')"),
+ ("?abc = qwe", "get_ipython().run_line_magic('pinfo', 'abc')"),
+ ],
+ end_help=[
+ ("x3?", "get_ipython().run_line_magic('pinfo', 'x3')"),
+ ("x4??", "get_ipython().run_line_magic('pinfo2', 'x4')"),
+ ("%hist1?", "get_ipython().run_line_magic('pinfo', '%hist1')"),
+ ("%hist2??", "get_ipython().run_line_magic('pinfo2', '%hist2')"),
+ ("%%hist3?", "get_ipython().run_line_magic('pinfo', '%%hist3')"),
+ ("%%hist4??", "get_ipython().run_line_magic('pinfo2', '%%hist4')"),
+ ("π.foo?", "get_ipython().run_line_magic('pinfo', 'π.foo')"),
+ ("f*?", "get_ipython().run_line_magic('psearch', 'f*')"),
+ ("ax.*aspe*?", "get_ipython().run_line_magic('psearch', 'ax.*aspe*')"),
+ ("a = abc?", "get_ipython().run_line_magic('pinfo', 'abc')"),
+ ("a = abc.qe??", "get_ipython().run_line_magic('pinfo2', 'abc.qe')"),
+ ("a = *.items?", "get_ipython().run_line_magic('psearch', '*.items')"),
+ ("plot(a?", "get_ipython().run_line_magic('pinfo', 'a')"),
+ ("a*2 #comment?", "a*2 #comment?"),
+ ],
+ # Explicit magic calls
+ escaped_magic=[
+ ("%cd", "get_ipython().run_line_magic('cd', '')"),
+ ("%cd /home", "get_ipython().run_line_magic('cd', '/home')"),
+ # Backslashes need to be escaped.
+ ("%cd C:\\User", "get_ipython().run_line_magic('cd', 'C:\\\\User')"),
+ (" %magic", " get_ipython().run_line_magic('magic', '')"),
+ ],
+ # Quoting with separate arguments
+ escaped_quote=[
+ (",f", 'f("")'),
+ (",f x", 'f("x")'),
+ (" ,f y", ' f("y")'),
+ (",f a b", 'f("a", "b")'),
+ ],
+ # Quoting with single argument
+ escaped_quote2=[
+ (";f", 'f("")'),
+ (";f x", 'f("x")'),
+ (" ;f y", ' f("y")'),
+ (";f a b", 'f("a b")'),
+ ],
+ # Simply apply parens
+ escaped_paren=[
+ ("/f", "f()"),
+ ("/f x", "f(x)"),
+ (" /f y", " f(y)"),
+ ("/f a b", "f(a, b)"),
+ ],
+ # Check that we transform prompts before other transforms
+ mixed=[
+ ("In [1]: %lsmagic", "get_ipython().run_line_magic('lsmagic', '')"),
+ (">>> %lsmagic", "get_ipython().run_line_magic('lsmagic', '')"),
+ ("In [2]: !ls", "get_ipython().system('ls')"),
+ ("In [3]: abs?", "get_ipython().run_line_magic('pinfo', 'abs')"),
+ ("In [4]: b = %who", "b = get_ipython().run_line_magic('who', '')"),
+ ],
+)
# multiline syntax examples. Each of these should be a list of lists, with
# each entry itself having pairs of raw/transformed input. The union (with
diff --git a/IPython/core/tests/test_inputtransformer2.py b/IPython/core/tests/test_inputtransformer2.py
index abc63031d3a..0613dc02c93 100644
--- a/IPython/core/tests/test_inputtransformer2.py
+++ b/IPython/core/tests/test_inputtransformer2.py
@@ -14,45 +14,65 @@
from IPython.core import inputtransformer2 as ipt2
from IPython.core.inputtransformer2 import _find_assign_op, make_tokens_by_line
-MULTILINE_MAGIC = ("""\
+MULTILINE_MAGIC = (
+ """\
a = f()
%foo \\
bar
g()
-""".splitlines(keepends=True), (2, 0), """\
+""".splitlines(
+ keepends=True
+ ),
+ (2, 0),
+ """\
a = f()
get_ipython().run_line_magic('foo', ' bar')
g()
-""".splitlines(keepends=True))
+""".splitlines(
+ keepends=True
+ ),
+)
-INDENTED_MAGIC = ("""\
+INDENTED_MAGIC = (
+ """\
for a in range(5):
%ls
-""".splitlines(keepends=True), (2, 4), """\
+""".splitlines(
+ keepends=True
+ ),
+ (2, 4),
+ """\
for a in range(5):
get_ipython().run_line_magic('ls', '')
-""".splitlines(keepends=True))
+""".splitlines(
+ keepends=True
+ ),
+)
-CRLF_MAGIC = ([
- "a = f()\n",
- "%ls\r\n",
- "g()\n"
-], (2, 0), [
- "a = f()\n",
- "get_ipython().run_line_magic('ls', '')\n",
- "g()\n"
-])
-
-MULTILINE_MAGIC_ASSIGN = ("""\
+CRLF_MAGIC = (
+ ["a = f()\n", "%ls\r\n", "g()\n"],
+ (2, 0),
+ ["a = f()\n", "get_ipython().run_line_magic('ls', '')\n", "g()\n"],
+)
+
+MULTILINE_MAGIC_ASSIGN = (
+ """\
a = f()
b = %foo \\
bar
g()
-""".splitlines(keepends=True), (2, 4), """\
+""".splitlines(
+ keepends=True
+ ),
+ (2, 4),
+ """\
a = f()
b = get_ipython().run_line_magic('foo', ' bar')
g()
-""".splitlines(keepends=True))
+""".splitlines(
+ keepends=True
+ ),
+)
MULTILINE_SYSTEM_ASSIGN = ("""\
a = f()
@@ -72,68 +92,70 @@ def test():
for i in range(1):
print(i)
res =! ls
-""".splitlines(keepends=True), (4, 7), '''\
+""".splitlines(
+ keepends=True
+ ),
+ (4, 7),
+ """\
def test():
for i in range(1):
print(i)
res =get_ipython().getoutput(\' ls\')
-'''.splitlines(keepends=True))
+""".splitlines(
+ keepends=True
+ ),
+)
######
-AUTOCALL_QUOTE = (
- [",f 1 2 3\n"], (1, 0),
- ['f("1", "2", "3")\n']
-)
+AUTOCALL_QUOTE = ([",f 1 2 3\n"], (1, 0), ['f("1", "2", "3")\n'])
-AUTOCALL_QUOTE2 = (
- [";f 1 2 3\n"], (1, 0),
- ['f("1 2 3")\n']
-)
+AUTOCALL_QUOTE2 = ([";f 1 2 3\n"], (1, 0), ['f("1 2 3")\n'])
-AUTOCALL_PAREN = (
- ["/f 1 2 3\n"], (1, 0),
- ['f(1, 2, 3)\n']
-)
+AUTOCALL_PAREN = (["/f 1 2 3\n"], (1, 0), ["f(1, 2, 3)\n"])
-SIMPLE_HELP = (
- ["foo?\n"], (1, 0),
- ["get_ipython().run_line_magic('pinfo', 'foo')\n"]
-)
+SIMPLE_HELP = (["foo?\n"], (1, 0), ["get_ipython().run_line_magic('pinfo', 'foo')\n"])
DETAILED_HELP = (
- ["foo??\n"], (1, 0),
- ["get_ipython().run_line_magic('pinfo2', 'foo')\n"]
+ ["foo??\n"],
+ (1, 0),
+ ["get_ipython().run_line_magic('pinfo2', 'foo')\n"],
)
-MAGIC_HELP = (
- ["%foo?\n"], (1, 0),
- ["get_ipython().run_line_magic('pinfo', '%foo')\n"]
-)
+MAGIC_HELP = (["%foo?\n"], (1, 0), ["get_ipython().run_line_magic('pinfo', '%foo')\n"])
HELP_IN_EXPR = (
- ["a = b + c?\n"], (1, 0),
- ["get_ipython().set_next_input('a = b + c');"
- "get_ipython().run_line_magic('pinfo', 'c')\n"]
+ ["a = b + c?\n"],
+ (1, 0),
+ ["get_ipython().run_line_magic('pinfo', 'c')\n"],
)
-HELP_CONTINUED_LINE = ("""\
+HELP_CONTINUED_LINE = (
+ """\
a = \\
zip?
-""".splitlines(keepends=True), (1, 0),
-[r"get_ipython().set_next_input('a = \\\nzip');get_ipython().run_line_magic('pinfo', 'zip')" + "\n"]
+""".splitlines(
+ keepends=True
+ ),
+ (1, 0),
+ [r"get_ipython().run_line_magic('pinfo', 'zip')" + "\n"],
)
-HELP_MULTILINE = ("""\
+HELP_MULTILINE = (
+ """\
(a,
b) = zip?
-""".splitlines(keepends=True), (1, 0),
-[r"get_ipython().set_next_input('(a,\nb) = zip');get_ipython().run_line_magic('pinfo', 'zip')" + "\n"]
+""".splitlines(
+ keepends=True
+ ),
+ (1, 0),
+ [r"get_ipython().run_line_magic('pinfo', 'zip')" + "\n"],
)
HELP_UNICODE = (
- ["π.foo?\n"], (1, 0),
- ["get_ipython().run_line_magic('pinfo', 'π.foo')\n"]
+ ["π.foo?\n"],
+ (1, 0),
+ ["get_ipython().run_line_magic('pinfo', 'π.foo')\n"],
)
@@ -149,6 +171,7 @@ def test_check_make_token_by_line_never_ends_empty():
Check that not sequence of single or double characters ends up leading to en empty list of tokens
"""
from string import printable
+
for c in printable:
assert make_tokens_by_line(c)[-1] != []
for k in printable:
@@ -156,7 +179,7 @@ def test_check_make_token_by_line_never_ends_empty():
def check_find(transformer, case, match=True):
- sample, expected_start, _ = case
+ sample, expected_start, _ = case
tbl = make_tokens_by_line(sample)
res = transformer.find(tbl)
if match:
@@ -166,25 +189,30 @@ def check_find(transformer, case, match=True):
else:
assert res is None
+
def check_transform(transformer_cls, case):
lines, start, expected = case
transformer = transformer_cls(start)
assert transformer.transform(lines) == expected
+
def test_continued_line():
lines = MULTILINE_MAGIC_ASSIGN[0]
assert ipt2.find_end_of_continued_line(lines, 1) == 2
assert ipt2.assemble_continued_line(lines, (1, 5), 2) == "foo bar"
+
def test_find_assign_magic():
check_find(ipt2.MagicAssign, MULTILINE_MAGIC_ASSIGN)
check_find(ipt2.MagicAssign, MULTILINE_SYSTEM_ASSIGN, match=False)
check_find(ipt2.MagicAssign, MULTILINE_SYSTEM_ASSIGN_AFTER_DEDENT, match=False)
+
def test_transform_assign_magic():
check_transform(ipt2.MagicAssign, MULTILINE_MAGIC_ASSIGN)
+
def test_find_assign_system():
check_find(ipt2.SystemAssign, MULTILINE_SYSTEM_ASSIGN)
check_find(ipt2.SystemAssign, MULTILINE_SYSTEM_ASSIGN_AFTER_DEDENT)
@@ -192,30 +220,36 @@ def test_find_assign_system():
check_find(ipt2.SystemAssign, (["a=!ls\n"], (1, 2), None))
check_find(ipt2.SystemAssign, MULTILINE_MAGIC_ASSIGN, match=False)
+
def test_transform_assign_system():
check_transform(ipt2.SystemAssign, MULTILINE_SYSTEM_ASSIGN)
check_transform(ipt2.SystemAssign, MULTILINE_SYSTEM_ASSIGN_AFTER_DEDENT)
+
def test_find_magic_escape():
check_find(ipt2.EscapedCommand, MULTILINE_MAGIC)
check_find(ipt2.EscapedCommand, INDENTED_MAGIC)
check_find(ipt2.EscapedCommand, MULTILINE_MAGIC_ASSIGN, match=False)
+
def test_transform_magic_escape():
check_transform(ipt2.EscapedCommand, MULTILINE_MAGIC)
check_transform(ipt2.EscapedCommand, INDENTED_MAGIC)
check_transform(ipt2.EscapedCommand, CRLF_MAGIC)
+
def test_find_autocalls():
for case in [AUTOCALL_QUOTE, AUTOCALL_QUOTE2, AUTOCALL_PAREN]:
print("Testing %r" % case[0])
check_find(ipt2.EscapedCommand, case)
+
def test_transform_autocall():
for case in [AUTOCALL_QUOTE, AUTOCALL_QUOTE2, AUTOCALL_PAREN]:
print("Testing %r" % case[0])
check_transform(ipt2.EscapedCommand, case)
+
def test_find_help():
for case in [SIMPLE_HELP, DETAILED_HELP, MAGIC_HELP, HELP_IN_EXPR]:
check_find(ipt2.HelpEnd, case)
@@ -233,6 +267,7 @@ def test_find_help():
# Nor in a string
check_find(ipt2.HelpEnd, (["foo = '''bar?\n"], None, None), match=False)
+
def test_transform_help():
tf = ipt2.HelpEnd((1, 0), (1, 9))
assert tf.transform(HELP_IN_EXPR[0]) == HELP_IN_EXPR[2]
@@ -246,10 +281,12 @@ def test_transform_help():
tf = ipt2.HelpEnd((1, 0), (1, 0))
assert tf.transform(HELP_UNICODE[0]) == HELP_UNICODE[2]
+
def test_find_assign_op_dedent():
"""
be careful that empty token like dedent are not counted as parens
"""
+
class Tk:
def __init__(self, s):
self.string = s
@@ -302,21 +339,23 @@ def test_check_complete_param(code, expected, number):
def test_check_complete():
cc = ipt2.TransformerManager().check_complete
- example = dedent("""
+ example = dedent(
+ """
if True:
- a=1""" )
+ a=1"""
+ )
assert cc(example) == ("incomplete", 4)
assert cc(example + "\n") == ("complete", None)
assert cc(example + "\n ") == ("complete", None)
# no need to loop on all the letters/numbers.
- short = '12abAB'+string.printable[62:]
+ short = "12abAB" + string.printable[62:]
for c in short:
# test does not raise:
cc(c)
for k in short:
- cc(c+k)
+ cc(c + k)
assert cc("def f():\n x=0\n \\\n ") == ("incomplete", 2)
@@ -371,10 +410,9 @@ def test_null_cleanup_transformer():
assert manager.transform_cell("") == ""
-
-
def test_side_effects_I():
count = 0
+
def counter(lines):
nonlocal count
count += 1
@@ -384,14 +422,13 @@ def counter(lines):
manager = ipt2.TransformerManager()
manager.cleanup_transforms.insert(0, counter)
- assert manager.check_complete("a=1\n") == ('complete', None)
+ assert manager.check_complete("a=1\n") == ("complete", None)
assert count == 0
-
-
def test_side_effects_II():
count = 0
+
def counter(lines):
nonlocal count
count += 1
@@ -401,5 +438,5 @@ def counter(lines):
manager = ipt2.TransformerManager()
manager.line_transforms.insert(0, counter)
- assert manager.check_complete("b=1\n") == ('complete', None)
+ assert manager.check_complete("b=1\n") == ("complete", None)
assert count == 0
| Transformer for `pinfo` line magic incorrectly sets next input when the line contains parentheses
In JupyterLab we experience an annoyance with pinfo magic which results in some expressions creating a new cell instead of providing help (https://github.com/jupyterlab/jupyterlab/issues/12269). The following example creates extra cells:
```python
sum([1]).denominator?
```
or:
```
y = lambda x: int?
```
While the direct call to `pinfo` line magic, or to underlying `_inspect` method does not have such an effect:
```python
?sum([1]).denominator
```
```python
%pinfo sum([1]).denominator
```
```python
ipython._inspect('pinfo', 'sum([1]).denominator?')
```
```python
get_ipython().run_line_magic('pinfo', 'sum([1]).denominator?')
```

This was narrowed down to a special construct in the input transformer which for some reason wants to set next input in case if the `?` is placed mid-command:
https://github.com/ipython/ipython/blob/0c5563497fe94a8a24ec88912433959908f2506e/IPython/core/inputtransformer.py#L196-L210
identically in transformer2:
https://github.com/ipython/ipython/blob/0c5563497fe94a8a24ec88912433959908f2506e/IPython/core/inputtransformer2.py#L328-L342
This code existed like that since 2012 when it was introduced during magics and splitter refactoring in https://github.com/ipython/ipython/commit/3f192dc6a1873b0d2e5345fc475ffab0fa403466. Interestingly the commit is titled `Remove next_input nonsense in magic calls (but keep functionality).`.
Now, the `set_next_input` will only get introduced if `next_input` is given which gets decided in `help_end` utility:
https://github.com/ipython/ipython/blob/0c5563497fe94a8a24ec88912433959908f2506e/IPython/core/inputtransformer.py#L342-L355
which also happens in transformer2:
https://github.com/ipython/ipython/blob/0c5563497fe94a8a24ec88912433959908f2506e/IPython/core/inputtransformer2.py#L468-L487
What follows:
- I do not see any use-case for the `next_input` to be ever returned. Can we remove it, or am I missing something?
- regardless, the regular expression `_help_end_re` disallows parentheses, only allows strings like `\w+(\.\w+)*` thus it thinks (possibly incorrectly) that it should set the next input to `sum([1]).denominator`; in more detail, the `_help_end_re.search` does not capture the `sum([])` part, and only captures `denominator?` which is different from `line.strip()` therefore `line.rstrip('?')` is assigned as `next_input`. Can we modify the regular expression to allow for parens, brackets and others?
- in `inputtransformer2` a syntax error will be raised when we try to use `DataFrame()?` or `data['key']?, however I would very much like to be able to get help for those as well; this might also require a slight change in the `_ofind` method to allow evaluation of code for pinfo magics (around here https://github.com/ipython/ipython/blob/47ccec77b41b010091ec18a20ff7d2bedcc674da/IPython/core/interactiveshell.py#L1525-L1527 where exception for other magics is already present)
| I think the reason for set_next_input is/was for the terminal as you can't (couldn't) easily edit your previous entry for multiline (which is now untrue for prompt toolkit. So I thik we can remove set_next_input. | 2022-04-05T12:28:09Z | 2022-04-05T13:05:01Z | ["IPython/core/tests/test_inputtransformer.py::test_classic_prompt", "IPython/core/tests/test_inputtransformer.py::test_cellmagic", "IPython/core/tests/test_inputtransformer2.py::test_find_magic_escape", "IPython/core/tests/test_inputtransformer.py::test_assemble_python_lines", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[()](-expected9]", "IPython/core/tests/test_inputtransformer.py::test_has_comment", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[\\\\\\r\\n-incomplete-0]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[())(-expected7]", "IPython/core/tests/test_inputtransformer2.py::test_transform_magic_escape", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[]-expected1]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[)-expected0]", "IPython/core/tests/test_inputtransformer2.py::test_find_help", "IPython/core/tests/test_inputtransformer2.py::test_transform_assign_magic", "IPython/core/tests/test_inputtransformer.py::test_escaped_shell", "IPython/core/tests/test_inputtransformer.py::test_escaped_help", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_II[async with example:\\n pass\\n -expected2]", "IPython/core/tests/test_inputtransformer.py::test_assemble_logical_lines", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[}{-expected5]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[a = 1-complete-None]", "IPython/core/tests/test_inputtransformer2.py::test_transform_assign_system", "IPython/core/tests/test_inputtransformer.py::test_escaped_paren", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[)(-expected3]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[)[](-expected8]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[][-expected4]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[1\\\\\\n+2-complete-None]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete", "IPython/core/tests/test_inputtransformer2.py::test_find_assign_op_dedent", "IPython/core/tests/test_inputtransformer2.py::test_null_cleanup_transformer", "IPython/core/tests/test_inputtransformer2.py::test_find_assign_magic", "IPython/core/tests/test_inputtransformer.py::test_token_input_transformer", "IPython/core/tests/test_inputtransformer.py::test_assign_system", "IPython/core/tests/test_inputtransformer.py::test_assign_magic", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[raise = 2-invalid-None]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[a = '''\\n hi-incomplete-3]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[(\\n))-incomplete-0]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[a = [1,\\n2,-incomplete-0]", "IPython/core/tests/test_inputtransformer2.py::test_find_autocalls", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[def a():\\n x=1\\n global x-invalid-None]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[]()(-expected6]", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[for a in range(5):-incomplete-4]", "IPython/core/tests/test_inputtransformer.py::test_escaped_magic", "IPython/core/tests/test_inputtransformer.py::test_escaped_quote", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_II[async with example:\\n pass-expected1]", "IPython/core/tests/test_inputtransformer.py::test_escaped_noesc", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_invalidates_sunken_brackets[}-expected2]", "IPython/core/tests/test_inputtransformer.py::test_escaped_quote2", "IPython/core/tests/test_inputtransformer2.py::test_transform_autocall", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_II[def foo():\\n \"\"\"-expected0]", "IPython/core/tests/test_inputtransformer2.py::test_continued_line", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[for a in range(5):\\n if a > 0:-incomplete-8]", "IPython/core/tests/test_inputtransformer2.py::test_side_effects_I", "IPython/core/tests/test_inputtransformer2.py::test_check_make_token_by_line_never_ends_empty", "IPython/core/tests/test_inputtransformer2.py::test_find_assign_system", "IPython/core/tests/test_inputtransformer.py::test_ipy_prompt", "IPython/core/tests/test_inputtransformer2.py::test_check_complete_param[a \\\\ -invalid-None]"] | [] | ["IPython/core/tests/test_inputtransformer2.py::test_transform_help", "IPython/core/tests/test_inputtransformer.py::test_help_end", "IPython/core/tests/test_inputtransformer2.py::test_side_effects_II"] | [] | {"install": ["uv pip install -e '.[test]'"], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\naddopts = --color=no -rA --tb=no --durations=10\n\t-p IPython.testing.plugin.pytest_ipdoctest --ipdoctest-modules\n\t--ignore=docs\n\t--ignore=examples\n\t--ignore=htmlcov\n\t--ignore=ipython_kernel\n\t--ignore=ipython_parallel\n\t--ignore=results\n\t--ignore=tmp\n\t--ignore=tools\n\t--ignore=traitlets\n\t--ignore=IPython/core/tests/daft_extension\n\t--ignore=IPython/sphinxext\n\t--ignore=IPython/terminal/pt_inputhooks\n\t--ignore=IPython/__main__.py\n\t--ignore=IPython/config.py\n\t--ignore=IPython/frontend.py\n\t--ignore=IPython/html.py\n\t--ignore=IPython/nbconvert.py\n\t--ignore=IPython/nbformat.py\n\t--ignore=IPython/parallel.py\n\t--ignore=IPython/qt.py\n\t--ignore=IPython/external/qt_for_kernel.py\n\t--ignore=IPython/html/widgets/widget_link.py\n\t--ignore=IPython/html/widgets/widget_output.py\n\t--ignore=IPython/terminal/console.py\n\t--ignore=IPython/terminal/ptshell.py\n\t--ignore=IPython/utils/_process_cli.py\n\t--ignore=IPython/utils/_process_posix.py\n\t--ignore=IPython/utils/_process_win32.py\n\t--ignore=IPython/utils/_process_win32_controller.py\n\t--ignore=IPython/utils/daemonize.py\n\t--ignore=IPython/utils/eventful.py\n\t\n\t--ignore=IPython/kernel\n\t--ignore=IPython/consoleapp.py\n\t--ignore=IPython/core/inputsplitter.py\n\t--ignore=IPython/lib/kernel.py\n\t--ignore=IPython/utils/jsonutil.py\n\t--ignore=IPython/utils/localinterfaces.py\n\t--ignore=IPython/utils/log.py\n\t--ignore=IPython/utils/signatures.py\n\t--ignore=IPython/utils/traitlets.py\n\t--ignore=IPython/utils/version.py\ndoctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS\nipdoctest_optionflags = NORMALIZE_WHITESPACE ELLIPSIS\n\n\nEOF_1234810234"], "python": "3.10", "pip_packages": ["asttokens==3.0.0", "attrs==24.3.0", "backcall==0.2.0", "decorator==5.1.1", "executing==2.1.0", "iniconfig==2.0.0", "jedi==0.19.2", "matplotlib-inline==0.1.7", "packaging==24.2", "parso==0.8.4", "pexpect==4.9.0", "pickleshare==0.7.5", "pluggy==1.5.0", "prompt-toolkit==3.0.48", "ptyprocess==0.7.0", "pure-eval==0.2.3", "py==1.11.0", "pygments==2.18.0", "pytest==7.0.1", "pytest-asyncio==0.23.8", "setuptools==75.6.0", "stack-data==0.6.3", "testpath==0.6.0", "tomli==2.2.1", "traitlets==5.14.3", "wcwidth==0.2.13", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-6072 | 95df3fd6495544eed7835fbf677069d401d3ed9d | diff --git a/news/6072.bugfix.rst b/news/6072.bugfix.rst
new file mode 100644
index 000000000..a62100343
--- /dev/null
+++ b/news/6072.bugfix.rst
@@ -0,0 +1,1 @@
+Remove logic that treats ``CI`` variable to use ``do_run_nt`` shell logic, as the original reasons for that patch were no longer valid.
diff --git a/pipenv/routines/shell.py b/pipenv/routines/shell.py
index a4a4df621..1e8b286be 100644
--- a/pipenv/routines/shell.py
+++ b/pipenv/routines/shell.py
@@ -3,7 +3,6 @@
import sys
from os.path import expandvars
-from pipenv import environments
from pipenv.utils.project import ensure_project
from pipenv.utils.shell import cmd_list_to_shell, system_which
from pipenv.vendor import click
@@ -99,9 +98,7 @@ def do_run(project, command, args, python=False, pypi_mirror=None):
click.echo("Can't run script {0!r}-it's empty?", err=True)
run_args = [project, script]
run_kwargs = {"env": env}
- # We're using `do_run_nt` on CI (even if we're running on a non-nt machine)
- # as a workaround for https://github.com/pypa/pipenv/issues/4909.
- if os.name == "nt" or environments.PIPENV_IS_CI:
+ if os.name == "nt":
run_fn = do_run_nt
else:
run_fn = do_run_posix
| diff --git a/tests/conftest.py b/tests/conftest.py
index 13778403e..fc75b6b57 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,14 +1,4 @@
import pytest
-import os
-
-# Note that we have to do this *before* `pipenv.environments` gets imported,
-# which is why we're doing it here as a side effect of importing this module.
-# CI=1 is necessary as a workaround for https://github.com/pypa/pipenv/issues/4909
-os.environ['CI'] = '1'
-
-def pytest_sessionstart(session):
- import pipenv.environments
- assert pipenv.environments.PIPENV_IS_CI
@pytest.fixture()
diff --git a/tests/integration/test_run.py b/tests/integration/test_run.py
index 0cb99d81a..2b938aa9b 100644
--- a/tests/integration/test_run.py
+++ b/tests/integration/test_run.py
@@ -41,8 +41,8 @@ def test_scripts(pipenv_instance_pypi):
c = p.pipenv('run notfoundscript')
assert c.returncode != 0
assert c.stdout == ''
- if os.name != 'nt': # TODO: Implement this message for Windows.
- assert 'not found' in c.stderr
+ if os.name != 'nt':
+ assert 'could not be found' in c.stderr
project = Project()
| Test suite immediately aborts with a successful exit code whenever a test that does a `pipenv run` executes
Check this out:
```python
$ time pytest
=============================================== test session starts ================================================
platform linux -- Python 3.8.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/jeremy/src/github.com/pypa/pipenv, configfile: setup.cfg, testpaths: tests
plugins: timeout-2.0.1, xdist-2.4.0, flaky-3.7.0, forked-1.3.0, pypi-0.1.1
collected 274 items
tests/integration/test_cli.py ...
real 7.14s
user 4.30s
sys 0.73s
$ echo $?
0
```
I know we don't have a 7 second test suite with only 3 tests in it! Also, where did pipenv's normal test summary go?
In the example above, we've run the first 3 tests of test_cli.py and the test suite aborted when running the 4th test: `test_pipenv_site_packages`. The whole test suite aborts when we get to this `pipenv run` invocation:
https://github.com/pypa/pipenv/blob/b0ebaf054e9b47fc90f6939b2473e31863da15a3/tests/integration/test_cli.py#L52
This doesn't happen in CI. It took me **forever** to figure out what's going on here. Here's the full story:
- That call to `p.pipenv` uses `click`'s [`invoke` method](https://click.palletsprojects.com/en/8.0.x/api/#click.testing.CliRunner.invoke) internally. That method internally starts executing pipenv (note that this is happening in the same python testrunner process, there is no forking going on here!)
- Eventually we get into the actual guts of `pipenv run`, which (on my Linux machine) means we execute [this call to `os.execve` in `do_run_posix`](https://github.com/pypa/pipenv/blob/b0ebaf054e9b47fc90f6939b2473e31863da15a3/pipenv/core.py#L2451-L2455). *This completely replaces the pytest process we were in the middle of*, and when the (now just pipenv) process exits, our entire test suite grinds to a halt and exits successfully. Yikes :exploding_head:!
- This doesn't happen in CI because we actually use `do_run_nt` (:interrobang:) in CI: https://github.com/pypa/pipenv/blob/b0ebaf054e9b47fc90f6939b2473e31863da15a3/pipenv/core.py#L2499-L2502. It looks like @frostming added this in https://github.com/pypa/pipenv/pull/4757/files#diff-ef852c4ac364f946819f765a6bc26f04f1b0968f31fc512949a60fa2ab0685e8R2488, presumably as a workaround for this very problem?
- (For the record, if you're running pytest with parallelism enabled, you'll see error messages like "node down: Not properly terminated" and "replacing crashed worker gw3" as the workers turn into pipenv processes and exit).
I've been able to work around this problem by explicitly setting the `CI` environment variable when running tests locally. I'll send in a PR to improve the documentation, but we might want to rework this a bit. It feels a bit off to require people to pretend to be in CI just to run tests.
| @jfly I haven't experienced this issue before in the last months of running pipenv tests locally on almost daily basis. Could you re-check this behavior with `pipenv==2022.4.21`?
@matteius that's because of [this workaround I added](https://github.com/pypa/pipenv/blob/114eb8f80a63e519fe9d12ac9e7cb60444cf47c0/tests/conftest.py#L4-L11). If you comment it out, this reproduces quickly:
```
$ git diff
diff --git a/tests/conftest.py b/tests/conftest.py
index 13778403..1dbfcfab 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,14 +1,14 @@
import pytest
-import os
-
-# Note that we have to do this *before* `pipenv.environments` gets imported,
-# which is why we're doing it here as a side effect of importing this module.
-# CI=1 is necessary as a workaround for https://github.com/pypa/pipenv/issues/4909
-os.environ['CI'] = '1'
-
-def pytest_sessionstart(session):
- import pipenv.environments
- assert pipenv.environments.PIPENV_IS_CI
+# <<< import os
+# <<<
+# <<< # Note that we have to do this *before* `pipenv.environments` gets imported,
+# <<< # which is why we're doing it here as a side effect of importing this module.
+# <<< # CI=1 is necessary as a workaround for https://github.com/pypa/pipenv/issues/4909
+# <<< os.environ['CI'] = '1'
+# <<<
+# <<< def pytest_sessionstart(session):
+# <<< import pipenv.environments
+# <<< assert pipenv.environments.PIPENV_IS_CI
@pytest.fixture()
$ time pytest
===================================================================== test session starts =====================================================================
platform linux -- Python 3.8.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/jeremy/src/github.com/pypa/pipenv, configfile: setup.cfg, testpaths: tests
plugins: timeout-2.0.1, xdist-2.4.0, flaky-3.7.0, forked-1.3.0, pypi-0.1.1
collected 294 items
tests/integration/test_cli.py ...
real 9.78s
user 6.02s
sys 0.74s
```
@jfly sorry for being dense but is this still an issue?
@matteius sorry for the delayed response here. I just checked, and yes, this is still an issue. I've filed this SO question seeking help from the click folks about how to handle this: https://stackoverflow.com/questions/73995157/best-practice-for-invoke-ing-a-tool-that-internally-calls-exec.
> @matteius that's because of [this workaround I added](https://github.com/pypa/pipenv/blob/114eb8f80a63e519fe9d12ac9e7cb60444cf47c0/tests/conftest.py#L4-L11). If you comment it out, this reproduces quickly:
>
Hi!
This workaround breaks process substitution in CI.
https://github.com/pypa/pipenv/blob/main/pipenv/routines/shell.py#L102
we have a script that runs something like
`pipenv run ./python_cli --file <(echo $FILE_CONTENT)`
this works fine on local machines, but it breaks on CI with: ` Path '/dev/fd/63' does not exist.`
this is because when the $CI env var is set, run uses `do_run_nt` instead of `do_run_posix`. `do_run_nt` uses a subprocess, so the temp file descriptor created with `<(..)` is not accesible when it runs.
Urg, sorry @scvsoft-javierrotelli, that must have been a pain to track down.
One solution would be to change that workaround to look at a new environment variable (`PIPENV_FORCE_RUN_NT`?) that we explicitly set in Pipenv's CI config.
Its been a while on this thread but I am wondering how relevant that pipenv logic for nt is still, but it might be -- anyway I am pretty busy at the moment but could accept a PR and cut a minor release sometime soon.
a new env variable seems like a good solution, I can work on a PR between today and tomorrow if that's fine | 2024-01-30T19:47:26Z | 2024-02-01T02:40:52Z | ["tests/integration/test_run.py::test_env", "tests/integration/test_run.py::test_pipenv_run_pip_freeze_has_expected_output[True]", "tests/integration/test_run.py::test_scripts_resolve_dot_env_vars[False]", "tests/integration/test_run.py::test_scripts_resolve_dot_env_vars[True]", "tests/integration/test_run.py::test_scripts_with_package_functions", "tests/integration/test_run.py::test_run_with_usr_env_shebang"] | [] | ["tests/integration/test_run.py::test_scripts", "tests/integration/test_run.py::test_pipenv_run_pip_freeze_has_expected_output[False]"] | [] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .[tests]\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider --timeout 300 []\ninstall_command = python -m pip install {opts} {packages}\nusedevelop = True\n\n[testenv:coverage-report]\ndeps = coverage\nskip_install = true\ncommands =\n\tcoverage combine\n\tcoverage report\n\n[testenv:docs]\ndeps =\n -r{toxinidir}/docs/requirements.txt\n -e .[tests]\ncommands =\n sphinx-build -d {envtmpdir}/doctrees -b html docs docs/build/html\n sphinx-build -d {envtmpdir}/doctrees -b man docs docs/build/man\n\n[testenv:packaging]\ndeps =\n check-manifest\n readme_renderer\ncommands =\n check-manifest\n python setup.py check -m -r -s\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["certifi==2023.11.17", "distlib==0.3.8", "execnet==2.0.2", "filelock==3.13.1", "iniconfig==2.0.0", "packaging==23.2", "platformdirs==4.2.0", "pluggy==1.4.0", "pytest==8.0.0", "pytest-xdist==3.5.0", "setuptools==69.0.3", "virtualenv==20.25.0", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-6017 | acbcdcc14273ad55f31e0cd14309f0a8d3f5470b | diff --git a/news/6017.bugfix.rst b/news/6017.bugfix.rst
new file mode 100644
index 000000000..b13de4078
--- /dev/null
+++ b/news/6017.bugfix.rst
@@ -0,0 +1,1 @@
+Fix regression with path installs on most recent release ``2023.11.14``
diff --git a/pipenv/utils/dependencies.py b/pipenv/utils/dependencies.py
index 05cc9cbf9..10cae818b 100644
--- a/pipenv/utils/dependencies.py
+++ b/pipenv/utils/dependencies.py
@@ -667,11 +667,11 @@ def ensure_path_is_relative(file_path):
# Check if the paths are on different drives
if abs_path.drive != current_dir.drive:
# If on different drives, return the absolute path
- return abs_path
+ return str(abs_path)
try:
# Try to create a relative path
- return abs_path.relative_to(current_dir)
+ return str(abs_path.relative_to(current_dir))
except ValueError:
# If the direct relative_to fails, manually compute the relative path
common_parts = 0
| diff --git a/tests/integration/test_install_twists.py b/tests/integration/test_install_twists.py
index 4bb250180..4979a06ef 100644
--- a/tests/integration/test_install_twists.py
+++ b/tests/integration/test_install_twists.py
@@ -7,6 +7,35 @@
from pipenv.utils.shell import temp_environ
[email protected]
[email protected]
[email protected]
+def test_local_path_issue_6016(pipenv_instance_pypi):
+ with pipenv_instance_pypi() as p:
+ setup_py = os.path.join(p.path, "setup.py")
+ with open(setup_py, "w") as fh:
+ contents = """
+from setuptools import setup, find_packages
+setup(
+ name='testpipenv',
+ version='0.1',
+ description='Pipenv Test Package',
+ author='Pipenv Test',
+ author_email='[email protected]',
+ license='MIT',
+ packages=find_packages(),
+ install_requires=[],
+ extras_require={'dev': ['six']},
+ zip_safe=False
+)
+ """.strip()
+ fh.write(contents)
+ # project.write_toml({"packages": pipfile, "dev-packages": {}})
+ c = p.pipenv("install .")
+ assert c.returncode == 0
+ assert "testpipenv" in p.lockfile["default"]
+
+
@pytest.mark.extras
@pytest.mark.install
@pytest.mark.local
| PosixPath' object has no attribute 'strip' since 2023.11.14 on Python 3.11.6
### Issue description
Starting with 2023.11.14 we get an error in pipenv in all our python builds (Linux on upstream python 3.11 container) and locally on Linux/Mac.
### Expected result
`pipenv install .` succeeds as in `2023.10.24`.
### Actual result
pipenv crashes:
```
⠸ Locking...
✔ Success!
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/cli/options.py", line 58, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/cli/command.py", line 209, in install
do_install(
File "/usr/local/lib/python3.11/site-packages/pipenv/routines/install.py", line 297, in do_install
raise e
File "/usr/local/lib/python3.11/site-packages/pipenv/routines/install.py", line 281, in do_install
do_init(
File "/usr/local/lib/python3.11/site-packages/pipenv/routines/install.py", line 672, in do_init
do_lock(
File "/usr/local/lib/python3.11/site-packages/pipenv/routines/lock.py", line 65, in do_lock
venv_resolve_deps(
File "/usr/local/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 875, in venv_resolve_deps
return prepare_lockfile(
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/utils/locking.py", line 140, in prepare_lockfile
lockfile_entry = get_locked_dep(project, dep, pipfile, current_entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/utils/locking.py", line 123, in get_locked_dep
lockfile_entry = clean_resolved_dep(project, dep, is_top_level, current_entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/utils/dependencies.py", line 277, in clean_resolved_dep
potential_hashes = unearth_hashes_for_dep(project, dep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/utils/dependencies.py", line 189, in unearth_hashes_for_dep
install_req, markers, _ = install_req_from_pipfile(dep["name"], dep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/utils/dependencies.py", line 1097, in install_req_from_pipfile
install_req, _ = expansive_install_req_from_line(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pipenv/utils/dependencies.py", line 954, in expansive_install_req_from_line
pip_line = pip_line.strip("'").lstrip(" ")
^^^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute 'strip'
```
### Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
Run `pipenv install .`.
Pipfile:
```
cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "3.11"
```
setup.py:
```
from setuptools import setup, find_packages
setup(
name='xxx',
version='0.1',
packages=find_packages('app'),
package_dir={'': 'app'},
include_package_data=True,
install_requires=(
'Flask==3.0.0',
'Flask-Login==0.6.3',
'flask-oidc-ext==1.4.5',
'Flask-Session==0.5.0',
'Flask-WTF==1.2.1',
'Flask-Bootstrap==3.3.7.1',
'Werkzeug==3.0.1',
'chardet==5.2.0',
'cryptography==41.0.5',
'gunicorn==21.2.0',
'pyOpenSSL==23.3.0',
'PyJWT[crypto]==2.8.0',
'requests==2.31.0',
'requests_pkcs12==1.22',
'sqlite3dict==1.0.1',
'pem==23.1.0',
'tabulate==0.9.0',
'setuptools==68.2.2',
'pyjks==20.0.0',
'itsdangerous>=2.1.2,<2.2',
)
)
```
-------------------------------------------------------------------------------
<details><summary>$ pipenv --support</summary>
Pipenv version: `'2023.11.14'`
Pipenv location: `'/usr/local/lib/python3.11/site-packages/pipenv'`
Python location: `'/usr/local/opt/[email protected]/bin/python3.11'`
OS Name: `'posix'`
User pip version: `'23.3.1'`
user Python installations found:
PEP 508 Information:
```
{'implementation_name': 'cpython',
'implementation_version': '3.11.6',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '22.6.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:52 PDT '
'2023; root:xnu-8796.141.3.700.8~1/RELEASE_X86_64',
'python_full_version': '3.11.6',
'python_version': '3.11',
'sys_platform': 'darwin'}
```
System environment variables:
- `TERM_SESSION_ID`
- `SSH_AUTH_SOCK`
- `LC_TERMINAL_VERSION`
- `COLORFGBG`
- `ITERM_PROFILE`
- `XPC_FLAGS`
- `LANG`
- `PWD`
- `SHELL`
- `__CFBundleIdentifier`
- `SECURITYSESSIONID`
- `TERM_PROGRAM_VERSION`
- `TERM_PROGRAM`
- `PATH`
- `LC_TERMINAL`
- `COLORTERM`
- `COMMAND_MODE`
- `TERM`
- `HOME`
- `TMPDIR`
- `USER`
- `XPC_SERVICE_NAME`
- `LOGNAME`
- `LaunchInstanceID`
- `__CF_USER_TEXT_ENCODING`
- `ITERM_SESSION_ID`
- `SHLVL`
- `OLDPWD`
- `P9K_TTY`
- `_P9K_TTY`
- `ZSH`
- `PAGER`
- `LESS`
- `LSCOLORS`
- `LS_COLORS`
- `P9K_SSH`
- `KUBE_EDITOR`
- `KOPS_STATE_STORE`
- `AWS_PROFILE`
- `_`
- `PIP_DISABLE_PIP_VERSION_CHECK`
- `PYTHONDONTWRITEBYTECODE`
- `PYTHONFINDER_IGNORE_UNSUPPORTED`
Pipenv–specific environment variables:
Debug–specific environment variables:
- `PATH`: `/usr/local/opt/[email protected]/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Users/xxx/.krew/bin:/Users/xxx/.cargo/bin:/Users/xxx/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/xxx/.local/bin`
- `SHELL`: `/bin/zsh`
- `LANG`: `de_DE.UTF-8`
- `PWD`: `/Users/xxx/src/xxx/xxx`
---------------------------
Contents of `Pipfile` ('/Users/xxx/src/xxx/xxx/Pipfile'):
```toml
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "3.11"
```
</details>
This also happens on a freshly installed pipenv in Docker on all of our projects. Downgrade fixes it.
| Will take a look tonight.
+1 getting the same error on Python 3.10.13 | 2023-11-15T22:58:01Z | 2023-11-15T23:31:00Z | ["tests/integration/test_install_twists.py::test_normalize_name_install", "tests/integration/test_install_twists.py::test_install_local_uri_special_character", "tests/integration/test_install_twists.py::test_local_extras_install", "tests/integration/test_install_twists.py::test_install_remote_wheel_file_with_extras"] | [] | ["tests/integration/test_install_twists.py::test_local_path_issue_6016"] | ["tests/integration/test_install_twists.py::test_multiple_editable_packages_should_not_race - assert 1 == 0", "tests/integration/test_install_twists.py::test_install_skip_lock - assert 1 == 0", "tests/integration/test_install_twists.py::test_local_tar_gz_file - assert 1 == 0", "tests/integration/test_install_twists.py::test_outdated_should_compare_postreleases_without_failing - assert 1 == 0"] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .[tests]\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider --timeout 300 []\ninstall_command = python -m pip install {opts} {packages}\nusedevelop = True\n\n[testenv:coverage-report]\ndeps = coverage\nskip_install = true\ncommands =\n\tcoverage combine\n\tcoverage report\n\n[testenv:docs]\ndeps =\n -r{toxinidir}/docs/requirements.txt\n -e .[tests]\ncommands =\n sphinx-build -d {envtmpdir}/doctrees -b html docs docs/build/html\n sphinx-build -d {envtmpdir}/doctrees -b man docs docs/build/man\n\n[testenv:packaging]\ndeps =\n check-manifest\n readme_renderer\ncommands =\n check-manifest\n python setup.py check -m -r -s\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["certifi==2023.7.22", "distlib==0.3.7", "execnet==2.0.2", "filelock==3.13.1", "iniconfig==2.0.0", "packaging==23.2", "platformdirs==3.11.0", "pluggy==1.3.0", "pytest==7.4.3", "pytest-xdist==3.4.0", "setuptools==68.2.2", "virtualenv==20.24.6", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-5826 | 549c6611c6d0a3943478064a1bd55ed3bde7075a | diff --git a/news/5722.feature.rst b/news/5722.feature.rst
new file mode 100644
index 0000000000..e4e835ec70
--- /dev/null
+++ b/news/5722.feature.rst
@@ -0,0 +1,1 @@
+The ``--categories`` option now works with requirements.txt file.
diff --git a/pipenv/routines/install.py b/pipenv/routines/install.py
index a411bfddb0..7d56bd8b5b 100644
--- a/pipenv/routines/install.py
+++ b/pipenv/routines/install.py
@@ -66,6 +66,7 @@ def do_install(
skip_requirements=skip_requirements,
pypi_mirror=pypi_mirror,
site_packages=site_packages,
+ categories=categories,
)
# Don't attempt to install develop and default packages if Pipfile is missing
if not project.pipfile_exists and not (package_args or dev):
@@ -131,7 +132,12 @@ def do_install(
err=True,
)
try:
- import_requirements(project, r=project.path_to(requirementstxt), dev=dev)
+ import_requirements(
+ project,
+ r=project.path_to(requirementstxt),
+ dev=dev,
+ categories=categories,
+ )
except (UnicodeDecodeError, PipError) as e:
# Don't print the temp file path if remote since it will be deleted.
req_path = requirements_url if remote else project.path_to(requirementstxt)
diff --git a/pipenv/utils/pipfile.py b/pipenv/utils/pipfile.py
index 9029c59a3d..79b6af96e8 100644
--- a/pipenv/utils/pipfile.py
+++ b/pipenv/utils/pipfile.py
@@ -50,7 +50,9 @@ def find_pipfile(max_depth=3):
raise RuntimeError("No Pipfile found!")
-def ensure_pipfile(project, validate=True, skip_requirements=False, system=False):
+def ensure_pipfile(
+ project, validate=True, skip_requirements=False, system=False, categories=None
+):
"""Creates a Pipfile for the project, if it doesn't exist."""
# Assert Pipfile exists.
@@ -81,7 +83,7 @@ def ensure_pipfile(project, validate=True, skip_requirements=False, system=False
) as st:
# Import requirements.txt.
try:
- import_requirements(project)
+ import_requirements(project, categories=categories)
except Exception:
err.print(environments.PIPENV_SPINNER_FAIL_TEXT.format("Failed..."))
else:
diff --git a/pipenv/utils/project.py b/pipenv/utils/project.py
index a0cfb10f57..44fa1c95b8 100644
--- a/pipenv/utils/project.py
+++ b/pipenv/utils/project.py
@@ -19,6 +19,7 @@ def ensure_project(
skip_requirements=False,
pypi_mirror=None,
clear=False,
+ categories=None,
):
"""Ensures both Pipfile and virtualenv exist for the project."""
@@ -78,5 +79,6 @@ def ensure_project(
validate=validate,
skip_requirements=skip_requirements,
system=system,
+ categories=categories,
)
os.environ["PIP_PYTHON_PATH"] = project.python(system=system)
diff --git a/pipenv/utils/requirements.py b/pipenv/utils/requirements.py
index 3d6f816bfe..2efe2c1cf7 100644
--- a/pipenv/utils/requirements.py
+++ b/pipenv/utils/requirements.py
@@ -12,7 +12,7 @@
from pipenv.utils.pip import get_trusted_hosts
-def import_requirements(project, r=None, dev=False):
+def import_requirements(project, r=None, dev=False, categories=None):
# Parse requirements.txt file with Pip's parser.
# Pip requires a `PipSession` which is a subclass of requests.Session.
# Since we're not making any network calls, it's initialized to nothing.
@@ -23,6 +23,8 @@ def import_requirements(project, r=None, dev=False):
r = project.requirements_location
with open(r) as f:
contents = f.read()
+ if categories is None:
+ categories = []
indexes = []
trusted_hosts = []
# Find and add extra indexes.
@@ -56,9 +58,22 @@ def import_requirements(project, r=None, dev=False):
package_string = str(package.link._url)
else:
package_string = str(package.link)
- project.add_package_to_pipfile(package_string, dev=dev)
+ if categories:
+ for category in categories:
+ project.add_package_to_pipfile(
+ package_string, dev=dev, category=category
+ )
+ else:
+ project.add_package_to_pipfile(package_string, dev=dev)
else:
- project.add_package_to_pipfile(str(package.req), dev=dev)
+ if categories:
+ for category in categories:
+ project.add_package_to_pipfile(
+ str(package.req), dev=dev, category=category
+ )
+ else:
+ project.add_package_to_pipfile(str(package.req), dev=dev)
+
for index in indexes:
add_index_to_pipfile(project, index, trusted_hosts)
project.recase_pipfile()
| diff --git a/tests/integration/test_install_categories.py b/tests/integration/test_install_categories.py
index 9da45b051e..5d33fdf443 100644
--- a/tests/integration/test_install_categories.py
+++ b/tests/integration/test_install_categories.py
@@ -18,7 +18,29 @@ def test_basic_category_install(pipenv_instance_private_pypi):
@pytest.mark.categories
@pytest.mark.install
[email protected]('categories', ["prereq other", "prereq, other"])
[email protected]
+def test_basic_category_install_from_requirements(pipenv_instance_private_pypi):
+ with pipenv_instance_private_pypi(pipfile=False) as p:
+ # Write a requirements file
+ with open("requirements.txt", "w") as f:
+ f.write(f"six==1.16.0")
+
+ c = p.pipenv("install --categories prereq")
+ assert c.returncode == 0
+ os.unlink("requirements.txt")
+ print(c.stdout)
+ print(c.stderr)
+ # assert stuff in pipfile
+ assert c.returncode == 0
+ assert "six" not in p.pipfile["packages"]
+ assert "six" not in p.lockfile["default"]
+ assert "six" in p.pipfile["prereq"]
+ assert "six" in p.lockfile["prereq"]
+
+
[email protected]
[email protected]
[email protected]("categories", ["prereq other", "prereq, other"])
def test_multiple_category_install(pipenv_instance_private_pypi, categories):
with pipenv_instance_private_pypi() as p:
c = p.pipenv('install six --categories="prereq other"')
@@ -31,6 +53,30 @@ def test_multiple_category_install(pipenv_instance_private_pypi, categories):
assert "six" in p.lockfile["other"]
[email protected]
[email protected]
[email protected]
+def test_multiple_category_install_from_requirements(pipenv_instance_private_pypi):
+ with pipenv_instance_private_pypi(pipfile=False) as p:
+ # Write a requirements file
+ with open("requirements.txt", "w") as f:
+ f.write("six==1.16.0")
+
+ c = p.pipenv('install --categories="prereq other"')
+ assert c.returncode == 0
+ os.unlink("requirements.txt")
+ print(c.stdout)
+ print(c.stderr)
+ # assert stuff in pipfile
+ assert c.returncode == 0
+ assert "six" not in p.pipfile["packages"]
+ assert "six" not in p.lockfile["default"]
+ assert "six" in p.pipfile["prereq"]
+ assert "six" in p.lockfile["prereq"]
+ assert "six" in p.pipfile["other"]
+ assert "six" in p.lockfile["other"]
+
+
@pytest.mark.extras
@pytest.mark.install
@pytest.mark.local
| Specifying categories when installing from a requirements.txt
I am converting an in-house python project to use pipenv.
We have 9 different requirements.txt depending on what stage of the build/testing we're at, each with a different name.
As such we're looking to use [categories](https://pipenv.pypa.io/en/latest/specifiers/#specifying-package-categories)
I was surprised when the below didn't work (it adds it to [packages])
```
pipenv install -r ./req-test.txt --categories test
```
When this does:
```
pipenv install -r ./req-test.txt --dev
```
### Describe the solution you'd like
```
#req-test.txt
requests
```
```bash
pipenv install -r ./req-test.txt --categories test
```
```
#Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[test]
requests = "*"
[requires]
python_version = "3.10"
```
I realise this might be a strange use case, but I just thought it made sense :)
| It makes sense, I am just short on time to work on all these enhancement requests, so I am hoping that someone else will pick this one up since it seems straight forward.
No worries Matt! If I get some free time myself, I might have a looksie.
Hi, is this still open and if so can I work on this?
if yes, should I add a new option like `--category` or use `--categories`? because giving multiple options here is not really meaningful.
Yes, fill your boots! `--categories` is probably the way to go. Keeps it in line with what we currently have. I do see your point, but maybe someone does want to install `requirements.txt` into multiple categories *shrug*. | 2023-08-10T12:55:51Z | 2023-08-17T20:30:53Z | [] | [] | ["tests/integration/test_install_categories.py::test_basic_category_install_from_requirements", "tests/integration/test_install_categories.py::test_multiple_category_install_from_requirements"] | ["tests/integration/test_install_categories.py::test_basic_category_install - assert 1 == 0", "tests/integration/test_install_categories.py::test_multiple_category_install_proceeds_in_order_specified", "tests/integration/test_install_categories.py::test_multiple_category_install[prereq, other] - assert 1 == 0", "tests/integration/test_install_categories.py::test_multiple_category_install[prereq other] - assert 1 == 0"] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .[tests]\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider --timeout 300 []\ninstall_command = python -m pip install {opts} {packages}\nusedevelop = True\n\n[testenv:coverage-report]\ndeps = coverage\nskip_install = true\ncommands =\n\tcoverage combine\n\tcoverage report\n\n[testenv:docs]\ndeps =\n -r{toxinidir}/docs/requirements.txt\n -e .[tests]\ncommands =\n sphinx-build -d {envtmpdir}/doctrees -b html docs docs/build/html\n sphinx-build -d {envtmpdir}/doctrees -b man docs docs/build/man\n\n[testenv:packaging]\ndeps =\n check-manifest\n readme_renderer\ncommands =\n check-manifest\n python setup.py check -m -r -s\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["certifi==2023.7.22", "charset-normalizer==3.2.0", "distlib==0.3.7", "execnet==2.0.2", "filelock==3.12.2", "idna==3.4", "iniconfig==2.0.0", "packaging==23.1", "platformdirs==3.10.0", "pluggy==1.2.0", "pytest==7.4.0", "pytest-xdist==3.3.1", "requests==2.31.0", "setuptools==68.1.0", "urllib3==2.0.4", "virtualenv==20.24.3", "virtualenv-clone==0.5.7", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-5784 | 374b7064e3c3c5e8e2ea74bb21826988c063ea87 | diff --git a/news/5784.bugfix.rst b/news/5784.bugfix.rst
new file mode 100644
index 0000000000..eeb9a08dff
--- /dev/null
+++ b/news/5784.bugfix.rst
@@ -0,0 +1,1 @@
+Fix regressions in the ``requirements`` command related to standard index extras and handling of local file requirements.
diff --git a/pipenv/routines/requirements.py b/pipenv/routines/requirements.py
index 0e4c6102d5..3b910756a1 100644
--- a/pipenv/routines/requirements.py
+++ b/pipenv/routines/requirements.py
@@ -19,8 +19,17 @@ def requirements_from_deps(deps, include_hashes=True, include_markers=True):
else ""
)
pip_package = f"{package_name}{extras} @ git+{git}@{ref}"
+ # Handling file-sourced packages
+ elif "file" in package_info or "path" in package_info:
+ file = package_info.get("file") or package_info.get("path")
+ extras = (
+ "[{}]".format(",".join(package_info.get("extras", [])))
+ if "extras" in package_info
+ else ""
+ )
+ pip_package = f"{file}{extras}"
else:
- # Handling packages with hashes and markers
+ # Handling packages from standard pypi like indexes
version = package_info.get("version", "").replace("==", "")
hashes = (
" --hash={}".format(" --hash=".join(package_info["hashes"]))
@@ -32,7 +41,12 @@ def requirements_from_deps(deps, include_hashes=True, include_markers=True):
if include_markers and "markers" in package_info
else ""
)
- pip_package = f"{package_name}=={version}{markers}{hashes}"
+ extras = (
+ "[{}]".format(",".join(package_info.get("extras", [])))
+ if "extras" in package_info
+ else ""
+ )
+ pip_package = f"{package_name}{extras}=={version}{markers}{hashes}"
# Append to the list
pip_packages.append(pip_package)
| diff --git a/tests/integration/test_requirements.py b/tests/integration/test_requirements.py
index ed957e892a..94a98530f1 100644
--- a/tests/integration/test_requirements.py
+++ b/tests/integration/test_requirements.py
@@ -3,7 +3,7 @@
import pytest
from pipenv.utils.shell import temp_environ
-
+from pipenv.routines.requirements import requirements_from_deps
@pytest.mark.requirements
def test_requirements_generates_requirements_from_lockfile(pipenv_instance_pypi):
@@ -192,6 +192,7 @@ def test_requirements_markers_get_excluded(pipenv_instance_pypi):
assert c.returncode == 0
assert markers not in c.stdout
+
@pytest.mark.requirements
def test_requirements_hashes_get_included(pipenv_instance_pypi):
package, version, markers = "werkzeug", "==2.1.2", "python_version >= '3.7'"
@@ -220,6 +221,7 @@ def test_requirements_hashes_get_included(pipenv_instance_pypi):
assert c.returncode == 0
assert f'{package}{version}; {markers} --hash={first_hash} --hash={second_hash}' in c.stdout
+
def test_requirements_generates_requirements_from_lockfile_without_env_var_expansion(
pipenv_instance_pypi,
):
@@ -250,3 +252,48 @@ def test_requirements_generates_requirements_from_lockfile_without_env_var_expan
"-i https://${redacted_user}:${redacted_pwd}@private_source.org"
in c.stdout
)
+
+
[email protected]
[email protected](
+ "deps, include_hashes, include_markers, expected",
+ [
+ (
+ {
+ "django-storages": {
+ "version": "==1.12.3",
+ "extras": ["azure"]
+ }
+ },
+ True,
+ True,
+ ["django-storages[azure]==1.12.3"]
+ ),
+ (
+ {
+ "evotum-cripto": {
+ "file": "https://gitlab.com/eVotUM/Cripto-py/-/archive/develop/Cripto-py-develop.zip"
+ }
+ },
+ True,
+ True,
+ ["https://gitlab.com/eVotUM/Cripto-py/-/archive/develop/Cripto-py-develop.zip"]
+ ),
+ (
+ {
+ "pyjwt": {
+ "git": "https://github.com/jpadilla/pyjwt.git",
+ "ref": "7665aa625506a11bae50b56d3e04413a3dc6fdf8",
+ "extras": ["crypto"]
+ }
+ },
+ True,
+ True,
+ ["pyjwt[crypto] @ git+https://github.com/jpadilla/pyjwt.git@7665aa625506a11bae50b56d3e04413a3dc6fdf8"]
+ )
+ ]
+)
+def test_requirements_from_deps(deps, include_hashes, include_markers, expected):
+ result = requirements_from_deps(deps, include_hashes, include_markers)
+ assert result == expected
+
| Pipenv requirements has problem with packages from files
### Issue description
Command `pipenv requirements` doesn't respect package with source from file. The following example shows a Pipfile where we try to install the package `https://gitlab.com/eVotUM/Cripto-py/-/archive/develop/Cripto-py-develop.zip`.
### Expected result
```
$ pipenv requirements
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
-i https://pypi.org/simple
argon2-cffi==20.1.0
cffi==1.15.1
colored==1.4.2
cryptography==41.0.1 ; python_version >= '3.7'
https://gitlab.com/eVotUM/Cripto-py/-/archive/develop/Cripto-py-develop.zip
pycparser==2.21
pycryptodome==3.9.9 ; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
pyopenssl==20.0.1 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
six==1.15.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
utilitybelt==0.2.6
```
### Steps to replicate
```
$ pipenv --version
pipenv, version 2023.7.3
$ pipenv requirements
-i https://pypi.org/simple
argon2-cffi==20.1.0
cffi==1.15.1
colored==1.4.2
cryptography==41.0.1; python_version >= '3.7'
evotum-cripto==2.0
pycparser==2.21
pycryptodome==3.9.9; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
pyopenssl==20.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
six==1.15.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
utilitybelt==0.2.6
```
pipenv requirements force evotum-cripto to version 2.0, while it should return `https://gitlab.com/eVotUM/Cripto-py/-/archive/develop/Cripto-py-develop.zip`.
This problem only occurs in pipenv>=2023.7.1
<details><summary>$ pipenv --support</summary>
Pipenv version: `'2023.7.3'`
Pipenv location: `'/home/raf/.local/lib/python3.10/site-packages/pipenv'`
Python location: `'/usr/bin/python3'`
OS Name: `'posix'`
User pip version: `'22.3.1'`
user Python installations found:
PEP 508 Information:
```
{'implementation_name': 'cpython',
'implementation_version': '3.10.6',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '5.19.0-45-generic',
'platform_system': 'Linux',
'platform_version': '#46~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 7 '
'15:06:04 UTC 20',
'python_full_version': '3.10.6',
'python_version': '3.10',
'sys_platform': 'linux'}
```
System environment variables:
- `GJS_DEBUG_TOPICS`
- `USER`
- `LC_TIME`
- `XDG_SESSION_TYPE`
- `SHLVL`
- `HOME`
- `DESKTOP_SESSION`
- `GTK_PATH`
- `GIO_LAUNCHED_DESKTOP_FILE`
- `GNOME_SHELL_SESSION_MODE`
- `GTK_MODULES`
- `LC_MONETARY`
- `MANAGERPID`
- `LC_CTYPE`
- `SYSTEMD_EXEC_PID`
- `DBUS_SESSION_BUS_ADDRESS`
- `LIBVIRT_DEFAULT_URI`
- `GIO_LAUNCHED_DESKTOP_FILE_PID`
- `MANDATORY_PATH`
- `GTK_IM_MODULE`
- `LOGNAME`
- `JOURNAL_STREAM`
- `XDG_SESSION_CLASS`
- `DEFAULTS_PATH`
- `USERNAME`
- `GNOME_DESKTOP_SESSION_ID`
- `WINDOWPATH`
- `PATH`
- `SESSION_MANAGER`
- `INVOCATION_ID`
- `XDG_MENU_PREFIX`
- `LC_ADDRESS`
- `BAMF_DESKTOP_FILE_HINT`
- `XDG_RUNTIME_DIR`
- `DISPLAY`
- `LOCPATH`
- `LANG`
- `XDG_CURRENT_DESKTOP`
- `LC_TELEPHONE`
- `XMODIFIERS`
- `XDG_SESSION_DESKTOP`
- `XAUTHORITY`
- `SSH_AGENT_LAUNCHER`
- `SSH_AUTH_SOCK`
- `SHELL`
- `LC_NAME`
- `QT_ACCESSIBILITY`
- `GDMSESSION`
- `LC_MEASUREMENT`
- `GPG_AGENT_INFO`
- `GJS_DEBUG_OUTPUT`
- `LC_IDENTIFICATION`
- `QT_IM_MODULE`
- `PWD`
- `XDG_CONFIG_DIRS`
- `XDG_DATA_DIRS`
- `LC_NUMERIC`
- `LC_PAPER`
- `CHROME_DESKTOP`
- `ORIGINAL_XDG_CURRENT_DESKTOP`
- `GTK_IM_MODULE_FILE`
- `GDK_BACKEND`
- `GIO_MODULE_DIR`
- `GTK_EXE_PREFIX`
- `GSETTINGS_SCHEMA_DIR`
- `PYENV_VIRTUALENV_INIT`
- `DOCKER_BUILDKIT`
- `GIT_ASKPASS`
- `GREP_COLOR`
- `LESS`
- `OLDPWD`
- `TERM_PROGRAM_VERSION`
- `NVM_BIN`
- `LSCOLORS`
- `PYENV_SHELL`
- `NVM_INC`
- `ZSH`
- `PAGER`
- `COLORTERM`
- `NVM_DIR`
- `USER_ZDOTDIR`
- `TERM`
- `LS_COLORS`
- `TERM_PROGRAM`
- `VIRTUAL_ENV`
- `ZDOTDIR`
- `NVM_CD_FLAGS`
- `PYENV_ROOT`
- `EDITOR`
- `NO_AT_BRIDGE`
- `VSCODE_GIT_ASKPASS_NODE`
- `VSCODE_GIT_ASKPASS_EXTRA_ARGS`
- `VSCODE_GIT_ASKPASS_MAIN`
- `VSCODE_GIT_IPC_HANDLE`
- `VSCODE_INJECTION`
- `_`
- `PYTHONDONTWRITEBYTECODE`
- `PIP_DISABLE_PIP_VERSION_CHECK`
- `PYTHONFINDER_IGNORE_UNSUPPORTED`
Pipenv–specific environment variables:
Debug–specific environment variables:
- `PATH`: `/home/raf/.pyenv/versions/bkcf_onboarding/bin:/home/raf/.pyenv/versions/3.6.8/bin:/home/raf/.pyenv/versions/3.11.2/bin:/home/raf/.pyenv/plugins/pyenv-virtualenv/shims:/home/raf/.pyenv/shims:/home/raf/.npm-global/bin:/home/raf/.local/bin:/home/raf/.config/composer/vendor/bin:/home/raf/.local/share/virtualenvs/webapp-qaen1iSS/bin:/home/raf/.pyenv/plugins/pyenv-virtualenv/shims:/home/raf/.npm-global/bin:/home/raf/.local/bin:/home/raf/.config/composer/vendor/bin:/home/raf/.nvm/versions/node/v18.14.1/bin:/home/raf/.pyenv/plugins/pyenv-virtualenv/shims:/home/raf/.pyenv/bin:/home/raf/.npm-global/bin:/home/raf/.local/bin:/home/raf/.config/composer/vendor/bin:/home/raf/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin`
- `SHELL`: `/usr/bin/zsh`
- `EDITOR`: `vim`
- `LANG`: `en_US.UTF-8`
- `PWD`: `/tmp/test_pipenv`
- `VIRTUAL_ENV`: `/home/raf/.local/share/virtualenvs/webapp-qaen1iSS`
---------------------------
Contents of `Pipfile` ('/tmp/test_pipenv/Pipfile'):
```toml
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
evotum-cripto = {file = "https://gitlab.com/eVotUM/Cripto-py/-/archive/develop/Cripto-py-develop.zip"}
[requires]
python_version = "3.11"
```
Contents of `Pipfile.lock` ('/tmp/test_pipenv/Pipfile.lock'):
```json
{
"_meta": {
"hash": {
"sha256": "174128240a5858f37f84f930aa799daa04f2533973405d8a66aeec90d854597f"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.11"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"argon2-cffi": {
"hashes": [
"sha256:05a8ac07c7026542377e38389638a8a1e9b78f1cd8439cd7493b39f08dd75fbf",
"sha256:0bf066bc049332489bb2d75f69216416329d9dc65deee127152caeb16e5ce7d5",
"sha256:18dee20e25e4be86680b178b35ccfc5d495ebd5792cd00781548d50880fee5c5",
"sha256:36320372133a003374ef4275fbfce78b7ab581440dfca9f9471be3dd9a522428",
"sha256:392c3c2ef91d12da510cfb6f9bae52512a4552573a9e27600bdb800e05905d2b",
"sha256:3aa804c0e52f208973845e8b10c70d8957c9e5a666f702793256242e9167c4e0",
"sha256:57358570592c46c420300ec94f2ff3b32cbccd10d38bdc12dc6979c4a8484fbc",
"sha256:6678bb047373f52bcff02db8afab0d2a77d83bde61cfecea7c5c62e2335cb203",
"sha256:6ea92c980586931a816d61e4faf6c192b4abce89aa767ff6581e6ddc985ed003",
"sha256:77e909cc756ef81d6abb60524d259d959bab384832f0c651ed7dcb6e5ccdbb78",
"sha256:7d455c802727710e9dfa69b74ccaab04568386ca17b0ad36350b622cd34606fe",
"sha256:8282b84ceb46b5b75c3a882b28856b8cd7e647ac71995e71b6705ec06fc232c3",
"sha256:8a84934bd818e14a17943de8099d41160da4a336bcc699bb4c394bbb9b94bd32",
"sha256:9bee3212ba4f560af397b6d7146848c32a800652301843df06b9e8f68f0f7361",
"sha256:9dfd5197852530294ecb5795c97a823839258dfd5eb9420233c7cfedec2058f2",
"sha256:b160416adc0f012fb1f12588a5e6954889510f82f698e23ed4f4fa57f12a0647",
"sha256:b94042e5dcaa5d08cf104a54bfae614be502c6f44c9c89ad1535b2ebdaacbd4c",
"sha256:ba7209b608945b889457f949cc04c8e762bed4fe3fec88ae9a6b7765ae82e496",
"sha256:cc0e028b209a5483b6846053d5fd7165f460a1f14774d79e632e75e7ae64b82b",
"sha256:d8029b2d3e4b4cea770e9e5a0104dd8fa185c1724a0f01528ae4826a6d25f97d",
"sha256:da7f0445b71db6d3a72462e04f36544b0de871289b0bc8a7cc87c0f5ec7079fa",
"sha256:e2db6e85c057c16d0bd3b4d2b04f270a7467c147381e8fd73cbbe5bc719832be"
],
"version": "==20.1.0"
},
"cffi": {
"hashes": [
"sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5",
"sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef",
"sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104",
"sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426",
"sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405",
"sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375",
"sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a",
"sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e",
"sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc",
"sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf",
"sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185",
"sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497",
"sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3",
"sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35",
"sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c",
"sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83",
"sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21",
"sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca",
"sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984",
"sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac",
"sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd",
"sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee",
"sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a",
"sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2",
"sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192",
"sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7",
"sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585",
"sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f",
"sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e",
"sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27",
"sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b",
"sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e",
"sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e",
"sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d",
"sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c",
"sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415",
"sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82",
"sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02",
"sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314",
"sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325",
"sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c",
"sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3",
"sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914",
"sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045",
"sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d",
"sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9",
"sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5",
"sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2",
"sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c",
"sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3",
"sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2",
"sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8",
"sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d",
"sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d",
"sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9",
"sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162",
"sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76",
"sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4",
"sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e",
"sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9",
"sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6",
"sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b",
"sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01",
"sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"
],
"version": "==1.15.1"
},
"colored": {
"hashes": [
"sha256:056fac09d9e39b34296e7618897ed1b8c274f98423770c2980d829fd670955ed"
],
"version": "==1.4.2"
},
"cryptography": {
"hashes": [
"sha256:059e348f9a3c1950937e1b5d7ba1f8e968508ab181e75fc32b879452f08356db",
"sha256:1a5472d40c8f8e91ff7a3d8ac6dfa363d8e3138b961529c996f3e2df0c7a411a",
"sha256:1a8e6c2de6fbbcc5e14fd27fb24414507cb3333198ea9ab1258d916f00bc3039",
"sha256:1fee5aacc7367487b4e22484d3c7e547992ed726d14864ee33c0176ae43b0d7c",
"sha256:5d092fdfedaec4cbbffbf98cddc915ba145313a6fdaab83c6e67f4e6c218e6f3",
"sha256:5f0ff6e18d13a3de56f609dd1fd11470918f770c6bd5d00d632076c727d35485",
"sha256:7bfc55a5eae8b86a287747053140ba221afc65eb06207bedf6e019b8934b477c",
"sha256:7fa01527046ca5facdf973eef2535a27fec4cb651e4daec4d043ef63f6ecd4ca",
"sha256:8dde71c4169ec5ccc1087bb7521d54251c016f126f922ab2dfe6649170a3b8c5",
"sha256:8f4ab7021127a9b4323537300a2acfb450124b2def3756f64dc3a3d2160ee4b5",
"sha256:948224d76c4b6457349d47c0c98657557f429b4e93057cf5a2f71d603e2fc3a3",
"sha256:9a6c7a3c87d595608a39980ebaa04d5a37f94024c9f24eb7d10262b92f739ddb",
"sha256:b46e37db3cc267b4dea1f56da7346c9727e1209aa98487179ee8ebed09d21e43",
"sha256:b4ceb5324b998ce2003bc17d519080b4ec8d5b7b70794cbd2836101406a9be31",
"sha256:cb33ccf15e89f7ed89b235cff9d49e2e62c6c981a6061c9c8bb47ed7951190bc",
"sha256:d198820aba55660b4d74f7b5fd1f17db3aa5eb3e6893b0a41b75e84e4f9e0e4b",
"sha256:d34579085401d3f49762d2f7d6634d6b6c2ae1242202e860f4d26b046e3a1006",
"sha256:eb8163f5e549a22888c18b0d53d6bb62a20510060a22fd5a995ec8a05268df8a",
"sha256:f73bff05db2a3e5974a6fd248af2566134d8981fd7ab012e5dd4ddb1d9a70699"
],
"markers": "python_version >= '3.7'",
"version": "==41.0.1"
},
"evotum-cripto": {
"file": "https://gitlab.com/eVotUM/Cripto-py/-/archive/develop/Cripto-py-develop.zip",
"hashes": [
"sha256:95d09385b14dacad5f410f7e724a3f6f42791afbbdc024691622b67542c765fd"
],
"version": "==2.0"
},
"pycparser": {
"hashes": [
"sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9",
"sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"
],
"version": "==2.21"
},
"pycryptodome": {
"hashes": [
"sha256:19cb674df6c74a14b8b408aa30ba8a89bd1c01e23505100fb45f930fbf0ed0d9",
"sha256:1cfdb92dca388e27e732caa72a1cc624520fe93752a665c3b6cd8f1a91b34916",
"sha256:21ef416aa52802d22b9c11598d4e5352285bd9d6b5d868cde3e6bf2b22b4ebfb",
"sha256:27397aee992af69d07502126561d851ba3845aa808f0e55c71ad0efa264dd7d4",
"sha256:28f75e58d02019a7edc7d4135203d2501dfc47256d175c72c9798f9a129a49a7",
"sha256:2a68df525b387201a43b27b879ce8c08948a430e883a756d6c9e3acdaa7d7bd8",
"sha256:411745c6dce4eff918906eebcde78771d44795d747e194462abb120d2e537cd9",
"sha256:46e96aeb8a9ca8b1edf9b1fd0af4bf6afcf3f1ca7fa35529f5d60b98f3e4e959",
"sha256:4ed27951b0a17afd287299e2206a339b5b6d12de9321e1a1575261ef9c4a851b",
"sha256:50826b49fbca348a61529693b0031cdb782c39060fb9dca5ac5dff858159dc5a",
"sha256:5598dc6c9dbfe882904e54584322893eff185b98960bbe2cdaaa20e8a437b6e5",
"sha256:5c3c4865730dfb0263f822b966d6d58429d8b1e560d1ddae37685fd9e7c63161",
"sha256:5f19e6ef750f677d924d9c7141f54bade3cd56695bbfd8a9ef15d0378557dfe4",
"sha256:60febcf5baf70c566d9d9351c47fbd8321da9a4edf2eff45c4c31c86164ca794",
"sha256:62c488a21c253dadc9f731a32f0ac61e4e436d81a1ea6f7d1d9146ed4d20d6bd",
"sha256:6d3baaf82681cfb1a842f1c8f77beac791ceedd99af911e4f5fabec32bae2259",
"sha256:6e4227849e4231a3f5b35ea5bdedf9a82b3883500e5624f00a19156e9a9ef861",
"sha256:6e89bb3826e6f84501e8e3b205c22595d0c5492c2f271cbb9ee1c48eb1866645",
"sha256:70d807d11d508433daf96244ec1c64e55039e8a35931fc5ea9eee94dbe3cb6b5",
"sha256:76b1a34d74bb2c91bce460cdc74d1347592045627a955e9a252554481c17c52f",
"sha256:7798e73225a699651888489fbb1dbc565e03a509942a8ce6194bbe6fb582a41f",
"sha256:834b790bbb6bd18956f625af4004d9c15eed12d5186d8e57851454ae76d52215",
"sha256:843e5f10ecdf9d307032b8b91afe9da1d6ed5bb89d0bbec5c8dcb4ba44008e11",
"sha256:8f9f84059039b672a5a705b3c5aa21747867bacc30a72e28bf0d147cc8ef85ed",
"sha256:9000877383e2189dafd1b2fc68c6c726eca9a3cfb6d68148fbb72ccf651959b6",
"sha256:910e202a557e1131b1c1b3f17a63914d57aac55cf9fb9b51644962841c3995c4",
"sha256:946399d15eccebafc8ce0257fc4caffe383c75e6b0633509bd011e357368306c",
"sha256:a199e9ca46fc6e999e5f47fce342af4b56c7de85fae893c69ab6aa17531fb1e1",
"sha256:a3d8a9efa213be8232c59cdc6b65600276508e375e0a119d710826248fd18d37",
"sha256:a4599c0ca0fc027c780c1c45ed996d5bef03e571470b7b1c7171ec1e1a90914c",
"sha256:b17b0ad9faee14d6318f965d58d323b0b37247e1e0c9c40c23504c00f4af881e",
"sha256:b4e6b269a8ddaede774e5c3adbef6bf452ee144e6db8a716d23694953348cd86",
"sha256:b68794fba45bdb367eeb71249c26d23e61167510a1d0c3d6cf0f2f14636e62ee",
"sha256:b830fae2a46536ee830599c3c4af114f5228f31e54adac370767616a701a99dc",
"sha256:d7ec2bd8f57c559dd24e71891c51c25266a8deb66fc5f02cc97c7fb593d1780a",
"sha256:e15bde67ccb7d4417f627dd16ffe2f5a4c2941ce5278444e884cb26d73ecbc61",
"sha256:eb01f9997e4d6a8ec8a1ad1f676ba5a362781ff64e8189fe2985258ba9cb9706",
"sha256:f381036287c25d9809a08224ce4d012b7b7d50b6ada3ddbc3bc6f1f659365120",
"sha256:faa682c404c218e8788c3126c9a4b8fbcc54dc245b5b6e8ea5b46f3b63bd0c84"
],
"markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==3.9.9"
},
"pyopenssl": {
"hashes": [
"sha256:4c231c759543ba02560fcd2480c48dcec4dae34c9da7d3747c508227e0624b51",
"sha256:818ae18e06922c066f777a33f1fca45786d85edfe71cd043de6379337a7f274b"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==20.0.1"
},
"six": {
"hashes": [
"sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",
"sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'",
"version": "==1.15.0"
},
"utilitybelt": {
"hashes": [
"sha256:dafdb6a2dbb32e71d67a9cd35afd7c2e4993ec094e7ddb547df4cf46788770a4"
],
"version": "==0.2.6"
}
},
"develop": {}
}
```
</details>
| I can confirm this is an issue.
From what I can tell it was introduced in `2023.7.1`, more specifically https://github.com/pypa/pipenv/pull/5757.
I can't tell if this is intended as per that PR, but it doesn't look like it.
In my case, I have the following in my `Pipfile`:
`dc-django-utils = {file = "https://github.com/DemocracyClub/dc_django_utils/archive/refs/tags/2.1.6.tar.gz"}`
And I expect that to translate to a `requirements.txt` output of just the URL.
What I get is `dc-django-utils==2.1.6`.
As I say, this changed in `2023.7.1`.
Yes. I can confirm this. The URL has been completely ignored.
As @symroe said, the version 2023.6.26 works:
```
pip install pipenv==2023.6.26
``` | 2023-07-07T03:28:43Z | 2023-07-09T09:14:52Z | ["tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_multiple_sources", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_from_categories", "tests/integration/test_requirements.py::test_requirements_with_git_requirements", "tests/integration/test_requirements.py::test_requirements_hashes_get_included", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_without_env_var_expansion", "tests/integration/test_requirements.py::test_requirements_markers_get_excluded", "tests/integration/test_requirements.py::test_requirements_markers_get_included"] | [] | ["tests/integration/test_requirements.py::test_requirements_from_deps[deps1-True-True-expected1]", "tests/integration/test_requirements.py::test_requirements_from_deps[deps0-True-True-expected0]", "tests/integration/test_requirements.py::test_requirements_from_deps[deps2-True-True-expected2]"] | [] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .[tests]\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider --timeout 300 []\ninstall_command = python -m pip install {opts} {packages}\nusedevelop = True\n\n[testenv:coverage-report]\ndeps = coverage\nskip_install = true\ncommands =\n\tcoverage combine\n\tcoverage report\n\n[testenv:docs]\ndeps =\n -r{toxinidir}/docs/requirements.txt\n -e .[tests]\ncommands =\n sphinx-build -d {envtmpdir}/doctrees -b html docs docs/build/html\n sphinx-build -d {envtmpdir}/doctrees -b man docs docs/build/man\n\n[testenv:packaging]\ndeps =\n check-manifest\n readme_renderer\ncommands =\n check-manifest\n python setup.py check -m -r -s\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["certifi==2023.5.7", "charset-normalizer==3.2.0", "click==8.1.4", "distlib==0.3.6", "execnet==2.0.2", "filelock==3.12.2", "idna==3.4", "iniconfig==2.0.0", "packaging==23.1", "platformdirs==3.8.1", "pluggy==1.2.0", "pytest==7.4.0", "pytest-xdist==3.3.1", "requests==2.31.0", "setuptools==68.0.0", "urllib3==2.0.3", "virtualenv==20.23.1", "virtualenv-clone==0.5.7", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-5765 | 2e913386cc8ee781f7e902139c95ffc4c99243b9 | diff --git a/news/5765.bugfix.rst b/news/5765.bugfix.rst
new file mode 100644
index 0000000000..06c57c4b47
--- /dev/null
+++ b/news/5765.bugfix.rst
@@ -0,0 +1,1 @@
+Fixes regression on Pipfile requirements syntax. Ensure default operator is provided to requirement lib to avoid crash.
diff --git a/pipenv/vendor/requirementslib/models/requirements.py b/pipenv/vendor/requirementslib/models/requirements.py
index 8617a68189..1f672c6597 100644
--- a/pipenv/vendor/requirementslib/models/requirements.py
+++ b/pipenv/vendor/requirementslib/models/requirements.py
@@ -34,7 +34,7 @@
from pipenv.patched.pip._internal.req.req_install import InstallRequirement
from pipenv.patched.pip._internal.utils.temp_dir import global_tempdir_manager
from pipenv.patched.pip._internal.utils.urls import path_to_url, url_to_path
-from pipenv.patched.pip._vendor.distlib.util import cached_property
+from pipenv.patched.pip._vendor.distlib.util import cached_property, COMPARE_OP
from pipenv.patched.pip._vendor.packaging.markers import Marker
from pipenv.patched.pip._vendor.packaging.requirements import Requirement as PackagingRequirement
from pipenv.patched.pip._vendor.packaging.specifiers import (
@@ -2544,6 +2544,10 @@ def from_pipfile(cls, name, pipfile):
if hasattr(pipfile, "keys"):
_pipfile = dict(pipfile).copy()
_pipfile["version"] = get_version(pipfile)
+
+ # We ensure version contains an operator. Default to equals (==)
+ if _pipfile["version"] and COMPARE_OP.match(_pipfile["version"]) is None:
+ _pipfile["version"] = "=={}".format(_pipfile["version"])
vcs = next(iter([vcs for vcs in VCS_LIST if vcs in _pipfile]), None)
if vcs:
_pipfile["vcs"] = vcs
| diff --git a/tests/integration/test_install_basic.py b/tests/integration/test_install_basic.py
index 54bf7e8e56..cbbf052c29 100644
--- a/tests/integration/test_install_basic.py
+++ b/tests/integration/test_install_basic.py
@@ -90,6 +90,22 @@ def test_install_without_dev(pipenv_instance_private_pypi):
assert c.returncode == 0
[email protected]
[email protected]
+def test_install_with_version_req_default_operator(pipenv_instance_pypi):
+ """Ensure that running `pipenv install` work when spec is package = "X.Y.Z". """
+ with pipenv_instance_pypi(chdir=True) as p:
+ with open(p.pipfile_path, "w") as f:
+ contents = """
+[packages]
+fastapi = "0.95.0"
+ """.strip()
+ f.write(contents)
+ c = p.pipenv("install")
+ assert c.returncode == 0
+ assert "fastapi" in p.pipfile["packages"]
+
+
@pytest.mark.basic
@pytest.mark.install
def test_install_without_dev_section(pipenv_instance_pypi):
| Default specifier operator regression from v2023.6.18
### Issue description
Describe the issue briefly here.
Look like requirement lib update change the format expected in a Pipfile to specify version requirements
### Expected result
Expecting `package = "X.Y.Z"` to be a valid spec
### Actual result
Stack trace with `Invalid specifier: '0.95.0'`
### Steps to replicate
```
mkdir -p /tmp/pyenvbug
cd /tmp/pyenvbug/
virtualenv env
. env/bin/activate
echo -e '[packages]\nfastapi = "0.95.0"\n' > Pipfile
pip install pipenv==2023.6.26
pipenv install # fails with: Invalid specifier: '0.95.0'
pip install pipenv==2023.6.18
pipenv install # works
deactivate
cd
rm -rf /tmp/pyenvbug
```
Looking at the code, look like the operator is compulsory so that `package = "==X.Y.Z"` is the way to specify version requirement
Correct me if I am wrong, but the syntax `package = "X.Y.Z"` is / was expected to work before, right?
I have a bunch of Pipfile to fix with the "new" syntax if this is the way moving forward.
| You are probably right, this is likely a regression. If you see where to patch requirementslib or pipenv for this issue feel free to open a PR against pipenv and we can handle porting the fix over to reqlib -- otherwise I will look into it when I can get some more time. | 2023-06-30T18:14:50Z | 2023-07-04T20:43:45Z | ["tests/integration/test_install_basic.py::test_install_creates_pipfile", "tests/integration/test_install_basic.py::test_basic_dev_install", "tests/integration/test_install_basic.py::test_editable_no_args", "tests/integration/test_install_basic.py::test_install_does_not_exclude_packaging", "tests/integration/test_install_basic.py::test_bad_packages", "tests/integration/test_install_basic.py::test_create_pipfile_requires_python_full_version", "tests/integration/test_install_basic.py::test_install_without_dev_section", "tests/integration/test_install_basic.py::test_clean_on_empty_venv", "tests/integration/test_install_basic.py::test_install_does_not_extrapolate_environ", "tests/integration/test_install_basic.py::test_bad_mirror_install", "tests/integration/test_install_basic.py::test_install_venv_project_directory", "tests/integration/test_install_basic.py::test_install_will_supply_extra_pip_args", "tests/integration/test_install_basic.py::test_mirror_install", "tests/integration/test_install_basic.py::test_install_non_exist_dep", "tests/integration/test_install_basic.py::test_pinned_pipfile"] | [] | ["tests/integration/test_install_basic.py::test_install_with_version_req_default_operator"] | ["tests/integration/test_install_basic.py::test_basic_install - assert 1 == 0", "tests/integration/test_install_basic.py::test_system_and_deploy_work - assert 1 == 0", "tests/integration/test_install_basic.py::test_extras_install - assert 1 == 0", "tests/integration/test_install_basic.py::test_requirements_to_pipfile - AssertionError: assert 1 == 0", "tests/integration/test_install_basic.py::test_install_tarball_is_actually_installed", "tests/integration/test_install_basic.py::test_outline_table_specifier - AssertionError: assert 1 == 0", "tests/integration/test_install_basic.py::test_alternative_version_specifier - AssertionError: assert 1 == 0", "tests/integration/test_install_basic.py::test_install_without_dev - AssertionError: assert 1 == 0", "tests/integration/test_install_basic.py::test_install_package_with_dots - assert 1 == 0", "tests/integration/test_install_basic.py::test_install_dev_use_default_constraints - assert 1 == 0", "tests/integration/test_install_basic.py::test_rewrite_outline_table - assert 1 == 0", "tests/integration/test_install_basic.py::test_skip_requirements_when_pipfile - assert 1 == 0", "tests/integration/test_install_basic.py::test_backup_resolver - AssertionError: assert 1 == 0"] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .[tests]\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider --timeout 300 []\ninstall_command = python -m pip install {opts} {packages}\nusedevelop = True\n\n[testenv:coverage-report]\ndeps = coverage\nskip_install = true\ncommands =\n\tcoverage combine\n\tcoverage report\n\n[testenv:docs]\ndeps =\n -r{toxinidir}/docs/requirements.txt\n -e .[tests]\ncommands =\n sphinx-build -d {envtmpdir}/doctrees -b html docs docs/build/html\n sphinx-build -d {envtmpdir}/doctrees -b man docs docs/build/man\n\n[testenv:packaging]\ndeps =\n check-manifest\n readme_renderer\ncommands =\n check-manifest\n python setup.py check -m -r -s\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["certifi==2023.5.7", "charset-normalizer==3.1.0", "click==8.1.3", "distlib==0.3.6", "execnet==1.9.0", "filelock==3.12.2", "idna==3.4", "iniconfig==2.0.0", "packaging==23.1", "platformdirs==3.8.0", "pluggy==1.2.0", "pytest==7.4.0", "pytest-xdist==3.3.1", "requests==2.31.0", "setuptools==68.0.0", "urllib3==2.0.3", "virtualenv==20.23.1", "virtualenv-clone==0.5.7", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/pipenv | pypa__pipenv-5778 | 2e913386cc8ee781f7e902139c95ffc4c99243b9 | diff --git a/news/5777.bugfix.rst b/news/5777.bugfix.rst
new file mode 100644
index 0000000000..8ad522f389
--- /dev/null
+++ b/news/5777.bugfix.rst
@@ -0,0 +1,1 @@
+Ensure hashes included in a generated requirements file are after any markers.
diff --git a/pipenv/routines/requirements.py b/pipenv/routines/requirements.py
index de48db446d..0e4c6102d5 100644
--- a/pipenv/routines/requirements.py
+++ b/pipenv/routines/requirements.py
@@ -32,7 +32,7 @@ def requirements_from_deps(deps, include_hashes=True, include_markers=True):
if include_markers and "markers" in package_info
else ""
)
- pip_package = f"{package_name}=={version}{hashes}{markers}"
+ pip_package = f"{package_name}=={version}{markers}{hashes}"
# Append to the list
pip_packages.append(pip_package)
| diff --git a/tests/integration/test_requirements.py b/tests/integration/test_requirements.py
index 00fe63437e..ed957e892a 100644
--- a/tests/integration/test_requirements.py
+++ b/tests/integration/test_requirements.py
@@ -192,6 +192,33 @@ def test_requirements_markers_get_excluded(pipenv_instance_pypi):
assert c.returncode == 0
assert markers not in c.stdout
[email protected]
+def test_requirements_hashes_get_included(pipenv_instance_pypi):
+ package, version, markers = "werkzeug", "==2.1.2", "python_version >= '3.7'"
+ first_hash = "sha256:1ce08e8093ed67d638d63879fd1ba3735817f7a80de3674d293f5984f25fb6e6"
+ second_hash = "sha256:72a4b735692dd3135217911cbeaa1be5fa3f62bffb8745c5215420a03dc55255"
+ lockfile = {
+ "_meta": {"sources": []},
+ "default": {
+ package: {
+ "hashes": [
+ first_hash,
+ second_hash
+ ],
+ "markers": markers,
+ "version": version
+ }
+ },
+ "develop": {}
+ }
+
+ with pipenv_instance_pypi(chdir=True) as p:
+ with open(p.lockfile_path, 'w') as f:
+ json.dump(lockfile, f)
+
+ c = p.pipenv('requirements --hash')
+ assert c.returncode == 0
+ assert f'{package}{version}; {markers} --hash={first_hash} --hash={second_hash}' in c.stdout
def test_requirements_generates_requirements_from_lockfile_without_env_var_expansion(
pipenv_instance_pypi,
| Requirements output different since 2023.7.1 causing pip install issues
### Issue description
The output of `pipenv requirements --hash` has changed slightly in `2023.7.1` (#5757) and `pip` appears to be sensitive to it in some scenarios, causing `pip` to be unable to install the package(s) from the generated requirements.txt.
Snippet of requirements.txt generated with `2023.6.26`
```
pyzip==0.2.0 ; python_version >= '3.1' --hash=sha256:c0b10776d798e4be9d5fe6eec541dd0a9740b6550b12fd4cfa238a085686a298
```
Snippet of requirements.txt generated with `2023.7.1` - The hash is now before the marker
```
pyzip==0.2.0 --hash=sha256:c0b10776d798e4be9d5fe6eec541dd0a9740b6550b12fd4cfa238a085686a298; python_version >= '3.1'
```
### Expected result
- `2023.7.1` generates a requirements.txt as per `2023.6.26`
### Actual result
- `2023.7.1` generates a slightly different requirements.txt
### Steps to replicate
Pip successfully installs the package with the `2023.6.26` requirements.txt:
```
$ pipenv run pip --version
pip 23.1.2
$ cat requirements_2023.6.26.txt
pyzip==0.2.0 ; python_version >= '3.1' --hash=sha256:c0b10776d798e4be9d5fe6eec541dd0a9740b6550b12fd4cfa238a085686a298
$ pipenv run pip install -r requirements_2023.6.26.txt -t test_dir
Collecting pyzip==0.2.0 (from -r requirements_2023.6.26.txt (line 1))
Using cached pyzip-0.2.0-py3-none-any.whl
Installing collected packages: pyzip
Successfully installed pyzip-0.2.0
```
Pip fails to install the package with the `2023.7.3` requirements.txt, thinking there is a hash mismatch even though it displays two identical shas:
```
$ pipenv run pip --version
pip 23.1.2
$ cat requirements_2023.7.1.txt
pyzip==0.2.0 --hash=sha256:c0b10776d798e4be9d5fe6eec541dd0a9740b6550b12fd4cfa238a085686a298; python_version >= '3.1'
$ pipenv run pip install -r requirements_2023.7.1.txt -t test_dir
Collecting pyzip==0.2.0 (from -r requirements_2023.7.1.txt (line 1))
Using cached pyzip-0.2.0-py3-none-any.whl
WARNING: The hashes of the source archive found in cache entry don't match, ignoring cached built wheel and re-downloading source.
Using cached pyzip-0.2.0.tar.gz (6.3 kB)
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
pyzip==0.2.0 from https://files.pythonhosted.org/packages/40/72/e29470ecfb5f2bc8cdd2a1b8a6aa14af8d44aa08fe5efa407cd991ce2c64/pyzip-0.2.0.tar.gz (from -r requirements_2023.7.1.txt (line 1)):
Expected sha256 c0b10776d798e4be9d5fe6eec541dd0a9740b6550b12fd4cfa238a085686a298;
Got c0b10776d798e4be9d5fe6eec541dd0a9740b6550b12fd4cfa238a085686a298
```
I will raise a PR with a fix for consideration.
| 2023-07-04T00:22:16Z | 2023-07-04T01:53:46Z | ["tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_multiple_sources", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_from_categories", "tests/integration/test_requirements.py::test_requirements_markers_get_excluded", "tests/integration/test_requirements.py::test_requirements_markers_get_included", "tests/integration/test_requirements.py::test_requirements_with_git_requirements"] | [] | ["tests/integration/test_requirements.py::test_requirements_hashes_get_included", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_without_env_var_expansion"] | [] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .[tests]\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider --timeout 300 []\ninstall_command = python -m pip install {opts} {packages}\nusedevelop = True\n\n[testenv:coverage-report]\ndeps = coverage\nskip_install = true\ncommands =\n\tcoverage combine\n\tcoverage report\n\n[testenv:docs]\ndeps =\n -r{toxinidir}/docs/requirements.txt\n -e .[tests]\ncommands =\n sphinx-build -d {envtmpdir}/doctrees -b html docs docs/build/html\n sphinx-build -d {envtmpdir}/doctrees -b man docs docs/build/man\n\n[testenv:packaging]\ndeps =\n check-manifest\n readme_renderer\ncommands =\n check-manifest\n python setup.py check -m -r -s\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["certifi==2023.5.7", "charset-normalizer==3.1.0", "click==8.1.3", "distlib==0.3.6", "execnet==1.9.0", "filelock==3.12.2", "idna==3.4", "iniconfig==2.0.0", "packaging==23.1", "platformdirs==3.8.0", "pluggy==1.2.0", "pytest==7.4.0", "pytest-xdist==3.3.1", "requests==2.31.0", "setuptools==68.0.0", "urllib3==2.0.3", "virtualenv==20.23.1", "virtualenv-clone==0.5.7", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
pypa/pipenv | pypa__pipenv-5757 | 7c3f6866a3c9676f79a9388014869b07cd8279cc | diff --git a/news/5755.bugfix.rst b/news/5755.bugfix.rst
new file mode 100644
index 0000000000..6cbf807c8b
--- /dev/null
+++ b/news/5755.bugfix.rst
@@ -0,0 +1,1 @@
+Fix regression in ``requirements`` command that was causing package installs after upgrade to ``requirementslib==3.0.0``.
diff --git a/pipenv/cli/command.py b/pipenv/cli/command.py
index 49ae42b42b..df39a56353 100644
--- a/pipenv/cli/command.py
+++ b/pipenv/cli/command.py
@@ -1,5 +1,4 @@
import os
-import re
import sys
from pipenv import environments
@@ -23,7 +22,6 @@
upgrade_options,
verbose_option,
)
-from pipenv.utils.dependencies import get_lockfile_section_using_pipfile_category
from pipenv.utils.environment import load_dot_env
from pipenv.utils.processes import subprocess_run
from pipenv.vendor import click
@@ -780,40 +778,17 @@ def verify(state):
def requirements(
state, dev=False, dev_only=False, hash=False, exclude_markers=False, categories=""
):
- from pipenv.utils.dependencies import convert_deps_to_pip
+ from pipenv.routines.requirements import generate_requirements
- lockfile = state.project.load_lockfile(expand_env_vars=False)
-
- for i, package_index in enumerate(lockfile["_meta"]["sources"]):
- prefix = "-i" if i == 0 else "--extra-index-url"
- echo(" ".join([prefix, package_index["url"]]))
-
- deps = {}
- categories_list = re.split(r", *| ", categories) if categories else []
-
- if categories_list:
- for category in categories_list:
- category = get_lockfile_section_using_pipfile_category(category.strip())
- deps.update(lockfile.get(category, {}))
- else:
- if dev or dev_only:
- deps.update(lockfile["develop"])
- if not dev_only:
- deps.update(lockfile["default"])
-
- pip_deps = convert_deps_to_pip(
- deps,
- project=None,
- include_index=False,
+ generate_requirements(
+ project=state.project,
+ dev=dev,
+ dev_only=dev_only,
include_hashes=hash,
include_markers=not exclude_markers,
+ categories=categories,
)
- for d in pip_deps:
- echo(d)
-
- sys.exit(0)
-
if __name__ == "__main__":
cli()
diff --git a/pipenv/routines/requirements.py b/pipenv/routines/requirements.py
new file mode 100644
index 0000000000..de48db446d
--- /dev/null
+++ b/pipenv/routines/requirements.py
@@ -0,0 +1,78 @@
+import re
+import sys
+
+from pipenv.utils.dependencies import get_lockfile_section_using_pipfile_category
+from pipenv.vendor import click
+
+
+def requirements_from_deps(deps, include_hashes=True, include_markers=True):
+ pip_packages = []
+
+ for package_name, package_info in deps.items():
+ # Handling git repositories
+ if "git" in package_info:
+ git = package_info["git"]
+ ref = package_info.get("ref", "")
+ extras = (
+ "[{}]".format(",".join(package_info.get("extras", [])))
+ if "extras" in package_info
+ else ""
+ )
+ pip_package = f"{package_name}{extras} @ git+{git}@{ref}"
+ else:
+ # Handling packages with hashes and markers
+ version = package_info.get("version", "").replace("==", "")
+ hashes = (
+ " --hash={}".format(" --hash=".join(package_info["hashes"]))
+ if include_hashes and "hashes" in package_info
+ else ""
+ )
+ markers = (
+ "; {}".format(package_info["markers"])
+ if include_markers and "markers" in package_info
+ else ""
+ )
+ pip_package = f"{package_name}=={version}{hashes}{markers}"
+
+ # Append to the list
+ pip_packages.append(pip_package)
+
+ # pip_packages contains the pip-installable lines
+ return pip_packages
+
+
+def generate_requirements(
+ project,
+ dev=False,
+ dev_only=False,
+ include_hashes=False,
+ include_markers=True,
+ categories="",
+):
+ lockfile = project.load_lockfile(expand_env_vars=False)
+
+ for i, package_index in enumerate(lockfile["_meta"]["sources"]):
+ prefix = "-i" if i == 0 else "--extra-index-url"
+ click.echo(" ".join([prefix, package_index["url"]]))
+
+ deps = {}
+ categories_list = re.split(r", *| ", categories) if categories else []
+
+ if categories_list:
+ for category in categories_list:
+ category = get_lockfile_section_using_pipfile_category(category.strip())
+ deps.update(lockfile.get(category, {}))
+ else:
+ if dev or dev_only:
+ deps.update(lockfile["develop"])
+ if not dev_only:
+ deps.update(lockfile["default"])
+
+ pip_installable_lines = requirements_from_deps(
+ deps, include_hashes=include_hashes, include_markers=include_markers
+ )
+
+ for line in pip_installable_lines:
+ click.echo(line)
+
+ sys.exit(0)
| diff --git a/tests/integration/test_requirements.py b/tests/integration/test_requirements.py
index fb0a8b0c3b..9ffad56b04 100644
--- a/tests/integration/test_requirements.py
+++ b/tests/integration/test_requirements.py
@@ -163,7 +163,7 @@ def test_requirements_markers_get_included(pipenv_instance_pypi):
c = p.pipenv('requirements')
assert c.returncode == 0
- assert f'{package}{version} ; {markers}' in c.stdout
+ assert f'{package}{version}; {markers}' in c.stdout
@pytest.mark.requirements
| `pipenv requirements` now requiring installation of VCS modules
### Issue description
This is less a "bug" per se, but it is absolutely a change in behavior that was not marked in the release notes, so I'm not sure if it was intended or not. Also, it's not clear *why* `pipenv requirements` needs to install via VCS, I would've assumed it's a simple translation of the `Pipfile.lock` file.
As a side note, this was also a breaking change for us, because we use `pipenv requirements` in places where ssh keys are not always available.
### Steps to replicate
Pipfile:
```
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
pyjwt = {extras = ["crypto"], editable = true, ref = "2.6.0", git = "ssh://[email protected]/jpadilla/pyjwt.git"}
[dev-packages]
[requires]
python_version = "3.9"
```
Lock the above with `pipenv lock`. Then run `pipenv requirements` with the two versions:
```
> pip install "pipenv==2023.6.18"
> pipenv requirements
...
cffi==1.15.1
cryptography==41.0.1 ; python_version >= '3.7'
pycparser==2.21
-e git+ssh://[email protected]/jpadilla/pyjwt.git@7665aa625506a11bae50b56d3e04413a3dc6fdf8#egg=pyjwt[crypto]
```
This is also very fast and shows no indication of network calls
```
> pip install "pipenv==2023.6.26"
> pipenv requirements
...
INFO:root:running egg_info
INFO:root:creating /var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/reqlib-src9gkpd_ke/pyjwt/reqlib-metadata/PyJWT.egg-info
INFO:root:writing /var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/reqlib-src9gkpd_ke/pyjwt/reqlib-metadata/PyJWT.egg-info/PKG-INFO
INFO:root:writing dependency_links to /var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/reqlib-src9gkpd_ke/pyjwt/reqlib-metadata/PyJWT.egg-info/dependency_links.txt
INFO:root:writing requirements to /var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/reqlib-src9gkpd_ke/pyjwt/reqlib-metadata/PyJWT.egg-info/requires.txt
INFO:root:writing top-level names to /var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/reqlib-src9gkpd_ke/pyjwt/reqlib-metadata/PyJWT.egg-info/top_level.txt
INFO:root:writing manifest file '/var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/reqlib-src9gkpd_ke/pyjwt/reqlib-metadata/PyJWT.egg-info/SOURCES.txt'
INFO:root:reading manifest file '/var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/reqlib-src9gkpd_ke/pyjwt/reqlib-metadata/PyJWT.egg-info/SOURCES.txt'
INFO:root:reading manifest template 'MANIFEST.in'
WARNING:root:warning: no previously-included files found matching 'codecov.yml'
WARNING:root:warning: no previously-included files matching '*' found under directory 'docs/_build'
WARNING:root:warning: no previously-included files matching '*.py[co]' found under directory '*'
WARNING:root:warning: no previously-included files matching '__pycache__' found under directory '*'
INFO:root:adding license file 'LICENSE'
INFO:root:adding license file 'AUTHORS.rst'
INFO:root:writing manifest file '/var/folders/jh/0_l94d8n51n2gjzt_5l8mv8r0000gq/T/reqlib-src9gkpd_ke/pyjwt/reqlib-metadata/PyJWT.egg-info/SOURCES.txt'
/.../.pyenv/versions/3.9.16/lib/python3.9/site-packages/pipenv/patched/pip/_internal/models/link.py:391: PipDeprecationWarning: DEPRECATION: git+ssh://****@github.com/jpadilla/pyjwt.git@7665aa625506a11bae50b56d3e04413a3dc6fdf8#egg=pyjwt[crypto] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
deprecated(
cffi==1.15.1
cryptography==41.0.1 ; python_version >= '3.7'
pycparser==2.21
-e git+ssh://[email protected]/jpadilla/pyjwt.git@7665aa625506a11bae50b56d3e04413a3dc6fdf8#egg=pyjwt[crypto]
```
This takes quite a bit longer, and includes the network calls, etc.
Note, I have removed the deprecation warnings mentioned in #5626.
| This was a side-effect in my larger refactor of requirementslib to version 3.0.0 -- while the goal was to migrate away from attrs to pydantic, I encountered some weird behaviors with some of the prior requirementslib code. The problem here is the requirementslib method is used to just go with the name `pyjwt` from your Pipfile line if it could, but that might actually be a different name than the package metadata so now requirementslib now has to obtain the package and generate the actual metadata to get the name, which I think is technically the more correct thing to do. I didn't really see a way around moving requirementslib away from the idea of working with fake package lines.
Another thing is that Pipfile still uses the old syntax which raises a warning:
```
git+ssh://[email protected]/jpadilla/pyjwt.git@7665aa625506a11bae50b56d3e04413a3dc6fdf8#egg=pyjwt[crypto]
```
Both of these are accepted without a warning:
```
pip install "pyjwt[crypto] @ git+https://github.com/jpadilla/pyjwt.git"
pip install " "pyjwt[crypto] @ git+ssh://[email protected]/jpadilla/pyjwt.git"
```
However, these trigger an exception from requirementslib.
```
$ pipenv lock
Locking [packages] dependencies...
Building requirements...
Traceback (most recent call last):
File "/home/oznt/.local/share/virtualenvs/pipenv-H8EVR25f/bin/pipenv", line 8, in <module>
sys.exit(cli())
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/oznt/Software/pypa/pipenv/pipenv/cli/options.py", line 58, in main
return super().main(*args, **kwargs, windows_expand_args=False)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/oznt/Software/pypa/pipenv/pipenv/cli/command.py", line 369, in lock
do_lock(
File "/home/oznt/Software/pypa/pipenv/pipenv/routines/lock.py", line 79, in do_lock
venv_resolve_deps(
File "/home/oznt/Software/pypa/pipenv/pipenv/utils/resolver.py", line 1029, in venv_resolve_deps
deps = convert_deps_to_pip(deps, project, include_index=True)
File "/home/oznt/Software/pypa/pipenv/pipenv/utils/dependencies.py", line 285, in convert_deps_to_pip
new_dep = Requirement.from_pipfile(dep_name, dep)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 2749, in from_pipfile
r = VCSRequirement.from_pipfile(name, pipfile)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/requirementslib/models/requirements.py", line 2274, in from_pipfile
cls_inst = cls(**creation_args) # type: ignore
File "<attrs generated init pipenv.vendor.requirementslib.models.requirements.VCSRequirement>", line 38, in __init__
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/attr/validators.py", line 269, in __call__
self.validator(inst, attr, value)
File "/home/oznt/Software/pypa/pipenv/pipenv/vendor/requirementslib/models/utils.py", line 571, in validate_path
raise ValueError("Invalid path {0!r}".format(value))
ValueError: Invalid path 'pyjwt[crypto] @ git+https://github.com/jpadilla/pyjwt.git'
```
@oz123 that issue is being tracked by https://github.com/pypa/pipenv/issues/5626
Hi @matteius Thanks for the response here. I understand your point about trying to determine the "real" name, but I have a few questions:
- Can this not rather be determined at the point of installation/lock and appropriately stored in the `Pipfile.lock`? It seems like it could then "fail" if the names were inconsistent. I think it is more expected that a `pipenv install` or `pipenv lock` can initiate network calls and require access to the underlying modules.
- Does PEP 508 give guidance here about what to do in the case of inconsistency?
My general issue is that, as a user, I would expect `pipenv requirements` to simply translate the `Pipfile.lock` file. I would also expect the `Pipfile.lock` to have sufficient information so as not to require network calls.
> Does PEP 508 give guidance here about what to do in the case of inconsistency?
Not as far as I can tell.
> I would expect pipenv requirements to simply translate the Pipfile.lock file.
@mgmarino This is a good point, and I think it ultimately should be doing that, but it was built re-using `convert_deps_to_pip` which uses `new_dep = Requirement.from_pipfile(dep_name, dep)` which generates the requirements line with `new_dep.as_line` and those are the same functions that are used to generate the lock file and the install lines.
Ultimately I'll treat this as a regression, and would be fine with moving towards requirements having its own functions that live outside requirementslib, since I am not convinced the re-use there is worth it. There may be a couple other requirements command issue reports that are hard to solve because of this re-use as well. Plus requirementslib needs additional refactor in the long run, and you are right that the lock should contain everything needed to generate the requirements.
@matteius Ok, thanks for all your efforts here! For the moment, where this causes us issues, we will pin `pipenv` to `2023.6.18`. | 2023-06-28T12:41:36Z | 2023-06-30T03:52:19Z | ["tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_from_categories", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile", "tests/integration/test_requirements.py::test_requirements_markers_get_excluded", "tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_multiple_sources"] | [] | ["tests/integration/test_requirements.py::test_requirements_generates_requirements_from_lockfile_without_env_var_expansion", "tests/integration/test_requirements.py::test_requirements_markers_get_included"] | [] | {"install": ["uv pip install -e .", "pipenv install --dev"], "pre_install": ["tee tests/fixtures/fake-package/tox.ini <<EOF_1234810234\n[tox]\nenvlist =\n docs, packaging, py27, py35, py36, py37, coverage-report\n\n[testenv]\npassenv = CI GIT_SSL_CAINFO\nsetenv =\n LC_ALL = en_US.UTF-8\ndeps =\n\tcoverage\n\t-e .[tests]\ncommands = coverage run --parallel -m pytest --color=no -rA --tb=no -p no:cacheprovider --timeout 300 []\ninstall_command = python -m pip install {opts} {packages}\nusedevelop = True\n\n[testenv:coverage-report]\ndeps = coverage\nskip_install = true\ncommands =\n\tcoverage combine\n\tcoverage report\n\n[testenv:docs]\ndeps =\n -r{toxinidir}/docs/requirements.txt\n -e .[tests]\ncommands =\n sphinx-build -d {envtmpdir}/doctrees -b html docs docs/build/html\n sphinx-build -d {envtmpdir}/doctrees -b man docs docs/build/man\n\n[testenv:packaging]\ndeps =\n check-manifest\n readme_renderer\ncommands =\n check-manifest\n python setup.py check -m -r -s\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["certifi==2023.5.7", "charset-normalizer==3.1.0", "click==8.1.3", "distlib==0.3.6", "execnet==1.9.0", "filelock==3.12.2", "idna==3.4", "iniconfig==2.0.0", "packaging==23.1", "platformdirs==3.8.0", "pluggy==1.2.0", "pytest==7.4.0", "pytest-xdist==3.3.1", "requests==2.31.0", "setuptools==68.0.0", "urllib3==2.0.3", "virtualenv==20.23.1", "virtualenv-clone==0.5.7", "wheel==0.44.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
pypa/bandersnatch | pypa__bandersnatch-1765 | ee74573c12cbed7941efaae038a0055ecff4d15d | diff --git a/CHANGES.md b/CHANGES.md
index 6973aa850..c42e6924c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -9,13 +9,14 @@
- Move Docker images to 3.12 (PR #1733)
- Removing swift builds due to lack or assistance - Happy to bring back if you're willing to help maintian
- Move black, mypy + pyupgrade to >= 3.11 codebase (PR #1734)
+- Allow non-HTTPS-enabled mirrors (PR #1765)
## Documentation
- Updated documentation for `[mirror]` configuration options `PR #1669`
- Updated documentation `PR #1760`
-## Big Fixes
+## Bug Fixes
- Fix config file value interpolation for the `diff-file` option `PR #1715`
- Fix diff-file being created when the option wasn't set `PR #1716`
diff --git a/docs/mirror_configuration.md b/docs/mirror_configuration.md
index bb5d47186..b080227dd 100644
--- a/docs/mirror_configuration.md
+++ b/docs/mirror_configuration.md
@@ -52,6 +52,18 @@ download-mirror = https://pypi-mirror.example.com/
This will download release files from `https://pypi-mirror.example.com` if possible and fall back to PyPI if a download fails. See [](#download-mirror). Add [](#download-mirror-no-fallback) to download release files exclusively from `download-mirror`.
+If you are using a download source that does not have HTTPS support, you can supply this configuration:
+
+```ini
+[mirror]
+...
+allow-non-https = true
+...
+```
+
+**Note**: It is not recommended to use this option in production environments as it may expose you to security vulnerabilities.
+Always ensure your PyPI server is running over `https://` in production.
+
### Index Files Only
It is possible to mirror just index files without downloading any package release files:
diff --git a/src/bandersnatch/defaults.conf b/src/bandersnatch/defaults.conf
index ca1cbc709..ee041dbf4 100644
--- a/src/bandersnatch/defaults.conf
+++ b/src/bandersnatch/defaults.conf
@@ -9,6 +9,7 @@ master = https://pypi.org
proxy =
download-mirror =
download-mirror-no-fallback = false
+allow-non-https = false
json = false
release-files = true
diff --git a/src/bandersnatch/master.py b/src/bandersnatch/master.py
index 6a8ed6cc3..34c4ed876 100644
--- a/src/bandersnatch/master.py
+++ b/src/bandersnatch/master.py
@@ -41,13 +41,15 @@ def __init__(
timeout: float = 10.0,
global_timeout: float | None = FIVE_HOURS_FLOAT,
proxy: str | None = None,
+ allow_non_https: bool = False,
) -> None:
self.proxy = proxy
self.loop = asyncio.get_event_loop()
self.timeout = timeout
self.global_timeout = global_timeout or FIVE_HOURS_FLOAT
self.url = url
- if self.url.startswith("http://"):
+ self.allow_non_https = allow_non_https
+ if self.url.startswith("http://") and not self.allow_non_https:
err = f"Master URL {url} is not https scheme"
logger.error(err)
raise ValueError(err)
diff --git a/src/bandersnatch/mirror.py b/src/bandersnatch/mirror.py
index 4f552d5a1..2cda42262 100644
--- a/src/bandersnatch/mirror.py
+++ b/src/bandersnatch/mirror.py
@@ -970,6 +970,7 @@ async def mirror(
)
mirror_url = config.get("mirror", "master")
+ allow_non_https = config.getboolean("mirror", "allow-non-https")
timeout = config.getfloat("mirror", "timeout")
global_timeout = config.getfloat("mirror", "global-timeout", fallback=None)
proxy = config.get("mirror", "proxy", fallback=None)
@@ -978,7 +979,9 @@ async def mirror(
# Always reference those classes here with the fully qualified name to
# allow them being patched by mock libraries!
- async with Master(mirror_url, timeout, global_timeout, proxy) as master:
+ async with Master(
+ mirror_url, timeout, global_timeout, proxy, allow_non_https
+ ) as master:
mirror = BandersnatchMirror(
homedir,
master,
| diff --git a/src/bandersnatch/tests/test_configuration.py b/src/bandersnatch/tests/test_configuration.py
index 900574144..b4969b96a 100644
--- a/src/bandersnatch/tests/test_configuration.py
+++ b/src/bandersnatch/tests/test_configuration.py
@@ -59,6 +59,7 @@ def test_single_config__default__mirror__setting_attributes(self) -> None:
self.assertSetEqual(
options,
{
+ "allow-non-https",
"cleanup",
"compare-method",
"diff-append-epoch",
| Add config/CLI arg to override https:// check for local mirrors (development)
When attempting to run a banderstnatch mirror against a locally-running index on port 80, a an exception is raised.
https://github.com/pypa/bandersnatch/blob/131438f40536c83c5074af90e2e337dfdadffebb/src/bandersnatch/master.py#L50-L53
Feature: Add a configuration parameter or CLI argument to skip the `https://` check and allow insecure targets.
| 2024-07-02T17:27:32Z | 2024-07-05T15:33:33Z | ["src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_invalid_diff_file_reference_throws_exception", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_boolean", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__mirror__setting__types", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_str", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_multiple_instances_custom_setting_str", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_is_singleton", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__all_sections_present", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_int", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values_download_mirror_false_sets_no_fallback", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_diff_file_reference", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values"] | [] | ["src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__mirror__setting_attributes", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values_release_files_false_sets_root_uri"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cacheprovider\n\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py3\n\n[testenv]\ncommands =\n coverage run -m pytest --color=no -rA --tb=no -p no:cacheprovider --strict-markers {posargs}\n coverage report -m\n coverage html\n coverage xml\ndeps =\n -r requirements.txt\n -r requirements_s3.txt\n -r requirements_swift.txt\n -r requirements_test.txt\npassenv =\n os\n CI\n\n[testenv:doc_build]\nbasepython=python3\ncommands =\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b html docs docs/html\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b linkcheck docs docs/html\nchangedir = {toxinidir}\ndeps = -r requirements_docs.txt\n\nextras = doc_build\npassenv = SSH_AUTH_SOCK\nsetenv =\n SPHINX_THEME=\\'pypa\\'\n\n[isort]\natomic = true\nnot_skip = __init__.py\nline_length = 88\nmulti_line_output = 3\nforce_grid_wrap = 0\nuse_parentheses=True\ninclude_trailing_comma = True\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["aiohttp==3.9.5", "aiohttp-socks==0.8.4", "aiohttp-xmlrpc==1.5.0", "aiosignal==1.3.1", "async-timeout==4.0.3", "attrs==23.2.0", "black==24.4.2", "cachetools==5.3.3", "cfgv==3.4.0", "chardet==5.2.0", "click==8.1.7", "colorama==0.4.6", "coverage==7.5.2", "distlib==0.3.8", "filelock==3.15.1", "flake8==7.1.0", "flake8-bugbear==24.4.26", "freezegun==1.5.1", "frozenlist==1.4.1", "humanfriendly==10.0", "identify==2.5.36", "idna==3.7", "importlib-metadata==7.1.0", "iniconfig==2.0.0", "lxml==5.2.2", "mccabe==0.7.0", "multidict==6.0.5", "mypy==1.10.1", "mypy-extensions==1.0.0", "nodeenv==1.9.1", "packaging==24.1", "pathspec==0.12.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pre-commit==3.7.1", "pycodestyle==2.12.0", "pyflakes==3.2.0", "pyparsing==3.1.2", "pyproject-api==1.7.1", "pytest==7.4.4", "pytest-asyncio==0.23.7", "pytest-timeout==2.3.1", "python-dateutil==2.9.0.post0", "python-socks==2.5.0", "pyyaml==6.0.1", "setuptools==70.1.1", "six==1.16.0", "tox==4.15.0", "types-filelock==3.2.7", "types-freezegun==1.1.10", "types-pkg-resources==0.1.3", "typing-extensions==4.12.2", "virtualenv==20.26.3", "wheel==0.44.0", "yarl==1.9.4", "zipp==3.19.2"]} | tox -e py3 -- | null | null | null | swa-bench:sw.eval |
|
pypa/bandersnatch | pypa__bandersnatch-1740 | 1561917a21d691b8dd482236a62441b5db0b6926 | diff --git a/CHANGES.md b/CHANGES.md
index 63fb44432..0a0833305 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -17,6 +17,7 @@
- Fix config file value interpolation for the `diff-file` option `PR #1715`
- Fix diff-file being created when the option wasn't set `PR #1716`
+- Provide default values for most config options in the `[mirror]` section `PR #1740`
## Deprecation
diff --git a/docs/mirror_configuration.md b/docs/mirror_configuration.md
index 9b0a32a8f..bb5d47186 100644
--- a/docs/mirror_configuration.md
+++ b/docs/mirror_configuration.md
@@ -5,12 +5,6 @@ The **\[mirror\]** section of the configuration file contains general options fo
The following options are currently _required_:
- [](#directory)
-- [](#master)
-- [](#workers)
-- [](#timeout)
-- [](#global-timeout)
-- [](#stop-on-error)
-- [](#hash-index)
## Examples
@@ -18,7 +12,7 @@ These examples only show `[mirror]` options; a complete configuration may includ
### Minmal
-A basic configuration with reasonable defaults for the required options:
+A basic configuration showing some of the more common options:
```ini
[mirror]
@@ -39,9 +33,6 @@ global-timeout = 18000
; continue syncing when an error occurs
stop-on-error = false
-
-; use PyPI-compatible folder structure for index files
-hash-index = false
```
This will mirror index files and package release files from PyPI and store the mirror in `/srv/pypi`. Add configuration for [mirror filtering plugins][filter-plugins] to optionally filter what packages are mirrored in a variety of ways.
@@ -57,13 +48,6 @@ directory = /srv/pypi
master = https://pypi.org
; Package distribution artifacts downloaded from here if possible
download-mirror = https://pypi-mirror.example.com/
-
-; required options from basic config
-workers = 3
-timeout = 15
-global-timeout = 18000
-stop-on-error = false
-hash-index = false
```
This will download release files from `https://pypi-mirror.example.com` if possible and fall back to PyPI if a download fails. See [](#download-mirror). Add [](#download-mirror-no-fallback) to download release files exclusively from `download-mirror`.
@@ -79,13 +63,6 @@ master = https://pypi.org
simple-format = ALL
release-files = false
root_uri = https://files.pythonhosted.org/
-
-; required options from basic config
-workers = 3
-timeout = 15
-global-timeout = 18000
-stop-on-error = false
-hash-index = false
```
This will mirror index files for projects and versions allowed by your [mirror filters][filter-plugins], but will not download any package release files. File URLs in index files will use the configured `root_uri`. See [](#release-files) and [](#root_uri).
@@ -169,9 +146,9 @@ A base URL to generate absolute URLs for package release files.
:Type: URL
:Required: no
-:Default: `https://files.pythonhosted.org/`
+:Default: dynamic; see description
-Bandersnatch creates index files containing relative URLs by default. Setting this option generates index files with absolute URLs instead.
+Bandersnatch creates index files containing relative URLs by default. Setting this option generates index files with absolute URLs instead, using the specified string for the base URL.
If [](#release-files) is disabled _and_ this option is unset, Bandersnatch uses a default value of `https://files.pythonhosted.org/`.
@@ -185,9 +162,9 @@ File location to write a list of all new or changed files during a mirror operat
:Type: file or folder path
:Required: no
-:Default: `<mirror directory>/mirrored-files`
+:Default: none
-Bandersnatch creates a plain-text file at the specified location containing a list of all files created or updated during the last mirror/sync operation. The files are listed as absolute paths separated by blank lines.
+If set, Bandersnatch creates a plain-text file at the specified location containing a list of all files created or updated during the last mirror/sync operation. The files are listed as absolute paths, one per line.
This is useful when mirroring to an offline network where it is required to only transfer new files to the downstream mirror. The diff file can be used to copy new files to an external drive, sync the list of files to an SSH destination such as a diode, or send the files through some other mechanism to an offline system.
@@ -233,7 +210,8 @@ Will generate diff files with names like `/srv/pypi/new-files-1568129735`. This
Group generated project index folders by the first letter of their normalized project name.
:Type: boolean
-:Required: **yes**
+:Required: no
+:Default: false
Enabling this changes the way generated index files are organized. Project folders are grouped into subfolders alphabetically as shown here: [](#hash-index-index-files). This has the effect of splitting up a large `/web/simple` directory into smaller subfolders, each containing a subset of the index files. This can improve file system efficiency when mirroring a very large number of projects, but requires a web server capable of translating Simple Repository API URLs into file paths.
@@ -275,14 +253,17 @@ rewrite ^/simple/([^/])([^/]*)/([^/]+)$/ /simple/$1/$1$2/$3 last;
The URL of the Python package repository server to mirror.
:Type: URL
-:Required: **yes**
-
-Bandersnatch requests metadata for projects and packages from this repository server, and downloads package release files from the URLs specified in the received metadata.
+:Required: no
+:Default: `https://pypi.org`
-To mirror packages from PyPI, set this to `https://pypi.org`.
+Bandersnatch requests metadata for projects and packages from this repository server, and downloads package release files from the URLs specified in the received metadata. The default value mirrors packages from PyPI.
The URL _must_ use the `https:` protocol.
+```{note}
+The specified server must support [PyPI's JSON API](https://warehouse.pypa.io/api-reference/json.html) for Bandersnatch to mirror any projects.
+```
+
```{seealso}
Bandersnatch can download package release files from an alternative source by configuring a [](#download-mirror).
```
@@ -312,7 +293,8 @@ SOCKS proxies are not currently supported via the `mirror.proxy` config option.
The network request timeout to use for all connections, in seconds. This is the maximum allowed time for individual web requests.
:Type: number, in seconds
-:Required: **yes**
+:Required: no
+:Default: 10
```{note}
It is recommended to set this to a relatively low value, e.g. 10 - 30 seconds. This is so temporary problems will fail quickly and allow retrying, instead of having a process hang infinitely and leave TCP unable to catch up for a long time.
@@ -323,7 +305,8 @@ It is recommended to set this to a relatively low value, e.g. 10 - 30 seconds. T
The maximum runtime of individual aiohttp coroutines, in seconds.
:Type: number, in seconds
-:Required: **yes**
+:Required: no
+:Default: 1800
```{note}
It is recommended to set this to a relatively high value, e.g. 3,600 - 18,000 (1 - 5 hours). This supports coroutines mirroring large package files on slow connections.
@@ -378,7 +361,8 @@ Bandersnatch versions prior to 4.0 used directories with non-normalized package
The number of worker threads used for parallel downloads.
:Type: number, 1 ≤ N ≤ 10
-:Required: **yes**
+:Required: no
+:Default: 3
Use **1 - 3** workers to avoid overloading the PyPI master (and maybe your own internet connection). If you see timeouts and have a slow connection, try lowering this setting.
@@ -401,7 +385,8 @@ This option is used by the <project:#bandersnatch-verify> subcommand.
Stop mirror/sync operations immediately when an error occurs.
:Type: boolean
-:Required: **yes**
+:Required: no
+:Default: false
When disabled (`stop-on-error = false`), Bandersnatch continues syncing after an error occurs, but will mark the sync as unsuccessful. When enabled, Bandersnatch will stop all syncing as soon as possible if an error occurs. This can be helpful when debugging the cause of an unsuccessful sync.
@@ -421,6 +406,7 @@ The method used to compare existing files with upstream files.
The algorithm used to compute file hashes when [](#compare-method) is set to `hash`.
:Type: one of `sha256`, `md5`
+:Required: no
:Default: `sha256`
### `keep_index_versions`
@@ -607,13 +593,23 @@ The content of the index files themselves is unchanged.
## Default Configuration File
-Bandersnatch loads default values from a configuration file inside the package. You can use this file as a reference or as the basis for your own configuration.
+Bandersnatch loads default values from a configuration file inside the package.
+
+```{literalinclude} ../src/bandersnatch/defaults.conf
+---
+name: defaults.conf
+language: ini
+caption: Default configuration file from `src/bandersnatch/defaults.conf`
+---
+```
+
+An annotated example configuration is also included. You can use this file as a reference or as the basis for your own configuration.
-```{literalinclude} ../src/bandersnatch/default.conf
+```{literalinclude} ../src/bandersnatch/example.conf
---
-name: default.conf
+name: example.conf
language: ini
-caption: Default configuration file from `src/bandersnatch/default.conf`
+caption: Example configuration file from `src/bandersnatch/example.conf`
---
```
diff --git a/src/bandersnatch/config/exceptions.py b/src/bandersnatch/config/exceptions.py
new file mode 100644
index 000000000..796c6e827
--- /dev/null
+++ b/src/bandersnatch/config/exceptions.py
@@ -0,0 +1,13 @@
+"""Exception subclasses for configuration file loading and validation."""
+
+
+class ConfigError(Exception):
+ """Base exception for configuration file exceptions."""
+
+ pass
+
+
+class ConfigFileNotFound(ConfigError):
+ """A specified configuration file is missing or unreadable."""
+
+ pass
diff --git a/src/bandersnatch/configuration.py b/src/bandersnatch/configuration.py
index 8e2ca4da5..246e4c088 100644
--- a/src/bandersnatch/configuration.py
+++ b/src/bandersnatch/configuration.py
@@ -2,24 +2,34 @@
Module containing classes to access the bandersnatch configuration file
"""
+import abc
import configparser
import importlib.resources
import logging
+import shutil
+from configparser import ConfigParser
from pathlib import Path
from typing import Any, NamedTuple
from .config.diff_file_reference import eval_config_reference, has_config_reference
+from .config.exceptions import ConfigError, ConfigFileNotFound
from .simple import SimpleDigest, SimpleFormat, get_digest_value, get_format_value
logger = logging.getLogger("bandersnatch")
+# Filename of example configuration file inside the bandersnatch package
+_example_conf_file = "example.conf"
+
+# Filename of default values file inside the bandersnatch package
+_defaults_conf_file = "defaults.conf"
+
class SetConfigValues(NamedTuple):
json_save: bool
root_uri: str
diff_file_path: str
diff_append_epoch: bool
- digest_name: str
+ digest_name: SimpleDigest
storage_backend_name: str
cleanup: bool
release_files_save: bool
@@ -38,70 +48,108 @@ def __call__(cls, *args: Any, **kwargs: Any) -> type:
return cls._instances[cls]
-class BandersnatchConfig(metaclass=Singleton):
+# ConfigParser's metaclass is abc.ABCMeta; we can't inherit from ConfigParser and
+# also use the Singleton metaclass unless we "manually" combine the metaclasses.
+class _SingletonABCMeta(Singleton, abc.ABCMeta):
+ pass
+
+
+class BandersnatchConfig(ConfigParser, metaclass=_SingletonABCMeta):
+ """Configuration singleton. Provides global access to loaded configuration
+ options as a ConfigParser subclass. Always reads default mirror options when
+ initialized. If given a file path, that file is loaded second so its values
+ overwrite corresponding defaults.
+ """
+
# Ensure we only show the deprecations once
SHOWN_DEPRECATIONS = False
- def __init__(self, config_file: str | None = None) -> None:
- """
- Bandersnatch configuration class singleton
-
- This class is a singleton that parses the configuration once at the
- start time.
+ def __init__(
+ self, config_file: Path | None = None, load_defaults: bool = True
+ ) -> None:
+ """Create the singleton configuration object. Default configuration values are
+ read from a configuration file inside the package. If a file path is given, that
+ file is read after reading defaults such that it's values overwrite defaults.
- Parameters
- ==========
- config_file: str, optional
- Path to the configuration file to use
+ :param Path | None config_file: non-default configuration file to load, defaults to None
"""
+ super(ConfigParser, self).__init__(delimiters="=")
self.found_deprecations: list[str] = []
- self.default_config_file = str(
- importlib.resources.files("bandersnatch") / "default.conf"
- )
- self.config_file = config_file
- self.load_configuration()
- # Keeping for future deprecations ... Commenting to save function call etc.
- # self.check_for_deprecations()
+
+ # ConfigParser.read can process an iterable of file paths, but separate read
+ # calls are used on purpose to add more information to error messages.
+ if load_defaults:
+ self._read_defaults_file()
+ if config_file:
+ self._read_user_config_file(config_file)
+
+ def optionxform(self, optionstr: str) -> str:
+ return optionstr
def check_for_deprecations(self) -> None:
if self.SHOWN_DEPRECATIONS:
return
self.SHOWN_DEPRECATIONS = True
- def load_configuration(self) -> None:
- """
- Read the configuration from a configuration file
- """
- config_file = self.default_config_file
- if self.config_file:
- config_file = self.config_file
- self.config = configparser.ConfigParser(delimiters="=")
- # mypy is unhappy with us assigning to a method - (monkeypatching?)
- self.config.optionxform = lambda option: option # type: ignore
- self.config.read(config_file)
+ def _read_defaults_file(self) -> None:
+ try:
+ defaults_file = (
+ importlib.resources.files("bandersnatch") / _defaults_conf_file
+ )
+ self.read(str(defaults_file))
+ logger.debug("Read configuration defaults file.")
+ except OSError as err:
+ raise ConfigError("Error reading configuration defaults: %s", err) from err
+
+ def _read_user_config_file(self, config_file: Path) -> None:
+ # Check for this case explicitly instead of letting it fall under the OSError
+ # case, so we can use the exception type for control flow:
+ if not config_file.exists():
+ raise ConfigFileNotFound(
+ f"Specified configuration file doesn't exist: {config_file}"
+ )
+
+ # Standard configparser, but we want to add context information to an OSError
+ try:
+ self.read(config_file)
+ logger.info("Read configuration file '%s'", config_file)
+ except OSError as err:
+ raise ConfigError(
+ "Error reading configuration file '%s': %s", config_file, err
+ ) from err
+
+
+def create_example_config(dest: Path) -> None:
+ """Create an example configuration file at the specified location.
+
+ :param Path dest: destination path for the configuration file.
+ """
+ example_source = importlib.resources.files("bandersnatch") / _example_conf_file
+ try:
+ shutil.copy(str(example_source), dest)
+ except OSError as err:
+ logger.error("Could not create config file '%s': %s", dest, err)
def validate_config_values( # noqa: C901
config: configparser.ConfigParser,
) -> SetConfigValues:
- try:
- json_save = config.getboolean("mirror", "json")
- except configparser.NoOptionError:
- logger.error(
- "Please update your config to include a json "
- + "boolean in the [mirror] section. Setting to False"
- )
- json_save = False
- try:
- root_uri = config.get("mirror", "root_uri")
- except configparser.NoOptionError:
- root_uri = ""
+ json_save = config.getboolean("mirror", "json")
- try:
- diff_file_path = config.get("mirror", "diff-file")
- except configparser.NoOptionError:
- diff_file_path = ""
+ root_uri = config.get("mirror", "root_uri")
+
+ release_files_save = config.getboolean("mirror", "release-files")
+
+ if not release_files_save and not root_uri:
+ root_uri = "https://files.pythonhosted.org"
+ logger.warning(
+ "Please update your config to include a root_uri in the [mirror] "
+ + "section when disabling release file sync. Setting to "
+ + root_uri
+ )
+
+ diff_file_path = config.get("mirror", "diff-file")
if diff_file_path and has_config_reference(diff_file_path):
try:
@@ -114,27 +162,12 @@ def validate_config_values( # noqa: C901
mirror_dir = config.get("mirror", "directory")
diff_file_path = (Path(mirror_dir) / "mirrored-files").as_posix()
- try:
- diff_append_epoch = config.getboolean("mirror", "diff-append-epoch")
- except configparser.NoOptionError:
- diff_append_epoch = False
+ diff_append_epoch = config.getboolean("mirror", "diff-append-epoch")
- try:
- logger.debug("Checking config for storage backend...")
- storage_backend_name = config.get("mirror", "storage-backend")
- logger.debug("Found storage backend in config!")
- except configparser.NoOptionError:
- storage_backend_name = "filesystem"
- logger.debug(
- "Failed to find storage backend in config, falling back to default!"
- )
- logger.info(f"Selected storage backend: {storage_backend_name}")
+ storage_backend_name = config.get("mirror", "storage-backend")
try:
digest_name = get_digest_value(config.get("mirror", "digest_name"))
- except configparser.NoOptionError:
- digest_name = SimpleDigest.SHA256
- logger.debug(f"Using digest {digest_name} by default ...")
except ValueError as e:
logger.error(
f"Supplied digest_name {config.get('mirror', 'digest_name')} is "
@@ -144,64 +177,38 @@ def validate_config_values( # noqa: C901
raise e
try:
- cleanup = config.getboolean("mirror", "cleanup")
- except configparser.NoOptionError:
- logger.debug(
- "bandersnatch is not cleaning up non PEP 503 normalized Simple "
- + "API directories"
- )
- cleanup = False
-
- release_files_save = config.getboolean("mirror", "release-files", fallback=True)
- if not release_files_save and not root_uri:
- root_uri = "https://files.pythonhosted.org"
+ simple_format_raw = config.get("mirror", "simple-format")
+ simple_format = get_format_value(simple_format_raw)
+ except ValueError as e:
logger.error(
- "Please update your config to include a root_uri in the [mirror] "
- + "section when disabling release file sync. Setting to "
- + root_uri
+ f"Supplied simple-format {simple_format_raw} is not supported!"
+ + " Please updare the simple-format in the [mirror] section of"
+ + " your config to a supported value."
)
+ raise e
- try:
- logger.debug("Checking config for compare method...")
- compare_method = config.get("mirror", "compare-method")
- logger.debug("Found compare method in config!")
- except configparser.NoOptionError:
- compare_method = "hash"
- logger.debug(
- "Failed to find compare method in config, falling back to default!"
- )
+ compare_method = config.get("mirror", "compare-method")
if compare_method not in ("hash", "stat"):
raise ValueError(
f"Supplied compare_method {compare_method} is not supported! Please "
+ "update compare_method to one of ('hash', 'stat') in the [mirror] "
+ "section."
)
- logger.info(f"Selected compare method: {compare_method}")
- try:
- logger.debug("Checking config for alternative download mirror...")
- download_mirror = config.get("mirror", "download-mirror")
- logger.info(f"Selected alternative download mirror {download_mirror}")
- except configparser.NoOptionError:
- download_mirror = ""
- logger.debug("No alternative download mirror found in config.")
+ download_mirror = config.get("mirror", "download-mirror")
if download_mirror:
- try:
- logger.debug(
- "Checking config for only download from alternative download"
- + "mirror..."
- )
- download_mirror_no_fallback = config.getboolean(
- "mirror", "download-mirror-no-fallback"
- )
- if download_mirror_no_fallback:
- logger.info("Setting to download from mirror without fallback")
- else:
- logger.debug("Setting to fallback to original if download mirror fails")
- except configparser.NoOptionError:
- download_mirror_no_fallback = False
- logger.debug("No download mirror fallback setting found in config.")
+
+ logger.debug(
+ "Checking config for only download from alternative download mirror"
+ )
+ download_mirror_no_fallback = config.getboolean(
+ "mirror", "download-mirror-no-fallback"
+ )
+ if download_mirror_no_fallback:
+ logger.info("Setting to download from mirror without fallback")
+ else:
+ logger.debug("Setting to fallback to original if download mirror fails")
else:
download_mirror_no_fallback = False
logger.debug(
@@ -209,11 +216,7 @@ def validate_config_values( # noqa: C901
+ "is not set in config."
)
- try:
- simple_format = get_format_value(config.get("mirror", "simple-format"))
- except configparser.NoOptionError:
- logger.debug("Storing all Simple Formats by default ...")
- simple_format = SimpleFormat.ALL
+ cleanup = config.getboolean("mirror", "cleanup", fallback=False)
return SetConfigValues(
json_save,
diff --git a/src/bandersnatch/defaults.conf b/src/bandersnatch/defaults.conf
new file mode 100644
index 000000000..ca1cbc709
--- /dev/null
+++ b/src/bandersnatch/defaults.conf
@@ -0,0 +1,34 @@
+; [ Default Config Values ]
+; Bandersnatch loads this file prior to loading the user config file.
+; The values in this file serve as defaults and are overriden if also
+; specified in a user config.
+[mirror]
+storage-backend = filesystem
+
+master = https://pypi.org
+proxy =
+download-mirror =
+download-mirror-no-fallback = false
+
+json = false
+release-files = true
+hash-index = false
+simple-format = ALL
+compare-method = hash
+digest_name = sha256
+keep-index-versions = 0
+cleanup = false
+
+stop-on-error = false
+timeout = 10
+global-timeout = 1800
+workers = 3
+verifiers = 3
+
+; dynamic default: this URI used if `release-files = false`
+; root_uri = https://files.pythonhosted.org
+root_uri =
+diff-file =
+diff-append-epoch = false
+
+log-config =
diff --git a/src/bandersnatch/default.conf b/src/bandersnatch/example.conf
similarity index 100%
rename from src/bandersnatch/default.conf
rename to src/bandersnatch/example.conf
diff --git a/src/bandersnatch/filter.py b/src/bandersnatch/filter.py
index 3b494bbae..7a6e48501 100644
--- a/src/bandersnatch/filter.py
+++ b/src/bandersnatch/filter.py
@@ -36,7 +36,7 @@ class Filter:
deprecated_name: str = ""
def __init__(self, *args: Any, **kwargs: Any) -> None:
- self.configuration = BandersnatchConfig().config
+ self.configuration = BandersnatchConfig()
if (
"plugins" not in self.configuration
or "enabled" not in self.configuration["plugins"]
@@ -155,7 +155,7 @@ def __init__(self, load_all: bool = False) -> None:
"""
Loads and stores all of specified filters from the config file
"""
- self.config = BandersnatchConfig().config
+ self.config = BandersnatchConfig()
self.loaded_filter_plugins: dict[str, list["Filter"]] = defaultdict(list)
self.enabled_plugins = self._load_enabled()
if load_all:
diff --git a/src/bandersnatch/main.py b/src/bandersnatch/main.py
index 92a0386e8..5b165699c 100644
--- a/src/bandersnatch/main.py
+++ b/src/bandersnatch/main.py
@@ -14,6 +14,7 @@
import bandersnatch.master
import bandersnatch.mirror
import bandersnatch.verify
+from bandersnatch.config.exceptions import ConfigError, ConfigFileNotFound
from bandersnatch.storage import storage_backend_plugins
# See if we have uvloop and use if so
@@ -202,23 +203,22 @@ def main(loop: asyncio.AbstractEventLoop | None = None) -> int:
# Prepare default config file if needed.
config_path = Path(args.config)
- if not config_path.exists():
+ try:
+ logger.info("Reading configuration file '%s'", config_path)
+ config = bandersnatch.configuration.BandersnatchConfig(config_path)
+ except ConfigFileNotFound:
logger.warning(f"Config file '{args.config}' missing, creating default config.")
logger.warning("Please review the config file, then run 'bandersnatch' again.")
-
- default_config_path = Path(__file__).parent / "default.conf"
- try:
- shutil.copy(default_config_path, args.config)
- except OSError as e:
- logger.error(f"Could not create config file: {e}")
+ bandersnatch.configuration.create_example_config(config_path)
return 1
-
- config = bandersnatch.configuration.BandersnatchConfig(
- config_file=args.config
- ).config
-
- if config.has_option("mirror", "log-config"):
- logging.config.fileConfig(str(Path(config.get("mirror", "log-config"))))
+ except ConfigError as err:
+ logger.error("Unable to load configuration: %s", err)
+ logger.debug("Error details:", exc_info=err)
+ return 2
+
+ user_log_config = config.get("mirror", "log-config", fallback=None)
+ if user_log_config:
+ logging.config.fileConfig(Path(user_log_config))
if loop:
loop.set_debug(args.debug)
diff --git a/src/bandersnatch/storage.py b/src/bandersnatch/storage.py
index d51665782..5f0709afc 100644
--- a/src/bandersnatch/storage.py
+++ b/src/bandersnatch/storage.py
@@ -63,11 +63,9 @@ def __init__(
) -> None:
self.flock_path: PATH_TYPES = ".lock"
if config is not None:
- if isinstance(config, BandersnatchConfig):
- config = config.config
self.configuration = config
else:
- self.configuration = BandersnatchConfig().config
+ self.configuration = BandersnatchConfig()
try:
storage_backend = self.configuration["mirror"]["storage-backend"]
except (KeyError, TypeError):
@@ -342,7 +340,7 @@ def load_storage_plugins(
"""
global loaded_storage_plugins
if config is None:
- config = BandersnatchConfig().config
+ config = BandersnatchConfig()
if not enabled_plugin:
try:
enabled_plugin = config["mirror"]["storage-backend"]
| diff --git a/src/bandersnatch/tests/mock_config.py b/src/bandersnatch/tests/mock_config.py
index b9830aecb..0db5c707b 100644
--- a/src/bandersnatch/tests/mock_config.py
+++ b/src/bandersnatch/tests/mock_config.py
@@ -3,13 +3,18 @@
def mock_config(contents: str, filename: str = "test.conf") -> BandersnatchConfig:
"""
- Creates a config file with contents and loads them into a
- BandersnatchConfig instance.
+ Creates a config file with contents and loads them into a BandersnatchConfig instance.
+ Because BandersnatchConfig is a singleton, it needs to be cleared before reading any
+ new configuration so the configuration from different tests aren't re-used.
"""
- with open(filename, "w") as fd:
- fd.write(contents)
-
- instance = BandersnatchConfig()
- instance.config_file = filename
- instance.load_configuration()
+ # If this is the first time BandersnatchConfig was initialized during a test run,
+ # skip loading defaults in init b/c we're going to do that explicitly instead.
+ instance = BandersnatchConfig(load_defaults=False)
+ # If this *isn't* the first time BandersnatchConfig was initialized, then we've
+ # got to clear any previously loaded configuration from the singleton.
+ instance.clear()
+ # explicitly load defaults here
+ instance._read_defaults_file()
+ # load specified config content
+ instance.read_string(contents)
return instance
diff --git a/src/bandersnatch/tests/plugins/test_storage_plugin_s3.py b/src/bandersnatch/tests/plugins/test_storage_plugin_s3.py
index a7c91741c..17c20fb6f 100644
--- a/src/bandersnatch/tests/plugins/test_storage_plugin_s3.py
+++ b/src/bandersnatch/tests/plugins/test_storage_plugin_s3.py
@@ -145,7 +145,7 @@ def test_scandir(s3_mock: S3Path) -> None:
def test_plugin_init(s3_mock: S3Path) -> None:
- config_loader = mock_config(
+ config = mock_config(
"""
[mirror]
directory = /tmp/pypi
@@ -168,14 +168,14 @@ def test_plugin_init(s3_mock: S3Path) -> None:
signature_version = s3v4
"""
)
- backend = s3.S3Storage(config=config_loader.config)
+ backend = s3.S3Storage(config=config)
backend.initialize_plugin()
path = s3.S3Path("/tmp/pypi")
resource, _ = configuration_map.get_configuration(path)
assert resource.meta.client.meta.endpoint_url == "http://localhost:9090"
- config_loader = mock_config(
+ config = mock_config(
"""
[mirror]
directory = /tmp/pypi
@@ -194,7 +194,7 @@ def test_plugin_init(s3_mock: S3Path) -> None:
endpoint_url = http://localhost:9090
"""
)
- backend = s3.S3Storage(config=config_loader.config)
+ backend = s3.S3Storage(config=config)
backend.initialize_plugin()
path = s3.S3Path("/tmp/pypi")
@@ -203,7 +203,7 @@ def test_plugin_init(s3_mock: S3Path) -> None:
def test_plugin_init_with_boto3_configs(s3_mock: S3Path) -> None:
- config_loader = mock_config(
+ config = mock_config(
"""
[mirror]
directory = /tmp/pypi
@@ -227,7 +227,7 @@ def test_plugin_init_with_boto3_configs(s3_mock: S3Path) -> None:
config_param_ServerSideEncryption = AES256
"""
)
- backend = s3.S3Storage(config=config_loader.config)
+ backend = s3.S3Storage(config=config)
backend.initialize_plugin()
assert backend.configuration_parameters["ServerSideEncryption"] == "AES256"
diff --git a/src/bandersnatch/tests/plugins/test_storage_plugins.py b/src/bandersnatch/tests/plugins/test_storage_plugins.py
index e8f8ed3b3..a383d242c 100644
--- a/src/bandersnatch/tests/plugins/test_storage_plugins.py
+++ b/src/bandersnatch/tests/plugins/test_storage_plugins.py
@@ -622,7 +622,7 @@ def test_plugin_type(self) -> None:
self.assertTrue(self.plugin.PATH_BACKEND is self.path_backends[self.backend])
def test_json_paths(self) -> None:
- config = mock_config(self.config_contents).config
+ config = mock_config(self.config_contents)
mirror_dir = self.plugin.PATH_BACKEND(config.get("mirror", "directory"))
packages = {
"bandersnatch": [
diff --git a/src/bandersnatch/tests/test_configuration.py b/src/bandersnatch/tests/test_configuration.py
index 89e628693..900574144 100644
--- a/src/bandersnatch/tests/test_configuration.py
+++ b/src/bandersnatch/tests/test_configuration.py
@@ -2,6 +2,7 @@
import importlib.resources
import os
import unittest
+from pathlib import Path
from tempfile import TemporaryDirectory
from unittest import TestCase
@@ -12,7 +13,7 @@
Singleton,
validate_config_values,
)
-from bandersnatch.simple import SimpleFormat
+from bandersnatch.simple import SimpleDigest, SimpleFormat
class TestBandersnatchConf(TestCase):
@@ -44,34 +45,43 @@ def test_is_singleton(self) -> None:
self.assertEqual(id(instance1), id(instance2))
def test_single_config__default__all_sections_present(self) -> None:
- config_file = str(importlib.resources.files("bandersnatch") / "unittest.conf")
- instance = BandersnatchConfig(str(config_file))
+ config_file = Path(
+ str(importlib.resources.files("bandersnatch") / "unittest.conf")
+ )
+ instance = BandersnatchConfig(config_file)
# All default values should at least be present and be the write types
for section in ["mirror", "plugins", "blocklist"]:
- self.assertIn(section, instance.config.sections())
+ self.assertIn(section, instance.sections())
def test_single_config__default__mirror__setting_attributes(self) -> None:
instance = BandersnatchConfig()
- options = [option for option in instance.config["mirror"]]
- options.sort()
- self.assertListEqual(
+ options = {option for option in instance["mirror"]}
+ self.assertSetEqual(
options,
- [
+ {
"cleanup",
"compare-method",
- "directory",
+ "diff-append-epoch",
+ "diff-file",
+ "digest_name",
+ "download-mirror",
+ "download-mirror-no-fallback",
"global-timeout",
"hash-index",
"json",
+ "keep-index-versions",
+ "log-config",
"master",
+ "proxy",
"release-files",
+ "root_uri",
"simple-format",
"stop-on-error",
"storage-backend",
"timeout",
"verifiers",
"workers",
- ],
+ },
)
def test_single_config__default__mirror__setting__types(self) -> None:
@@ -92,42 +102,34 @@ def test_single_config__default__mirror__setting__types(self) -> None:
("compare-method", str),
]:
self.assertIsInstance(
- option_type(instance.config["mirror"].get(option)), option_type
+ option_type(instance["mirror"].get(option)), option_type
)
def test_single_config_custom_setting_boolean(self) -> None:
- with open("test.conf", "w") as testconfig_handle:
- testconfig_handle.write("[mirror]\nhash-index=false\n")
instance = BandersnatchConfig()
- instance.config_file = "test.conf"
- instance.load_configuration()
- self.assertFalse(instance.config["mirror"].getboolean("hash-index"))
+ instance.read_string("[mirror]\nhash-index=false\n")
+
+ self.assertFalse(instance["mirror"].getboolean("hash-index"))
def test_single_config_custom_setting_int(self) -> None:
- with open("test.conf", "w") as testconfig_handle:
- testconfig_handle.write("[mirror]\ntimeout=999\n")
instance = BandersnatchConfig()
- instance.config_file = "test.conf"
- instance.load_configuration()
- self.assertEqual(int(instance.config["mirror"]["timeout"]), 999)
+ instance.read_string("[mirror]\ntimeout=999\n")
+
+ self.assertEqual(int(instance["mirror"]["timeout"]), 999)
def test_single_config_custom_setting_str(self) -> None:
- with open("test.conf", "w") as testconfig_handle:
- testconfig_handle.write("[mirror]\nmaster=https://foo.bar.baz\n")
instance = BandersnatchConfig()
- instance.config_file = "test.conf"
- instance.load_configuration()
- self.assertEqual(instance.config["mirror"]["master"], "https://foo.bar.baz")
+ instance.read_string("[mirror]\nmaster=https://foo.bar.baz\n")
+
+ self.assertEqual(instance["mirror"]["master"], "https://foo.bar.baz")
def test_multiple_instances_custom_setting_str(self) -> None:
- with open("test.conf", "w") as testconfig_handle:
- testconfig_handle.write("[mirror]\nmaster=https://foo.bar.baz\n")
instance1 = BandersnatchConfig()
- instance1.config_file = "test.conf"
- instance1.load_configuration()
+ instance1.read_string("[mirror]\nmaster=https://foo.bar.baz\n")
instance2 = BandersnatchConfig()
- self.assertEqual(instance2.config["mirror"]["master"], "https://foo.bar.baz")
+
+ self.assertEqual(instance2["mirror"]["master"], "https://foo.bar.baz")
def test_validate_config_values(self) -> None:
default_values = SetConfigValues(
@@ -135,7 +137,7 @@ def test_validate_config_values(self) -> None:
"",
"",
False,
- "sha256",
+ SimpleDigest.SHA256,
"filesystem",
False,
True,
@@ -144,8 +146,7 @@ def test_validate_config_values(self) -> None:
False,
SimpleFormat.ALL,
)
- no_options_configparser = configparser.ConfigParser()
- no_options_configparser["mirror"] = {}
+ no_options_configparser = BandersnatchConfig(load_defaults=True)
self.assertEqual(
default_values, validate_config_values(no_options_configparser)
)
@@ -156,7 +157,7 @@ def test_validate_config_values_release_files_false_sets_root_uri(self) -> None:
"https://files.pythonhosted.org",
"",
False,
- "sha256",
+ SimpleDigest.SHA256,
"filesystem",
False,
False,
@@ -165,8 +166,8 @@ def test_validate_config_values_release_files_false_sets_root_uri(self) -> None:
False,
SimpleFormat.ALL,
)
- release_files_false_configparser = configparser.ConfigParser()
- release_files_false_configparser["mirror"] = {"release-files": "false"}
+ release_files_false_configparser = BandersnatchConfig(load_defaults=True)
+ release_files_false_configparser["mirror"].update({"release-files": "false"})
self.assertEqual(
default_values, validate_config_values(release_files_false_configparser)
)
@@ -179,7 +180,7 @@ def test_validate_config_values_download_mirror_false_sets_no_fallback(
"",
"",
False,
- "sha256",
+ SimpleDigest.SHA256,
"filesystem",
False,
True,
@@ -188,10 +189,12 @@ def test_validate_config_values_download_mirror_false_sets_no_fallback(
False,
SimpleFormat.ALL,
)
- release_files_false_configparser = configparser.ConfigParser()
- release_files_false_configparser["mirror"] = {
- "download-mirror-no-fallback": "true",
- }
+ release_files_false_configparser = BandersnatchConfig(load_defaults=True)
+ release_files_false_configparser["mirror"].update(
+ {
+ "download-mirror-no-fallback": "true",
+ }
+ )
self.assertEqual(
default_values, validate_config_values(release_files_false_configparser)
)
@@ -247,7 +250,7 @@ def test_validate_config_diff_file_reference(self) -> None:
expected=expected,
cfg_data=cfg_data,
):
- cfg = configparser.ConfigParser()
+ cfg = BandersnatchConfig(load_defaults=True)
cfg.read_dict(cfg_data)
config_values = validate_config_values(cfg)
self.assertIsInstance(config_values.diff_file_path, str)
diff --git a/src/bandersnatch/tests/test_delete.py b/src/bandersnatch/tests/test_delete.py
index f120a4bb3..4a08b07f2 100644
--- a/src/bandersnatch/tests/test_delete.py
+++ b/src/bandersnatch/tests/test_delete.py
@@ -11,6 +11,7 @@
from aiohttp import ClientResponseError
from pytest import MonkeyPatch
+from bandersnatch.configuration import BandersnatchConfig
from bandersnatch.delete import delete_packages, delete_path, delete_simple_page
from bandersnatch.master import Master
from bandersnatch.mirror import BandersnatchMirror
@@ -77,6 +78,7 @@ def _fake_config() -> ConfigParser:
@pytest.mark.asyncio
async def test_delete_path() -> None:
+ BandersnatchConfig().read_dict(_fake_config())
with TemporaryDirectory() as td:
td_path = Path(td)
fake_path = td_path / "unittest-file.tgz"
diff --git a/src/bandersnatch/tests/test_filter.py b/src/bandersnatch/tests/test_filter.py
index 4932db05c..87d75d205 100644
--- a/src/bandersnatch/tests/test_filter.py
+++ b/src/bandersnatch/tests/test_filter.py
@@ -124,11 +124,9 @@ def test__filter_base_clases(self) -> None:
self.assertFalse(error)
def test_deprecated_keys(self) -> None:
- with open("test.conf", "w") as f:
- f.write("[allowlist]\npackages=foo\n[blocklist]\npackages=bar\n")
instance = BandersnatchConfig()
- instance.config_file = "test.conf"
- instance.load_configuration()
+ instance.read_string("[allowlist]\npackages=foo\n[blocklist]\npackages=bar\n")
+
plugin = Filter()
assert plugin.allowlist.name == "allowlist"
assert plugin.blocklist.name == "blocklist"
diff --git a/src/bandersnatch/tests/test_main.py b/src/bandersnatch/tests/test_main.py
index 5fc34b340..47fcdd14d 100644
--- a/src/bandersnatch/tests/test_main.py
+++ b/src/bandersnatch/tests/test_main.py
@@ -108,7 +108,7 @@ def test_main_reads_custom_config_values(
sys.argv = ["bandersnatch", "-c", conffile, "mirror"]
main(asyncio.new_event_loop())
(log_config, _kwargs) = logging_mock.call_args_list[0]
- assert log_config == (str(customconfig / "bandersnatch-log.conf"),)
+ assert log_config == ((customconfig / "bandersnatch-log.conf"),)
def test_main_throws_exception_on_unsupported_digest_name(
diff --git a/src/bandersnatch/tests/test_mirror.py b/src/bandersnatch/tests/test_mirror.py
index 2b1a5d64e..1e4dbffe7 100644
--- a/src/bandersnatch/tests/test_mirror.py
+++ b/src/bandersnatch/tests/test_mirror.py
@@ -3,7 +3,6 @@
import time
import unittest.mock as mock
from collections.abc import Awaitable, Callable, Iterator, Mapping
-from configparser import ConfigParser
from os import sep
from pathlib import Path
from tempfile import TemporaryDirectory
@@ -144,9 +143,9 @@ def test_mirror_filter_packages_match(tmpdir: Path) -> None:
example1
"""
Singleton._instances = {}
- with open("test.conf", "w") as testconfig_handle:
- testconfig_handle.write(test_configuration)
- BandersnatchConfig("test.conf")
+ test_conf = Path("test.conf")
+ test_conf.write_text(test_configuration)
+ BandersnatchConfig(config_file=test_conf)
m = BandersnatchMirror(tmpdir, mock.Mock())
m.packages_to_sync = {"example1": "", "example2": ""}
m._filter_packages()
@@ -167,9 +166,9 @@ def test_mirror_filter_packages_nomatch_package_with_spec(tmpdir: Path) -> None:
example3>2.0.0
"""
Singleton._instances = {}
- with open("test.conf", "w") as testconfig_handle:
- testconfig_handle.write(test_configuration)
- BandersnatchConfig("test.conf")
+ test_conf = Path("test.conf")
+ test_conf.write_text(test_configuration)
+ BandersnatchConfig(config_file=test_conf)
m = BandersnatchMirror(tmpdir, mock.Mock())
m.packages_to_sync = {"example1": "", "example3": ""}
m._filter_packages()
@@ -1332,7 +1331,7 @@ async def test_mirror_subcommand_only_creates_diff_file_if_configured(
) -> None:
# Setup: create a configuration for the 'mirror' subcommand
# Mirror section only contains required options and omits 'diff-file'
- config = ConfigParser()
+ config = BandersnatchConfig(load_defaults=True)
config.read_dict(
{
"mirror": {
@@ -1415,7 +1414,7 @@ async def test_mirror_subcommand_diff_file_dir_with_epoch(
# Setup: create configuration for 'mirror' subcommand that includes both
# `diff-file` and `diff-append-epoch`
- config = ConfigParser()
+ config = BandersnatchConfig(load_defaults=True)
config.read_dict(
{
"mirror": {
diff --git a/src/bandersnatch/tests/test_simple.py b/src/bandersnatch/tests/test_simple.py
index 4ac9de7c1..54d2b257d 100644
--- a/src/bandersnatch/tests/test_simple.py
+++ b/src/bandersnatch/tests/test_simple.py
@@ -6,7 +6,7 @@
import pytest
from bandersnatch import utils
-from bandersnatch.configuration import validate_config_values
+from bandersnatch.configuration import BandersnatchConfig, validate_config_values
from bandersnatch.package import Package
from bandersnatch.simple import (
InvalidDigestFormat,
@@ -46,8 +46,7 @@ def test_digest_valid() -> None:
def test_digest_config_default() -> None:
- c = ConfigParser()
- c.add_section("mirror")
+ c = BandersnatchConfig(load_defaults=True)
config = validate_config_values(c)
s = SimpleAPI(Storage(), "ALL", [], config.digest_name, False, None)
assert config.digest_name.upper() in [v.name for v in SimpleDigest]
| Many options do not have a configured fallback value even if the documentation says so
**What's the issue:**
Some of the configurable knobs don't actually have a fallback value defined even though the documentation explicitly states these values do have a default. Case in point, let's take a gander at the `[mirror].timeout` value -- it's documented as having a default of 10 seconds:
> The default value for this setting is 10 seconds.
https://bandersnatch.readthedocs.io/en/latest/mirror_configuration.html#timeout
buttt looking at the source code it actually doesn't have one: https://github.com/pypa/bandersnatch/blob/3b78e040a330e3308389e3d32d8c13e8b8c41af5/src/bandersnatch/mirror.py#L1012-L1014
**Potential solutions:**
- Fix the lack of `fallback=$val` for all of the options that are documented having a default
- Fix the documentation to avoid stating these options have a default
I personally prefer the first one since having defaults makes sense so fixing the code to actually implement them is a good idea ... although this is a good opportunity to do a configuration adiut and see if any options shouldn't exist / or have a default / should have their default changed.
**Additional context:**
I was notified of this issue from a quick exchange in the Python Discord server: https://discord.com/channels/267624335836053506/463035462760792066/877942046952947722
| The quoting of default refers to the [default.conf](https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/default.conf) file have in the repo for people to use to get started.
I just hit this same issue — I wrote a config file from scratch based on the documentation, and was surprised to find that "the default value for this setting is [some value]" didn't mean that the setting had a default value. I never even saw `default.conf` until I went to file an issue about the defaults not working as documented and found this issue.
PRs to link docs to default.conf and make configparser set default both welcome.
I've started looking at the documentation and code for mirror configuration. These are the options I've found so far:
| Option Name | Type | Doc'd? | Default? (Doc/Actual) | Source File |
|------------------------------|--------|--------|------------------------------------------|------------------|
| json | `bool` | yes | - / `False` | configuration.py |
| root_uri | `str` | yes | `"https://files.pythonhosted.org/"`[^1] | " |
| diff-file | `str` | yes | - / `""` | " |
| diff-append-epoch | `bool` | yes | - / `False` | " |
| storage-backend | `str` | no[^2] | `"filesystem"`/`"filesystem"` | " |
| digest_name | `str` | no | - / `"sha256"` | " |
| cleanup | `bool` | no | - / `False` | " |
| release-files | `bool` | yes | `True` / `True` | " |
| compare-method | `str` | yes | `"hash"`/ `"hash"` | " |
| download-mirror | `str` | yes | - / `""` | " |
| download-mirror-no-fallback | `bool` | no | - / `False` | " |
| simple-format | `str` | yes | `"ALL"` / `"ALL"` | " |
| master | `str` | yes | `"https://pypi/org"` / **!!!** | mirror.py |
| timeout | `int` | yes | `10` / **!!!** | " |
| global-timeout | `int` | yes | `18000` / **!!!** | " |
| proxy | `str` | yes | - / `""` | " |
| stop-on-error | `bool` | yes | - / `False` | " |
| workers | `int` | yes | `3` / **!!!** | " |
| hash-index | `bool` | yes | `False` / **!!!** | " |
| keep_index_versions | `bool` | no | - / `0` | " |
There are a handful that aren't documented (that is, at least not on the mirror configuration page), as well as the ones that are set in `default.conf` but the don't have a default/fallback when a user's config file is loaded. I intend to update `mirror_configuration.md` in the docs as well as look into adding defaults in code for the options that don't have one.
Presently there is a function in `configuration.py` that validates most of the options while others are only read in mirror.py. I don't know if it would be a problem to consolidate all configuration loading into one place.
[^1]: `root_uri`'s default value interacts with `release-files`. The description of the default in the docs matches the code, which is in pseudocode something like:
```
if not release-files and not root-uri then
"https://files.pythonhosted.org/"
else
""
```
[^2]: Option and default are documented w/ storage backends, but not in the list of mirror configuration options. Could be listed with a cross reference?
Thanks for digging in.
> Presently there is a function in configuration.py that validates most of the options while others are only read in mirror.py. I don't know if it would be a problem to consolidate all configuration loading into one place.
Welcome to move all to configuration if you feel there is an advantage
> root_uri's default value interacts with release-files. The description of the default in the docs matches the code, which is in pseudocode something like:
Is there a missing question here? Pseudo code seems right.
> Option and default are documented w/ storage backends, but not in the list of mirror configuration options. Could be listed with a cross reference?
Sure - cross reference. But lets avoid as much duplication as possible
Hi @cooperlees , good to hear from you!
> > Presently there is a function in configuration.py that validates most of the options while others are only read in mirror.py. I don't know if it would be a problem to consolidate all configuration loading into one place.
>
> Welcome to move all to configuration if you feel there is an advantage
I'll look in to this. I have one idea I'd like to hear your thoughts on. I was wondering if it would make sense to _always_ load the module's `default.conf`, whether or not there is a user config file, and have values from the user config overwrite/take precedence. That would make `default.conf` a single source for what the default values are, but it could also mean making `default.conf` more extensive and less suited for someone first getting started.
Otherwise I'm happy to just consolidate things into `configuration.py` a bit, but seeing where `default.conf` gets loaded when there's no file specified got me thinking about trying to expand its use.
> > root_uri's default value interacts with release-files. The description of the default in the docs matches the code, which is in pseudocode something like:
>
> Is there a missing question here? Pseudo code seems right.
>
No missing question! I originally wrote the table as a list for my own reference, and when I posted it my footnotes came along too. Glad to hear my interpretation seems accurate. 🙂
> > Option and default are documented w/ storage backends, but not in the list of mirror configuration options. Could be listed with a cross reference?
>
> Sure - cross reference. But lets avoid as much duplication as possible
Sounds good. 👍
Can't promise a timeline for a PR, but I'm happy I've found something I feel like I could contribute to, so I feel optimistic about finishing this.
> I was wondering if it would make sense to always load the module's default.conf, whether or not there is a user config file, and have values from the user config overwrite/take precedence.
I like this idea a lot. Please lets unit test all scenarios tho please. Should be able to make configuration.py very clean as it seems you can just call read twice with configparser.
- Please make sure we include `default.conf` in our packages too (I think we do)
```python
def merge_ini_files(file1: str, file2: str):
config = configparser.ConfigParser()
# Read the first INI file
config.read(file1)
# Read the second INI file
config.read(file2)
...
```
I've opened a draft pull request (#1669). I've made it a draft because:
- I do not know if it is preferable to review documentation updates separately from code changes, or to put them together in one PR.
- I maybe got a bit carried away rewriting/reorganizing and it may be too big of a change relative to the initial goal here.
Working on the mirror documentation definitely increased my understanding of Bandersnatch's behavior with different options, but of course let me know if I've introduced any inaccuracies.
> > I was wondering if it would make sense to always load the module's default.conf, whether or not there is a user config file, and have values from the user config overwrite/take precedence.
>
> I like this idea a lot. Please lets unit test all scenarios tho please. Should be able to make configuration.py very clean as it seems you can just call read twice with configparser.
The only concern I have thus far is `root_uri` - I think it needs to distinguish whether it is set in the user configuration file or not, so loading a default value for it can't be completely transparent. I'm going to play around with the idea anyway and see how far I get.
> I do not know if it is preferable to review documentation updates separately from code changes, or to put them together in one PR.
Let's do the docs first but maybe
> I maybe got a bit carried away rewriting/reorganizing and it may be too big of a change relative to the initial goal here.
All good to me - but let's just have it document reality and change the docs to state when we make the default.conf actually be the source of truth for all default options
I've also commented on the PR suggestions for some enhancements.
`root_uri` - I think we leave it required in the config maybe as I think it's good to make people create their own config file ...
- I think directory (for a filesystem mirror) needs to me mandatory too
Thanks again.
> All good to me - but let's just have it document reality and change the docs to state when we make the default.conf actually be the source of truth for all default options
This makes sense! That will leave the docs "correct" in the interim while I figure out the configuration implementation bits.
I will go ahead and change the docs PR so the options that are currently missing defaults are marked as required.
@cooperlees - I've been fiddling around with config validation for a bit and I'm struggling some with how `diff-file` works.
1. It looks like it should support `diff-file = {{section_option}}/newstuff.txt` (unittest.conf, test_storage_plugins.py), but the implementation breaks if there is anything in the value other than the reference, e.g. `diff-file = {{section_option}}` works but `diff-file = {{section_option}}/mirrored-files` doesn't. It follows the 'Invalid section reference' path and defaults to '(directory)/mirrored-files'. (This makes it look like it is working if the value happens to be `{{mirror_directory}}/mirrored-files`.)
2. The mirror subcommand `mirror.py:mirror` seems to expect `diff_file` is optional and has "if diff_file" checks to not write the diff list if there's no path set. But `validate_config_values` sets diff_file to the empty string, and in the mirror function has `diff_file = storage_plugin.PATH_BACKEND(config_values.diff_file_path)` before any of the conditional checks, and `Path("")` evaluates to the same as `Path(".")` and is "truthy". So it seems like in practice a diff file is always written.
For both of these it is straightforward enough to "fix" them, but doing so changes externally observable behavior in a potentially incompatible way:
- Although (1) has fallen out of the documentation, I'm imagining someone somewhere is using it and even using the buggy (?) behavior (https://xkcd.com/1172/). I can maintain the behavior exactly as is, fix the parsing/interpolation (I've written and tested an alternate version), or it could be probably be removed since configparser has `ExtendedInterpolation` that satisfies the use case.
- The current behavior for (2) is pretty harmless, basically that users who don't have a `diff-file` option set are getting one anyway, but the file can just be ignored. On the other hand changing it so diff-file is actually optional and isn't written if there's no path set would break things for anyone relying on the current behavior. I could also update the code to expect that there will always be a diff-file path, making the current behavior "official", so to speak.
Thoughts on a direction to take?
(Also should I open a new issue for this config implementation stuff?)
> Thoughts on a direction to take?
I prefer to just fix the magic file appearing and mark it loudly in change log. If anyone is relying on that, I feel it's better to break them and make them be explicit in their config file on their needs.
TIL that Path("") == Path(".") and thus truthy. "" is false, so yeah. Fun. I bet this was once a string before I `pathlib`'ed everything.
Thanks for noting these found bugs and asking questions on fun cases like this.
Happy to! 👍
And yeah the Path(“”) thing… I didn’t know either, had to try it in a REPL a few different ways to convince myself. 😆 | 2024-05-27T20:47:16Z | 2024-05-29T00:42:40Z | ["src/bandersnatch/tests/test_main.py::test_main_create_config", "src/bandersnatch/tests/test_simple.py::test_json_package_page", "src/bandersnatch/tests/test_mirror.py::test_limit_workers", "src/bandersnatch/tests/test_main.py::test_main_reads_custom_config_values", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_is_singleton", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_invalid_diff_file_reference_throws_exception", "src/bandersnatch/tests/test_delete.py::test_delete_packages_no_exist", "src/bandersnatch/tests/test_simple.py::test_format_valid", "src/bandersnatch/tests/test_main.py::test_main_help", "src/bandersnatch/tests/test_delete.py::test_delete_packages", "src/bandersnatch/tests/test_simple.py::test_json_index_page", "src/bandersnatch/tests/test_simple.py::test_digest_invalid", "src/bandersnatch/tests/test_simple.py::test_digest_valid", "src/bandersnatch/tests/test_simple.py::test_format_invalid", "src/bandersnatch/tests/test_delete.py::test_delete_simple_page", "src/bandersnatch/tests/test_delete.py::test_delete_package_json_not_exists", "src/bandersnatch/tests/test_main.py::test_main_throws_exception_on_unsupported_digest_name", "src/bandersnatch/tests/test_main.py::test_main_reads_config_values", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_base_clases", "src/bandersnatch/tests/test_main.py::test_main_cant_create_config"] | [] | ["src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_delete_file", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_multiple_instances_custom_setting_str", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_read_file", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_int", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_iter_dir", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_diff_file_reference", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_is_dir", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_compare_files", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_rmdir", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__mirror__setting__types", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_project_blocklist_allowlist__pep503_normalize", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_open_file", "src/bandersnatch/tests/test_mirror.py::test_mirror_subcommand_only_creates_diff_file_if_configured", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_canonicalize_package", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_rewrite", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_project_plugins__loads", "src/bandersnatch/tests/test_simple.py::test_digest_config_default", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_is_file", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_json_paths", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_write_file", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_symlink", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values", "src/bandersnatch/tests/test_mirror.py::test_mirror_subcommand_diff_file_dir_with_epoch", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_plugin_type", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_copy_file", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__all_sections_present", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_get_hash", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_delete", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_mkdir", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values_download_mirror_false_sets_no_fallback", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__mirror__setting_attributes", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_release_plugins__loads", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_update_safe", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_find", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_hash_file", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_no_plugin", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_str", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_scandir", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values_release_files_false_sets_root_uri", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_boolean", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test_deprecated_keys"] | ["src/bandersnatch/tests/test_mirror.py::test_package_sync_downloads_release_file", "src/bandersnatch/tests/test_mirror.py::test_package_sync_does_not_touch_existing_local_file", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_copy_file", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_root_uri", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_empty_todo_list", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_scandir", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package - Runti...", "src/bandersnatch/tests/test_mirror.py::test_mirror_recovers_from_inconsistent_serial", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_existing_dir", "src/bandersnatch/tests/test_mirror.py::test_mirror_json_metadata - Runt...", "src/bandersnatch/tests/test_mirror.py::test_sync_incorrect_download_with_old_serials_retries", "src/bandersnatch/tests/test_mirror.py::test_mirror_filter_packages_match", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror_fails", "src/bandersnatch/tests/test_mirror.py::test_package_download_rejects_non_package_directory_links", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_mkdir_rmdir", "src/bandersnatch/tests/test_mirror.py::test_gen_html_file_tags - Runtim...", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_path_glob", "src/bandersnatch/tests/test_mirror.py::test_mirror_with_same_homedir_needs_lock", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_with_hash", "src/bandersnatch/tests/test_mirror.py::test_survives_exceptions_from_record_finished_package", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_error_no_early_exit", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_file_size", "src/bandersnatch/tests/test_mirror.py::test_mirror_empty_resume_from_todo_list", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror_fallback", "src/bandersnatch/tests/test_mirror.py::test_sync_incorrect_download_with_current_serial_fails", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_skip_index", "src/bandersnatch/tests/test_mirror.py::test_package_sync_handles_non_pep_503_in_packages_to_sync", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_broken_todo_list", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_existing_dir_with_hash", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_delete_path", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_plugin_init", "src/bandersnatch/tests/test_mirror.py::test_cleanup_non_pep_503_paths", "src/bandersnatch/tests/test_mirror.py::test_mirror_loads_serial - Runt...", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_update_safe", "src/bandersnatch/tests/test_mirror.py::test_package_sync_replaces_mismatching_local_files", "src/bandersnatch/tests/test_mirror.py::test_write_simple_pages - Runtim...", "src/bandersnatch/tests/test_mirror.py::test_determine_packages_to_sync", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_lock - b...", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_canonical_simple_page", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_normalized_simple_page", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_path_mkdir", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_release_no_files_syncs_simple_page", "src/bandersnatch/tests/test_mirror.py::test_mirror_filter_packages_nomatch_package_with_spec", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_upload_time", "src/bandersnatch/tests/test_mirror.py::test_mirror_serial_current_no_sync_of_packages_and_index_page", "src/bandersnatch/tests/test_mirror.py::test_validate_todo - RuntimeErro...", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_delete_file", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_stores_different_prior_versions", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_plugin_init_with_boto3_configs", "src/bandersnatch/tests/test_mirror.py::test_mirror_generation_3_resets_status_files", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_compare_files", "src/bandersnatch/tests/test_mirror.py::test_sync_keeps_superfluous_files_on_nondeleting_mirror", "src/bandersnatch/tests/test_mirror.py::test_package_sync_skips_release_file", "src/bandersnatch/tests/test_mirror.py::test_mirror_generation_4_resets_status_files", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_rewrite", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_release_no_files_syncs_simple_page_with_hash", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_error_keeps_it_on_todo_list", "src/bandersnatch/tests/test_mirror.py::test_metadata_404_keeps_package_on_non_deleting_mirror", "src/bandersnatch/tests/test_mirror.py::test_find_package_indexes_in_dir_threaded", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_files", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_read_write_file", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_stores_one_prior_version", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_canonical_simple_page_with_hash", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_old_status_and_todo_inits_generation", "src/bandersnatch/tests/test_mirror.py::test_mirror_empty_master_gets_index", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_removes_old_versions", "src/bandersnatch/tests/test_delete.py::test_delete_path - RuntimeError..."] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cacheprovider\n\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py3\n\n[testenv]\ncommands =\n coverage run -m pytest --color=no -rA --tb=no -p no:cacheprovider --strict-markers {posargs}\n coverage report -m\n coverage html\n coverage xml\ndeps =\n -r requirements.txt\n -r requirements_s3.txt\n -r requirements_swift.txt\n -r requirements_test.txt\npassenv =\n os\n CI\n\n[testenv:doc_build]\nbasepython=python3\ncommands =\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b html docs docs/html\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b linkcheck docs docs/html\nchangedir = {toxinidir}\ndeps = -r requirements_docs.txt\n\nextras = doc_build\npassenv = SSH_AUTH_SOCK\nsetenv =\n SPHINX_THEME=\\'pypa\\'\n\n[isort]\natomic = true\nnot_skip = __init__.py\nline_length = 88\nmulti_line_output = 3\nforce_grid_wrap = 0\nuse_parentheses=True\ninclude_trailing_comma = True\n\nEOF_1234810234"], "python": "3.12", "pip_packages": ["aiohttp==3.9.4", "aiohttp-socks==0.8.4", "aiohttp-xmlrpc==1.5.0", "aiosignal==1.3.1", "async-timeout==4.0.3", "attrs==23.2.0", "black==24.4.2", "cachetools==5.3.3", "cfgv==3.4.0", "chardet==5.2.0", "click==8.1.7", "colorama==0.4.6", "coverage==7.5.2", "distlib==0.3.8", "filelock==3.14.0", "flake8==7.0.0", "flake8-bugbear==24.2.6", "freezegun==1.4.0", "frozenlist==1.4.1", "humanfriendly==10.0", "identify==2.5.36", "idna==3.7", "importlib-metadata==7.1.0", "iniconfig==2.0.0", "lxml==5.2.2", "mccabe==0.7.0", "multidict==6.0.5", "mypy==1.10.0", "mypy-extensions==1.0.0", "nodeenv==1.9.0", "packaging==23.2", "pathspec==0.12.1", "platformdirs==4.2.2", "pluggy==1.5.0", "pre-commit==3.6.2", "pycodestyle==2.11.1", "pyflakes==3.2.0", "pyparsing==3.1.1", "pyproject-api==1.6.1", "pytest==7.4.4", "pytest-asyncio==0.23.7", "pytest-timeout==2.3.1", "python-dateutil==2.9.0.post0", "python-socks==2.4.4", "pyyaml==6.0.1", "setuptools==70.0.0", "six==1.16.0", "tox==4.15.0", "types-filelock==3.2.7", "types-freezegun==1.1.10", "types-pkg-resources==0.1.3", "typing-extensions==4.12.0", "virtualenv==20.26.2", "wheel==0.44.0", "yarl==1.9.4", "zipp==3.19.0"]} | tox -e py3 -- | null | null | null | swa-bench:sw.eval |
pypa/bandersnatch | pypa__bandersnatch-1557 | 963f9ef61500b5794006bc5029cfc89a84b8e76a | diff --git a/CHANGES.md b/CHANGES.md
index 0776235f5..fb6e904d6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,6 @@
# 6.4.0 (Unreleased)
+- Move JSON Simple API to version 1.1 (as per PEP700) `PR #1557`
- Move to >= 3.10 project `PR #1457`
## Bug Fixes
diff --git a/src/bandersnatch/default.conf b/src/bandersnatch/default.conf
index ef7794f32..510c89a02 100644
--- a/src/bandersnatch/default.conf
+++ b/src/bandersnatch/default.conf
@@ -1,6 +1,7 @@
[mirror]
; The directory where the mirror data will be stored.
directory = /srv/pypi
+
; Save JSON metadata into the web tree:
; URL/pypi/PKG_NAME/json (Symlink) -> URL/json/PKG_NAME
json = false
diff --git a/src/bandersnatch/simple.py b/src/bandersnatch/simple.py
index 3cf461922..c657eedfb 100644
--- a/src/bandersnatch/simple.py
+++ b/src/bandersnatch/simple.py
@@ -81,8 +81,9 @@ class SimpleAPI:
# PEP620 Simple API Version
pypi_repository_version = "1.0"
- # PEP691 Simple API Version
- pypi_simple_api_version = "1.0"
+ # PEP691 Simple API Version 1.0
+ # PEP700 defines 1.1
+ pypi_simple_api_version = "1.1"
def __init__(
self,
@@ -215,6 +216,8 @@ def generate_json_simple_page(
"_last-serial": str(package.last_serial),
},
"name": package.name,
+ # TODO: Just sorting by default sort - Maybe specify order in future PEP
+ "versions": sorted(package.releases.keys()),
}
release_files = package.release_files
@@ -229,6 +232,8 @@ def generate_json_simple_page(
self.digest_name: r["digests"][self.digest_name],
},
"requires-python": r.get("requires_python", ""),
+ "size": r["size"],
+ "upload-time": r.get("upload_time_iso_8601", ""),
"url": self._file_url_to_local_url(r["url"]),
"yanked": r.get("yanked", False),
}
@@ -263,7 +268,10 @@ def sync_index_page(
simple_json_path = simple_dir / "index.v1_json"
simple_json: dict[str, Any] = {
- "meta": {"_last-serial": serial, "api-version": "1.0"},
+ "meta": {
+ "_last-serial": serial,
+ "api-version": self.pypi_simple_api_version,
+ },
"projects": [],
}
| diff --git a/src/bandersnatch/tests/test_simple.py b/src/bandersnatch/tests/test_simple.py
index 997253099..039ee81b9 100644
--- a/src/bandersnatch/tests/test_simple.py
+++ b/src/bandersnatch/tests/test_simple.py
@@ -18,8 +18,8 @@
from bandersnatch.storage import Storage
from bandersnatch.tests.test_simple_fixtures import (
EXPECTED_SIMPLE_GLOBAL_JSON_PRETTY,
- EXPECTED_SIMPLE_SIXTYNINE_JSON,
- EXPECTED_SIMPLE_SIXTYNINE_JSON_PRETTY,
+ EXPECTED_SIMPLE_SIXTYNINE_JSON_1_1,
+ EXPECTED_SIMPLE_SIXTYNINE_JSON_PRETTY_1_1,
SIXTYNINE_METADATA,
)
from bandersnatch_storage_plugins.filesystem import FilesystemStorage
@@ -58,9 +58,9 @@ def test_json_package_page() -> None:
s = SimpleAPI(Storage(), SimpleFormat.JSON, [], SimpleDigest.SHA256, False, None)
p = Package("69")
p._metadata = SIXTYNINE_METADATA
- assert EXPECTED_SIMPLE_SIXTYNINE_JSON == s.generate_json_simple_page(p)
+ assert EXPECTED_SIMPLE_SIXTYNINE_JSON_1_1 == s.generate_json_simple_page(p)
# Only testing pretty so it's easier for humans ...
- assert EXPECTED_SIMPLE_SIXTYNINE_JSON_PRETTY == s.generate_json_simple_page(
+ assert EXPECTED_SIMPLE_SIXTYNINE_JSON_PRETTY_1_1 == s.generate_json_simple_page(
p, pretty=True
)
diff --git a/src/bandersnatch/tests/test_simple_fixtures.py b/src/bandersnatch/tests/test_simple_fixtures.py
index bc7058ca2..139fe7b07 100644
--- a/src/bandersnatch/tests/test_simple_fixtures.py
+++ b/src/bandersnatch/tests/test_simple_fixtures.py
@@ -108,11 +108,11 @@
"vulnerabilities": [],
}
-EXPECTED_SIMPLE_SIXTYNINE_JSON = """\
-{"files": [{"filename": "69-0.69.tar.gz", "hashes": {"sha256": "5c11f48399f9b1bca802751513f1f97bff6ce97e6facb576b7729e1351453c10"}, "requires-python": ">=3.6", "url": "../../packages/d3/cc/95dc5434362bd333a1fec275231775d748315b26edf1e7e568e6f8660238/69-0.69.tar.gz", "yanked": false}, {"filename": "69-6.9.tar.gz", "hashes": {"sha256": "0c8deb7c8574787283c3fc08b714ee63fd6752a38d13515a9d8508798d428597"}, "requires-python": ">=3.6", "url": "../../packages/7b/6e/7c4ce77c6ca092e94e19b78282b459e7f8270362da655cbc6a75eeb9cdd7/69-6.9.tar.gz", "yanked": false}], "meta": {"api-version": "1.0", "_last-serial": "10333928"}, "name": "69"}\
+EXPECTED_SIMPLE_SIXTYNINE_JSON_1_1 = """\
+{"files": [{"filename": "69-0.69.tar.gz", "hashes": {"sha256": "5c11f48399f9b1bca802751513f1f97bff6ce97e6facb576b7729e1351453c10"}, "requires-python": ">=3.6", "size": 1078, "upload-time": "2018-05-17T03:37:19.330556Z", "url": "../../packages/d3/cc/95dc5434362bd333a1fec275231775d748315b26edf1e7e568e6f8660238/69-0.69.tar.gz", "yanked": false}, {"filename": "69-6.9.tar.gz", "hashes": {"sha256": "0c8deb7c8574787283c3fc08b714ee63fd6752a38d13515a9d8508798d428597"}, "requires-python": ">=3.6", "size": 1077, "upload-time": "2018-05-17T03:47:45.953704Z", "url": "../../packages/7b/6e/7c4ce77c6ca092e94e19b78282b459e7f8270362da655cbc6a75eeb9cdd7/69-6.9.tar.gz", "yanked": false}], "meta": {"api-version": "1.1", "_last-serial": "10333928"}, "name": "69", "versions": ["0.69", "6.9"]}\
"""
-EXPECTED_SIMPLE_SIXTYNINE_JSON_PRETTY = """\
+EXPECTED_SIMPLE_SIXTYNINE_JSON_PRETTY_1_1 = """\
{
"files": [
{
@@ -121,6 +121,8 @@
"sha256": "5c11f48399f9b1bca802751513f1f97bff6ce97e6facb576b7729e1351453c10"
},
"requires-python": ">=3.6",
+ "size": 1078,
+ "upload-time": "2018-05-17T03:37:19.330556Z",
"url": "../../packages/d3/cc/95dc5434362bd333a1fec275231775d748315b26edf1e7e568e6f8660238/69-0.69.tar.gz",
"yanked": false
},
@@ -130,15 +132,21 @@
"sha256": "0c8deb7c8574787283c3fc08b714ee63fd6752a38d13515a9d8508798d428597"
},
"requires-python": ">=3.6",
+ "size": 1077,
+ "upload-time": "2018-05-17T03:47:45.953704Z",
"url": "../../packages/7b/6e/7c4ce77c6ca092e94e19b78282b459e7f8270362da655cbc6a75eeb9cdd7/69-6.9.tar.gz",
"yanked": false
}
],
"meta": {
- "api-version": "1.0",
+ "api-version": "1.1",
"_last-serial": "10333928"
},
- "name": "69"
+ "name": "69",
+ "versions": [
+ "0.69",
+ "6.9"
+ ]
}\
"""
@@ -146,7 +154,7 @@
{
"meta": {
"_last-serial": 12345,
- "api-version": "1.0"
+ "api-version": "1.1"
},
"projects": [
{
| Ensure bandersnatch implements pep700 fields
https://peps.python.org/pep-0700/
- The api-version must specify version 1.1 or later.
- A new versions key is added at the top level.
- Two new “file information” keys, size and upload-time, are added to the files data.
Keys (at any level) with a leading underscore are reserved as private for index server use. No future standard will assign a meaning to any such key.
| 2023-09-23T02:03:32Z | 2023-09-26T02:11:15Z | ["src/bandersnatch/tests/test_simple.py::test_format_invalid", "src/bandersnatch/tests/test_simple.py::test_digest_invalid", "src/bandersnatch/tests/test_simple.py::test_digest_valid", "src/bandersnatch/tests/test_simple.py::test_format_valid"] | [] | ["src/bandersnatch/tests/test_simple.py::test_json_index_page", "src/bandersnatch/tests/test_simple.py::test_json_package_page", "src/bandersnatch/tests/test_simple.py::test_digest_config_default"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cacheprovider\n\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py3\n\n[testenv]\ncommands =\n coverage run -m pytest --color=no -rA --tb=no -p no:cacheprovider --strict-markers {posargs}\n coverage report -m\n coverage html\n coverage xml\ndeps =\n -r requirements.txt\n -r requirements_s3.txt\n -r requirements_swift.txt\n -r requirements_test.txt\npassenv =\n os\n CI\n\n[testenv:doc_build]\nbasepython=python3\ncommands =\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b html docs docs/html\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b linkcheck docs docs/html\nchangedir = {toxinidir}\ndeps = -r requirements_docs.txt\n\nextras = doc_build\npassenv = SSH_AUTH_SOCK\nsetenv =\n SPHINX_THEME=\\'pypa\\'\n\n[isort]\natomic = true\nnot_skip = __init__.py\nline_length = 88\nmulti_line_output = 3\nforce_grid_wrap = 0\nuse_parentheses=True\ninclude_trailing_comma = True\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["aiohttp==3.8.5", "aiohttp-socks==0.8.3", "aiohttp-xmlrpc==1.5.0", "aiosignal==1.3.1", "async-timeout==4.0.3", "attrs==23.1.0", "black==23.7.0", "cachetools==5.3.1", "cfgv==3.4.0", "chardet==5.2.0", "charset-normalizer==3.2.0", "click==8.1.7", "colorama==0.4.6", "coverage==7.3.1", "distlib==0.3.7", "filelock==3.12.4", "flake8==6.1.0", "flake8-bugbear==23.9.16", "freezegun==1.2.2", "frozenlist==1.4.0", "humanfriendly==10.0", "identify==2.5.29", "idna==3.4", "iniconfig==2.0.0", "lxml==4.9.3", "mccabe==0.7.0", "multidict==6.0.4", "mypy==1.5.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pathspec==0.11.2", "platformdirs==3.10.0", "pluggy==1.3.0", "pre-commit==3.4.0", "pycodestyle==2.11.0", "pyflakes==3.1.0", "pyparsing==3.1.1", "pyproject-api==1.6.1", "pytest==7.4.2", "pytest-asyncio==0.21.1", "pytest-timeout==2.1.0", "python-dateutil==2.8.2", "python-socks==2.4.3", "pyyaml==6.0.1", "setuptools==68.2.0", "six==1.16.0", "tox==4.11.1", "types-filelock==3.2.7", "types-freezegun==1.1.10", "types-pkg-resources==0.1.3", "typing-extensions==4.8.0", "virtualenv==20.24.5", "wheel==0.44.0", "yarl==1.9.2"]} | tox -e py3 -- | null | null | null | swa-bench:sw.eval |
|
pypa/bandersnatch | pypa__bandersnatch-1495 | 052f1b2c5bcb775baeffe53703a95cc657eed469 | diff --git a/CHANGES.md b/CHANGES.md
index fc57d8147..0776235f5 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,10 @@
- Move to >= 3.10 project `PR #1457`
+## Bug Fixes
+
+- Support `py2` + `py3` bdist file name filtering `PR #1495`
+
# 6.3.0
## Bug Fixes
diff --git a/src/bandersnatch_filter_plugins/filename_name.py b/src/bandersnatch_filter_plugins/filename_name.py
index 7b15061d4..90c5bc56a 100644
--- a/src/bandersnatch_filter_plugins/filename_name.py
+++ b/src/bandersnatch_filter_plugins/filename_name.py
@@ -17,10 +17,12 @@ class ExcludePlatformFilter(FilterReleaseFilePlugin):
_packagetypes: list[str] = []
_pythonversions = [
+ "py2",
"py2.4",
"py2.5",
"py2.6",
"py2.7",
+ "py3",
"py3.0",
"py3.1",
"py3.2",
@@ -32,6 +34,8 @@ class ExcludePlatformFilter(FilterReleaseFilePlugin):
"py3.8",
"py3.9",
"py3.10",
+ "py3.11",
+ "py3.12",
]
_windowsPlatformTypes = [".win32", "-win32", "win_amd64", "win-amd64"]
| diff --git a/src/bandersnatch/tests/plugins/test_filename.py b/src/bandersnatch/tests/plugins/test_filename.py
index 15d48b407..fa960c1aa 100644
--- a/src/bandersnatch/tests/plugins/test_filename.py
+++ b/src/bandersnatch/tests/plugins/test_filename.py
@@ -40,6 +40,7 @@ class TestExcludePlatformFilter(BasePluginTestCase):
freebsd
macos
linux_armv7l
+ py3
py3.5
py3.7
py3.9
@@ -136,6 +137,11 @@ def test_exclude_platform(self) -> None:
"filename": "foobar-0.1-win32.whl",
"flag": "DROP",
},
+ {
+ "packagetype": "bdist_wheel",
+ "filename": "foobar-0.1-py3-none-any.whl",
+ "flag": "DROP",
+ },
],
"0.2": [
{
| Sync only python 2 packages
I'm trying to sync only packages compatible with Python 2 but it's not working
```
[mirror]
directory = /data/MINI_PYPI/bandersnatch/packages/
master = https://pypi.org
timeout = 20
workers = 3
hash-index = false
stop-on-error = false
json = true
[plugins]
enabled =
allowlist_project
regex_project_metadata
blocklist_project
exclude_platform
latest_release
[allowlist]
packages =
setuptools
[blocklist]
platforms =
windows
macos
freebsd
py3
py3.0
py3.1
py3.2
py3.3
py3.4
py3.5
py3.6
py3.7
py3.8
py3.9
py3.10
py3.11
[latest_release]
keep = 3
[regex_project_metadata]
any:info.classifiers =
.*Development Status :: *
.*Intended Audience :: *
.*License :: *
.*Operating System :: *
.*Topic :: *
not-null:info.classifiers =
.*Programming Language :: Python :: 2.*
```
| What is happening? I'm guessing it's downloading lots of python3 only packages you don't want? Describing that is always an advantage when you open an issue to help people find the bug / config error. Attaching run logs is always super helpful too.
I always recommend using as little plugins as possible, as there is very little testing of applying them all together. Interoperability of all the filtering plugins has never been super tested and the apply order isn't documented / tested.
I feel here cause you have on **setuptools** in `allowlist ` is the only package you pull?
so I removed all plugins and kept the following as you suggested
```
[mirror]
directory = /data/MINI_PYPI/bandersnatch/packages/
master = https://pypi.org
timeout = 20
workers = 3
hash-index = false
stop-on-error = false
json = true
[plugins]
enabled =
allowlist_project
blocklist_project
exclude_platform
[allowlist]
packages =
setuptools
[blocklist]
platforms =
windows
macos
freebsd
py3
py3.0
py3.1
py3.2
py3.3
py3.4
py3.5
py3.6
py3.7
py3.8
py3.9
py3.10
py3.11
```
I thought this would block the sync of all python3-compatible versions of setuptools. But it pulled all versions.
This is the log:
```
2023-07-12 09:22:55,420 INFO: No status file to move (/data/MINI_PYPI/bandersnatch/packages/status) - Full sync will occur (main.py:187)
2023-07-12 09:22:55,420 INFO: Selected storage backend: filesystem (configuration.py:131)
2023-07-12 09:22:55,420 INFO: Selected compare method: hash (configuration.py:179)
2023-07-12 09:22:55,431 INFO: Initialized project plugin allowlist_project, filtering ['setuptools'] (allowlist_name.py:33)
2023-07-12 09:22:55,432 INFO: Initialized project plugin blocklist_project, filtering [] (blocklist_name.py:27)
2023-07-12 09:22:55,446 INFO: Initialized exclude_platform plugin with ['.win32', '-win32', 'win_amd64', 'win-amd64', 'macosx_', 'macosx-', '.freebsd', '-freebsd', '-cp30-', '-pp30-', '-ip30-', '-jy30-', '-py3.0-', '-py3.0.', '-cp31-', '-pp31-', '-ip31-', '-jy31-', '-py3.1-', '-py3.1.', '-cp32-', '-pp32-', '-ip32-', '-jy32-', '-py3.2-', '-py3.2.', '-cp33-', '-pp33-', '-ip33-', '-jy33-', '-py3.3-', '-py3.3.', '-cp34-', '-pp34-', '-ip34-', '-jy34-', '-py3.4-', '-py3.4.', '-cp35-', '-pp35-', '-ip35-', '-jy35-', '-py3.5-', '-py3.5.', '-cp36-', '-pp36-', '-ip36-', '-jy36-', '-py3.6-', '-py3.6.', '-cp37-', '-pp37-', '-ip37-', '-jy37-', '-py3.7-', '-py3.7.', '-cp38-', '-pp38-', '-ip38-', '-jy38-', '-py3.8-', '-py3.8.', '-cp39-', '-pp39-', '-ip39-', '-jy39-', '-py3.9-', '-py3.9.', '-cp310-', '-pp310-', '-ip310-', '-jy310-', '-py3.10-', '-py3.10.'] (filename_name.py:108)
2023-07-12 09:22:55,449 INFO: Status file /data/MINI_PYPI/bandersnatch/packages/status missing. Starting over. (mirror.py:566)
2023-07-12 09:22:55,449 INFO: Syncing with https://pypi.org. (mirror.py:57)
2023-07-12 09:22:55,449 INFO: Current mirror serial: 0 (mirror.py:278)
2023-07-12 09:22:55,449 INFO: Syncing all packages. (mirror.py:293)
2023-07-12 09:23:10,527 INFO: Package 'setuptools' is allowlisted (allowlist_name.py:90)
2023-07-12 09:23:10,735 INFO: Trying to reach serial: 18856834 (mirror.py:310)
2023-07-12 09:23:10,735 INFO: 1 packages to sync. (mirror.py:312)
2023-07-12 09:23:10,745 INFO: No metadata filters are enabled. Skipping metadata filtering (mirror.py:76)
2023-07-12 09:23:10,746 INFO: No release filters are enabled. Skipping release filtering (mirror.py:78)
2023-07-12 09:23:10,746 INFO: Fetching metadata for package: setuptools (serial 18561969) (package.py:58)
```
To answer your question, for now, I only need setup-tools. My aim is to sync only needed packages. I don't want all of the packages present in my repo | 2023-07-12T21:13:56Z | 2023-07-12T22:43:28Z | ["src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_delete_file", "src/bandersnatch/tests/plugins/test_filename.py::TestExcludePlatformFilter::test_plugin_compiles_patterns", "src/bandersnatch/tests/test_mirror.py::test_package_sync_downloads_release_file", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListRelease::test__plugin__doesnt_load__explicitly__disabled", "src/bandersnatch/tests/test_main.py::test_main_create_config", "src/bandersnatch/tests/test_mirror.py::test_package_sync_does_not_touch_existing_local_file", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_empty_todo_list", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_root_uri", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_multiple_instances_custom_setting_str", "src/bandersnatch/tests/test_master.py::test_changed_packages_no_changes", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_read_file", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_int", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_iter_dir", "src/bandersnatch/tests/test_simple.py::test_json_package_page", "src/bandersnatch/tests/plugins/test_prerelease_name.py::TestRegexReleaseFilter::test_plugin_filter_packages", "src/bandersnatch/tests/test_mirror.py::test_limit_workers", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_is_dir", "src/bandersnatch/tests/test_main.py::test_main_reads_custom_config_values", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_compare_files", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_rmdir", "src/bandersnatch/tests/plugins/test_metadata_plugins.py::TestSizeProjectMetadataFilter::test__size__plugin__loads__and__initializes", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowListProject::test__filter__commented__out", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRequirements::test__filter__requirements__pip__options", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__mirror__setting__types", "src/bandersnatch/tests/test_mirror.py::test_mirror_recovers_from_inconsistent_serial", "src/bandersnatch/tests/test_verify.py::test_delete_unowned_files", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_project_blocklist_allowlist__pep503_normalize", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListProject::test__filter__nomatch_package", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_iter_dir", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_is_singleton", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_existing_dir", "src/bandersnatch/tests/test_master.py::test_all_packages", "src/bandersnatch/tests/test_master.py::test_session_raise_for_status", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_write_file", "src/bandersnatch/tests/test_utils.py::test_convert_url_to_path", "src/bandersnatch/tests/test_master.py::test_master_url_fetch", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_open_file", "src/bandersnatch/tests/test_mirror.py::test_sync_incorrect_download_with_old_serials_retries", "src/bandersnatch/tests/test_mirror.py::test_mirror_filter_packages_match", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_symlink", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_open_file", "src/bandersnatch/tests/test_master.py::test_disallow_http", "src/bandersnatch/tests/test_verify.py::test_get_latest_json_timeout", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror_fails", "src/bandersnatch/tests/test_mirror.py::test_package_download_rejects_non_package_directory_links", "src/bandersnatch/tests/test_utils.py::test_rewrite", "src/bandersnatch/tests/test_utils.py::test_bandersnatch_safe_name", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_with_hash", "src/bandersnatch/tests/test_mirror.py::test_mirror_with_same_homedir_needs_lock", "src/bandersnatch/tests/plugins/test_regex_name.py::TestRegexReleaseFilter::test_plugin_compiles_patterns", "src/bandersnatch/tests/test_mirror.py::test_survives_exceptions_from_record_finished_package", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_scandir", "src/bandersnatch/tests/test_delete.py::test_delete_packages_no_exist", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_canonicalize_package", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_rewrite", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_error_no_early_exit", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowListProject::test__filter__nomatch_package", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowListProject::test__filter__varying__specifiers", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_project_plugins__loads", "src/bandersnatch/tests/test_simple.py::test_format_valid", "src/bandersnatch/tests/test_mirror.py::test_mirror_empty_resume_from_todo_list", "src/bandersnatch/tests/plugins/test_metadata_plugins.py::TestSizeProjectMetadataFilter::test__filter__size__only", "src/bandersnatch/tests/plugins/test_prerelease_name.py::TestRegexReleaseFilter::test_plugin_includes_predefined_patterns", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror", "src/bandersnatch/tests/test_verify.py::test_verify_producer", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror_fallback", "src/bandersnatch/tests/test_simple.py::test_digest_config_default", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_copy_file", "src/bandersnatch/tests/test_main.py::test_main_help", "src/bandersnatch/tests/test_mirror.py::test_sync_incorrect_download_with_current_serial_fails", "src/bandersnatch/tests/test_utils.py::test_rewrite_fails", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_skip_index", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_is_file", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_json_paths", "src/bandersnatch/tests/test_mirror.py::test_package_sync_handles_non_pep_503_in_packages_to_sync", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_broken_todo_list", "src/bandersnatch/tests/plugins/test_regex_name.py::TestRegexProjectFilter::test_plugin_check_match", "src/bandersnatch/tests/test_utils.py::test_user_agent", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_compare_files", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_existing_dir_with_hash", "src/bandersnatch/tests/test_utils.py::test_hash", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowListProject::test__filter__matches__package", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRelease::test__dont__filter__prereleases", "src/bandersnatch/tests/plugins/test_regex_name.py::TestRegexReleaseFilter::test_plugin_check_match", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_write_file", "src/bandersnatch/tests/test_delete.py::test_delete_packages", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_symlink", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListProject::test__filter__name_only", "src/bandersnatch/tests/test_mirror.py::test_cleanup_non_pep_503_paths", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_is_file", "src/bandersnatch/tests/plugins/test_metadata_plugins.py::TestSizeProjectMetadataFilter::test__filter__size__or__allowlist", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_is_dir", "src/bandersnatch/tests/test_verify.py::test_get_latest_json", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListRelease::test__casing__no__affect", "src/bandersnatch/tests/plugins/test_prerelease_name.py::TestRegexReleaseFilter::test_plugin_filter_all", "src/bandersnatch/tests/test_mirror.py::test_package_sync_replaces_mismatching_local_files", "src/bandersnatch/tests/test_simple.py::test_json_index_page", "src/bandersnatch/tests/test_master.py::test_changed_packages_with_changes", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_rmdir", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_removes_old_versions", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListProject::test__filter__matches__package", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRequirements::test__filter__find__glob__files", "src/bandersnatch/tests/test_mirror.py::test_write_simple_pages", "src/bandersnatch/tests/test_package.py::test_package_update_metadata_gives_up_after_3_timeouts", "src/bandersnatch/tests/plugins/test_latest_release.py::TestLatestReleaseFilter::test_plugin_compiles_patterns", "src/bandersnatch/tests/test_mirror.py::test_determine_packages_to_sync", "src/bandersnatch/tests/test_master.py::test_master_doesnt_raise_if_serial_equal", "src/bandersnatch/tests/test_simple.py::test_digest_invalid", "src/bandersnatch/tests/plugins/test_latest_release.py::TestLatestReleaseFilterUninitialized::test_latest_releases_uninitialized", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_plugin_type", "src/bandersnatch/tests/test_master.py::test_all_packages_raises", "src/bandersnatch/tests/test_verify.py::test_verify_url_exception", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_copy_file", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListRelease::test__filter__matches__release", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_canonical_simple_page", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowListProject::test__plugin__loads__explicitly_enabled", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRequirements::test__filter__find_files", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__all_sections_present", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_normalized_simple_page", "src/bandersnatch/tests/test_master.py::test_xmlrpc_user_agent", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRelease::test__plugin__doesnt_load__explicitly__disabled", "src/bandersnatch/tests/test_master.py::test_rpc_url", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListProject::test__plugin__loads__explicitly_enabled", "src/bandersnatch/tests/test_simple.py::test_digest_valid", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_json_paths", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_get_hash", "src/bandersnatch/tests/test_mirror.py::test_mirror_json_metadata", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_release_no_files_syncs_simple_page", "src/bandersnatch/tests/test_utils.py::test_find_files", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_delete", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_mkdir", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values_download_mirror_false_sets_no_fallback", "src/bandersnatch/tests/test_delete.py::test_delete_path", "src/bandersnatch/tests/test_mirror.py::test_mirror_filter_packages_nomatch_package_with_spec", "src/bandersnatch/tests/test_verify.py::test_get_latest_json_404", "src/bandersnatch/tests/test_mirror.py::test_mirror_serial_current_no_sync_of_packages_and_index_page", "src/test_docker_runner.py::TestRunner::test__parseHourList__function", "src/bandersnatch/tests/test_utils.py::test_parse_version", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_hash_file", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config__default__mirror__setting_attributes", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_read_file", "src/bandersnatch/tests/test_mirror.py::test_mirror_loads_serial", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_stores_different_prior_versions", "src/bandersnatch/tests/test_package.py::test_package_update_metadata_gives_up_after_3_stale_responses", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListProject::test__plugin__doesnt_load__explicitly__disabled", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_release_plugins__loads", "src/bandersnatch/tests/test_mirror.py::test_mirror_generation_3_resets_status_files", "src/bandersnatch/tests/plugins/test_latest_release.py::TestLatestReleaseFilter::test_latest_releases_keep_stable", "src/bandersnatch/tests/test_simple.py::test_format_invalid", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_update_safe", "src/bandersnatch/tests/test_delete.py::test_delete_simple_page", "src/bandersnatch/tests/test_delete.py::test_delete_package_json_not_exists", "src/bandersnatch/tests/test_mirror.py::test_sync_keeps_superfluous_files_on_nondeleting_mirror", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRelease::test__casing__no__affect", "src/bandersnatch/tests/test_verify.py::test_fake_mirror", "src/bandersnatch/tests/plugins/test_regex_name.py::TestRegexProjectFilter::test_plugin_compiles_patterns", "src/bandersnatch/tests/test_utils.py::test_removeprefix", "src/bandersnatch/tests/test_utils.py::test_unlink_parent_dir", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_find", "src/bandersnatch/tests/test_main.py::test_main_throws_exception_on_unsupported_digest_name", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowListProject::test__filter__name_only", "src/bandersnatch/tests/test_mirror.py::test_package_sync_skips_release_file", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListRelease::test__dont__filter__prereleases", "src/bandersnatch/tests/test_master.py::test_master_raises_if_serial_too_small", "src/bandersnatch/tests/plugins/test_latest_release.py::TestLatestReleaseFilter::test_latest_releases_keep_latest", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_hash_file", "src/bandersnatch/tests/test_mirror.py::test_mirror_generation_4_resets_status_files", "src/bandersnatch/tests/test_mirror.py::test_validate_todo", "src/bandersnatch/tests/test_sync.py::test_sync_specific_packages", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_no_plugin", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_str", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_release_no_files_syncs_simple_page_with_hash", "src/bandersnatch/tests/test_master.py::test_check_for_socks_proxy", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_error_keeps_it_on_todo_list", "src/bandersnatch/tests/test_mirror.py::test_metadata_404_keeps_package_on_non_deleting_mirror", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_plugin_type", "src/bandersnatch/tests/test_mirror.py::test_find_package_indexes_in_dir_threaded", "src/bandersnatch/tests/test_verify.py::test_metadata_verify", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_rewrite", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListProject::test__plugin__loads__default", "src/bandersnatch/tests/plugins/test_latest_release.py::TestLatestReleaseFilter::test_latest_releases_ensure_reusable", "src/bandersnatch/tests/test_mirror.py::test_gen_html_file_tags", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestFilesystemStoragePlugin::test_scandir", "src/bandersnatch/tests/test_package.py::test_package_accessors", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowListProject::test__plugin__loads__default", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_delete_file", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListRelease::test__plugin__loads__explicitly_enabled", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_mkdir", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRelease::test__plugin__loads__explicitly_enabled", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRelease::test__filter__matches__release__commented__inline", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_files", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRequirements::test__filter__matches__release", "src/bandersnatch/tests/test_main.py::test_main_reads_config_values", "src/bandersnatch/tests/plugins/test_latest_release.py::TestLatestReleaseFilterUninitialized::test_plugin_compiles_patterns", "src/bandersnatch/tests/test_package.py::test_package_not_found", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_get_hash", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test__filter_base_clases", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRequirements::test__plugin__doesnt_load__explicitly__disabled", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_stores_one_prior_version", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_canonical_simple_page_with_hash", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_update_safe", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_delete", "src/bandersnatch/tests/test_utils.py::test_rewrite_nonexisting_file", "src/bandersnatch/tests/plugins/test_blocklist_name.py::TestBlockListProject::test__filter__varying__specifiers", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_validate_config_values_release_files_false_sets_root_uri", "src/bandersnatch/tests/test_main.py::test_main_cant_create_config", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRequirements::test__plugin__loads__explicitly_enabled", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_find", "src/bandersnatch/tests/plugins/test_storage_plugins.py::TestSwiftStoragePlugin::test_canonicalize_package", "src/bandersnatch/tests/test_configuration.py::TestBandersnatchConf::test_single_config_custom_setting_boolean", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_old_status_and_todo_inits_generation", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRequirements::test__filter__requirements__utf16__encoding", "src/bandersnatch/tests/test_filter.py::TestBandersnatchFilter::test_deprecated_keys", "src/bandersnatch/tests/plugins/test_allowlist_name.py::TestAllowlistRelease::test__filter__matches__release", "src/bandersnatch/tests/test_mirror.py::test_mirror_empty_master_gets_index"] | [] | ["src/bandersnatch/tests/plugins/test_filename.py::TestExcludePlatformFilter::test_exclude_platform"] | ["src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_copy_file", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_scandir", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_mkdir_rmdir", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_path_glob", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_file_size", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_delete_path", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_plugin_init", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_update_safe", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_lock - b...", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_path_mkdir", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_upload_time", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_delete_file", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_compare_files", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_rewrite", "src/bandersnatch/tests/plugins/test_storage_plugin_s3.py::test_read_write_file"] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cacheprovider\n\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py3\n\n[testenv]\ncommands =\n coverage run -m pytest --color=no -rA --tb=no -p no:cacheprovider --strict-markers {posargs}\n coverage report -m\n coverage html\n coverage xml\ndeps =\n -r requirements.txt\n -r requirements_s3.txt\n -r requirements_swift.txt\n -r requirements_test.txt\npassenv =\n os\n CI\n\n[testenv:doc_build]\nbasepython=python3\ncommands =\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b html docs docs/html\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b linkcheck docs docs/html\nchangedir = {toxinidir}\ndeps = -r requirements_docs.txt\n\nextras = doc_build\npassenv = SSH_AUTH_SOCK\nsetenv =\n SPHINX_THEME=\\'pypa\\'\n\n[isort]\natomic = true\nnot_skip = __init__.py\nline_length = 88\nmulti_line_output = 3\nforce_grid_wrap = 0\nuse_parentheses=True\ninclude_trailing_comma = True\n\nEOF_1234810234"], "python": "3.11", "pip_packages": ["aiohttp==3.8.4", "aiohttp-socks==0.8.0", "aiohttp-xmlrpc==1.5.0", "aiosignal==1.3.1", "async-timeout==4.0.2", "attrs==23.1.0", "black==23.3.0", "cachetools==5.3.1", "cfgv==3.3.1", "chardet==5.1.0", "charset-normalizer==3.2.0", "click==8.1.4", "colorama==0.4.6", "coverage==7.2.7", "distlib==0.3.6", "filelock==3.12.2", "flake8==6.0.0", "flake8-bugbear==23.6.5", "freezegun==1.2.2", "frozenlist==1.4.0", "humanfriendly==10.0", "identify==2.5.24", "idna==3.4", "iniconfig==2.0.0", "lxml==4.9.2", "mccabe==0.7.0", "multidict==6.0.4", "mypy==1.4.1", "mypy-extensions==1.0.0", "nodeenv==1.8.0", "packaging==23.1", "pathspec==0.11.1", "platformdirs==3.8.1", "pluggy==1.2.0", "pre-commit==3.3.3", "pycodestyle==2.10.0", "pyflakes==3.0.1", "pyparsing==3.1.0", "pyproject-api==1.5.3", "pytest==7.4.0", "pytest-asyncio==0.21.0", "pytest-timeout==2.1.0", "python-dateutil==2.8.2", "python-socks==2.3.0", "pyyaml==6.0", "setuptools==68.0.0", "six==1.16.0", "tox==4.5.1", "types-filelock==3.2.7", "types-freezegun==1.1.10", "types-pkg-resources==0.1.3", "typing-extensions==4.7.1", "virtualenv==20.23.1", "wheel==0.44.0", "yarl==1.9.2"]} | null | ["tox -e py3"] | null | null | swa-bench:sw.eval |
pypa/bandersnatch | pypa__bandersnatch-1248 | 9ac0603304f534feffd9a4fe3a766a10a44cc7ce | diff --git a/CHANGES.md b/CHANGES.md
index 4a181b733..059aac7ed 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -4,6 +4,7 @@
## Bug Fixes
+- Fixed JSON only mirroring adding correct path to diff_file_list `PR #1248`
- Fixed requirements file parsing when it contains pip options `PR #1231`
## New Features
diff --git a/src/bandersnatch/mirror.py b/src/bandersnatch/mirror.py
index 82654c786..5444cd70e 100644
--- a/src/bandersnatch/mirror.py
+++ b/src/bandersnatch/mirror.py
@@ -725,7 +725,7 @@ def write_simple_pages(self, package: Package, content: SimpleFormats) -> None:
simple_json_page, "w", encoding="utf-8"
) as f:
f.write(content.json)
- self.diff_file_list.append(simple_page)
+ self.diff_file_list.append(simple_json_page)
def _save_simple_page_version(
self, package: Package, content: SimpleFormats
| diff --git a/src/bandersnatch/tests/test_mirror.py b/src/bandersnatch/tests/test_mirror.py
index ec257e5af..0c16b5b41 100644
--- a/src/bandersnatch/tests/test_mirror.py
+++ b/src/bandersnatch/tests/test_mirror.py
@@ -14,6 +14,7 @@
from bandersnatch.master import Master
from bandersnatch.mirror import BandersnatchMirror
from bandersnatch.package import Package
+from bandersnatch.simple import SimpleFormats
from bandersnatch.tests.test_simple_fixtures import SIXTYNINE_METADATA
from bandersnatch.utils import WINDOWS, make_time_stamp
@@ -1259,13 +1260,20 @@ def test_determine_packages_to_sync(mirror: BandersnatchMirror) -> None:
def test_write_simple_pages(mirror: BandersnatchMirror) -> None:
+ html_content = SimpleFormats(html="html", json="")
+ json_content = SimpleFormats(html="", json="json")
package = Package("69")
package._metadata = SIXTYNINE_METADATA
with TemporaryDirectory() as td:
td_path = Path(td)
- package_simple_dir = td_path / "simple" / package.name
+ package_simple_dir = td_path / "web" / "simple" / package.name
package_simple_dir.mkdir(parents=True)
- mirror.homedir = mirror.storage_backend.PATH_BACKEND(str(td_path))
+ mirror.homedir = mirror.storage_backend.PATH_BACKEND(str(td_path))
+ # Run function for each format separately only
+ mirror.write_simple_pages(package, html_content)
+ mirror.write_simple_pages(package, json_content)
+ # Expect .html, .v1_html and .v1_json ...
+ assert 3 == len(mirror.diff_file_list)
if __name__ == "__main__":
| Errors when using `simple-format = JSON`
Hello,
When using the `simple-format = JSON' option, bandersnatch 6.0.0 crashes when downloading package.
The error come from [the write_simple_page function](https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/mirror.py#L712):
If `content.html` does not evaluate as True, then `simple_page` is never assigned.
| 2022-10-11T21:46:36Z | 2022-10-24T10:33:26Z | ["src/bandersnatch/tests/test_mirror.py::test_mirror_empty_resume_from_todo_list", "src/bandersnatch/tests/test_mirror.py::test_mirror_generation_4_resets_status_files", "src/bandersnatch/tests/test_mirror.py::test_package_sync_downloads_release_file", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror", "src/bandersnatch/tests/test_mirror.py::test_validate_todo", "src/bandersnatch/tests/test_mirror.py::test_mirror_json_metadata", "src/bandersnatch/tests/test_mirror.py::test_package_sync_does_not_touch_existing_local_file", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_empty_todo_list", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror_fallback", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_root_uri", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_release_no_files_syncs_simple_page", "src/bandersnatch/tests/test_mirror.py::test_sync_incorrect_download_with_current_serial_fails", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_release_no_files_syncs_simple_page_with_hash", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_error_keeps_it_on_todo_list", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_skip_index", "src/bandersnatch/tests/test_mirror.py::test_metadata_404_keeps_package_on_non_deleting_mirror", "src/bandersnatch/tests/test_mirror.py::test_package_sync_handles_non_pep_503_in_packages_to_sync", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_broken_todo_list", "src/bandersnatch/tests/test_mirror.py::test_mirror_filter_packages_nomatch_package_with_spec", "src/bandersnatch/tests/test_mirror.py::test_limit_workers", "src/bandersnatch/tests/test_mirror.py::test_find_package_indexes_in_dir_threaded", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_existing_dir_with_hash", "src/bandersnatch/tests/test_mirror.py::test_mirror_serial_current_no_sync_of_packages_and_index_page", "src/bandersnatch/tests/test_mirror.py::test_gen_html_file_tags", "src/bandersnatch/tests/test_mirror.py::test_mirror_recovers_from_inconsistent_serial", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_files", "src/bandersnatch/tests/test_mirror.py::test_package_sync_simple_page_with_existing_dir", "src/bandersnatch/tests/test_mirror.py::test_cleanup_non_pep_503_paths", "src/bandersnatch/tests/test_mirror.py::test_mirror_loads_serial", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_stores_different_prior_versions", "src/bandersnatch/tests/test_mirror.py::test_package_sync_replaces_mismatching_local_files", "src/bandersnatch/tests/test_mirror.py::test_sync_incorrect_download_with_old_serials_retries", "src/bandersnatch/tests/test_mirror.py::test_mirror_generation_3_resets_status_files", "src/bandersnatch/tests/test_mirror.py::test_mirror_filter_packages_match", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_stores_one_prior_version", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_canonical_simple_page_with_hash", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_download_mirror_fails", "src/bandersnatch/tests/test_mirror.py::test_sync_keeps_superfluous_files_on_nondeleting_mirror", "src/bandersnatch/tests/test_mirror.py::test_package_download_rejects_non_package_directory_links", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_with_hash", "src/bandersnatch/tests/test_mirror.py::test_mirror_with_same_homedir_needs_lock", "src/bandersnatch/tests/test_mirror.py::test_survives_exceptions_from_record_finished_package", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_canonical_simple_page", "src/bandersnatch/tests/test_mirror.py::test_mirror_removes_old_status_and_todo_inits_generation", "src/bandersnatch/tests/test_mirror.py::test_package_sync_skips_release_file", "src/bandersnatch/tests/test_mirror.py::test_package_sync_with_normalized_simple_page", "src/bandersnatch/tests/test_mirror.py::test_mirror_sync_package_error_no_early_exit", "src/bandersnatch/tests/test_mirror.py::test_mirror_empty_master_gets_index", "src/bandersnatch/tests/test_mirror.py::test_keep_index_versions_removes_old_versions"] | [] | ["src/bandersnatch/tests/test_mirror.py::test_write_simple_pages", "src/bandersnatch/tests/test_mirror.py::test_determine_packages_to_sync"] | [] | {"install": ["uv pip install -e ."], "pre_install": ["tee pytest.ini <<EOF_1234810234\n[pytest]\nlog_cli_level = DEBUG\nlog_level = DEBUG\nasyncio_mode = strict\nnorecursedirs = src/bandersnatch_docker_compose\nmarkers = \n\ts3: mark tests that require an S3/MinIO bucket\naddopts = --color=no -rA --tb=no -p no:cacheprovider\n\n\nEOF_1234810234", "tee tox.ini <<EOF_1234810234\n[tox]\nenvlist = py3\n\n[testenv]\ncommands =\n coverage run -m pytest --color=no -rA --tb=no -p no:cacheprovider --strict-markers {posargs}\n coverage report -m\n coverage html\n coverage xml\ndeps =\n -r requirements.txt\n -r requirements_s3.txt\n -r requirements_swift.txt\n -r requirements_test.txt\npassenv =\n os\n CI\n\n[testenv:doc_build]\nbasepython=python3\ncommands =\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b html docs docs/html\n {envpython} {envbindir}/sphinx-build -a -W --keep-going -b linkcheck docs docs/html\nchangedir = {toxinidir}\ndeps = -r requirements_docs.txt\n\nextras = doc_build\npassenv = SSH_AUTH_SOCK\nsetenv =\n SPHINX_THEME=\\'pypa\\'\n\n[isort]\natomic = true\nnot_skip = __init__.py\nline_length = 88\nmulti_line_output = 3\nforce_grid_wrap = 0\nuse_parentheses=True\ninclude_trailing_comma = True\n\nEOF_1234810234"], "python": "3.10", "pip_packages": ["aiohttp==3.8.3", "aiohttp-socks==0.7.1", "aiohttp-xmlrpc==1.5.0", "aiosignal==1.2.0", "async-timeout==4.0.2", "attrs==22.1.0", "black==22.10.0", "cfgv==3.3.1", "chardet==5.0.0", "charset-normalizer==2.1.1", "click==8.1.3", "coverage==6.5.0", "distlib==0.3.6", "filelock==3.8.0", "flake8==5.0.4", "flake8-bugbear==22.9.23", "freezegun==1.2.2", "frozenlist==1.3.1", "humanfriendly==10.0", "identify==2.5.6", "idna==3.4", "iniconfig==1.1.1", "lxml==4.9.1", "mccabe==0.7.0", "multidict==6.0.2", "mypy==0.982", "mypy-extensions==0.4.3", "nodeenv==1.7.0", "packaging==21.3", "pathspec==0.10.1", "platformdirs==2.5.2", "pluggy==1.0.0", "pre-commit==2.20.0", "py==1.11.0", "pycodestyle==2.9.1", "pyflakes==2.5.0", "pyparsing==3.0.9", "pytest==7.1.3", "pytest-asyncio==0.20.1", "pytest-timeout==2.1.0", "python-dateutil==2.8.2", "python-socks==2.0.3", "pyyaml==6.0", "setuptools==65.5.0", "six==1.16.0", "toml==0.10.2", "tomli==2.0.1", "tox==3.26.0", "types-filelock==3.2.7", "types-freezegun==1.1.10", "types-pkg-resources==0.1.3", "typing-extensions==4.4.0", "virtualenv==20.16.5", "wheel==0.44.0", "yarl==1.8.1"]} | tox -e py3 -- | null | null | null | swa-bench:sw.eval |
|
streamlink/streamlink | streamlink__streamlink-6127 | 903cd93a43163bd69c84fbdfc33ff8f25e2fdeeb | diff --git a/src/streamlink/plugins/nicolive.py b/src/streamlink/plugins/nicolive.py
index 514114638bb..45596cc6ffe 100644
--- a/src/streamlink/plugins/nicolive.py
+++ b/src/streamlink/plugins/nicolive.py
@@ -116,9 +116,9 @@ def set_wsclient(self, wsclient: NicoLiveWsClient):
self.wsclient = wsclient
-@pluginmatcher(re.compile(
- r"https?://(?P<domain>live\d*\.nicovideo\.jp)/watch/(lv|co)\d+",
-))
+@pluginmatcher(
+ re.compile(r"https?://(?P<domain>live\d*\.nicovideo\.jp)/watch/(lv|co|user/)\d+"),
+)
@pluginargument(
"email",
sensitive=True,
| diff --git a/tests/plugins/test_nicolive.py b/tests/plugins/test_nicolive.py
index 9e4b8eb03ac..6be23fa00d1 100644
--- a/tests/plugins/test_nicolive.py
+++ b/tests/plugins/test_nicolive.py
@@ -10,12 +10,12 @@ class TestPluginCanHandleUrlNicoLive(PluginCanHandleUrl):
__plugin__ = NicoLive
should_match = [
- "https://live2.nicovideo.jp/watch/lv534562961",
- "http://live2.nicovideo.jp/watch/lv534562961",
- "https://live.nicovideo.jp/watch/lv534562961",
- "https://live2.nicovideo.jp/watch/lv534562961?ref=rtrec&zroute=recent",
- "https://live.nicovideo.jp/watch/co2467009?ref=community",
- "https://live.nicovideo.jp/watch/co2619719",
+ "https://live.nicovideo.jp/watch/lv123",
+ "https://live2.nicovideo.jp/watch/lv123",
+ "https://live2.nicovideo.jp/watch/lv123?ref=rtrec&zroute=recent",
+ "https://live.nicovideo.jp/watch/co456?ref=community",
+ "https://live.nicovideo.jp/watch/co456",
+ "https://live.nicovideo.jp/watch/user/789",
]
| plugins.nicolive: Community has been deprecated
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)
### Collaboration
- [X] [I will provide feedback should a pull request be opened with a fix for the plugin](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback)
### Streamlink version
6.8.3
### Description
The static room url format is changed as nico community has been deprecated.
before: https://live.nicovideo.jp/watch/coXXXXXXXX
now: https://live.nicovideo.jp/watch/user/XXXXXXXXX
### Debug log
```text
/
```
| 2024-08-12T10:07:55Z | 2024-08-12T10:10:47Z | ["tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_all_matchers_match[#0]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_negative[https://example.com/index.html]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_negative[http://example.com/]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_positive_unnamed[https://live.nicovideo.jp/watch/co456]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_class_setup", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_negative[https://example.com/]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_positive_unnamed[https://live.nicovideo.jp/watch/lv123]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_positive_unnamed[https://live2.nicovideo.jp/watch/lv123?ref=rtrec&zroute=recent]", "tests/plugins/test_nicolive.py::TestNicoLiveArguments::test_timeshift_offset[123]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_positive_unnamed[https://live2.nicovideo.jp/watch/lv123]", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_class_name", "tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_positive_unnamed[https://live.nicovideo.jp/watch/co456?ref=community]"] | [] | ["tests/plugins/test_nicolive.py::TestPluginCanHandleUrlNicoLive::test_url_matches_positive_unnamed[https://live.nicovideo.jp/watch/user/789]", "tests/plugins/test_nicolive.py::TestNicoLiveArguments::test_timeshift_offset[123.45]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==24.2.0", "babel==2.16.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.7.4", "charset-normalizer==3.3.2", "coverage==7.6.1", "docutils==0.21.2", "docutils-stubs==0.0.22", "freezegun==1.5.1", "furo==2024.8.6", "h11==0.14.0", "idna==3.7", "imagesize==1.4.1", "importlib-metadata==8.2.0", "iniconfig==2.0.0", "isodate==0.6.1", "jinja2==3.1.4", "lxml==5.3.0", "lxml-stubs==0.5.1", "markdown-it-py==3.0.0", "markupsafe==2.1.5", "mdit-py-plugins==0.4.1", "mdurl==0.1.2", "mypy==1.10.1", "mypy-extensions==1.0.0", "myst-parser==4.0.0", "outcome==1.3.0.post0", "packaging==24.1", "pluggy==1.5.0", "pycountry==24.6.1", "pycryptodome==3.20.0", "pygments==2.18.0", "pysocks==1.7.1", "pytest==8.3.2", "pytest-asyncio==0.23.8", "pytest-cov==5.0.0", "pytest-trio==0.8.0", "python-dateutil==2.9.0.post0", "pyyaml==6.0.2", "requests==2.32.3", "requests-mock==1.12.1", "ruff==0.5.7", "setuptools==72.1.0", "shtab==1.7.1", "six==1.16.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "sortedcontainers==2.4.0", "soupsieve==2.5", "sphinx==7.4.7", "sphinx-basic-ng==1.0.0b2", "sphinx-design==0.5.0", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "trio==0.26.2", "trio-typing==0.10.0", "trio-websocket==0.11.1", "types-freezegun==1.1.10", "types-requests==2.32.0.20240712", "types-setuptools==71.1.0.20240806", "types-urllib3==1.26.25.14", "typing-extensions==4.12.2", "urllib3==2.2.2", "versioningit==3.1.2", "websocket-client==1.8.0", "wheel==0.44.0", "wsproto==1.2.0", "zipp==3.20.0"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
streamlink/streamlink | streamlink__streamlink-6111 | bb070a7d912866805fad67482b1a029908e0eab4 | diff --git a/src/streamlink/plugin/api/aws_waf.py b/src/streamlink/plugin/api/aws_waf.py
index d9594dce920..fd7e84f413c 100644
--- a/src/streamlink/plugin/api/aws_waf.py
+++ b/src/streamlink/plugin/api/aws_waf.py
@@ -24,9 +24,8 @@ class AWSWAF:
TOKEN = "aws-waf-token"
EXPIRATION = 3600 * 24 * 4
- def __init__(self, session: Streamlink, headless: bool = False):
+ def __init__(self, session: Streamlink):
self.session = session
- self.headless = headless
def acquire(self, url: str) -> bool:
send: trio.MemorySendChannel[Optional[str]]
@@ -63,11 +62,7 @@ async def acquire_token(client: CDPClient):
return await receive.receive()
try:
- data = CDPClient.launch(
- self.session,
- acquire_token,
- headless=self.headless,
- )
+ data = CDPClient.launch(self.session, acquire_token)
except BaseExceptionGroup:
log.exception("Failed acquiring AWS WAF token")
except Exception as err:
diff --git a/src/streamlink/webbrowser/chromium.py b/src/streamlink/webbrowser/chromium.py
index 6ce9f948201..82dde51e8e0 100644
--- a/src/streamlink/webbrowser/chromium.py
+++ b/src/streamlink/webbrowser/chromium.py
@@ -8,6 +8,7 @@
from streamlink.compat import is_darwin, is_win32
from streamlink.plugin.api import validate
from streamlink.session import Streamlink
+from streamlink.session.http_useragents import CHROME
from streamlink.utils.socket import find_free_port_ipv4, find_free_port_ipv6
from streamlink.webbrowser.webbrowser import Webbrowser
@@ -151,6 +152,8 @@ def __init__(
self.port = port
if headless:
self.arguments.append("--headless=new")
+ # When in headless mode, a headless hint is added to the User-Agent header, which we want to avoid
+ self.arguments.append(f"--user-agent={CHROME}")
@asynccontextmanager
async def launch(self, timeout: Optional[float] = None) -> AsyncGenerator[trio.Nursery, None]:
| diff --git a/tests/webbrowser/test_chromium.py b/tests/webbrowser/test_chromium.py
index cacece5828e..e516c813fec 100644
--- a/tests/webbrowser/test_chromium.py
+++ b/tests/webbrowser/test_chromium.py
@@ -11,6 +11,7 @@
from streamlink.compat import is_win32
from streamlink.exceptions import PluginError
from streamlink.session import Streamlink
+from streamlink.session.http_useragents import CHROME
from streamlink.webbrowser.chromium import ChromiumWebbrowser
from streamlink.webbrowser.exceptions import WebbrowserError
@@ -107,6 +108,7 @@ def test_launch_args(self):
def test_headless(self, headless: bool):
webbrowser = ChromiumWebbrowser(headless=headless)
assert ("--headless=new" in webbrowser.arguments) is headless
+ assert (f"--user-agent={CHROME}" in webbrowser.arguments) is headless
@pytest.mark.trio()
| webbrowser: Cloak headless Chrome user agent string
### Checklist
- [X] This is a feature request and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed feature requests](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22feature+request%22)
### Collaboration
- [X] My request is genuine and in the best interest of the project
- [X] [I will provide feedback should a pull request be opened with a new feature implementation](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback)
### Description
Since a few months ago, headless Chrome reports itself using the `HeadlessChrome` user agent, I believe this is what caused sites like Twitch to stop working in headless mode (https://github.com/streamlink/streamlink/issues/5600). I believe it may also affect recent additions like the [Amazon WAF tokens](https://github.com/streamlink/streamlink/pull/6102).
The current user agent for headless Chrome (on Windows 10) is
`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/127.0.0.0 Safari/537.36`,
while non-headless is
`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36`. Simply replacing "HeadlessChrome" with "Chrome" seems to work.
Also see:
https://github.com/seleniumbase/SeleniumBase/issues/2106
https://github.com/seleniumbase/SeleniumBase/issues/2523
https://github.com/seleniumbase/SeleniumBase/pull/2524
https://github.com/seleniumbase/SeleniumBase/blob/feca61a3c283858c185596ef3d0941e519c2be31/seleniumbase/core/browser_launcher.py#L4183-L4203
| 2024-08-04T11:06:58Z | 2024-08-04T13:38:00Z | ["tests/webbrowser/test_chromium.py::test_get_websocket_address[Success-IPv4]", "tests/webbrowser/test_chromium.py::test_launch[1234-::1]", "tests/webbrowser/test_chromium.py::TestLaunchArgs::test_launch_args", "tests/webbrowser/test_chromium.py::TestInit::test_resolve_executable[Success with custom path]", "tests/webbrowser/test_chromium.py::test_launch[1234-127.0.0.1]", "tests/webbrowser/test_chromium.py::TestInit::test_resolve_executable[Success with default path]", "tests/webbrowser/test_chromium.py::TestFallbacks::test_darwin", "tests/webbrowser/test_chromium.py::test_get_websocket_address[Success-IPv6]", "tests/webbrowser/test_chromium.py::TestInit::test_resolve_executable[Failure with unset path]", "tests/webbrowser/test_chromium.py::TestFallbacks::test_win32", "tests/webbrowser/test_chromium.py::test_launch[None-::1]", "tests/webbrowser/test_chromium.py::TestFallbacks::test_other", "tests/webbrowser/test_chromium.py::test_launch[None-127.0.0.1]", "tests/webbrowser/test_chromium.py::test_get_websocket_address[Timeout/Failure-IPv4]", "tests/webbrowser/test_chromium.py::TestLaunchArgs::test_headless[False]", "tests/webbrowser/test_chromium.py::TestInit::test_resolve_executable[Failure with custom path]"] | [] | ["tests/webbrowser/test_chromium.py::test_get_websocket_address[Timeout/Failure-IPv6]", "tests/webbrowser/test_chromium.py::TestLaunchArgs::test_headless[True]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==24.1.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.7.4", "charset-normalizer==3.3.2", "coverage==7.6.1", "docutils==0.21.2", "docutils-stubs==0.0.22", "freezegun==1.5.1", "furo==2024.4.27", "h11==0.14.0", "idna==3.7", "imagesize==1.4.1", "importlib-metadata==8.2.0", "iniconfig==2.0.0", "isodate==0.6.1", "jinja2==3.1.4", "lxml==5.2.2", "lxml-stubs==0.5.1", "markdown-it-py==3.0.0", "markupsafe==2.1.5", "mdit-py-plugins==0.4.1", "mdurl==0.1.2", "mypy==1.10.1", "mypy-extensions==1.0.0", "myst-parser==3.0.1", "outcome==1.3.0.post0", "packaging==24.1", "pluggy==1.5.0", "pycountry==24.6.1", "pycryptodome==3.20.0", "pygments==2.18.0", "pysocks==1.7.1", "pytest==8.3.2", "pytest-asyncio==0.23.8", "pytest-cov==5.0.0", "pytest-trio==0.8.0", "python-dateutil==2.9.0.post0", "pyyaml==6.0.1", "requests==2.32.3", "requests-mock==1.12.1", "ruff==0.5.5", "setuptools==72.1.0", "shtab==1.7.1", "six==1.16.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "sortedcontainers==2.4.0", "soupsieve==2.5", "sphinx==7.4.7", "sphinx-basic-ng==1.0.0b2", "sphinx-design==0.5.0", "sphinxcontrib-applehelp==2.0.0", "sphinxcontrib-devhelp==2.0.0", "sphinxcontrib-htmlhelp==2.1.0", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==2.0.0", "sphinxcontrib-serializinghtml==2.0.0", "trio==0.26.0", "trio-typing==0.10.0", "trio-websocket==0.11.1", "types-freezegun==1.1.10", "types-requests==2.32.0.20240712", "types-setuptools==71.1.0.20240726", "types-urllib3==1.26.25.14", "typing-extensions==4.12.2", "urllib3==2.2.2", "versioningit==3.1.2", "websocket-client==1.8.0", "wheel==0.44.0", "wsproto==1.2.0", "zipp==3.19.2"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
streamlink/streamlink | streamlink__streamlink-6085 | ab30b0cfb12a1822b572cdff69a1633c21730031 | diff --git a/src/streamlink/plugins/okru.py b/src/streamlink/plugins/okru.py
index 78e9587b39f..2c1dceb87ca 100644
--- a/src/streamlink/plugins/okru.py
+++ b/src/streamlink/plugins/okru.py
@@ -22,8 +22,14 @@
log = logging.getLogger(__name__)
-@pluginmatcher(re.compile(r"https?://(?:www\.)?ok\.ru/"))
-@pluginmatcher(re.compile(r"https?://m(?:obile)?\.ok\.ru/"))
+@pluginmatcher(
+ name="default",
+ pattern=re.compile(r"https?://(?:www\.)?ok\.ru/"),
+)
+@pluginmatcher(
+ name="mobile",
+ pattern=re.compile(r"https?://m(?:obile)?\.ok\.ru/"),
+)
class OKru(Plugin):
QUALITY_WEIGHTS = {
"full": 1080,
@@ -81,8 +87,14 @@ def _get_streams_default(self):
schema_metadata = validate.Schema(
validate.parse_json(),
{
- validate.optional("author"): validate.all({"name": str}, validate.get("name")),
- validate.optional("movie"): validate.all({"title": str}, validate.get("title")),
+ validate.optional("author"): validate.all({validate.optional("name"): str}, validate.get("name")),
+ validate.optional("movie"): validate.all(
+ {
+ validate.optional("id"): str,
+ validate.optional("title"): str,
+ },
+ validate.union_get("id", "title"),
+ ),
validate.optional("hlsManifestUrl"): validate.url(),
validate.optional("hlsMasterPlaylistUrl"): validate.url(),
validate.optional("liveDashManifestUrl"): validate.url(),
@@ -122,7 +134,7 @@ def _get_streams_default(self):
data = schema_metadata.validate(metadata)
self.author = data.get("author")
- self.title = data.get("movie")
+ self.id, self.title = data.get("movie", (None, None))
for hls_url in data.get("hlsManifestUrl"), data.get("hlsMasterPlaylistUrl"):
if hls_url is not None:
@@ -137,7 +149,7 @@ def _get_streams_default(self):
}
def _get_streams(self):
- return self._get_streams_default() if self.matches[0] else self._get_streams_mobile()
+ return self._get_streams_default() if self.matches["default"] else self._get_streams_mobile()
__plugin__ = OKru
| diff --git a/tests/plugins/test_okru.py b/tests/plugins/test_okru.py
index aa28f2a885e..d2f4c278e8b 100644
--- a/tests/plugins/test_okru.py
+++ b/tests/plugins/test_okru.py
@@ -6,10 +6,10 @@ class TestPluginCanHandleUrlOKru(PluginCanHandleUrl):
__plugin__ = OKru
should_match = [
- "http://ok.ru/live/12345",
- "https://ok.ru/live/12345",
- "https://m.ok.ru/live/12345",
- "https://mobile.ok.ru/live/12345",
- "https://www.ok.ru/live/12345",
- "https://ok.ru/video/266205792931",
+ ("default", "https://ok.ru/live/ID"),
+ ("default", "https://ok.ru/video/ID"),
+ ("default", "https://ok.ru/videoembed/ID"),
+ ("default", "https://www.ok.ru/video/ID"),
+ ("mobile", "https://m.ok.ru/video/ID"),
+ ("mobile", "https://mobile.ok.ru/video/ID"),
]
| plugins.okru: Unable to validate value of key 'author'
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)
### Collaboration
- [X] [I will provide feedback should a pull request be opened with a fix for the plugin](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback)
### Streamlink version
Streamlink: 6.8.2 - 6.8.3
### Description
- name: OTB Primorie
link: https://ok.ru/video/3503444925978
- name: 25 Regions
link: https://ok.ru/videoembed/7930222354061
### Debug log
```text
streamlink https://ok.ru/video/3503444925978 best --player-continuous-http --player-external-http-port 46203 --player-external-http --loglevel=debug
[session][debug] Loading plugin: okru
[cli][debug] OS: Linux-6.5.0-41-generic-x86_64-with-glibc2.35
[cli][debug] Python: 3.10.12
[cli][debug] OpenSSL: OpenSSL 3.0.2 15 Mar 2022
[cli][debug] Streamlink: 6.8.3
[cli][debug] Dependencies:
[cli][debug] certifi: 2020.12.5
[cli][debug] isodate: 0.6.1
[cli][debug] lxml: 4.8.0
[cli][debug] pycountry: 20.7.3
[cli][debug] pycryptodome: 3.20.0
[cli][debug] PySocks: 1.7.1
[cli][debug] requests: 2.32.3
[cli][debug] trio: 0.26.0
[cli][debug] trio-websocket: 0.11.1
[cli][debug] typing-extensions: 4.11.0
[cli][debug] urllib3: 1.26.2
[cli][debug] websocket-client: 1.8.0
[cli][debug] exceptiongroup: 1.2.1
[cli][debug] Arguments:
[cli][debug] url=https://ok.ru/video/3503444925978
[cli][debug] stream=['best']
[cli][debug] --loglevel=debug
[cli][debug] --player-continuous-http=True
[cli][debug] --player-external-http=True
[cli][debug] --player-external-http-port=46203
[cli][info] Found matching plugin okru for URL https://ok.ru/video/3503444925978
error: Unable to validate result: ValidationError(dict):
Unable to validate value of key 'author'
Context(dict):
Key 'name' not found in {}
```
| 2024-07-17T12:48:31Z | 2024-07-17T12:52:08Z | ["tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_class_name", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_class_setup", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_negative[https://example.com/]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_negative[http://example.com/]"] | [] | ["tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_all_matchers_match[mobile]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_all_named_matchers_have_tests[mobile]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_all_matchers_match[default]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_all_named_matchers_have_tests[default]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_positive_named[NAME=default URL=https://ok.ru/live/ID]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_negative[https://example.com/index.html]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_positive_named[NAME=mobile URL=https://m.ok.ru/video/ID]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_positive_named[NAME=default URL=https://ok.ru/videoembed/ID]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_positive_named[NAME=default URL=https://www.ok.ru/video/ID]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_positive_named[NAME=mobile URL=https://mobile.ok.ru/video/ID]", "tests/plugins/test_okru.py::TestPluginCanHandleUrlOKru::test_url_matches_positive_named[NAME=default URL=https://ok.ru/video/ID]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.7.4", "charset-normalizer==3.3.2", "coverage==7.6.0", "docutils==0.21.2", "docutils-stubs==0.0.22", "freezegun==1.5.1", "furo==2024.4.27", "h11==0.14.0", "idna==3.7", "imagesize==1.4.1", "importlib-metadata==8.0.0", "iniconfig==2.0.0", "isodate==0.6.1", "jinja2==3.1.4", "lxml==5.2.2", "lxml-stubs==0.5.1", "markdown-it-py==3.0.0", "markupsafe==2.1.5", "mdit-py-plugins==0.4.1", "mdurl==0.1.2", "mypy==1.10.1", "mypy-extensions==1.0.0", "myst-parser==3.0.1", "outcome==1.3.0.post0", "packaging==24.1", "pip==24.1.2", "pluggy==1.5.0", "pycountry==24.6.1", "pycryptodome==3.20.0", "pygments==2.18.0", "pysocks==1.7.1", "pytest==8.2.2", "pytest-asyncio==0.23.8", "pytest-cov==5.0.0", "pytest-trio==0.8.0", "python-dateutil==2.9.0.post0", "pyyaml==6.0.1", "requests==2.32.3", "requests-mock==1.12.1", "ruff==0.5.1", "setuptools==71.0.0", "shtab==1.7.1", "six==1.16.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "sortedcontainers==2.4.0", "soupsieve==2.5", "sphinx==7.4.5", "sphinx-basic-ng==1.0.0b2", "sphinx-design==0.5.0", "sphinxcontrib-applehelp==1.0.8", "sphinxcontrib-devhelp==1.0.6", "sphinxcontrib-htmlhelp==2.0.5", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==1.0.7", "sphinxcontrib-serializinghtml==1.1.10", "trio==0.26.0", "trio-typing==0.10.0", "trio-websocket==0.11.1", "types-freezegun==1.1.10", "types-requests==2.32.0.20240712", "types-setuptools==70.3.0.20240710", "types-urllib3==1.26.25.14", "typing-extensions==4.12.2", "urllib3==2.2.2", "versioningit==3.1.1", "websocket-client==1.8.0", "wheel==0.44.0", "wsproto==1.2.0", "zipp==3.19.2"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
streamlink/streamlink | streamlink__streamlink-6073 | 7d641b261c81caab496f0af7d2cb5215a9cdf6be | diff --git a/src/streamlink/plugins/tiktok.py b/src/streamlink/plugins/tiktok.py
new file mode 100644
index 00000000000..c5d467c326b
--- /dev/null
+++ b/src/streamlink/plugins/tiktok.py
@@ -0,0 +1,124 @@
+"""
+$description TikTok is a short-form video hosting service owned by ByteDance.
+$url www.tiktok.com
+$type live
+$metadata id
+$metadata author
+$metadata title
+"""
+
+import logging
+import re
+from typing import Dict
+
+from streamlink.plugin import Plugin, pluginmatcher
+from streamlink.plugin.api import validate
+from streamlink.stream.http import HTTPStream
+
+
+log = logging.getLogger(__name__)
+
+
+@pluginmatcher(
+ re.compile(
+ r"https?://(?:www\.)?tiktok\.com/@(?P<channel>[^/?]+)",
+ ),
+)
+class TikTok(Plugin):
+ QUALITY_WEIGHTS: Dict[str, int] = {}
+
+ _URL_WEB_LIVE = "https://www.tiktok.com/@{channel}/live"
+ _URL_API_LIVE_DETAIL = "https://www.tiktok.com/api/live/detail/?aid=1988&roomID={room_id}"
+ _URL_WEBCAST_ROOM_INFO = "https://webcast.tiktok.com/webcast/room/info/?aid=1988&room_id={room_id}"
+
+ _STATUS_OFFLINE = 4
+
+ @classmethod
+ def stream_weight(cls, key):
+ weight = cls.QUALITY_WEIGHTS.get(key)
+ if weight:
+ return weight, key
+
+ return super().stream_weight(key)
+
+ def _get_streams(self):
+ self.id = self.session.http.get(
+ self._URL_WEB_LIVE.format(channel=self.match["channel"]),
+ allow_redirects=False,
+ schema=validate.Schema(
+ validate.parse_html(),
+ validate.xml_xpath_string(
+ ".//head/meta[@property='al:android:url'][contains(@content,'live?room_id=')]/@content",
+ ),
+ validate.none_or_all(
+ str,
+ re.compile(r"room_id=(\d+)"),
+ validate.get(1),
+ ),
+ ),
+ )
+ if not self.id:
+ return
+
+ live_detail = self.session.http.get(
+ self._URL_API_LIVE_DETAIL.format(room_id=self.id),
+ schema=validate.Schema(
+ validate.parse_json(),
+ {
+ "status_code": 0,
+ "LiveRoomInfo": {
+ "status": int,
+ "title": str,
+ "ownerInfo": {"nickname": str},
+ },
+ },
+ validate.get("LiveRoomInfo"),
+ validate.union_get(
+ "status",
+ ("ownerInfo", "nickname"),
+ "title",
+ ),
+ ),
+ )
+ status, self.author, self.title = live_detail
+ if status == self._STATUS_OFFLINE:
+ log.info("The channel is currently offline")
+ return
+
+ streams = self.session.http.get(
+ self._URL_WEBCAST_ROOM_INFO.format(room_id=self.id),
+ schema=validate.Schema(
+ validate.parse_json(),
+ {"data": {"stream_url": {"live_core_sdk_data": {"pull_data": {"stream_data": str}}}}},
+ validate.get(("data", "stream_url", "live_core_sdk_data", "pull_data", "stream_data")),
+ validate.parse_json(),
+ {
+ "data": {
+ str: validate.all(
+ {
+ "main": {
+ "flv": validate.url(),
+ "sdk_params": validate.all(
+ validate.parse_json(),
+ {
+ "vbitrate": int,
+ },
+ ),
+ },
+ },
+ validate.union_get(
+ ("main", "flv"),
+ ("main", "sdk_params", "vbitrate"),
+ ),
+ ),
+ },
+ },
+ validate.get("data"),
+ ),
+ )
+ for name, (url, vbitrate) in streams.items():
+ self.QUALITY_WEIGHTS[name] = vbitrate
+ yield name, HTTPStream(self.session, url)
+
+
+__plugin__ = TikTok
| diff --git a/tests/plugins/test_tiktok.py b/tests/plugins/test_tiktok.py
new file mode 100644
index 00000000000..64a02075fa0
--- /dev/null
+++ b/tests/plugins/test_tiktok.py
@@ -0,0 +1,16 @@
+from streamlink.plugins.tiktok import TikTok
+from tests.plugins import PluginCanHandleUrl
+
+
+class TestPluginCanHandleUrlTikTok(PluginCanHandleUrl):
+ __plugin__ = TikTok
+
+ should_match_groups = [
+ ("https://www.tiktok.com/@CHANNEL", {"channel": "CHANNEL"}),
+ ("https://www.tiktok.com/@CHANNEL/live", {"channel": "CHANNEL"}),
+
+ ]
+
+ should_not_match = [
+ "https://www.tiktok.com",
+ ]
| tiktok support
### Checklist
- [X] This is a plugin request and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin requests](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+request%22)
### Collaboration
- [X] My request is genuine, in the best interest of the project, and I have access to the stream(s) in my web browser
- [X] [I will provide feedback should a pull request be opened with a new plugin implementation](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback)
- [X] I will help with reporting future plugin issues should the new plugin be merged and then stop working
### Description
Tiktok is a short-form video hosting service owned by ByteDance.
### Input URLs
1. https://www.tiktok.com/@azonlug9516/live
| 2024-07-08T12:29:02Z | 2024-07-08T22:18:06Z | [] | [] | ["tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_groups_unnamed[URL=https://www.tiktok.com/@CHANNEL/live GROUPS={'channel': 'CHANNEL'}]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_negative[https://example.com/]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_class_setup", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_negative[https://example.com/index.html]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_positive_unnamed[https://www.tiktok.com/@CHANNEL]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_negative[https://www.tiktok.com]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_all_matchers_match[#0]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_negative[http://example.com/]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_positive_unnamed[https://www.tiktok.com/@CHANNEL/live]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_url_matches_groups_unnamed[URL=https://www.tiktok.com/@CHANNEL GROUPS={'channel': 'CHANNEL'}]", "tests/plugins/test_tiktok.py::TestPluginCanHandleUrlTikTok::test_class_name"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.7.4", "charset-normalizer==3.3.2", "coverage==7.5.4", "docutils==0.21.2", "docutils-stubs==0.0.22", "freezegun==1.5.1", "furo==2024.4.27", "h11==0.14.0", "idna==3.7", "imagesize==1.4.1", "importlib-metadata==8.0.0", "iniconfig==2.0.0", "isodate==0.6.1", "jinja2==3.1.4", "lxml==5.2.2", "lxml-stubs==0.5.1", "markdown-it-py==3.0.0", "markupsafe==2.1.5", "mdit-py-plugins==0.4.1", "mdurl==0.1.2", "mypy==1.10.1", "mypy-extensions==1.0.0", "myst-parser==3.0.1", "outcome==1.3.0.post0", "packaging==24.1", "pip==24.1.2", "pluggy==1.5.0", "pycountry==24.6.1", "pycryptodome==3.20.0", "pygments==2.18.0", "pysocks==1.7.1", "pytest==8.2.2", "pytest-asyncio==0.23.7", "pytest-cov==5.0.0", "pytest-trio==0.8.0", "python-dateutil==2.9.0.post0", "pyyaml==6.0.1", "requests==2.32.3", "requests-mock==1.12.1", "ruff==0.5.1", "setuptools==70.2.0", "shtab==1.7.1", "six==1.16.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "sortedcontainers==2.4.0", "soupsieve==2.5", "sphinx==7.3.7", "sphinx-basic-ng==1.0.0b2", "sphinx-design==0.5.0", "sphinxcontrib-applehelp==1.0.8", "sphinxcontrib-devhelp==1.0.6", "sphinxcontrib-htmlhelp==2.0.5", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==1.0.7", "sphinxcontrib-serializinghtml==1.1.10", "trio==0.26.0", "trio-typing==0.10.0", "trio-websocket==0.11.1", "types-freezegun==1.1.10", "types-requests==2.32.0.20240622", "types-setuptools==70.2.0.20240704", "types-urllib3==1.26.25.14", "typing-extensions==4.12.2", "urllib3==2.2.2", "versioningit==3.1.1", "websocket-client==1.8.0", "wheel==0.44.0", "wsproto==1.2.0", "zipp==3.19.2"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
streamlink/streamlink | streamlink__streamlink-6059 | 6d953efb7f9c2012c497f9f3059117c3bcfd07be | diff --git a/src/streamlink/plugins/douyin.py b/src/streamlink/plugins/douyin.py
new file mode 100644
index 00000000000..b0afc9d275e
--- /dev/null
+++ b/src/streamlink/plugins/douyin.py
@@ -0,0 +1,153 @@
+"""
+$description Chinese live-streaming platform owned by ByteDance.
+$url live.douyin.com
+$type live
+$metadata id
+$metadata author
+$metadata title
+"""
+
+import logging
+import re
+import uuid
+from typing import Dict
+
+from streamlink.plugin import Plugin, pluginmatcher
+from streamlink.plugin.api import validate
+from streamlink.stream.http import HTTPStream
+from streamlink.utils.url import update_scheme
+
+
+log = logging.getLogger(__name__)
+
+
+@pluginmatcher(
+ re.compile(
+ r"https?://(?:live\.)?douyin\.com/(?P<room_id>[^/?]+)",
+ ),
+)
+class Douyin(Plugin):
+ _STATUS_LIVE = 2
+
+ QUALITY_WEIGHTS: Dict[str, int] = {}
+
+ @classmethod
+ def stream_weight(cls, key):
+ weight = cls.QUALITY_WEIGHTS.get(key)
+ if weight:
+ return weight, key
+
+ return super().stream_weight(key)
+
+ SCHEMA_ROOM_STORE = validate.all(
+ {
+ "roomInfo": {
+ # "room" and "anchor" keys are missing on invalid channels
+ validate.optional("room"): validate.all(
+ {
+ "id_str": str,
+ "status": int,
+ "title": str,
+ },
+ validate.union_get(
+ "status",
+ "id_str",
+ "title",
+ ),
+ ),
+ validate.optional("anchor"): validate.all(
+ {"nickname": str},
+ validate.get("nickname"),
+ ),
+ },
+ },
+ validate.union_get(
+ ("roomInfo", "room"),
+ ("roomInfo", "anchor"),
+ ),
+ )
+
+ SCHEMA_STREAM_STORE = validate.all(
+ {
+ "streamData": {
+ "H264_streamData": {
+ # "stream" value is `none` on offline/invalid channels
+ "stream": validate.none_or_all(
+ {
+ str: validate.all(
+ {
+ "main": {
+ # HLS stream URLs are multivariant streams but only with a single media playlist,
+ # so avoid using HLS in favor of having reduced stream lookup/start times
+ "flv": validate.any("", validate.url()),
+ "sdk_params": validate.all(
+ validate.parse_json(),
+ {"vbitrate": int},
+ validate.get("vbitrate"),
+ ),
+ },
+ },
+ validate.union_get(
+ ("main", "sdk_params"),
+ ("main", "flv"),
+ ),
+ ),
+ },
+ ),
+ },
+ },
+ },
+ validate.get(("streamData", "H264_streamData", "stream")),
+ )
+
+ def _get_streams(self):
+ data = self.session.http.get(
+ self.url,
+ cookies={
+ "__ac_nonce": uuid.uuid4().hex[:21],
+ },
+ schema=validate.Schema(
+ re.compile(r"self\.__pace_f\.push\(\[\d,(?P<json_string>\"[a-z]:.+?\")]\)</script>"),
+ validate.none_or_all(
+ validate.get("json_string"),
+ validate.parse_json(),
+ validate.transform(lambda s: re.sub(r"^[a-z]:", "", s)),
+ validate.parse_json(),
+ list,
+ validate.filter(lambda item: isinstance(item, dict) and "state" in item),
+ validate.length(1),
+ validate.get((0, "state")),
+ {
+ "roomStore": self.SCHEMA_ROOM_STORE,
+ "streamStore": self.SCHEMA_STREAM_STORE,
+ },
+ validate.union_get(
+ "roomStore",
+ "streamStore",
+ ),
+ ),
+ ),
+ )
+ if not data:
+ return
+
+ (room_info, self.author), stream_data = data
+ if not room_info:
+ return
+
+ status, self.id, self.title = room_info
+ if status != self._STATUS_LIVE:
+ log.info("The channel is currently offline")
+ return
+
+ for name, (vbitrate, url) in stream_data.items():
+ if not url:
+ continue
+ self.QUALITY_WEIGHTS[name] = vbitrate
+ url = update_scheme("https://", url, force=True)
+ yield name, HTTPStream(self.session, url)
+
+ log.debug(f"{self.QUALITY_WEIGHTS=!r}")
+
+
+__plugin__ = Douyin
| diff --git a/tests/plugins/test_douyin.py b/tests/plugins/test_douyin.py
new file mode 100644
index 00000000000..2315d207ca1
--- /dev/null
+++ b/tests/plugins/test_douyin.py
@@ -0,0 +1,14 @@
+from streamlink.plugins.douyin import Douyin
+from tests.plugins import PluginCanHandleUrl
+
+
+class TestPluginCanHandleUrlDouyin(PluginCanHandleUrl):
+ __plugin__ = Douyin
+
+ should_match_groups = [
+ ("https://live.douyin.com/ROOM_ID", {"room_id": "ROOM_ID"}),
+ ]
+
+ should_not_match = [
+ "https://live.douyin.com",
+ ]
| douyin support
### Checklist
- [X] This is a plugin request and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin requests](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+request%22)
### Collaboration
- [X] My request is genuine, in the best interest of the project, and I have access to the stream(s) in my web browser
- [X] [I will provide feedback should a pull request be opened with a new plugin implementation](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback)
- [X] I will help with reporting future plugin issues should the new plugin be merged and then stop working
### Description
**What is the site about?**
Similar with Tiktok
**Who is it owned and run by?**
Bytedance
**What kind of content does it provide?**
Short videos and streams
**Are there any access restrictions, like logins or region checks?**
No
**Further relevant information**
No
### Input URLs
1. [1](https://live.douyin.com/830806814749)
2. [2](https://live.douyin.com/805846507166)
| 2024-07-02T09:11:07Z | 2024-07-03T14:41:55Z | [] | [] | ["tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_url_matches_positive_unnamed[https://live.douyin.com/ROOM_ID]", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_all_matchers_match[#0]", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_url_matches_negative[https://live.douyin.com]", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_url_matches_negative[http://example.com/]", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_class_setup", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_url_matches_groups_unnamed[URL=https://live.douyin.com/ROOM_ID GROUPS={'room_id': 'ROOM_ID'}]", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_url_matches_negative[https://example.com/]", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_class_name", "tests/plugins/test_douyin.py::TestPluginCanHandleUrlDouyin::test_url_matches_negative[https://example.com/index.html]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.6.2", "charset-normalizer==3.3.2", "coverage==7.5.4", "docutils==0.21.2", "docutils-stubs==0.0.22", "freezegun==1.5.1", "furo==2024.4.27", "h11==0.14.0", "idna==3.7", "imagesize==1.4.1", "importlib-metadata==8.0.0", "iniconfig==2.0.0", "isodate==0.6.1", "jinja2==3.1.4", "lxml==5.2.2", "lxml-stubs==0.5.1", "markdown-it-py==3.0.0", "markupsafe==2.1.5", "mdit-py-plugins==0.4.1", "mdurl==0.1.2", "mypy==1.10.1", "mypy-extensions==1.0.0", "myst-parser==3.0.1", "outcome==1.3.0.post0", "packaging==24.1", "pip==24.1.1", "pluggy==1.5.0", "pycountry==24.6.1", "pycryptodome==3.20.0", "pygments==2.18.0", "pysocks==1.7.1", "pytest==8.2.2", "pytest-asyncio==0.23.7", "pytest-cov==5.0.0", "pytest-trio==0.8.0", "python-dateutil==2.9.0.post0", "pyyaml==6.0.1", "requests==2.32.3", "requests-mock==1.12.1", "ruff==0.5.0", "setuptools==70.2.0", "shtab==1.7.1", "six==1.16.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "sortedcontainers==2.4.0", "soupsieve==2.5", "sphinx==7.3.7", "sphinx-basic-ng==1.0.0b2", "sphinx-design==0.5.0", "sphinxcontrib-applehelp==1.0.8", "sphinxcontrib-devhelp==1.0.6", "sphinxcontrib-htmlhelp==2.0.5", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==1.0.7", "sphinxcontrib-serializinghtml==1.1.10", "trio==0.25.1", "trio-typing==0.10.0", "trio-websocket==0.11.1", "types-freezegun==1.1.10", "types-requests==2.32.0.20240622", "types-setuptools==70.1.0.20240627", "types-urllib3==1.26.25.14", "typing-extensions==4.12.2", "urllib3==2.2.2", "versioningit==3.1.1", "websocket-client==1.8.0", "wheel==0.44.0", "wsproto==1.2.0", "zipp==3.19.2"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
|
streamlink/streamlink | streamlink__streamlink-6048 | 97d8e6d81433a5077fcd622ec16d40e587e937f1 | diff --git a/src/streamlink/plugins/pluzz.py b/src/streamlink/plugins/pluzz.py
index ce8de45f0e5..4b7c6efd206 100644
--- a/src/streamlink/plugins/pluzz.py
+++ b/src/streamlink/plugins/pluzz.py
@@ -16,23 +16,23 @@
from streamlink.stream.dash import DASHStream
from streamlink.stream.hls import HLSStream
from streamlink.utils.times import localnow
-from streamlink.utils.url import update_qsd
log = logging.getLogger(__name__)
-@pluginmatcher(re.compile(r"""
- https?://(?:
- (?:www\.)?france\.tv/
- |
- (?:.+\.)?francetvinfo\.fr/
- )
-""", re.VERBOSE))
+@pluginmatcher(
+ name="francetv",
+ pattern=re.compile(r"https?://(?:[\w-]+\.)?france\.tv/"),
+)
+@pluginmatcher(
+ name="francetvinfofr",
+ pattern=re.compile(r"https?://(?:[\w-]+\.)?francetvinfo\.fr/"),
+)
class Pluzz(Plugin):
PLAYER_VERSION = "5.51.35"
GEO_URL = "https://geoftv-a.akamaihd.net/ws/edgescape.json"
- API_URL = "https://player.webservices.francetelevisions.fr/v1/videos/{video_id}"
+ API_URL = "https://k7.ftven.fr/videos/{video_id}"
def _get_streams(self):
self.session.http.headers.update({
@@ -56,6 +56,7 @@ def _get_streams(self):
video_id = self.session.http.get(self.url, schema=validate.Schema(
validate.parse_html(),
validate.any(
+ # default francetv player
validate.all(
validate.xml_xpath_string(".//script[contains(text(),'window.FTVPlayerVideos')][1]/text()"),
str,
@@ -68,18 +69,19 @@ def _get_streams(self):
[{"videoId": str}],
validate.get((0, "videoId")),
),
+ # francetvinfo.fr overseas live stream
validate.all(
- validate.xml_xpath_string(".//script[contains(text(),'new Magnetoscope')][1]/text()"),
+ validate.xml_xpath_string(".//script[contains(text(),'magneto:{videoId:')][1]/text()"),
str,
- validate.regex(re.compile(
- r"""player\.load\s*\(\s*{\s*src\s*:\s*(?P<q>['"])(?P<video_id>.+?)(?P=q)\s*}\s*\)\s*;""",
- )),
+ validate.regex(re.compile(r"""magneto:\{videoId:(?P<q>['"])(?P<video_id>.+?)(?P=q)""")),
validate.get("video_id"),
),
+ # francetvinfo.fr news article
validate.all(
validate.xml_xpath_string(".//*[@id][contains(@class,'francetv-player-wrapper')][1]/@id"),
str,
),
+ # francetvinfo.fr videos
validate.all(
validate.xml_xpath_string(".//*[@data-id][contains(@class,'magneto')][1]/@data-id"),
str,
@@ -92,47 +94,54 @@ def _get_streams(self):
return
log.debug(f"Video ID: {video_id}")
- api_url = update_qsd(self.API_URL.format(video_id=video_id), {
- "country_code": country_code,
- "w": 1920,
- "h": 1080,
- "player_version": self.PLAYER_VERSION,
- "domain": urlparse(self.url).netloc,
- "device_type": "mobile",
- "browser": "chrome",
- "browser_version": CHROME_VERSION,
- "os": "ios",
- "gmt": localnow().strftime("%z"),
- })
- video_format, token_url, url, self.title = self.session.http.get(api_url, schema=validate.Schema(
- validate.parse_json(),
- {
- "video": {
- "workflow": validate.any("token-akamai", "dai"),
- "format": validate.any("dash", "hls"),
- "token": validate.url(),
- "url": validate.url(),
- },
- "meta": {
- "title": str,
- },
+ video_format, token_url, url, self.title = self.session.http.get(
+ self.API_URL.format(video_id=video_id),
+ params={
+ "country_code": country_code,
+ "w": 1920,
+ "h": 1080,
+ "player_version": self.PLAYER_VERSION,
+ "domain": urlparse(self.url).netloc,
+ "device_type": "mobile",
+ "browser": "chrome",
+ "browser_version": CHROME_VERSION,
+ "os": "ios",
+ "gmt": localnow().strftime("%z"),
},
- validate.union_get(
- ("video", "format"),
- ("video", "token"),
- ("video", "url"),
- ("meta", "title"),
+ schema=validate.Schema(
+ validate.parse_json(),
+ {
+ "video": {
+ "format": validate.any("dash", "hls"),
+ "token": {
+ "akamai": validate.url(),
+ },
+ "url": validate.url(),
+ },
+ "meta": {
+ "title": str,
+ },
+ },
+ validate.union_get(
+ ("video", "format"),
+ ("video", "token", "akamai"),
+ ("video", "url"),
+ ("meta", "title"),
+ ),
),
- ))
+ )
- data_url = update_qsd(token_url, {
- "url": url,
- })
- video_url = self.session.http.get(data_url, schema=validate.Schema(
- validate.parse_json(),
- {"url": validate.url()},
- validate.get("url"),
- ))
+ video_url = self.session.http.get(
+ token_url,
+ params={
+ "url": url,
+ },
+ schema=validate.Schema(
+ validate.parse_json(),
+ {"url": validate.url()},
+ validate.get("url"),
+ ),
+ )
if video_format == "dash":
yield from DASHStream.parse_manifest(self.session, video_url).items()
| diff --git a/tests/plugins/test_pluzz.py b/tests/plugins/test_pluzz.py
index f1e2e4ce29c..b5e47915ca4 100644
--- a/tests/plugins/test_pluzz.py
+++ b/tests/plugins/test_pluzz.py
@@ -6,17 +6,31 @@ class TestPluginCanHandleUrlPluzz(PluginCanHandleUrl):
__plugin__ = Pluzz
should_match = [
- "https://www.france.tv/france-2/direct.html",
- "https://www.france.tv/france-3/direct.html",
- "https://www.france.tv/france-4/direct.html",
- "https://www.france.tv/france-5/direct.html",
- "https://www.france.tv/franceinfo/direct.html",
- "https://www.france.tv/france-2/journal-20h00/141003-edition-du-lundi-8-mai-2017.html",
- "https://france3-regions.francetvinfo.fr/bourgogne-franche-comte/direct/franche-comte",
- "https://www.francetvinfo.fr/en-direct/tv.html",
- "https://www.francetvinfo.fr/meteo/orages/inondations-dans-le-gard-plus-de-deux-mois-de-pluie-en-quelques-heures-des"
- + "-degats-mais-pas-de-victime_4771265.html",
- "https://la1ere.francetvinfo.fr/info-en-continu-24-24",
- "https://la1ere.francetvinfo.fr/programme-video/france-3_outremer-ledoc/diffusion/"
- + "2958951-polynesie-les-sages-de-l-ocean.html",
+ ("francetv", "https://www.france.tv/france-2/direct.html"),
+ ("francetv", "https://www.france.tv/france-3/direct.html"),
+ ("francetv", "https://www.france.tv/france-4/direct.html"),
+ ("francetv", "https://www.france.tv/france-5/direct.html"),
+ ("francetv", "https://www.france.tv/franceinfo/direct.html"),
+ ("francetv", "https://www.france.tv/france-2/journal-20h00/141003-edition-du-lundi-8-mai-2017.html"),
+
+ (
+ "francetvinfofr",
+ "https://www.francetvinfo.fr/en-direct/tv.html",
+ ),
+ (
+ "francetvinfofr",
+ "https://www.francetvinfo.fr/meteo/orages/inondations-dans-le-gard-plus-de-deux-mois-de-pluie-en-quelques-heures-des-degats-mais-pas-de-victime_4771265.html",
+ ),
+ (
+ "francetvinfofr",
+ "https://france3-regions.francetvinfo.fr/bourgogne-franche-comte/direct/franche-comte",
+ ),
+ (
+ "francetvinfofr",
+ "https://la1ere.francetvinfo.fr/programme-video/france-3_outremer-ledoc/diffusion/2958951-polynesie-les-sages-de-l-ocean.html",
+ ),
+ (
+ "francetvinfofr",
+ "https://la1ere.francetvinfo.fr/info-en-continu-24-24",
+ ),
]
| plugins.pluzz: live or replay from francetv doesn't work anymore
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)
### Collaboration
- [X] [I will provide feedback should a pull request be opened with a fix for the plugin](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback)
### Streamlink version
[cli][info] Your Streamlink version (6.8.1) is up to date!
### Description
I've noticed that this plugin hasn't been working for a week now. Neither on live broadcasts nor on replays.
### Debug log
```text
[session][debug] Loading plugin: pluzz
[cli][debug] OS: Linux-6.8.0-35-generic-x86_64-with-glibc2.39
[cli][debug] Python: 3.12.3
[cli][debug] OpenSSL: OpenSSL 3.0.13 30 Jan 2024
[cli][debug] Streamlink: 6.8.1
[cli][debug] Dependencies:
[cli][debug] certifi: 2024.6.2
[cli][debug] isodate: 0.6.1
[cli][debug] lxml: 5.2.2
[cli][debug] pycountry: 24.6.1
[cli][debug] pycryptodome: 3.20.0
[cli][debug] PySocks: 1.7.1
[cli][debug] requests: 2.32.3
[cli][debug] trio: 0.25.1
[cli][debug] trio-websocket: 0.11.1
[cli][debug] typing-extensions: 4.12.2
[cli][debug] urllib3: 2.2.2
[cli][debug] websocket-client: 1.8.0
[cli][debug] Arguments:
[cli][debug] url=https://www.france.tv/france-2/planete-terre/5875566-le-prix-de-la-survie.html
[cli][debug] stream=['best']
[cli][debug] --loglevel=debug
[cli][debug] --player=mpv
[cli][info] Found matching plugin pluzz for URL https://www.france.tv/france-2/planete-terre/5875566-le-prix-de-la-survie.html
[plugins.pluzz][debug] Country: FR
[plugins.pluzz][debug] Video ID: c7833bef-2639-466d-b96f-3dbae6222c4c
error: Unable to validate response text: ValidationError(dict):
Unable to validate value of key 'video'
Context(dict):
Unable to validate value of key 'workflow'
Context(AnySchema):
ValidationError(equality):
None does not equal 'token-akamai'
ValidationError(equality):
None does not equal 'dai'
```
| Perhaps related to this issue https://github.com/yt-dlp/yt-dlp/issues/10197
The workaround given in the issue seems to work for `yt-dlp` but not for `streamlink`:
```
python3 -m pip install -U --pre "yt-dlp[default]"
```
_Originally posted by @bashonly in https://github.com/yt-dlp/yt-dlp/issues/10197#issuecomment-2172114541_ | 2024-06-22T15:30:06Z | 2024-06-23T15:59:12Z | ["tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_negative[https://example.com/]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_class_setup", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_negative[http://example.com/]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_class_name"] | [] | ["tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_all_named_matchers_have_tests[francetv]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_all_named_matchers_have_tests[francetvinfofr]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_all_matchers_match[francetv]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_all_matchers_match[francetvinfofr]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetvinfofr URL=https://www.francetvinfo.fr/en-direct/tv.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetv URL=https://www.france.tv/france-4/direct.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetv URL=https://www.france.tv/france-2/journal-20h00/141003-edition-du-lundi-8-mai-2017.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetvinfofr URL=https://france3-regions.francetvinfo.fr/bourgogne-franche-comte/direct/franche-comte]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetvinfofr URL=https://www.francetvinfo.fr/meteo/orages/inondations-dans-le-gard-plus-de-deux-mois-de-pluie-en-quelques-heures-des-degats-mais-pas-de-victime_4771265.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetv URL=https://www.france.tv/france-5/direct.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetvinfofr URL=https://la1ere.francetvinfo.fr/info-en-continu-24-24]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_negative[https://example.com/index.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetv URL=https://www.france.tv/france-2/direct.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetvinfofr URL=https://la1ere.francetvinfo.fr/programme-video/france-3_outremer-ledoc/diffusion/2958951-polynesie-les-sages-de-l-ocean.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetv URL=https://www.france.tv/france-3/direct.html]", "tests/plugins/test_pluzz.py::TestPluginCanHandleUrlPluzz::test_url_matches_positive_named[NAME=francetv URL=https://www.france.tv/franceinfo/direct.html]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.6.2", "charset-normalizer==3.3.2", "coverage==7.5.4", "docutils==0.21.2", "docutils-stubs==0.0.22", "freezegun==1.5.1", "furo==2024.4.27", "h11==0.14.0", "idna==3.7", "imagesize==1.4.1", "importlib-metadata==7.2.1", "iniconfig==2.0.0", "isodate==0.6.1", "jinja2==3.1.4", "lxml==5.2.2", "lxml-stubs==0.5.1", "markdown-it-py==3.0.0", "markupsafe==2.1.5", "mdit-py-plugins==0.4.1", "mdurl==0.1.2", "mypy==1.10.0", "mypy-extensions==1.0.0", "myst-parser==3.0.1", "outcome==1.3.0.post0", "packaging==24.1", "pip==24.1", "pluggy==1.5.0", "pycountry==24.6.1", "pycryptodome==3.20.0", "pygments==2.18.0", "pysocks==1.7.1", "pytest==8.2.2", "pytest-asyncio==0.23.7", "pytest-cov==5.0.0", "pytest-trio==0.8.0", "python-dateutil==2.9.0.post0", "pyyaml==6.0.1", "requests==2.32.3", "requests-mock==1.12.1", "ruff==0.4.9", "setuptools==70.1.0", "shtab==1.7.1", "six==1.16.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "sortedcontainers==2.4.0", "soupsieve==2.5", "sphinx==7.3.7", "sphinx-basic-ng==1.0.0b2", "sphinx-design==0.5.0", "sphinxcontrib-applehelp==1.0.8", "sphinxcontrib-devhelp==1.0.6", "sphinxcontrib-htmlhelp==2.0.5", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==1.0.7", "sphinxcontrib-serializinghtml==1.1.10", "trio==0.25.1", "trio-typing==0.10.0", "trio-websocket==0.11.1", "types-freezegun==1.1.10", "types-requests==2.32.0.20240622", "types-setuptools==70.0.0.20240524", "types-urllib3==1.26.25.14", "typing-extensions==4.12.2", "urllib3==2.2.2", "versioningit==3.1.1", "websocket-client==1.8.0", "wheel==0.44.0", "wsproto==1.2.0", "zipp==3.19.2"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
streamlink/streamlink | streamlink__streamlink-6022 | 97d8e6d81433a5077fcd622ec16d40e587e937f1 | diff --git a/src/streamlink/plugins/twitch.py b/src/streamlink/plugins/twitch.py
index 7ae078e9ad5..06278b094d4 100644
--- a/src/streamlink/plugins/twitch.py
+++ b/src/streamlink/plugins/twitch.py
@@ -71,26 +71,45 @@ class TwitchM3U8Parser(M3U8Parser[TwitchM3U8, TwitchHLSSegment, HLSPlaylist]):
__m3u8__: ClassVar[Type[TwitchM3U8]] = TwitchM3U8
__segment__: ClassVar[Type[TwitchHLSSegment]] = TwitchHLSSegment
+ @parse_tag("EXT-X-TWITCH-LIVE-SEQUENCE")
+ def parse_ext_x_twitch_live_sequence(self, value):
+ # Unset discontinuity state if the previous segment was not an ad,
+ # as the following segment won't be an ad
+ if self.m3u8.segments and not self.m3u8.segments[-1].ad:
+ self._discontinuity = False
+
@parse_tag("EXT-X-TWITCH-PREFETCH")
def parse_tag_ext_x_twitch_prefetch(self, value):
segments = self.m3u8.segments
if not segments: # pragma: no cover
return
last = segments[-1]
+
# Use the average duration of all regular segments for the duration of prefetch segments.
# This is better than using the duration of the last segment when regular segment durations vary a lot.
# In low latency mode, the playlist reload time is the duration of the last segment.
duration = last.duration if last.prefetch else sum(segment.duration for segment in segments) / float(len(segments))
+
# Use the last duration for extrapolating the start time of the prefetch segment, which is needed for checking
# whether it is an ad segment and matches the parsed date ranges or not
date = last.date + timedelta(seconds=last.duration)
+
# Always treat prefetch segments after a discontinuity as ad segments
+ # (discontinuity tag inserted after last regular segment)
+ # Don't reset discontinuity state: the date extrapolation might be inaccurate,
+ # so all following prefetch segments should be considered an ad after a discontinuity
ad = self._discontinuity or self._is_segment_ad(date)
+
+ # Since we don't reset the discontinuity state in prefetch segments for the purpose of ad detection,
+ # set the prefetch segment's discontinuity attribute based on ad transitions
+ discontinuity = ad != last.ad
+
segment = dataclass_replace(
last,
uri=self.uri(value),
duration=duration,
title=None,
+ discontinuity=discontinuity,
date=date,
ad=ad,
prefetch=True,
@@ -108,6 +127,15 @@ def get_segment(self, uri: str, **data) -> TwitchHLSSegment:
ad = self._is_segment_ad(self._date, self._extinf.title if self._extinf else None)
segment: TwitchHLSSegment = super().get_segment(uri, ad=ad, prefetch=False) # type: ignore[assignment]
+ # Special case where Twitch incorrectly inserts discontinuity tags between segments of the live content
+ if (
+ segment.discontinuity
+ and not segment.ad
+ and self.m3u8.segments
+ and not self.m3u8.segments[-1].ad
+ ):
+ segment.discontinuity = False
+
return segment
def _is_segment_ad(self, date: Optional[datetime], title: Optional[str] = None) -> bool:
| diff --git a/tests/plugins/test_twitch.py b/tests/plugins/test_twitch.py
index e8997dbbc22..00bdd0237cf 100644
--- a/tests/plugins/test_twitch.py
+++ b/tests/plugins/test_twitch.py
@@ -363,6 +363,7 @@ def test_hls_low_latency_has_prefetch_disable_ads_no_preroll_with_prefetch_ads(s
Tag("EXT-X-DISCONTINUITY"),
TagDateRangeAd(start=DATETIME_BASE + timedelta(seconds=3), duration=4),
]
+ tls = Tag("EXT-X-TWITCH-LIVE-SEQUENCE", 7)
# noinspection PyTypeChecker
segments = self.subject([
# regular stream data with prefetch segments
@@ -374,9 +375,9 @@ def test_hls_low_latency_has_prefetch_disable_ads_no_preroll_with_prefetch_ads(s
# still no prefetch segments while ads are playing
Playlist(3, [*ads, Seg(3), Seg(4), Seg(5), Seg(6)]),
# new prefetch segments on the first regular segment occurrence
- Playlist(4, [*ads, Seg(4), Seg(5), Seg(6), Seg(7), Pre(8), Pre(9)]),
- Playlist(5, [*ads, Seg(5), Seg(6), Seg(7), Seg(8), Pre(9), Pre(10)]),
- Playlist(6, [*ads, Seg(6), Seg(7), Seg(8), Seg(9), Pre(10), Pre(11)]),
+ Playlist(4, [*ads, Seg(4), Seg(5), Seg(6), tls, Seg(7), Pre(8), Pre(9)]),
+ Playlist(5, [*ads, Seg(5), Seg(6), tls, Seg(7), Seg(8), Pre(9), Pre(10)]),
+ Playlist(6, [*ads, Seg(6), tls, Seg(7), Seg(8), Seg(9), Pre(10), Pre(11)]),
Playlist(7, [Seg(7), Seg(8), Seg(9), Seg(10), Pre(11), Pre(12)], end=True),
], streamoptions={"disable_ads": True, "low_latency": True})
@@ -415,6 +416,36 @@ def test_hls_low_latency_no_ads_reload_time(self):
self.await_read(read_all=True)
assert self.thread.reader.worker.playlist_reload_time == pytest.approx(23 / 3)
+ @patch("streamlink.stream.hls.hls.log")
+ def test_hls_prefetch_after_discontinuity(self, mock_log):
+ segments = self.subject([
+ Playlist(0, [Segment(0), Segment(1)]),
+ Playlist(2, [Segment(2), Segment(3), Tag("EXT-X-DISCONTINUITY"), SegmentPrefetch(4), SegmentPrefetch(5)]),
+ Playlist(6, [Segment(6), Segment(7)], end=True),
+ ], streamoptions={"disable_ads": True, "low_latency": True})
+
+ self.await_write(8)
+ assert self.await_read(read_all=True) == self.content(segments, cond=lambda seg: seg.num not in (4, 5))
+ assert mock_log.warning.mock_calls == [
+ call("Encountered a stream discontinuity. This is unsupported and will result in incoherent output data."),
+ ]
+
+ @patch("streamlink.stream.hls.hls.log")
+ def test_hls_ignored_discontinuity(self, mock_log):
+ Seg, Pre = Segment, SegmentPrefetch
+ discontinuity = Tag("EXT-X-DISCONTINUITY")
+ tls = Tag("EXT-X-TWITCH-LIVE-SEQUENCE", 1234) # value is irrelevant
+ segments = self.subject([
+ Playlist(0, [Seg(0), discontinuity, Seg(1)]),
+ Playlist(2, [Seg(2), Seg(3), discontinuity, Seg(4), Seg(5)]),
+ Playlist(6, [Seg(6), Seg(7), discontinuity, tls, Pre(8), Pre(9)]),
+ Playlist(10, [Seg(10), Seg(11), discontinuity, tls, Pre(12), discontinuity, tls, Pre(13)], end=True),
+ ], streamoptions={"disable_ads": True, "low_latency": True})
+
+ self.await_write(14)
+ assert self.await_read(read_all=True) == self.content(segments)
+ assert mock_log.warning.mock_calls == []
+
class TestTwitchAPIAccessToken:
@pytest.fixture(autouse=True)
| plugins.twitch: incorrect discontinuity tags lead to warnings being spammed
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)
### Streamlink version
streamlink 6.7.4
### Description
Recently, I've noticed constant warnings about stream discontinuities despite not seeing any actually happen.
According to the verbose log the playlists seem to keep having the X-DISCONTINUITY tag in them even though I'm not getting served some sort of mid-roll or pre-roll due to having a subscription to the channel in question. I'm still receiving the live broadcast.
There are also instances of repetitively getting this warning even after getting past the initial pre-roll in the event I don't have a subscription to a particular streamer.
I'm not sure what's going on in the Twitch side of things, is this some attempt at trying to break streamlink usage again?
The verbose log is too large for the issue report so I'm attaching it as a file:
[streamlink.txt.gz](https://github.com/user-attachments/files/15524324/streamlink.txt.gz)
### Debug log
```text
https://github.com/user-attachments/files/15524324/streamlink.txt.gz
```
| This has nothing to do with Twitch. It's a bug in the HLS implementation which warns when there's a stream discontinuity, which is not supported by Streamlink, as two different bitstreams are concatenated. This happens during ad transitions. The warning however is not supposed to be written to the log output every time. This looks like a bug in regards to the ad segment filtering.
After having another closer look at the logs, the warning behavior seems to be working correctly. What's wrong is the discontinuity tag in between two "live" segments where there's no actual discontinuity.
No idea why Twitch is inserting this here, but it's clearly wrong. You said it yourself, you get the regular live content without ads.
I guess this could be covered by the Twitch plugin's HLS subclasses. The discontinuity status of a segment would need to be cleared when it and the segment before it are both considered "live" segments.
Prefetch segments however might cause a few problems:
https://github.com/streamlink/streamlink/blob/6.7.4/src/streamlink/plugins/twitch.py#L87
I took another log after a streamer ran a several minute long midroll ad break:
[streamlink.txt.gz](https://github.com/user-attachments/files/15527113/streamlink.txt.gz)
I might try seeing what happens if I don't use the "Low Latency" option, but this is really strange behavior coming from the playlists.
There is no point doing this unless you're using the branch of the linked pull request (#6016).
https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#pull-request-feedback
Apologies, I noticed the pull request a bit late; I grabbed the `twitch.py` from it and ran this test.
The fix seems to work from my testing; I only get a warning on the actual adbreak segments.
[streamlink.txt.gz](https://github.com/user-attachments/files/15527285/streamlink.txt.gz)
Something else bizarre happened towards the end, after the adbreak the video froze and I just keep seeing streamlink reloading the playlist, but mpv receives nothing; just stuck on the last frame of the "Commercial Break In Progress" video. That's a separate issue I'm trying to understand the underlying cause of that's not related to this issue though.
You are not filtering out ads using `--twitch-disable-ads` ([1](https://streamlink.github.io/cli.html#cmdoption-twitch-disable-ads), [2](https://streamlink.github.io/cli/plugins/twitch.html#embedded-ads)), hence why you're seeing the "commercial break in progress" video loop placeholder. This is a loop of about 30 seconds which overrides the actual live segments.
> after the adbreak the video froze and I just keep seeing streamlink reloading the playlist, but mpv receives nothing; just stuck on the last frame of the "Commercial Break In Progress" video
The reason for this are incorrect timestamps of the "commercial break in progress" video container, which messes with your player's demuxer during the stream discontinuity, or rather discontinuities, because when repeating the "commercial break in progress" video, there's also a discontinuity. There is unfortunately not much that can be done here. You should always be filtering out "ads" / the placeholder in order to prevent this.
----
The changes of #6016 are working fine. I've checked multiple streams with and without ad filtering, as well as with low latency streaming and without. I was worried about the changed logic of the line I linked in my previous comment, which filtered out prefetch segments if the last actual segment contained a discontinuity. This is not necessary anymore, as the discontinuities are properly annotated in the prefetch segments now, which was the reason for the log warning spam. I'm going to merge #6016 now.
I was about to file a new issue against streamlink 6.8.1
It worked fine yesterday. Seems like Twitch decided to break something today (Tuesday 2024-06-18).
I'm observing this on at least the two streamers I just happened to try that I'm still subscribed to.
Lots of lines like:
[stream.hls][warning] Encountered a stream discontinuity. This is unsupported and will result in incoherent output data.
https://gist.github.com/mjevans/616101c98666baa31f6048218b94c21a
I have re-tested with PR #6022 included, the behavior and output appear identical. This PR might be a building block towards the fix, but it alone is insufficient.
I posted this in the linked PR, and the only thing that helped for me was turning off `twitch-low-latency`. Without that I get discontinuities (on some streams), and actual discontinuities in the video feed. Based on turning off low latency fixing it, I think it might be an issue with low latency as of today?
Removing --twitch-low-latency AND using the PR does seem to avoid the issue.
Though it would be nice if low latency worked too, that's what I usually used in scripts to try to be almost as live as the web browser and mobile clients for interactive streams.
This seems to be a regression, it does not happen in versions 6.3.1 nor 5.5.1.
> This seems to be a regression, it does not happen in versions 6.3.1 nor 5.5.1.
This is not a regression in Streamlink, because Twitch has made changes. They've recently started to include discontinuity tags between two "live" segments in some cases. Unless there's an actual discontinuity, which is unlikely considering it's two "live" segments and considering it's included repeatedly, this is incorrect metadata.
https://datatracker.ietf.org/doc/html/rfc8216#section-4.3.2.3
If you read Streamlink's changelog or check the diff, you'll see that there were no relevant changes between those versions.
```sh
git diff 6.3.1...6.8.1 -- src/streamlink/plugins/twitch.py src/streamlink/stream/hls/
```
So if you want this issue to be resolved, instead of making wild claims, consider providing useful log outputs, as I've explained in the linked pull request.
https://github.com/streamlink/streamlink/pull/6022#issuecomment-2178541757
FWIW the pull request had a green checkmark so I thought there wasn't anything else to discuss there.
**Patch Author Requested Data Collection**
`streamlink --twitch-disable-ads --twitch-low-latency --loglevel=all https://twitch.tv/${STREAMER} ${QUALITY} 2>&1 | tee -a all.log`
Note I am also using a streamlink config ~/.config/streamlink/config.twitch which inclueds
```
# follow https://streamlink.github.io/cli/plugins/twitch.html#authentication
twitch-api-header=Authorization=OAuth REDACTED
twitch-disable-ads
twitch-disable-hosting
player=mpv
player-args=--really-quiet
```
Unfortunately I didn't know these things _last_ night when I was trying it out with two streamers (from the general Chicago ingress area) which both had that issue. Today only one of the streamers I'm subscribed to has streamed thus far. That stream has not presented the issue. I'll continue testing with other streamers and see if a reproduction occurs. | 2024-06-05T19:14:35Z | 2024-06-23T15:58:14Z | ["tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://www.twitch.tv/dota2ti/video/]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_no_low_latency_has_prefetch", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=vod URL=https://www.twitch.tv/dota2ti/video/1963401646]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[http://example.com/]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=clip URL=https://clips.twitch.tv/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_disable_ads_has_midstream", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_all_matchers_match[player]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=vod URL=https://www.twitch.tv/dota2ti/v/1963401646]", "tests/plugins/test_twitch.py::TestTwitchAPIAccessToken::test_failed_integrity_check[plugin0-mock0]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_disable_ads_daterange_by_id", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=player URL=https://player.twitch.tv/?parent=twitch.tv&video=1963401646]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=clip URL=https://www.twitch.tv/lirik/clip/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_low_latency_has_prefetch_has_preroll", "tests/plugins/test_twitch.py::TestTwitchAPIAccessToken::test_plugin_options[plugin0-exp_headers0-exp_variables0]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://www.twitch.tv]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://player.twitch.tv/?]", "tests/plugins/test_twitch.py::TestTwitchMetadata::test_metadata_video_no_data[False-https://twitch.tv/videos/1337]", "tests/plugins/test_twitch.py::TestTwitchAPIAccessToken::test_plugin_options[plugin1-exp_headers1-exp_variables1]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_disable_ads_daterange_by_attr", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_all_matchers_match[clip]", "tests/plugins/test_twitch.py::TestTwitchHLSMultivariantResponse::test_multivariant_response[non-json error response]", "tests/plugins/test_twitch.py::TestTwitchMetadata::test_metadata_channel[True-https://twitch.tv/foo]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=live URL=https://www.twitch.tv/CHANNELNAME/]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_all_named_matchers_have_tests[live]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=player URL=https://player.twitch.tv/?parent=twitch.tv&video=1963401646&t=1h23m45s GROUPS={}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://example.com/index.html]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=live URL=https://www.twitch.tv/CHANNELNAME? GROUPS={'channel': 'CHANNELNAME'}]", "tests/plugins/test_twitch.py::TestTwitchHLSMultivariantResponse::test_multivariant_response[offline]", "tests/plugins/test_twitch.py::TestTwitchMetadata::test_metadata_channel_no_data[False-https://twitch.tv/foo]", "tests/plugins/test_twitch.py::TestTwitchMetadata::test_metadata_video[True-https://twitch.tv/videos/1337]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=live URL=https://www.twitch.tv/CHANNELNAME/? GROUPS={'channel': 'CHANNELNAME'}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=vod URL=https://www.twitch.tv/dota2ti/video/1963401646 GROUPS={'video_id': '1963401646'}]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_prefetch_after_discontinuity", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://example.com/]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_disable_ads_has_preroll", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=live URL=https://www.twitch.tv/CHANNELNAME GROUPS={'channel': 'CHANNELNAME'}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://www.twitch.tv/dota2ti/v]", "tests/plugins/test_twitch.py::TestTwitchAPIAccessToken::test_auth_failure[plugin0-mock0]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=clip URL=https://www.twitch.tv/clip/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://player.twitch.tv/]", "tests/plugins/test_twitch.py::TestTwitchAPIAccessToken::test_live_success[mock0]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_low_latency_no_prefetch", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_low_latency_has_prefetch_disable_ads_has_preroll", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_class_name", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=live URL=https://www.twitch.tv/CHANNELNAME/ GROUPS={'channel': 'CHANNELNAME'}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_all_named_matchers_have_tests[vod]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_low_latency_has_prefetch", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_all_matchers_match[live]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=player URL=https://player.twitch.tv/?parent=twitch.tv&video=1963401646&t=1h23m45s]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=player URL=https://player.twitch.tv/?parent=twitch.tv&channel=CHANNELNAME GROUPS={}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://www.twitch.tv/videos/]", "tests/plugins/test_twitch.py::TestTwitchAPIAccessToken::test_vod_success[mock0]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_class_setup", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=player URL=https://player.twitch.tv/?parent=twitch.tv&channel=CHANNELNAME]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=vod URL=https://www.twitch.tv/videos/1963401646]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=clip URL=https://www.twitch.tv/lirik/clip/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4 GROUPS={'clip_id': 'GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4'}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_all_named_matchers_have_tests[clip]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_disable_ads_daterange_unknown", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=clip URL=https://www.twitch.tv/clip/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4 GROUPS={'clip_id': 'GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4'}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=live URL=https://www.twitch.tv/CHANNELNAME]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=live URL=https://www.twitch.tv/CHANNELNAME?]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_disable_ads_daterange_by_class", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=vod URL=https://www.twitch.tv/videos/1963401646?t=1h23m45s]", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_low_latency_no_prefetch_disable_ads_has_preroll", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_low_latency_has_prefetch_disable_ads_no_preroll_with_prefetch_ads", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_low_latency_no_ads_reload_time", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=vod URL=https://www.twitch.tv/dota2ti/v/1963401646 GROUPS={'video_id': '1963401646'}]", "tests/plugins/test_twitch.py::TestTwitchAPIAccessToken::test_live_failure[mock0]", "tests/plugins/test_twitch.py::TestTwitchHLSMultivariantResponse::test_multivariant_response[success]", "tests/plugins/test_twitch.py::TestTwitchHLSMultivariantResponse::test_multivariant_response[invalid HLS playlist]", "tests/plugins/test_twitch.py::TestTwitchMetadata::test_metadata_clip[True-https://clips.twitch.tv/foo]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_positive_named[NAME=live URL=https://www.twitch.tv/CHANNELNAME/?]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=vod URL=https://www.twitch.tv/videos/1963401646 GROUPS={'video_id': '1963401646'}]", "tests/plugins/test_twitch.py::TestTwitchHLSMultivariantResponse::test_multivariant_response[geo restriction]", "tests/plugins/test_twitch.py::test_stream_weight", "tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_no_disable_ads_has_preroll", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://www.twitch.tv/lirik/clip/]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_all_matchers_match[vod]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://www.twitch.tv/]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://clips.twitch.tv/]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=player URL=https://player.twitch.tv/?parent=twitch.tv&video=1963401646 GROUPS={}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_negative[https://www.twitch.tv/clip/]", "tests/plugins/test_twitch.py::TestTwitchAPIAccessToken::test_vod_failure[mock0]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_all_named_matchers_have_tests[player]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=clip URL=https://clips.twitch.tv/GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4 GROUPS={'clip_id': 'GoodEndearingPassionfruitPMSTwin-QfRLYDPKlscgqt-4'}]", "tests/plugins/test_twitch.py::TestPluginCanHandleUrlTwitch::test_url_matches_groups_named[NAME=vod URL=https://www.twitch.tv/videos/1963401646?t=1h23m45s GROUPS={'video_id': '1963401646'}]"] | [] | ["tests/plugins/test_twitch.py::TestTwitchHLSStream::test_hls_ignored_discontinuity", "tests/plugins/test_twitch.py::TestTwitchMetadata::test_metadata_clip_no_data[False-https://clips.twitch.tv/foo]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.6.2", "charset-normalizer==3.3.2", "coverage==7.5.4", "docutils==0.21.2", "docutils-stubs==0.0.22", "freezegun==1.5.1", "furo==2024.4.27", "h11==0.14.0", "idna==3.7", "imagesize==1.4.1", "importlib-metadata==7.2.1", "iniconfig==2.0.0", "isodate==0.6.1", "jinja2==3.1.4", "lxml==5.2.2", "lxml-stubs==0.5.1", "markdown-it-py==3.0.0", "markupsafe==2.1.5", "mdit-py-plugins==0.4.1", "mdurl==0.1.2", "mypy==1.10.0", "mypy-extensions==1.0.0", "myst-parser==3.0.1", "outcome==1.3.0.post0", "packaging==24.1", "pip==24.1", "pluggy==1.5.0", "pycountry==24.6.1", "pycryptodome==3.20.0", "pygments==2.18.0", "pysocks==1.7.1", "pytest==8.2.2", "pytest-asyncio==0.23.7", "pytest-cov==5.0.0", "pytest-trio==0.8.0", "python-dateutil==2.9.0.post0", "pyyaml==6.0.1", "requests==2.32.3", "requests-mock==1.12.1", "ruff==0.4.9", "setuptools==70.1.0", "shtab==1.7.1", "six==1.16.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "sortedcontainers==2.4.0", "soupsieve==2.5", "sphinx==7.3.7", "sphinx-basic-ng==1.0.0b2", "sphinx-design==0.5.0", "sphinxcontrib-applehelp==1.0.8", "sphinxcontrib-devhelp==1.0.6", "sphinxcontrib-htmlhelp==2.0.5", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==1.0.7", "sphinxcontrib-serializinghtml==1.1.10", "trio==0.25.1", "trio-typing==0.10.0", "trio-websocket==0.11.1", "types-freezegun==1.1.10", "types-requests==2.32.0.20240622", "types-setuptools==70.0.0.20240524", "types-urllib3==1.26.25.14", "typing-extensions==4.12.2", "urllib3==2.2.2", "versioningit==3.1.1", "websocket-client==1.8.0", "wheel==0.44.0", "wsproto==1.2.0", "zipp==3.19.2"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
streamlink/streamlink | streamlink__streamlink-6029 | 7780833480fc25350a5ed84eae64d65ed9e91706 | diff --git a/src/streamlink/plugins/cnbce.py b/src/streamlink/plugins/cnbce.py
new file mode 100644
index 00000000000..3ab158b3ae5
--- /dev/null
+++ b/src/streamlink/plugins/cnbce.py
@@ -0,0 +1,38 @@
+"""
+$description Turkish live TV channel owned by NBCUniversal Media.
+$url cnbce.com
+$type live
+$region Turkey
+"""
+
+import logging
+import re
+
+from streamlink.plugin import Plugin, pluginmatcher
+from streamlink.plugin.api import validate
+from streamlink.stream.hls import HLSStream
+
+
+log = logging.getLogger(__name__)
+
+
+@pluginmatcher(re.compile(r"https?://(?:www\.)?cnbce\.com/canli-yayin"))
+class CNBCE(Plugin):
+ _URL_API = "https://www.cnbce.com/api/live-stream/source"
+
+ def _get_streams(self):
+ hls_url = self.session.http.post(self._URL_API, schema=validate.Schema(
+ validate.parse_json(),
+ {
+ "source": validate.url(path=validate.endswith(".m3u8")),
+ },
+ validate.get("source"),
+ ))
+ if self.session.http.get(hls_url, raise_for_status=False).status_code != 200:
+ log.error("Could not access stream (geo-blocked content, etc.)")
+ return
+
+ return HLSStream.parse_variant_playlist(self.session, hls_url)
+
+
+__plugin__ = CNBCE
| diff --git a/tests/plugins/test_cnbce.py b/tests/plugins/test_cnbce.py
new file mode 100644
index 00000000000..10fd4205fe0
--- /dev/null
+++ b/tests/plugins/test_cnbce.py
@@ -0,0 +1,10 @@
+from streamlink.plugins.cnbce import CNBCE
+from tests.plugins import PluginCanHandleUrl
+
+
+class TestPluginCanHandleUrlCNBCE(PluginCanHandleUrl):
+ __plugin__ = CNBCE
+
+ should_match = [
+ "https://www.cnbce.com/canli-yayin",
+ ]
| cnbce.com / ercdn.net
### Checklist
- [X] This is a plugin request and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin requests](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+request%22)
### Description
https://www.cnbce.com/canli-yayin turkish channel started onair 10th june.
Live stream format to get is : https://cnbc-e-live.ercdn.net/cnbce/cnbce.m3u8?st=J7h0M4dEIU002lsClOpAbc&e=1718011321
My attempts are unsuccessfull :
https://github.com/ipstreet312/streamlink/blob/master/tests/plugins/test_cnbce.py
https://github.com/ipstreet312/streamlink/blob/master/src/streamlink/plugins/cnbce.py
https://github.com/ipstreet312/freeiptv/blob/master/ressources/tur/cnbce.py
https://github.com/ipstreet312/freeiptv/blob/master/.github/workflows/cnbcemaster.yml
https://github.com/ipstreet312/freeiptv/blob/master/ressources/tur/cnbce.m3u8
Could someome look at for create cnbce plugin ?
Bests & Regards for your help and interest
### Input URLs
https://www.cnbce.com/canli-yayin
https://s.cnbce.com/dist/assets/live-stream-CLjhjGN7.js
https:\/\/cnbc-e-live.ercdn.net\/cnbce\/cnbce_low.m3u8?st=nDW4MABCmP8xzh907hrUbg&e=1718085229
https://cnbc-e-live.ercdn.net/cnbce/cnbce_1080p.m3u8?st=J7h0M4dABC002lsClOpyJw&e=1718011987
| 2024-06-11T12:54:16Z | 2024-06-13T18:50:53Z | [] | [] | ["tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_class_setup", "tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_url_matches_positive_unnamed[https://www.cnbce.com/canli-yayin]", "tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_url_matches_negative[http://example.com/]", "tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_all_matchers_match[#0]", "tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_url_matches_negative[https://example.com/]", "tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_class_name", "tests/plugins/test_cnbce.py::TestPluginCanHandleUrlCNBCE::test_url_matches_negative[https://example.com/index.html]"] | [] | {"install": ["uv pip install -e ."], "pre_install": [], "python": "3.12", "pip_packages": ["alabaster==0.7.16", "async-generator==1.10", "attrs==23.2.0", "babel==2.15.0", "beautifulsoup4==4.12.3", "brotli==1.1.0", "certifi==2024.6.2", "charset-normalizer==3.3.2", "coverage==7.5.3", "docutils==0.21.2", "docutils-stubs==0.0.22", "freezegun==1.5.1", "furo==2024.4.27", "h11==0.14.0", "idna==3.7", "imagesize==1.4.1", "importlib-metadata==7.1.0", "iniconfig==2.0.0", "isodate==0.6.1", "jinja2==3.1.4", "lxml==5.2.2", "lxml-stubs==0.5.1", "markdown-it-py==3.0.0", "markupsafe==2.1.5", "mdit-py-plugins==0.4.1", "mdurl==0.1.2", "mypy==1.10.0", "mypy-extensions==1.0.0", "myst-parser==3.0.1", "outcome==1.3.0.post0", "packaging==24.1", "pip==24.0", "pluggy==1.5.0", "pycountry==24.6.1", "pycryptodome==3.20.0", "pygments==2.18.0", "pysocks==1.7.1", "pytest==8.2.2", "pytest-asyncio==0.23.7", "pytest-cov==5.0.0", "pytest-trio==0.8.0", "python-dateutil==2.9.0.post0", "pyyaml==6.0.1", "requests==2.32.3", "requests-mock==1.12.1", "ruff==0.4.7", "setuptools==70.0.0", "shtab==1.7.1", "six==1.16.0", "sniffio==1.3.1", "snowballstemmer==2.2.0", "sortedcontainers==2.4.0", "soupsieve==2.5", "sphinx==7.3.7", "sphinx-basic-ng==1.0.0b2", "sphinx-design==0.5.0", "sphinxcontrib-applehelp==1.0.8", "sphinxcontrib-devhelp==1.0.6", "sphinxcontrib-htmlhelp==2.0.5", "sphinxcontrib-jsmath==1.0.1", "sphinxcontrib-qthelp==1.0.7", "sphinxcontrib-serializinghtml==1.1.10", "trio==0.25.1", "trio-typing==0.10.0", "trio-websocket==0.11.1", "types-freezegun==1.1.10", "types-requests==2.32.0.20240602", "types-setuptools==70.0.0.20240524", "types-urllib3==1.26.25.14", "typing-extensions==4.12.2", "urllib3==2.2.1", "versioningit==3.1.1", "websocket-client==1.8.0", "wheel==0.44.0", "wsproto==1.2.0", "zipp==3.19.2"]} | pytest --tb=no -rA -p no:cacheprovider | null | null | null | swa-bench:sw.eval |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.