Commit 01988a5
committed
Can't throw the exception and maintain coverage
Throwing an exception causes coverage to drop:
```
Name Stmts Miss Branch BrPart Cover Missing
------------------------------------------------------------------------------------
pydantic_ai_slim/pydantic_ai/tools.py 141 31 18 7 73.58% 176, 194-195, 196->202, 199, 202->204, 206, 209->210, 211, 224-228, 317, 320, 376-385, 389-392, 401-404, 417-418, 426, 438, 450, 463, 472->473, 474, 476-481
------------------------------------------------------------------------------------
TOTAL 141 31 18 7 73.58%
```
This is due to the exception introducing a new branch which is untested
by the original code.1 parent b386eb6 commit 01988a5
2 files changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | 182 | | |
185 | 183 | | |
186 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1496 | 1496 | | |
1497 | 1497 | | |
1498 | 1498 | | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
1499 | 1502 | | |
1500 | 1503 | | |
1501 | 1504 | | |
| |||
0 commit comments