Skip to content

Commit bbdac40

Browse files
Copilotxadupre
andauthored
Add non-numeric input test for waterfall helper
Agent-Logs-Url: https://github.com/sdpython/teachpyx/sessions/e6e8e7c7-c0a1-47b3-9763-5ebb04affcb9 Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com>
1 parent f79dc95 commit bbdac40

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

_unittests/ut_tools/test_pandas.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ def test_plot_waterfall_bad_colors(self):
4444
with self.assertRaises(ValueError):
4545
plot_waterfall(df, "delta", "name", colors=("r",))
4646

47+
def test_plot_waterfall_not_numeric(self):
48+
df = pandas.DataFrame({"name": ["A"], "delta": ["x"]})
49+
with self.assertRaises(ValueError):
50+
plot_waterfall(df, "delta", "name")
51+
4752

4853
if __name__ == "__main__":
4954
unittest.main()

0 commit comments

Comments
 (0)