I’ve been spending more time with pytest lately, and it’s been surprisingly eye‑opening. Writing tests forced me to look at my own function names with fresh eyes — suddenly 'nullable_rule(...)' didn’t make sense at all, but 'null_allowed_rule(...)' read clearly.
I also bumped into a few pandas quirks along the way: 'bool' and 'boolean' are not the same thing, and 'None' in a Series is definitely not the same as an empty string.
And then there’s parametrisation — such a simple feature, yet it makes tests cleaner, sharper, and far easier to reason about. It’s been a good reminder that testing isn’t just about catching bugs - it’s about understanding your code more deeply.
What small testing discovery has surprised you lately?
Top comments (0)