3 ms·
> run Python with "-O" no one ever does this Yes Pytest is black magic(I tried and failed to understand it for my own dark purposes). But it lets you get cont
by rat87 10y ago
> run Python with "-O"
no one ever does this
Yes Pytest is black magic(I tried and failed to understand it for my own dark purposes). But it lets you get context without violating repeating yourself over and over.
- nilliams 10y agoYou should repeat yourself in your tests. See DAMP vs DRY [1]. Also that repetition is valuable feedback that you may have a design problem, that something about your object hierarchy is overly-complex, for example. If you hide it, you're just sweeping the problem under the rug. [1] http://stackoverflow.com/a/11837973 http://stackoverflow.com/a/11837973