def test_unpinned_things():
    pkgreq = pkg_resources.Requirement.parse('pkg-with-deps==0.1.0')
    ret = main.find_unpinned_requirements(((pkgreq, 'reqs.txt'), ))
    assert ret == {
        ('pkg-dep-1', pkgreq, 'reqs.txt'),
        ('pkg-dep-2', pkgreq, 'reqs.txt'),
    }
def test_format_unpinned_requirements():
    unpinned = main.find_unpinned_requirements(
        ((pkg_resources.Requirement.parse('pkg-with-deps==0.1.0'),
          'reqs.txt'), ))
    ret = main.format_unpinned_requirements(unpinned)
    assert ret == (
        "\tpkg-dep-1 (required by pkg-with-deps==0.1.0 in reqs.txt)\n"
        '\t\tmaybe you want "pkg-dep-1==1.0.0"?\n'
        "\tpkg-dep-2 (required by pkg-with-deps==0.1.0 in reqs.txt)\n"
        '\t\tmaybe you want "pkg-dep-2==2.0.0"?')