Closed shubhbapna closed 1 month ago
In one of my test cases I was mocking the URL of the file being downloaded to something like this "path/foo-1.0" and got the following error:
destination_dir = PosixPath('/tmp/pytest-of-shubh/pytest-145/test_default_download_source_w0/sdists-repo/downloads'), url = 'predefined_url-1.0', rename_to = 'foo-1.0' def _download_source_check( destination_dir: pathlib.Path, url: str, rename_to: str | None = None ): source_filename = download_url(destination_dir, url, rename_to) > if source_filename.suffix == ".zip": E AttributeError: 'str' object has no attribute 'suffix' .tox/py/lib/python3.11/site-packages/fromager/sources.py:156: AttributeError
If a string is passed then it throws this error. Make sure to pass a pathlib.Path object
pathlib.Path
In one of my test cases I was mocking the URL of the file being downloaded to something like this "path/foo-1.0" and got the following error: