def METHOD_NAME():
    with mock.patch('sys.stdout', new=StringIO()) as output:
        modules.main(["list", "--mode", "package-path"])
        assert output.getvalue() == ' '.join(
            [os.path.join("mod1", "pack1"), os.path.join("mod2", "pack2"), ""]
        )
    with mock.patch('sys.stdout', new=StringIO()) as output:
        modules.main(["list", "--mode", "folder", "--include-parent"])
        assert output.getvalue() == ' '.join(["mod1", "mod2", ".", ""])
    with mock.patch('sys.stdout', new=StringIO()) as output:
        modules.main(["list", "--mode", "package"])
        assert output.getvalue() == ' '.join(["pack1", "pack2", ""])