test_atexit_hook wasn't testing what it meant to.