Jan Giacomelli’s Post

Seeing patching inside Python tests shows that you're an amateur Yes, it's very easy to add such after the fact. But they are bad, so bad. They are fragile - totally irresistant to refactoring. As FastAPI nicely shows - life, including automated software testing, is so much easier with dependency injection. You have full control also during tests. You can very easily swap "hard to use in tests" parts. Next time you see the Claude Code use pathc, push back to replace it with DI.

To view or add a comment, sign in

Explore content categories