Compare commits

..

3 commits

Author SHA1 Message Date
c1e4156f3c Fix case where DSDA not being set in the config caused a crash. 2025-10-09 18:59:18 -04:00
fa176ae6ed Add pytest-mockito to the list of deps. 2025-10-09 18:56:18 -04:00
cf6ac16e27 Add pillow to the project's dependencies.
Also fix the relevant error message's formatting.
2025-09-19 18:33:08 -04:00
3 changed files with 11 additions and 3 deletions

View file

@ -15,7 +15,7 @@ class ConfigBase(object):
self.doom.joinpath(self.config_name)).read() self.doom.joinpath(self.config_name)).read()
self._dsda = self._config.get("dsda") self._dsda = self._config.get("dsda")
if self.dsda is None: if self._dsda is None:
raise Exception( raise Exception(
"required key 'dsda' not set in config " "required key 'dsda' not set in config "
+ f"{self.doom.joinpath(self.config_name)}.") + f"{self.doom.joinpath(self.config_name)}.")
@ -37,7 +37,7 @@ class ConfigBase(object):
propname = "_".join(what) propname = "_".join(what)
val = self._config val = self._config
for w in what: for w in what:
val = val[w] val = val.get(w)
if val is None: if val is None:
val = default val = default
break break

View file

@ -40,6 +40,6 @@ class Extract(dcc.doom_base.Wad):
) )
print( 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}" + f"{parsed_args.wad}"
) )

View file

@ -16,6 +16,9 @@ dependencies = [
"omgifol (>=0.5.1,<0.6.0)", "omgifol (>=0.5.1,<0.6.0)",
"tomlkit (>=0.13.3,<0.14.0)", "tomlkit (>=0.13.3,<0.14.0)",
"wand (>=0.6.13,<0.7.0)", "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)",
] ]
@ -31,3 +34,8 @@ dcc = { source = "dcc/main.py", type = "onefile" }
[tool.poetry-pyinstaller-plugin.collect] [tool.poetry-pyinstaller-plugin.collect]
all = ["cliff"] all = ["cliff"]
[tool.pytest.ini_options]
testpaths = [
"tests",
]