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 logged times are system-dependent. It's possible to mock these times.
The function fulfills several purposes: some logical checks, creating the statistical strings, and writing to some designated output. Unit-testing a function with so many effects is tedious and a bit of an anti-pattern. Maybe the log_data function should be broken up into a few more modular functions that are then easier to test.
The text was updated successfully, but these errors were encountered:
Update: since make_output_string has been extracted from log_data and tested reasonably thoroughly, the only testable features remaining for log_data are the call_freq and call_times assignments. But these variable assignments don't seem as if they need to be tested (the logic is unambiguous).
The problems with testing
log_data
are that:log_data
function should be broken up into a few more modular functions that are then easier to test.The text was updated successfully, but these errors were encountered: