Skip to content

Commit

Permalink
use fs fixture in test_run_seasnap_itransfer_results_smoke_test
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil committed Jan 13, 2025
1 parent 3835425 commit 1ba8a43
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_seasnap_itransfer_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_run_seasnap_itransfer_results_nothing(capsys):
assert res.err


def test_run_seasnap_itransfer_results_smoke_test(mocker):
def test_run_seasnap_itransfer_results_smoke_test(mocker, fs):
# --- setup arguments
dest_path = "/irods/dest"
fake_base_path = "/base/path"
Expand All @@ -57,7 +57,6 @@ def test_run_seasnap_itransfer_results_smoke_test(mocker):

# Setup fake file system but only patch selected modules. We cannot use the Patcher approach here as this would
# break biomedsheets.
fs = fake_filesystem.FakeFilesystem()
fake_os = fake_filesystem.FakeOsModule(fs)
fake_pl = fake_pathlib.FakePathlibModule(fs)

Expand All @@ -83,7 +82,6 @@ def test_run_seasnap_itransfer_results_smoke_test(mocker):
fs.remove(fake_file_paths[3])

# --- mock modules
mocker.patch("glob.os", fake_os)
mocker.patch("cubi_tk.sea_snap.itransfer_results.pathlib", fake_pl)
mocker.patch("cubi_tk.sea_snap.itransfer_results.os", fake_os)
mocker.patch("cubi_tk.snappy.itransfer_common.os", fake_os)
Expand Down

0 comments on commit 1ba8a43

Please sign in to comment.