def test_group_locations__file_not_find_link(data): """ Test that a file:// url dir that's not a find-link, doesn't get a listdir run """ files, urls = group_locations([data.index_url("empty_with_pkg")]) assert urls and not files, "urls, but not files should have been found"
def test_group_locations__file_expand_dir(data): """ Test that a file:// dir gets listdir run with expand_dir """ files, urls = group_locations([data.find_links], expand_dir=True) assert files and not urls, ("files and not urls should have been found " f"at find-links url: {data.find_links}")
def test_group_locations__non_existing_path(): """ Test that a non-existing path is ignored. """ files, urls = group_locations([os.path.join('this', 'doesnt', 'exist')]) assert not urls and not files, "nothing should have been found"