Commit 5148d03
committed
Refactor token usage constants and streamline assertions in async message tests
- Simplify the definition of cache read input tokens constant.
- Consolidate assertions in async message tests for better readability and maintainability.
- Ensure consistent formatting in token usage assertions across test cases.1 parent ca4f6a8 commit 5148d03
2 files changed
Lines changed: 17 additions & 26 deletions
File tree
- instrumentation-genai/opentelemetry-instrumentation-anthropic
- src/opentelemetry/instrumentation/anthropic
- tests
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
61 | 59 | | |
62 | 60 | | |
63 | 61 | | |
| |||
474 | 472 | | |
475 | 473 | | |
476 | 474 | | |
477 | | - | |
478 | | - | |
479 | | - | |
| 475 | + | |
480 | 476 | | |
481 | 477 | | |
482 | 478 | | |
| |||
Lines changed: 15 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
| 200 | + | |
| 201 | + | |
203 | 202 | | |
204 | | - | |
205 | | - | |
206 | | - | |
| 203 | + | |
| 204 | + | |
207 | 205 | | |
208 | 206 | | |
209 | 207 | | |
| |||
509 | 507 | | |
510 | 508 | | |
511 | 509 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
516 | 513 | | |
517 | 514 | | |
518 | 515 | | |
519 | 516 | | |
520 | | - | |
521 | | - | |
522 | | - | |
| 517 | + | |
| 518 | + | |
523 | 519 | | |
524 | | - | |
525 | | - | |
526 | | - | |
| 520 | + | |
| 521 | + | |
527 | 522 | | |
528 | 523 | | |
529 | 524 | | |
| |||
0 commit comments