« * K @dane.dev

Dane Hillard @dane.dev

2025-01-14 12:58 UTC

Yesterday I learned something new about pytest! When using `with pytest.raises`, the line that raises the expected exception must come last in the block. Lines after it won’t be executed. This makes sense in retrospect (context managers) but cost me a few minutes of being befuddled.

1 likes, 0 reposts, 1 replies

3 Next post4 More from @dane.devBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup