Missing "global" meant that we set a local "has_run_tests" so the global was False by the time everything has run.