Skip to content

Running tests locally creates a lot of folders and files in user home directory and does not do cleanup #82

Description

@shashfrankenstien

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions