From ae23cf6dcdbc813f993a8d3ce0bb7910cd1d4b87 Mon Sep 17 00:00:00 2001 From: Charles Durieux Date: Mon, 12 Sep 2022 17:04:27 +0100 Subject: [PATCH] Add test --- tests/installation/test_executor.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/installation/test_executor.py b/tests/installation/test_executor.py index b2e06de6f99..11f2799d510 100644 --- a/tests/installation/test_executor.py +++ b/tests/installation/test_executor.py @@ -643,6 +643,14 @@ def test_executor_should_write_pep610_url_references_for_git_with_subdirectories ) +@pytest.mark.parametrize( + "file_hash", + [ + ("sha256:70e704135718fffbcbf61ed1fc45933cfd86951a744b681000eaaa75da31f17a"), + ("md5:15507846fd4299596661d0197bfb4f90"), + ("sha512:44cfa6b8696e5008c1c4dfe32c52a8b6511c261d8f3a25882366c0718eb42a17da5e4b9196623597661871be65c48e613d8f5c50a5c5c827e0efbf8b612fe5be"), # noqa: E501 + ] +) def test_executor_should_use_cached_link_and_hash( tmp_venv: VirtualEnv, pool: Pool, @@ -650,6 +658,7 @@ def test_executor_should_use_cached_link_and_hash( io: BufferedIO, mocker: MockerFixture, fixture_dir: FixtureDirGetter, + file_hash, ): link_cached = fixture_dir("distributions") / "demo-0.1.0-py2.py3-none-any.whl" @@ -663,7 +672,7 @@ def test_executor_should_use_cached_link_and_hash( package.files = [ { "file": "demo-0.1.0-py2.py3-none-any.whl", - "hash": "sha256:70e704135718fffbcbf61ed1fc45933cfd86951a744b681000eaaa75da31f17a", # noqa: E501 + "hash": file_hash, } ]