conf: fix edge case in TOML config validation

This commit is contained in:
Fabio Valentini 2023-10-10 02:57:42 +02:00
parent 0034c349f2
commit 17cfd82728
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -459,6 +459,10 @@ class TomlConf:
if len(run) != 1: if len(run) != 1:
raise ConfError(f"Invalid set of tests to run: {run!r}") raise ConfError(f"Invalid set of tests to run: {run!r}")
# the "default" feature is always implicitly defined
if "default" not in features:
features.add("default")
if features_list := toml.get("features"): if features_list := toml.get("features"):
if enable_list := features_list.get("enable"): if enable_list := features_list.get("enable"):
for enabled in enable_list: for enabled in enable_list: