Redux: Abort collection and exit when an autoused fixture encounters a syntax error #9139
Labels
type: proposal
proposal for a new feature, often to gather opinions or design the API around the new feature
If you write a fixture which imports code, and that code contains a syntax error, pytest will continue collecting tests, and then it will print a failure for each collected test.
This is time-consuming and annoying.
I was rudely dismissed when I first reported this, and then got flak for getting frustrated. This is consistent with my overall experience with pytest, on GitHub and out in the community.
This was how the last thread ended:
Pytest is an industry-standard tool to which, as I mentioned in that issue, untold thousands of programmers are professionally handcuffed.
This was only the most recent occasion on which Pytest cost me hours upon hours, and I had to refactor all my tests to get around a simple problem: I need to mock several environment variables over and over.
Last time around, one full workday to discover that the only reliable way to run tests in a prescribed order is to use a plugin. An understandable performance tradeoff, poorly documented. I should not have to rely on StackOverflow for things like that.
I have literally spent hundreds of hours fighting with Pytest, in various circumstances, and its "community" is consistently rude and dismissive. Problems aren't problems, you're just doing it wrong! (The documentation reads like a very thorough refresher for people who already know Pytest intimately.
Perhaps this is the first time anyone's put it in terms: I also maintain free software, and, like most Python devs, I rely on Pytest to keep my teams' projects working. I am the only one on any of my teams willing to try anything fancy with Pytest. Everybody else, anytime the solution requires unfamiliar imports, just says, "Screw it," and writes integration tests where there should be unit tests. Why?
Because the documentation is obtuse and you guys treat everybody else this way, always
The text was updated successfully, but these errors were encountered: