Closed brialee closed 5 years ago
EDIT: I mean the indentation issue was in Client.py not FTP_main.py
There is an indentation bug within the mkdir function in FTP_main.py that prevented the code from running for me. The entire function is indented at the same level as the function definition. Indenting it correctly made the script executable. After that fix I ran FTP_tests.py and the tests test_mkdir_single_dir and test_mkdir_nested_dir failed:
Traceback (most recent call last): File "FTP_tests.py", line 227, in test_mkdir_single_dir self.assertNotIn(dir_files, dir_path) 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 Traceback (most recent call last): File "FTP_tests.py", line 239, in test_mkdir_nested_dir self.assertNotIn(dir_path, split_path[0]) NameError: name 'dir_path' is not defined
Otherwise the mkdir functionality seems to work as expected while manually testing on ada.cs.pdx.edu.
Also should there really be two entries for the mkdir
command in command_list.txt? I thought help
and ls
had two entries because they can accept one or two arguments. mkdir
only takes one.
The issues in the FTP_tests.py should be resolved with the latest commit. Unless I'm missing something, I didn't see any references to 'mkdir' in the FTP_main file. As far as the command_list.txt double listing, I'm not sure what the correct format should be. Perhaps that's something we can pin down before merging into master?
The last commit made the program run but those same two tests are failing only due to a TypeError this time.
Eddie, your suggestions were implemented into the latest commit, which should allow the unitttests to pass. However, as we briefly discussed prior, there is the caveat that some of the tests will only pass on the first run as we don't yet have a method to remove directories remotely. Absent that, just adding a letter to the dir_path(s) should be enough to get you through multiple test runs. A bit hokey for now....
Yep, once the rmdir() command has been implemented I'll make sure my code is still working as intended.
Implements mkdir command closes #31
[x] After passing directory name, new directory should be created remotely
[x] After passing a directory with a nested path, the nested path should be created remotely.