MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / test_list_comp

Function test_list_comp

pythonwhat/test_funcs/test_compound_statement.py:534–549  ·  view source on GitHub ↗

Test list comprehension.

(
    state,
    index=1,
    not_called_msg=None,
    comp_iter=None,
    iter_vars_names=False,
    incorrect_iter_vars_msg=None,
    body=None,
    ifs=None,
    insufficient_ifs_msg=None,
)

Source from the content-addressed store, hash-verified

532
533
534def test_list_comp(
535 state,
536 index=1,
537 not_called_msg=None,
538 comp_iter=None,
539 iter_vars_names=False,
540 incorrect_iter_vars_msg=None,
541 body=None,
542 ifs=None,
543 insufficient_ifs_msg=None,
544):
545 """Test list comprehension."""
546 kwargs = locals().copy()
547 kwargs["typestr"] = "{{ordinal}} list comprehension"
548 kwargs["comptype"] = "list_comps"
549 test_comp(**kwargs)
550
551
552def test_comp(

Callers

nothing calls this directly

Calls 2

test_compFunction · 0.85
copyMethod · 0.80

Tested by

no test coverage detected