<commit_before>###
###
#
# This file should not be modified. To adjust test cases, edit the related json file(s).
#
###
###


import os
import json
import glob
import warnings

from tests.test_utils import get_dataset, candidate_test_is_on_temporary_notimplemented_list, evaluate_json_test

contexts = ['PandasDataset', 'SqlAlchemyDataset']


def pytest_generate_tests(metafunc):

    # Load all the JSON files in the directory
    dir_path = os.path.dirname(os.path.realpath(__file__))
    test_configuration_files = glob.glob(dir_path+'/*.json')

    parametrized_tests = []
    ids = []
    for c in contexts:
        for filename in test_configuration_files:
            file = open(filename)
            test_configuration = json.load(file)

            if candidate_test_is_on_temporary_notimplemented_list(c, test_configuration["expectation_type"]):
                warnings.warn("Skipping generation of tests for expectation " + test_configuration["expectation_type"] +
                              " and context " + c)
            else:
                for d in test_configuration['datasets']:
                    my_dataset = get_dataset(c, d["data"])

                    for test in d["tests"]:
                        parametrized_tests.append({
                            "expectation_type": test_configuration["expectation_type"],
                            "dataset": my_dataset,
                            "test": test,
                        })

                        ids.append(
                            c+":"+test_configuration["expectation_type"]+":"+test["title"])

    metafunc.parametrize(
        "test_case",<commit_msg>Updated test runner for multi-column-map to pass schemas to get_dataset<commit_after>###
###
#
# This file should not be modified. To adjust test cases, edit the related json file(s).
#
###
###


import os
import json
import glob
import warnings

from tests.test_utils import get_dataset, candidate_test_is_on_temporary_notimplemented_list, evaluate_json_test

contexts = ['PandasDataset', 'SqlAlchemyDataset']


def pytest_generate_tests(metafunc):

    # Load all the JSON files in the directory
    dir_path = os.path.dirname(os.path.realpath(__file__))
    test_configuration_files = glob.glob(dir_path+'/*.json')

    parametrized_tests = []
    ids = []
    for c in contexts:
        for filename in test_configuration_files:
            file = open(filename)
            test_configuration = json.load(file)

            if candidate_test_is_on_temporary_notimplemented_list(c, test_configuration["expectation_type"]):
                warnings.warn("Skipping generation of tests for expectation " + test_configuration["expectation_type"] +
                              " and context " + c)
            else:
                for d in test_configuration['datasets']:
                    schemas = d["schemas"] if "schemas" in d else None
                    my_dataset = get_dataset(c, d["data"], schemas=schemas)

                    for test in d["tests"]:
                        parametrized_tests.append({
                            "expectation_type": test_configuration["expectation_type"],
                            "dataset": my_dataset,
                            "test": test,
                        })

                        ids.append(
                            c+":"+test_configuration["expectation_type"]+":"+test["title"])

    metafunc.parametrize(
        "test_case",
{'fraction_non_alphanumeric': 0.09572006940427993, 'fraction_numerical': 0.0, 'mean_word_length': 2.1675824175824174, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4231828', 'n_tokens_mistral': 939, 'n_tokens_neox': 907, 'n_words': 211}