There are a lot of cases where Path.home() is used as destination location when running tests against local sftp server. There is no cleanup of these files and folders. Would you consider using a subfolder instead of home directory so cleanup can be applied through pytest fixtures at the end of the test session?
Example test:
def test_put_d(lsftp):
'''test put_d'''
localpath = Path(mkdtemp()).as_posix()
remote = Path.home()
build_dir_struct(localpath)
local = Path(localpath).joinpath('pub')
lsftp.put_d(local.as_posix(), remote.as_posix())
rmdir(localpath)
pub folder is not cleaned up
There are a lot of cases where
Path.home()is used as destination location when running tests against local sftp server. There is no cleanup of these files and folders. Would you consider using a subfolder instead of home directory so cleanup can be applied through pytest fixtures at the end of the test session?Example test:
pubfolder is not cleaned up