Improved mig/shared/fileio.py unit test coverage
#377
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds basic unit tests for additional
mig/shared/fileio.pyfunctions like:read_file,read_file_lines,read_head_lines,read_tail_lines,write_file_linesmake_symlink,delete_symlinktouch,delete_file,get_file_sizemakedirs_rec,remove_dir,remove_rec,check_empty_dirmove_file,move_rec,copy_file,copy_reccheck_read_access,check_write_access,check_readable,check_writable,check_readonly,check_readwritablereusing the existing structure.
Integrates PR #376 fixes so this PR should either replace the former or only be merged afterwards.
Includes a TODO to fix
get_file_sizeto actually return result value on exception as it currently doesn't and therefore effectively returnsNonee.g. for missing paths.Includes a TODO to fix a (possible py3 regression) bug in
touchto make it work again for existing files and directories.Includes tests to cover the corner-case bugs of the check access helpers registered in issue #378 when run outside the docker containers e.g. with
make unittestrather thanmake test.