Skip to content

Commit b23daba

Browse files
committed
Add tests and drop config class
1 parent 48c1d14 commit b23daba

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

tests/fsystem/test_fcopy.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66

77
from pathlib import Path
8-
from dmu import FCopy, FCopyConf
8+
from dmu import FCopy
99

1010
from dmu.logging.log_store import LogStore
1111

@@ -63,12 +63,22 @@ def test_local(tmp_path) -> None:
6363
# ----------------------
6464
def test_remote_target(tmp_path) -> None:
6565
'''
66-
Test for transfer between from remote server
66+
Files are in a local server, copy them remotely
6767
'''
6868
l_source = _make_paths(dir=tmp_path / 'source', make_file= True, number=10)
6969
l_target = _make_paths(dir=tmp_path / 'target', make_file=False, number=10)
7070

71-
cfg = FCopyConf(target='acampove@localhost')
72-
fcp = FCopy(cfg=cfg)
71+
fcp = FCopy(target='acampove@localhost')
72+
for source, target in zip(l_source, l_target):
73+
fcp.copy(source=source, target=target)
74+
# ----------------------
75+
def test_remote_source(tmp_path) -> None:
76+
'''
77+
Files are in a remote server, copy them locally
78+
'''
79+
l_source = _make_paths(dir=tmp_path / 'source', make_file= True, number=10)
80+
l_target = _make_paths(dir=tmp_path / 'target', make_file=False, number=10)
81+
82+
fcp = FCopy(source='acampove@localhost')
7383
for source, target in zip(l_source, l_target):
7484
fcp.copy(source=source, target=target)

0 commit comments

Comments
 (0)