fsspec / dropboxdrivefs

dropbox implementation for intake module
BSD 3-Clause "New" or "Revised" License
4 stars 8 forks source link

feature: add copy method #15

Closed jeffrey82221 closed 6 months ago

jeffrey82221 commented 10 months ago

Adding copy method to DropboxDriveFileSystem.

The method is tested upon the examples reference from fsspec copy interface definition: https://filesystem-spec.readthedocs.io/en/latest/copying.html.

The test is written in pytest. Not sure how to convert it to Unittest.

Please help me rewrite the pytest testing to Unittest testing.

MarineChap commented 10 months ago

Thanks! Working on the text this week.

MarineChap commented 8 months ago

Actually I really don't have the time to switch it for unittest. I will keep it as pytest for now.

jeffrey82221 commented 6 months ago

Hi, sorry taking so long for replying. I have added the on_error option on the assertion parts and the parts calling dbx.files_copy. Is the method now in the right behavior as you suggested?

I also change the dropbox token in test_copy to ‘123’, same as those in test.py. Could you help running the test to see if the method works successfully?

MarineChap commented 6 months ago

Great. I took a look at your test and actually what you are testing is if the copy with the dropbox API is working. But here, I want to test only the dropboxdrivefs API. What i am doing is I mock call to the dropbox API while checking that I am calling these functions with the right parameters.

This avoid having a dropbox instance running somewhere with the right API key.