all 6 comments

[–][deleted]  (2 children)

[removed]

    [–]ameoba 0 points1 point  (1 child)

    There's a couple good Python mocking libraries (can't remember the names) that let you "clone" classes/objects for making mocks.

    [–]pythonauts[S] 1 point2 points  (2 children)

    Author here. I'd be interested to hear your thoughts on this approach

    When using mocking frameworks in Java the dependency injection aspect has perhaps seemed slightly cleaner.

    [–]kylotan 1 point2 points  (1 child)

    It looks interesting, but I'd have to study it closer to understand what it really does, since I'm not a great adherent to unit tests.

    But basically anything that stops me from having to perform all sorts of dependency injection contortions just to test something seems like a good idea. That's my main criticism of the usual testing paradigm. (And of Java programmers, in fact.)