def test_ls_magic():
    kernel = get_kernel()
    kernel.do_execute("%ls /tmp")
    text = get_log_text(kernel)
    assert '/tmp/' in text, text[:100]
    clear_log_text(kernel)

    kernel.do_execute("%ls /tmp --recursive")
    text = get_log_text(kernel)
    assert text in '/tmp', text[:100]
    clear_log_text(kernel)
dataset/ETHPy150Open Calysto/metakernel/metakernel/magics/tests/test_ls_magic.py/test_ls_magic/swapped operands of `in`