Skip to content

Commit aae57d3

Browse files
committed
test : reformat with precommit
1 parent 8abd14d commit aae57d3

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

tests/unit/dataset_classes/testProteinPretrainingData.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import unittest
22
from unittest.mock import PropertyMock, mock_open, patch
3+
34
from chebai.preprocessing.datasets.protein_pretraining import _ProteinPretrainingData
45
from chebai.preprocessing.reader import ProteinDataReader
56
from tests.unit.mock_data.ontology_mock_data import GOUniProtMockData
@@ -41,7 +42,9 @@ def setUpClass(
4142
new_callable=mock_open,
4243
read_data=GOUniProtMockData.get_UniProt_raw_data(),
4344
)
44-
def test_parse_protein_data_for_pretraining(self, mock_open_file: mock_open) -> None:
45+
def test_parse_protein_data_for_pretraining(
46+
self, mock_open_file: mock_open
47+
) -> None:
4548
"""
4649
Tests the _parse_protein_data_for_pretraining method.
4750
@@ -55,15 +58,15 @@ def test_parse_protein_data_for_pretraining(self, mock_open_file: mock_open) ->
5558

5659
# Assert that all expected Swiss-Prot IDs are present in the DataFrame
5760
self.assertEqual(
58-
set(pretrain_df['swiss_id']),
61+
set(pretrain_df["swiss_id"]),
5962
set(list_of_pretrain_swiss_ids),
60-
msg="The parsed DataFrame does not contain the expected Swiss-Prot IDs for pretraining."
63+
msg="The parsed DataFrame does not contain the expected Swiss-Prot IDs for pretraining.",
6164
)
6265

6366
# Assert that all sequences are not empty
6467
self.assertTrue(
65-
pretrain_df['sequence'].str.len().gt(0).all(),
66-
msg="Some protein sequences in the pretraining DataFrame are empty."
68+
pretrain_df["sequence"].str.len().gt(0).all(),
69+
msg="Some protein sequences in the pretraining DataFrame are empty.",
6770
)
6871

6972

tests/unit/mock_data/ontology_mock_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,19 +751,19 @@ def get_UniProt_raw_data() -> str:
751751
"SQ SEQUENCE 60 AA; 29735 MW; B4840739BF7D4121 CRC64;\n"
752752
" XAFSAEDVLK EYDRRRRMEA LLLSLYYPND RKLLDYKEWS PPRVQVECPK APVEWNNPPS\n"
753753
"//\n"
754-
# Below protein with a `valid` associated GO class but without sequence string
754+
# Below protein with a `valid` associated GO class but without sequence string
755755
"ID Swiss_Prot_10 Reviewed; 60 AA.\n"
756756
"AC Q6GZX4;\n"
757757
"DR GO; GO:0000027; P:regulation of viral transcription; EXP:InterPro.\n"
758758
"SQ SEQUENCE 60 AA; 29735 MW; B4840739BF7D4121 CRC64;\n"
759-
" \n"
759+
" \n"
760760
"//\n"
761-
# Below protein with a `Invalid` associated GO class but without sequence string
761+
# Below protein with a `Invalid` associated GO class but without sequence string
762762
"ID Swiss_Prot_11 Reviewed; 60 AA.\n"
763763
"AC Q6GZX4;\n"
764764
"DR GO; GO:0000028; P:regulation of viral transcription; ND:NoData.\n"
765765
"SQ SEQUENCE 60 AA; 29735 MW; B4840739BF7D4121 CRC64;\n"
766-
" \n"
766+
" \n"
767767
"//\n"
768768
)
769769

0 commit comments

Comments
 (0)