dependencies
dependencies copied to clipboard
Python does not need DI because mocks.
Dependency injection is all about composition. Would you use global mocks in the production code?
it is not for mocking, it is for isolation with composition
DI is not for testing. It is great for structuring code the right way. Easier code reuse and refactoring. It is for production, not testing.
Include in the FAQ section.
The reason to move from direct imports & calls is the same programmers in Java and C# moves from static methods and utility classes.
You'll ends up with mocks returning mocks returning mocks just to test a + b.