Skip to content

Commit 9441467

Browse files
committed
trivial test for duplicate keys
1 parent ef1597f commit 9441467

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

unittests/test_schema.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,15 @@ def test_recipe_environments_yaml(recipe_paths):
200200
with open(p / "environments.yaml") as fid:
201201
raw = yaml.load(fid, Loader=yaml.Loader)
202202
schema.EnvironmentsValidator.validate(raw)
203+
204+
205+
def test_unique_properties():
206+
invalid_config = dedent(
207+
"""
208+
name: invalid-config
209+
name: duplicate-name
210+
"""
211+
)
212+
213+
with pytest.raises(Exception):
214+
yaml.load(invalid_config, Loader=yaml.Loader)

0 commit comments

Comments
 (0)