From 3d94e243d6c56dfc083f0be67a246f988e27ddec Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 29 Aug 2016 15:11:56 +0100 Subject: Handle missing level in the same way as missing num --- tests/docx/numbering_xml_tests.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/docx/numbering_xml_tests.py b/tests/docx/numbering_xml_tests.py index 6f4e9ac..8fb59ff 100644 --- a/tests/docx/numbering_xml_tests.py +++ b/tests/docx/numbering_xml_tests.py @@ -41,3 +41,9 @@ def list_is_not_ordered_if_formatted_as_bullet(): def list_is_ordered_if_formatted_as_decimal(): numbering = read_numbering_xml_element(_sample_numbering_xml) assert_equal(True, numbering.find_level("47", "1").is_ordered) + + +@istest +def find_level_returns_none_if_level_cannot_be_found(): + numbering = read_numbering_xml_element(_sample_numbering_xml) + assert_equal(None, numbering.find_level("47", "2")) -- cgit v1.2.3