News for hackers. Stuff that matters.
Re:Solving Algorithmic Problems in Python with Pytest (2019) by makapuf on Saturday December 19, 2020 @06:21AM (#25476717)
I see the point of pytest and the greatness of it. I like pytest but I like minimalism more. I dont find it a good showcase here: couldn't you have kept only the asserts and just run the script?
Re:Solving Algorithmic Problems in Python with Pytest (2019) by jaimebuelta on Saturday December 19, 2020 @06:51AM (#25476850)
In that case, only the first fail will be reported and exit. Which is fair enough in some cases, but may be confusing for long sequences of tests.

(There’s the option to get that behaviour in pytest as well with a parameter. Also, pytest may run the tests in parallel, which may speed up the results)

Re:Solving Algorithmic Problems in Python with Pytest (2019) by makapuf on Sunday December 20, 2020 @04:23PM (#25489656)
Well sure but a simple function if a!=b print(f"{a} is not {b}") could do the job fine.