Skip to content

Commit

Permalink
F Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Sep 3, 2020
1 parent dfaa111 commit 753ad4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/functional/test_new_resolver_hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _create_find_links(script):
base==0.1.0 --hash=sha256:{sdist_hash} --hash=sha256:{wheel_hash}
base==0.1.0 --hash=sha256:{sdist_hash} --hash=sha256:{wheel_hash}
""",
"Checked 2 links for project 'base' against 2 hashes "
"Checked 2 links for project {name!r} against 2 hashes "
"(2 matches, 0 no digest): discarding no candidates",
),
(
Expand All @@ -56,7 +56,7 @@ def _create_find_links(script):
base==0.1.0 --hash=sha256:{sdist_hash} --hash=sha256:{wheel_hash}
base==0.1.0 --hash=sha256:{sdist_hash}
""",
"Checked 2 links for project 'base' against 1 hashes "
"Checked 2 links for project {name!r} against 1 hashes "
"(1 matches, 0 no digest): discarding 1 non-matches",
),
],
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_new_resolver_hash_intersect(script, requirements_template, message):
"--requirement", requirements_txt,
)

assert message in result.stdout, str(result)
assert message.format(name=u"base") in result.stdout, str(result)


def test_new_resolver_hash_intersect_from_constraint(script):
Expand Down Expand Up @@ -119,7 +119,7 @@ def test_new_resolver_hash_intersect_from_constraint(script):
)

message = (
"Checked 2 links for project 'base' against 1 hashes "
"Checked 2 links for project {name!r} against 1 hashes "
"(1 matches, 0 no digest): discarding 1 non-matches"
)
).format(name=u"base")
assert message in result.stdout, str(result)

4 comments on commit 753ad4d

@pradyunsg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Press F to pay respects? :)

@McSinyx
Copy link
Contributor

@McSinyx McSinyx commented on 753ad4d Sep 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having a lot of confusion on why this is needed πŸ˜•

@uranusjr
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because in Python 2 the repr would output u'base' instead of 'base'.

@McSinyx
Copy link
Contributor

@McSinyx McSinyx commented on 753ad4d Sep 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well then I have no opposition towards the commit message 🀷 Edit: Oops this is showing up in the PR πŸ˜…

Please sign in to comment.