Skip to content

Commit 13a51c8

Browse files
committed
[test_validation.py] Add Test for Section Name Readability
1 parent aaac777 commit 13a51c8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test_validation.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,16 @@ def test_section_unique_ids(self):
129129
res = validate(doc)
130130
self.assertError(res, "Duplicate id in Section")
131131

132+
def test_section_name_readable(self):
133+
"""
134+
Test if section name is not uuid and thus more readable.
135+
"""
136+
doc = odml.Document()
137+
sec = odml.Section("sec", parent=doc)
138+
sec.name = sec.id
139+
res = validate(doc)
140+
self.assertError(res, "Name should be readable")
141+
132142
def test_standalone_section(self):
133143
"""
134144
Test if standalone section does not return errors if required attributes are correct.

0 commit comments

Comments
 (0)