(mock_pypi_rest_api)
| 23 | |
| 24 | @responses.activate |
| 25 | def test_package_info(mock_pypi_rest_api): |
| 26 | mock_pypi_rest_api(responses) |
| 27 | pkg = package.PypiPackage.from_cached("wheel") |
| 28 | |
| 29 | repo_url = "https://github.com/pypa/wheel" |
| 30 | |
| 31 | assert pkg.homepage_url == repo_url |
| 32 | assert pkg.source_url == repo_url |
| 33 | assert pkg.documentation_url == "https://wheel.readthedocs.io/" |
| 34 | |
| 35 | deps = list(pkg.get_dependencies()) |
| 36 | dep_names = [x.name for x in deps] |
| 37 | assert "pytest" in dep_names |
| 38 | assert "pytest-cov" in dep_names |
| 39 | |
| 40 | |
| 41 | @responses.activate |
nothing calls this directly
no test coverage detected