Best practice to do the same tests in pytest with different classes

That’s a good observation.

Playing devil’s advocate, I do not run tests concurrently, since the tests are really fast. Furthermore, sometimes is good to have sequential tests (for example, for integration tests).

Anyway, I find that the class-oriented approach suggested by you is more clean and robust. I’ll change my tests (well, when I have time…)

PS: I have a curiosity, but I thought it was better to open another thread: