Poolitzer
changed the title
Feat: File.download, merge out and custom_path into out
Feat: Rewrite File.download into download_to_drive and download_to_object
I dont get codecov path, test_download_file_obj covers that, no?
| async def test_download_file_obj(self, monkeypatch, file): | |
| async def test(*args, **kwargs): | |
| return self.file_content | |
| monkeypatch.setattr(file.get_bot().request, "retrieve", test) | |
| with TemporaryFile() as custom_fobj: | |
| out_fobj = await file.download_to_object(out=custom_fobj) | |
| assert out_fobj is custom_fobj | |
| out_fobj.seek(0) | |
| assert out_fobj.read() == self.file_content |
Edit: Doesn't complain anymore. I think it has seen its error :D
| __version_info__ = (0, 0, 0, 0, 0) # type: ignore[assignment] | ||
|
|
||
| if __version_info__ < (20, 0, 0, "alpha", 1): | ||
| if __version_info__ < (20, 0, 0, "alpha", 5): |