File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,34 @@ def next_sibling(self) -> DomNode:
150150 return DomNode (self ._node .nextSibling )
151151
152152
153+ class TestJunitHelpers :
154+ """minimal test to increase coverage for methods that are used in debugging"""
155+
156+ @pytest .fixture
157+ def document (self ) -> DomDocument :
158+ doc = minidom .parseString ("""
159+ <root>
160+ <item name="a"></item>
161+ <item name="b"></item>
162+ </root>
163+ """ )
164+ return DomDocument (doc )
165+
166+ def test_uc_root (self , document : DomDocument ) -> None :
167+ assert document .get_unique_child .tag == "root"
168+
169+ def test_node_assert_attr (self , document : DomDocument ) -> None :
170+ item = document .get_first_by_tag ("item" )
171+
172+ item .assert_attr (name = "a" )
173+
174+ def test_node_repr (self , document : DomDocument ) -> None :
175+ item = document .get_first_by_tag ("item" )
176+
177+ assert repr (item ) == item .toxml ()
178+ assert item .toxml () == '<item name="a"/>'
179+
180+
153181parametrize_families = pytest .mark .parametrize ("xunit_family" , ["xunit1" , "xunit2" ])
154182
155183
You can’t perform that action at this time.
0 commit comments