tidy tests to run correctly from run_test