Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sauhard Gupta committed Oct 26, 2018
1 parent 727f5ed commit 4dfb3ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/test_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def test_finder_installs_pre_releases(data):
link = finder.find_requirement(req, False)
assert link.url == "https://foo/bar-2.0b1.tar.gz"

def test_finder_does_not_candidate_pre_releases(data):
def test_finder_does_not_return_pre_release_candidates(data):
"""
Test PackageFinder finds pre-releases if asked to.
"""
Expand All @@ -483,7 +483,7 @@ def test_finder_does_not_candidate_pre_releases(data):
links = ["https://foo/bar-1.0.tar.gz", "https://foo/bar-2.0b1.tar.gz"]
finder = PackageFinder(
links, [],
allow_all_prereleases=True,
allow_all_prereleases=False,
session=PipSession(),
)

Expand Down Expand Up @@ -530,14 +530,14 @@ def test_finder_installs_pre_releases_with_version_spec():

with patch.object(finder, "_get_pages", lambda x, y: []):
link = finder.find_requirement(req, False)
assert link.url == "https://foo/bar-2.0b1.tar.gz"
assert link.url == "https://foo/bar-1.0.tar.gz"

links.reverse()
finder = PackageFinder(links, [], session=PipSession())

with patch.object(finder, "_get_pages", lambda x, y: []):
link = finder.find_requirement(req, False)
assert link.url == "https://foo/bar-2.0b1.tar.gz"
assert link.url == "https://foo/bar-1.0.tar.gz"


class test_link_package_versions(object):
Expand Down

0 comments on commit 4dfb3ba

Please sign in to comment.