diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-11-02 07:28:26 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-11-02 07:49:26 +1000 |
commit | e734651581e11fd83c0669987898aa0feed64fbd (patch) | |
tree | 7e537716fe2f0a658a2d491069dc6d5601ae12c6 /tests | |
parent | c214ee371cbd81bf6aebc3f9b58968718df33516 (diff) | |
download | xkeyboard-config-e734651581e11fd83c0669987898aa0feed64fbd.tar.gz |
models: remove duplicated teck229 and teck227 models
And expand our tests to also check for duplicate models.
Fixes #236
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_rules_xml.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_rules_xml.py b/tests/test_rules_xml.py index 0e27a56..3a57bcf 100644 --- a/tests/test_rules_xml.py +++ b/tests/test_rules_xml.py @@ -89,3 +89,13 @@ def test_duplicate_layouts(rules_xml): assert vci.name not in variants, \ f'{rules_xml}: duplicate variant {ci.name}({vci.name}):\n{prettyxml(variant)}' variants[vci.name] = True + + +def test_duplicate_models(rules_xml): + tree = ET.parse(rules_xml) + root = tree.getroot() + models = {} + for model in root.iter('model'): + ci = ConfigItem.from_elem(model) + assert ci.name not in models, f'Duplicate model {ci.name}' + models[ci.name] = True |