Mir

Code review comment for lp:~hikiko/mir/mir.1238000

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> I unset it in both places because if a test runs after the bypass_disables_ via_environment unit test but before the new setup, it might fail.

Actually, on second thought, you make a valid point here since we are allowed to run tests (including ones from other test cases) in an arbitrary order, although we don't do so normally. In light of this, let's just keep the second unsetenv (end of the test). Ideally that should happen automatically when we leave the test function scope (using a wrapper class to set/unset the env, ala RAII), to ensure unsetenv gets called even in case an ASSERT fails.

« Back to merge proposal