Open bbengfort opened 8 years ago
huh?
On Thu, Jun 30, 2016 at 11:18 AM, Benjamin Bengfort < notifications@github.com> wrote:
The mocks are causing more trouble than they're worth in testing; only mock exactly what needs to be mocked, e.g. anything that will do anything destructive. (Probably just the environment?)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bbengfort/cloudscope/issues/64, or mute the thread https://github.com/notifications/unsubscribe/ABA4WBQ8KhVstC7JySRRt9dExcJzsm_Qks5qQ95VgaJpZM4JCReM .
@keleher in my testing package I use mock objects to eliminate side effects like writing log messages or overwriting files or databases.
When I first started writing the tests I thought it would be easier to mock things at the high level (e.g. a replica, the simulation, the results, the logger, etc.) -- however, I keep breaking tests as the complexity of the simulation increases because the mock objects need to do more work for tests to pass.
I'd rather be working on research than fixing my tests, so going to do less mocking and more integration style testing.
The mocks are causing more trouble than they're worth in testing; only mock exactly what needs to be mocked, e.g. anything that will do anything destructive. (Probably just the environment?)