Skip to content

Commit 060cf45

Browse files
Fix code coverage
1 parent 3ca14dc commit 060cf45

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tests/basic_rendering_test.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ def test_flatten_element_lists():
208208

209209
def test_flatten_element_generators():
210210
"""
211-
If a list of elements is given as a child element, each element should be
212-
considered as a child.
211+
If a generator of elements is given as a child element, each element
212+
yielded should be considered as a child.
213213
"""
214214
doc = html(c for c in "hi")
215215

@@ -221,6 +221,21 @@ def test_flatten_element_generators():
221221
])
222222

223223

224+
def test_flatten_element_other_sequence():
225+
"""
226+
If a tuple of elements is given as a child element, each element should be
227+
considered as a child.
228+
"""
229+
doc = html(("h", "i"))
230+
231+
assert str(doc) == "\n".join([
232+
"<html>",
233+
" h",
234+
" i",
235+
"</html>",
236+
])
237+
238+
224239
def test_classes_can_render():
225240
"""
226241
Can a class by itself be rendered individually?

0 commit comments

Comments
 (0)