Skip to content

Commit 14b5b67

Browse files
committed
fix errors in test_applications.py
1 parent 8267a97 commit 14b5b67

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

test/test_applications.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def test_make_risk_report():
3131
[str(_TMP_DIR / "risk-report"), None], # save_path
3232
)
3333

34-
for data_source, ref_classes, risk_name, return_type, save_path in grid:
34+
for data_source, rc, risk_name, return_type, save_path in grid:
3535
report = make_risk_report(
3636
data_source=data_source,
37-
ref_classes=ref_classes,
37+
ref_classes=rc,
3838
risk_name=risk_name,
3939
return_type=return_type,
4040
save_path=save_path,
@@ -49,6 +49,16 @@ def test_make_risk_report():
4949
elif return_type in ("latex", "md", "markdown", "html"):
5050
assert isinstance(report, str)
5151

52+
with pytest.raises(ValueError, match="Unsupported return_type"):
53+
make_risk_report(
54+
data_source=df_test,
55+
ref_classes=ref_classes,
56+
risk_name="Seizure",
57+
target="HasSeizure",
58+
positive_class="Yes",
59+
return_type="xxx",
60+
)
61+
5262
with pytest.raises(ValueError, match=f"target {repr('xxx')} not in the columns"):
5363
make_risk_report(
5464
data_source=df_test,
@@ -108,13 +118,4 @@ def test_make_risk_report():
108118
target="HasSeizure",
109119
)
110120

111-
with pytest.raises(ValueError, match="Unsupported return_type"):
112-
make_risk_report(
113-
data_source=df_test,
114-
risk_name="Seizure",
115-
target="HasSeizure",
116-
positive_class="Yes",
117-
return_type="xxx",
118-
)
119-
120121
shutil.rmtree(_TMP_DIR)

0 commit comments

Comments
 (0)