| ▲ | 1718627440 5 hours ago | |||||||
> This blog post talks as if mocking the `open` function is a good thing that people should be told how to do. If you are mocking anything in the standard library your code is probably structured poorly. Valgrind is a mock of standard library/OS functions and I think its existence is a good thing. Simulating OOM is also only possible by mocking stuff like open. | ||||||||
| ▲ | vkou 5 hours ago | parent [-] | |||||||
All rules exist to be broken in the right circumstances. But in 99.9% of test code, there's no reason to do any of that. | ||||||||
| ||||||||