Closed brialee closed 5 years ago
The unit test test_rm_file_nonexistent failed for me:
Traceback (most recent call last): File "FTP_tests.py", line 240, in test_rm_file_nonexistent self.assertNotIn(dir_files, filepath) File "/usr/lib/python3.6/unittest/case.py", line 1093, in assertNotIn if member in container: TypeError: 'in
' requires string as left operand, not list
I manually tested rm
on ada.cs.pdx.edu and it seems to work. I noticed when I tried to delete a directory with rm
the client crashed back to my shell after raising an IOError and OSError, however. I think if you check that the argument is a file using pysftyp's isfile
method and raise an error if it fails the check would solve that issue.
The latest commit should resolve the issues in the FTP_tests.py file. Good thinking on the 'isfile' check to prevent the script from crashing. That's also updated in the latest commit.
The latest commits should resolve the issues in the FTP_tests.py file
Adds the rm command to remove a remote file based on the file name given, which may or may not include a path.
[x] Verify that a given file exists remotely, and remove the file.
[x] Verify that the file is remote from remote path.