Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test__add_lookup_path_do_nothing():
paths = ['a', 'b']
discovery._add_lookup_path('a', paths)
assert paths == ['a', 'b']
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']
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)