Skip to content

Commit a9c21ca

Browse files
author
Patrick Leonardy
committed
added type hint for test_col_id
1 parent 353b9bc commit a9c21ca

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/preprocessing/test_pig_tables.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import pandas as pd
44
from cobra.evaluation.pigs_tables import generate_pig_tables
55

6+
from typing import Optional
7+
68
class TestPigTablesGeneration:
79

810
@pytest.mark.parametrize("id_col_name", [None, "col_id"]) # test None as this is the default value in generate pig tabels
9-
def test_col_id(self, id_col_name):
11+
def test_col_id(self, id_col_name: Optional[str]):
1012

1113
# input
1214
data = pd.DataFrame({
@@ -36,4 +38,5 @@ def test_col_id(self, id_col_name):
3638
'avg_target': [0.0, 0.5, 1.0, 0.0, 0.6666666666666666, 0.0, 1.0, 0.0]
3739
})
3840

39-
pd.testing.assert_frame_equal(out, expected)
41+
pd.testing.assert_frame_equal(out, expected)
42+

0 commit comments

Comments
 (0)