<commit_before><commit_msg>Add the basis for some functional tests<commit_after>from locators import SimpleLocator

def test_latest_source():
    loc = SimpleLocator()
    proj = 'pip'
    latest = max(loc.versions(proj))
    # We want the first item in the following list
    assert len(loc.get(proj, latest)['sdist']) != 0

def test_has_wheels():
    loc = SimpleLocator()
    proj = 'pip'
    latest = max(loc.versions(proj))
    # This will fail if there is no 'wheel' key.
    # Maybe require all keys to be present?
    assert len(loc.get(proj, latest)['wheel']) != 0

def test_has_old_wheels():
    loc = SimpleLocator()
    proj = 'pip'
    versions = sorted(loc.versions(proj))
    older = any(len(loc.get(proj, v)['wheel']) > 0 for v in versions[:-1])
    current = len(loc.get(proj, versions[-1])['wheel']) != 0

def test_no_released_versions():
    loc = SimpleLocator()
    [d for d in loc.distributions() if not loc.versions(d)]
{'fraction_non_alphanumeric': 0.13800424628450106, 'fraction_numerical': 0.006369426751592357, 'mean_word_length': 3.7626262626262625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4502980', 'n_tokens_mistral': 323, 'n_tokens_neox': 304, 'n_words': 91}