Fix check for missing subheadings
If a spec heading is missing entirely, and subheadings are expected, the heading was being used in a key lookup causing an exception. Change-Id: I44fb2b9c701cf359433211e876d2f6b3d1dbec5c
This commit is contained in:
parent
4a1570061e
commit
a12a6527dd
|
@ -64,6 +64,10 @@ class TestTitles(testtools.TestCase):
|
|||
msgs.append("Extra sections: %s" % extra_sections)
|
||||
|
||||
for section in expect.keys():
|
||||
# Sections missing entirely are already covered above
|
||||
if section not in actual:
|
||||
continue
|
||||
|
||||
missing_subsections = [x for x in expect[section]
|
||||
if x not in actual[section]]
|
||||
# extra subsections are allowed
|
||||
|
|
Loading…
Reference in New Issue