def test_drop(): with filetext('name,balance\nAlice,100\nBob,200', extension='csv') as fn: with tmpfile('csv') as target: scsv = SSH(CSV)(target, hostname='localhost') assert not os.path.exists(target) conn = sftp(**scsv.auth) conn.put(fn, target) assert os.path.exists(target) drop(scsv) drop(scsv) assert not os.path.exists(target)