test_file and test_dir use global env instead of parent of global env.