How to use the mlblocks.discovery._add_lookup_path function in mlblocks

To help you get started, we’ve selected a few mlblocks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HDI-Project / MLBlocks / tests / test_discovery.py View on Github external
def test__add_lookup_path_do_nothing():
    paths = ['a', 'b']
    discovery._add_lookup_path('a', paths)

    assert paths == ['a', 'b']
github HDI-Project / MLBlocks / tests / test_discovery.py View on Github external
def test__add_lookup_path():
    paths = ['a', 'b']
    discovery._add_lookup_path('tests', paths)

    expected_path = os.path.abspath('tests')

    assert paths == [expected_path, 'a', 'b']
github HDI-Project / MLBlocks / tests / test_discovery.py View on Github external
def test__add_lookup_path_exception():
    paths = ['a', 'b']
    invalid_path = str(uuid.uuid4())

    with pytest.raises(ValueError):
        discovery._add_lookup_path(invalid_path, paths)