art: a test
@@ -119,14 +119,20 @@ def test_should_cache_git_sha(script, tmpdir):
commit = script.run(
"git", "rev-parse", "HEAD", cwd=repo_path
).stdout.strip()
+
# a link referencing a sha should be cached
url = "git+https://g.c/o/r@" + commit + "#egg=mypkg"
req = ReqMock(link=Link(url), source_dir=repo_path)
- assert wheel_builder.should_cache(req, check_binary_allowed=lambda r: True)
+ assert wheel_builder.should_cache(
+ req, check_binary_allowed=lambda r: True,
+ )
+
# a link not referencing a sha should not be cached
url = "git+https://g.c/o/r@master#egg=mypkg"
req = ReqMock(link=Link(url), source_dir=repo_path)
- assert not wheel_builder.should_cache(req, check_binary_allowed=lambda r: True)
+ assert not wheel_builder.should_cache(
+ req, check_binary_allowed=lambda r: True,
+ )
def test_format_command_result__INFO(caplog):
