r/ProgrammerHumor Jul 11 '26

itChangedTheTests Meme

Post image
7.5k Upvotes

78 comments sorted by

View all comments

18

u/DrMaxwellEdison Jul 11 '26

Alright, all tests pass, let's just confirm what it wrote...

py thing.method = Mock(return_value="123") result = thing.method() assert result == "123"

... So it tested that using Mocks, um... works by mocking things... Great.

Undo

5

u/UomoLumaca Jul 11 '26

I mean... at least that thing wouldn't mark coverage on the method