Unit testing of codes with large amounts of global state can be challenging. As a starting point we should try to identify sections that could be unit tested. Ideal candidates would be pure functions. Failing that, functions or sub-routines with minimal side effects that avoid operations with global (module) level variables.
Unit testing of codes with large amounts of global state can be challenging. As a starting point we should try to identify sections that could be unit tested. Ideal candidates would be pure functions. Failing that, functions or sub-routines with minimal side effects that avoid operations with global (module) level variables.