gdown
gdown copied to clipboard
Fix tests for Windows
Fixes #313.
Changes:
- Removed all uses of
shlex.split. Since windows paths use\, string interpolation +shlex.splitwill result in those backslashes being interpreted as escape sequences. So I used argument arrays everywhere instead. - Removed the assumption that
/tmpis a directory that exists. - Removed usage of
tempfile.NamedTemporaryFile(). The named file is opened by the test process, which means that it cannot be written to by a sub process on windows. - Added GH CI job for tests with Windows test runner. Since
makedoesn't exist on Windows, I copied the test command.
Right now, all tests pass on Windows except for test_download_folder_from_gdrive. I have no idea what this command does, so I can't replace it with equivalent python code.
@RunDevelopment Now I added CI for Windows that uses make command with : https://github.com/wkentaro/gdown/pull/324
I'll work on updating the tests next.