Skip to content

Commit 8c66ec2

Browse files
committed
Add test to transfer between remote servers
Which should fail
1 parent 685f6ad commit 8c66ec2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/fsystem/test_fcopy.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,17 @@ def test_remote_source(tmp_path : Path , user : str) -> None:
101101
fcp = FCopy(source=f'{user}@localhost')
102102
for source, target in zip(l_source, l_target):
103103
fcp.copy(source=source, target=target)
104+
# ----------------------
105+
@pytest.mark.skip(reason='Uses SSH')
106+
def test_remote_both(tmp_path : Path, user : str) -> None:
107+
'''
108+
Files are transferred between two remote servers
109+
Should fail, this tests that the failure happens
110+
'''
111+
l_source = _make_paths(dir=tmp_path / 'source', make_file= True, number=10)
112+
l_target = _make_paths(dir=tmp_path / 'target', make_file=False, number=10)
113+
114+
fcp = FCopy(source=f'{user}@localhost', target=f'{user}@localhost')
115+
for source, target in zip(l_source, l_target):
116+
with pytest.raises(RuntimeError):
117+
fcp.copy(source=source, target=target)

0 commit comments

Comments
 (0)