Esempio n. 1
0
def test_solve_internal_plugins():
    internal = [p for p in find_internal_plugins().values()]

    # For now we're not computing dependencies for internal plugins
    # TODO: Remove when the migration is complete
    assert solve_plugin_dependencies(internal, testing=False) == []

    # Test that solver doesn't crash and returns all available plugins
    assert len(solve_plugin_dependencies(internal, testing=True)) == 26
Esempio n. 2
0
def test_solve_plugin_dependencies_missing_requires():
    found_plugins = [A, B, C, D]
    assert solve_plugin_dependencies(found_plugins) == found_plugins[:-1]
Esempio n. 3
0
def test_solve_plugin_dependencies_missing_optional():
    found_plugins = [A, B, C]
    assert solve_plugin_dependencies(found_plugins) == found_plugins
Esempio n. 4
0
def test_solve_plugin_dependencies_circular():
    found_plugins = [Circular1, Circular2]
    with pytest.raises(CircularDependencyError):
        solve_plugin_dependencies(found_plugins)
Esempio n. 5
0
def test_solve_plugin_dependencies_self_reference():
    found_plugins = [Self]
    with pytest.raises(SpyderAPIError):
        solve_plugin_dependencies(found_plugins)
Esempio n. 6
0
def test_solve_plugin_dependencies_none_values():
    found_plugins = [None1]
    assert solve_plugin_dependencies(found_plugins) == found_plugins
Esempio n. 7
0
def test_solve_plugin_dependencies_3():
    found_plugins = [F, D]
    assert solve_plugin_dependencies(found_plugins) == [F]
Esempio n. 8
0
def test_solve_plugin_dependencies_2():
    found_plugins = [E, D]
    assert solve_plugin_dependencies(found_plugins) == found_plugins
Esempio n. 9
0
def test_solve_internal_plugins():
    internal = [p for p in find_internal_plugins().values()]
    # Test that solver doesn't crash and returns all available plugins
    solved_dependencies = solve_plugin_dependencies(internal)
    print(solved_dependencies)
    assert len(solve_plugin_dependencies(internal)) == 27
Esempio n. 10
0
def test_solve_plugin_dependencies_missing_requires():
    found_plugins = [A, B, C, D]
    expected = found_plugins[:-1]
    solved = solve_plugin_dependencies(found_plugins)
    assert solved == expected