<commit_before>#
# Copyright (C) 2021 <NAME> <<EMAIL>>
# License: MIT
#
# pylint: disable=missing-docstring
import pathlib
import unittest

import anyconfig.api._load as TT

from .common import RES_DIR


def datasets_itr():
    for rdir in sorted(pathlib.Path(RES_DIR / 'multi').glob('*')):
        if not rdir.is_dir():
            continue

        exp = TT.single_load(rdir / 'e' / 'exp.json')
        opts = TT.single_load(rdir / 'options' / '00.json')

        yield (rdir, exp, opts)


def gen_datasets():
    datasets = datasets_itr()
    if not datasets:
        raise RuntimeError('No test data was found!')<commit_msg>fix: ensure test data for api.multi_load sorted list<commit_after>#
# Copyright (C) 2021 <NAME> <<EMAIL>>
# License: MIT
#
# pylint: disable=missing-docstring
import pathlib
import unittest

import anyconfig.api._load as TT

from .common import RES_DIR


def datasets_itr():
    for rdir in sorted(pathlib.Path(RES_DIR / 'multi').glob('*')):
        if not rdir.is_dir():
            continue

        exp = TT.single_load(rdir / 'e' / 'exp.json')
        opts = TT.single_load(rdir / 'options' / '00.json')

        yield (rdir, exp, opts)


def gen_datasets():
    datasets = sorted(datasets_itr())
    if not datasets:
        raise RuntimeError('No test data was found!')
{'fraction_non_alphanumeric': 0.13046815042210283, 'fraction_numerical': 0.00920951650038373, 'mean_word_length': 3.0371517027863777, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '660459', 'n_tokens_mistral': 452, 'n_tokens_neox': 431, 'n_words': 122}