def test_is_addon_dir(tmp_path):
    assert not is_addon_dir(tmp_path)
    m = tmp_path / "__manifest__.py"
    m.write_text("{'name': 'addon'}")
    assert is_addon_dir(tmp_path)
    m.write_text("{'name': 'addon', 'installable': False}")
    assert is_addon_dir(tmp_path)
    m.write_text("{'name': 'addon', 'installable': False}")
    assert not is_addon_dir(tmp_path, installable_only=True)
    m.write_text("{'name': 'addon', 'installable': True}")
    assert is_addon_dir(tmp_path, installable_only=True)
示例#2
0
def test_is_addon_dir(tmp_path):
    assert not is_addon_dir(tmp_path)
    m = tmp_path / "__manifest__.py"
    m.write_text("{'name': 'addon'}")
    assert is_addon_dir(tmp_path)