From cf6ac16e273847109184a680bff3153237c033c7 Mon Sep 17 00:00:00 2001 From: yrriban Date: Fri, 19 Sep 2025 18:33:08 -0400 Subject: [PATCH 1/3] Add pillow to the project's dependencies. Also fix the relevant error message's formatting. --- dcc/extract.py | 2 +- pyproject.toml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dcc/extract.py b/dcc/extract.py index a61b446..447ffa9 100644 --- a/dcc/extract.py +++ b/dcc/extract.py @@ -40,6 +40,6 @@ class Extract(dcc.doom_base.Wad): ) print( - "Lump {parsed_args.lump} not found in any wad in " + f"Lump {parsed_args.lump} not found in any wad in " + f"{parsed_args.wad}" ) diff --git a/pyproject.toml b/pyproject.toml index 1970ebf..2692d05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,8 @@ dependencies = [ "omgifol (>=0.5.1,<0.6.0)", "tomlkit (>=0.13.3,<0.14.0)", "wand (>=0.6.13,<0.7.0)", + "pytest (>=8.4.2,<9.0.0)", + "pillow (>=11.3.0,<12.0.0)", ] @@ -31,3 +33,8 @@ dcc = { source = "dcc/main.py", type = "onefile" } [tool.poetry-pyinstaller-plugin.collect] all = ["cliff"] + +[tool.pytest.ini_options] +testpaths = [ + "tests", +] From fa176ae6ed308841d3bc585bf13460eed2f7681c Mon Sep 17 00:00:00 2001 From: yrriban Date: Thu, 9 Oct 2025 18:56:18 -0400 Subject: [PATCH 2/3] Add pytest-mockito to the list of deps. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2692d05..891d8db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ dependencies = [ "wand (>=0.6.13,<0.7.0)", "pytest (>=8.4.2,<9.0.0)", "pillow (>=11.3.0,<12.0.0)", + "pytest-mockito (>=0.0.4,<0.0.5)", ] From c1e4156f3c99ba153bc62c7f988fe1e432a95150 Mon Sep 17 00:00:00 2001 From: yrriban Date: Thu, 9 Oct 2025 18:59:18 -0400 Subject: [PATCH 3/3] Fix case where DSDA not being set in the config caused a crash. --- dcc/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dcc/config.py b/dcc/config.py index d1683a7..ae2487a 100644 --- a/dcc/config.py +++ b/dcc/config.py @@ -15,7 +15,7 @@ class ConfigBase(object): self.doom.joinpath(self.config_name)).read() self._dsda = self._config.get("dsda") - if self.dsda is None: + if self._dsda is None: raise Exception( "required key 'dsda' not set in config " + f"{self.doom.joinpath(self.config_name)}.") @@ -37,7 +37,7 @@ class ConfigBase(object): propname = "_".join(what) val = self._config for w in what: - val = val[w] + val = val.get(w) if val is None: val = default break