Allow transferring files outside of HOME

This commit is contained in:
Kovid Goyal
2022-02-28 11:49:22 +05:30
parent 4b6bfaffba
commit 8867317b6a
4 changed files with 20 additions and 15 deletions

View File

@@ -48,10 +48,7 @@ print(' '.join(map(str, buf)))'''), lines=13, cols=77)
def test_ssh_config_parsing(self):
def parse(conf):
with tempfile.NamedTemporaryFile(suffix='test.conf') as cf:
cf.write(conf.encode('utf-8'))
cf.flush()
return load_config(cf.name)
return load_config(overrides=conf.splitlines())
def for_host(hostname, conf):
if isinstance(conf, str):
@@ -72,6 +69,9 @@ print(' '.join(map(str, buf)))'''), lines=13, cols=77)
def all_possible_sh(self):
return tuple(sh for sh in ('dash', 'zsh', 'bash', 'posh', 'sh') if shutil.which(sh))
def test_ssh_copy(self):
pass
def test_ssh_env_vars(self):
for sh in self.all_possible_sh:
with self.subTest(sh=sh), tempfile.TemporaryDirectory() as tdir: