refactor out _test_dir and rename tests