Skip to content

Commit

Permalink
fixing a typo. style
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymedina committed Feb 28, 2024
1 parent 65efaaa commit 8412e95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/orca/services/synapse/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def update_submissions_status(

# Prepare a single submission_id for the for-loop
if isinstance(submission_ids, str):
submission_ids = list(str)
submission_ids = [submission_ids]

Check warning on line 118 in src/orca/services/synapse/ops.py

View check run for this annotation

Codecov / codecov/patch

src/orca/services/synapse/ops.py#L118

Added line #L118 was not covered by tests

# Let's catch for anything that was fed that is NOT a str or list of strs
if not isinstance(submission_ids, list):
Expand Down
11 changes: 3 additions & 8 deletions tests/services/synapse/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pandas as pd
import pytest
import synapseclient

from orca.errors import ConfigError
from orca.services.synapse import SynapseOps
Expand Down Expand Up @@ -91,9 +90,7 @@ def test_get_submissions(mocker, mocked_ops):

# Mocking the table query results
table_mock = MagicMock()
table_mock.asDataFrame.return_value = pd.DataFrame(
input_dict
)
table_mock.asDataFrame.return_value = pd.DataFrame(input_dict)

# Mock the ``trigger_indexing`` call in SynapseOps() and the tableQuery call
# in ``SynapseOps().get_submissions``
Expand Down Expand Up @@ -142,9 +139,8 @@ def test_update_submission_status_with_non_string_non_list_input():
"""
# Test for non-string + non-list submission_ids.
error = "Not a list. ``submission_ids`` must be an int or list of ints."
error = "Not a list. ``submission_ids`` must be an int or list of ints."
with pytest.raises(TypeError) as err:

# Calling the function to be tested
SynapseOps().update_submissions_status(1234, "SCORED")

Expand All @@ -163,9 +159,8 @@ def test_update_submission_status_with_non_string_in_list(mocker, mocked_ops):
"""
# Test for non-string elements in list
error = "Non-strings found. ``submission_ids`` must be an int or list of ints."
error = "Non-strings found. ``submission_ids`` must be an int or list of ints."
with pytest.raises(TypeError) as err:

# Calling the function to be tested
SynapseOps().update_submissions_status(["syn111", 1234], "SCORED")

Expand Down

0 comments on commit 8412e95

Please sign in to comment.