From 5a624b664197d4bca85c91a50db9ab3c7eda2f14 Mon Sep 17 00:00:00 2001 From: IanCa Date: Mon, 20 Nov 2023 18:29:27 -0600 Subject: [PATCH] Add a test for invalid header attributes --- .../wiki_tests/HED_header_unknown_attribute.mediawiki | 3 +++ tests/schema/test_schema_wiki_fatal_errors.py | 1 + 2 files changed, 4 insertions(+) create mode 100644 tests/data/schema_tests/wiki_tests/HED_header_unknown_attribute.mediawiki diff --git a/tests/data/schema_tests/wiki_tests/HED_header_unknown_attribute.mediawiki b/tests/data/schema_tests/wiki_tests/HED_header_unknown_attribute.mediawiki new file mode 100644 index 00000000..4874eef9 --- /dev/null +++ b/tests/data/schema_tests/wiki_tests/HED_header_unknown_attribute.mediawiki @@ -0,0 +1,3 @@ +HED unknownattribute:unknown + + diff --git a/tests/schema/test_schema_wiki_fatal_errors.py b/tests/schema/test_schema_wiki_fatal_errors.py index 0759dba4..43348432 100644 --- a/tests/schema/test_schema_wiki_fatal_errors.py +++ b/tests/schema/test_schema_wiki_fatal_errors.py @@ -21,6 +21,7 @@ def setUpClass(cls): "empty_file.mediawiki": HedExceptions.SCHEMA_HEADER_INVALID, "HED_header_invalid_version.mediawiki": HedExceptions.SCHEMA_VERSION_INVALID, "HED_header_missing_version.mediawiki": HedExceptions.SCHEMA_VERSION_INVALID, + "HED_header_unknown_attribute.mediawiki": HedExceptions.SCHEMA_UNKNOWN_HEADER_ATTRIBUTE, "HED_header_bad_library.mediawiki": HedExceptions.BAD_HED_LIBRARY_NAME, "HED_schema_out_of_order.mediawiki": HedExceptions.SCHEMA_SECTION_MISSING, "empty_node.mediawiki": HedExceptions.WIKI_DELIMITERS_INVALID,