you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 7 months ago* (1 child)

Quickest way to get a test suite so tightly coupled to structure rather than behavior that even just looking at the tests wrong makes them fail. But technically you do get test coverage I guess. Goodhart's law in action.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 7 months ago

    It's not really that different from like

    
    my_get_mock = Mock(side_effect=Some exception("oh no"))
    result = some_func(http_getter=my_get_mock)
    

    There's many ways of writing bad code and tests, but mocks and patches aren't always a bad tool. But sure, you can definitely fuck things up with them.

  • source
  • parent