pypa/pip — pull request #678 by qwcode (2012-09-17 06:06:44+00:00)
Title: file:// fixes, test cleanup, and some refactor

file:// fixes:
1) only find-link file:// urls (that are dirs) should have listdir run against them.
2) file:// urls could have hash fragments that need to be processed and not fail

test cleanup:
1) tests.test_file_scheme_index:test_install had only been passing coincidentally prior to the fixes above. The link in 'in dex/FSPkg/index.html' was not being used and had the wrong md5 fragment. I converted it to use the new simple index and simple dist (see below), and moved it to test_index.py
2) a new "tests/indexes" folder for file:// index test cases
3) a new "packages/simple-1.0.tar.gz" for basic testing
4) convert packages/LocalExtras to use the new simple index and dist.

refactor:
1) converted PacakageFinder._sort_locations from staticmethod to classmethod. didn't see any reason for it to be static
2) reformatted the core logic of _sort_locations to make it easier to add my new conditions.