▲ | benji-york 2 days ago | |
As someone that loves Python and hates pytest, you have my support. (Although, I don't like using bare `assert`s in tests, but maybe you'll convince me.) | ||
▲ | tsv_ 16 hours ago | parent [-] | |
Thanks for the support! It means a lot, especially from someone who shares the pytest frustration. About bare `assert`s. Vedro is actually flexible enough to use any matchers you prefer, but let me share why I stick with plain asserts: 1. In most editor themes, `assert` jumps out with distinct syntax highlighting. When scanning tests, I can quickly spot the assertions and understand what's being tested. 2. The expressions feel cleaner to me:
3. I like that there's nothing new to learn, the expressions work exactly like they do in any Python code, with no special test behavior or surprises.Would love to hear what specifically bothers you about bare asserts, always looking to understand different perspectives on testing ergonomics! |