You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?)
The text was updated successfully, but these errors were encountered:
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?)
@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?)
The text was updated successfully, but these errors were encountered: