Skip to content

Commit

Permalink
flake8: > 127 chrs
Browse files Browse the repository at this point in the history
  • Loading branch information
ellendejong committed Feb 20, 2024
1 parent 855b0ec commit 65c013c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test_rsync_to_rdisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def set_up_test(tmp_path_factory):
run = "230920_A01131_0356_AHKM7VDRX3"
analysis = f"{run}_1" # run ok + exomedepth
analysis_transfer_settings = rsync_to_rdisc.settings.transfer_settings['bgarray']['transfers'][0]
Path(f"{rsync_to_rdisc.settings.wkdir}/transferred_runs.txt").write_text(analysis) # Other analysis will be added as part of the tests.

# Other analysis will be added as part of the tests.
Path(f"{rsync_to_rdisc.settings.wkdir}/transferred_runs.txt").write_text(analysis)

# Processed folder
for project in range(1, 6):
Expand Down Expand Up @@ -327,7 +327,9 @@ def test_rsync_ok(self, set_up_test, mocker, mock_send_mail_transfer_state):
mock_check_rsync.assert_called_once()
mock_send_mail_transfer_state.assert_called_once()
mock_send_mail_transfer_state.reset_mock()
assert f"{set_up_test['run']}_3_TRANSFER\tok" in Path(f"{rsync_to_rdisc.settings.wkdir}/transferred_runs.txt").read_text()
assert (
f"{set_up_test['run']}_3_TRANSFER\tok" in Path(f"{rsync_to_rdisc.settings.wkdir}/transferred_runs.txt").read_text()
)

def test_rsync_error(self, set_up_test, mocker, mock_send_mail_transfer_state):
mocker.patch("rsync_to_rdisc.check_if_file_missing", return_value=[])
Expand All @@ -338,7 +340,9 @@ def test_rsync_error(self, set_up_test, mocker, mock_send_mail_transfer_state):
{f"{set_up_test['run']}_3": rsync_to_rdisc.settings.transfer_settings['bgarray']['transfers'][0]},
set_up_test['tmp_path'], f"{rsync_to_rdisc.settings.wkdir}/transferred_runs.txt",
)
assert f"{set_up_test['run']}_3_Exomes" not in Path(f"{rsync_to_rdisc.settings.wkdir}/transferred_runs.txt").read_text()
assert (
f"{set_up_test['run']}_3_Exomes" not in Path(f"{rsync_to_rdisc.settings.wkdir}/transferred_runs.txt").read_text()
)

# parametrize GATK / ExomeDepth error and no errors.
@pytest.mark.parametrize("project,gatk_succes,ed_succes,state", [
Expand Down

0 comments on commit 65c013c

Please sign in to comment.