from pathlib import Path
import glob


def get_local_instance_parameter_values(metafunc):
    """Add `local_instance` variable to tests.

    Populate `local_instance` variable with any *.json file in the same
    directory as the test.
    """
    cur_dir = Path(metafunc.module.__file__).parent
    instances = glob.glob(str(cur_dir) + '/*.json')

    return instances