(
create_pip, # type: CreatePip
version, # type: PipVersionValue
py39, # type: PythonInterpreter
tmpdir, # type: Any
)
| 153 | ], |
| 154 | ) |
| 155 | def test_download_platform_issues_1355( |
| 156 | create_pip, # type: CreatePip |
| 157 | version, # type: PipVersionValue |
| 158 | py39, # type: PythonInterpreter |
| 159 | tmpdir, # type: Any |
| 160 | ): |
| 161 | # type: (...) -> None |
| 162 | pip = create_pip(py39, version=version) |
| 163 | download_dir = os.path.join(str(tmpdir), "downloads") |
| 164 | |
| 165 | def download_pyarrow(target=None): |
| 166 | # type: (Optional[Target]) -> Job |
| 167 | safe_rmtree(download_dir) |
| 168 | return pip.spawn_download_distributions( |
| 169 | download_dir=download_dir, |
| 170 | requirements=["pyarrow==4.0.1"], |
| 171 | transitive=False, |
| 172 | target=target, |
| 173 | package_index_configuration=package_index_configuration(pip.version), |
| 174 | ) |
| 175 | |
| 176 | def assert_pyarrow_downloaded( |
| 177 | expected_wheel, # type: str |
| 178 | target=None, # type: Optional[Target] |
| 179 | ): |
| 180 | # type: (...) -> None |
| 181 | download_pyarrow(target=target).wait() |
| 182 | assert [expected_wheel] == os.listdir(download_dir) |
| 183 | |
| 184 | assert_pyarrow_downloaded( |
| 185 | "pyarrow-4.0.1-cp39-cp39-manylinux2014_x86_64.whl", target=LocalInterpreter.create(py39) |
| 186 | ) |
| 187 | assert_pyarrow_downloaded( |
| 188 | "pyarrow-4.0.1-cp39-cp39-manylinux2010_x86_64.whl", |
| 189 | target=AbbreviatedPlatform.create( |
| 190 | abbreviated_platforms.create("linux-x86_64-cp-39-cp39", manylinux="manylinux2010") |
| 191 | ), |
| 192 | ) |
| 193 | |
| 194 | |
| 195 | def assert_download_platform_markers_issue_1366( |
nothing calls this directly
no test coverage detected