diff --git a/tests/api/load/multi_load/common.py b/tests/api/load/multi_load/common.py new file mode 100644 index 00000000..ca1bde07 --- /dev/null +++ b/tests/api/load/multi_load/common.py @@ -0,0 +1,13 @@ +# +# Copyright (C) 2021 - 2024 Satoru SATOH +# SPDX-License-Identifier: MIT +# +# pylint: disable=missing-docstring +# pylint: disable=unused-import +"""Common module for tests.api.load.""" +from __future__ import annotations + +from ...multi_load.common import ( # noqa: F401 + NAMES, GLOB_PATTERN, + load_data_for_testfile, get_test_ids +) diff --git a/tests/api/load/multi_load/test_basics.py b/tests/api/load/multi_load/test_basics.py new file mode 100644 index 00000000..33996a1f --- /dev/null +++ b/tests/api/load/multi_load/test_basics.py @@ -0,0 +1,105 @@ +# +# Copyright (C) 2021 - 2024 Satoru SATOH +# SPDX-License-Identifier: MIT +# +# pylint: disable=missing-docstring +"""Test cases for anyconfig.api.load (multi_load).""" +from __future__ import annotations + +import collections +import typing + +import pytest + +import anyconfig.api._load as TT + +from .common import ( + NAMES, GLOB_PATTERN, load_data_for_testfile, get_test_ids +) + +if typing.TYPE_CHECKING: + import pathlib + + +DATA = load_data_for_testfile(__file__) +DATA_IDS: list[str] = get_test_ids(DATA) + +DATA_W_GLOB = [ + (inputs[0].parent / GLOB_PATTERN, opts, exp) + for inputs, opts, exp in DATA +] + + +def test_data() -> None: + assert DATA + + +def test_load_with_empty_list() -> None: + with pytest.raises(ValueError): + TT.load([]) + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_load_for_a_list_of_path_objects( + inputs: list[pathlib.Path], opts: dict, exp +) -> None: + assert TT.load(inputs, **opts) == exp + assert TT.load((i for i in inputs), **opts) == exp + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_load_for_a_list_of_path_strings( + inputs: list[pathlib.Path], opts: dict, exp +) -> None: + assert TT.load([str(i) for i in inputs], **opts) == exp + assert TT.load((str(i) for i in inputs), **opts) == exp + + +@pytest.mark.parametrize( + NAMES, DATA_W_GLOB, ids=get_test_ids(DATA_W_GLOB) +) +def test_load_for_glob_patterns( + inputs: list[pathlib.Path], opts: dict, exp +) -> None: + assert TT.load(inputs, **opts) == exp + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_load_for_a_list_of_streams( + inputs: list[pathlib.Path], opts: dict, exp +) -> None: + assert TT.load([i.open() for i in inputs], **opts) == exp + + +class MyDict(collections.OrderedDict): + pass + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_load_with_ac_dict_option( + inputs: list[pathlib.Path], opts: dict, exp +) -> None: + res = TT.load(inputs, ac_dict=MyDict, **opts) + assert res == exp + assert isinstance(res, MyDict) + + +@pytest.mark.parametrize(NAMES, DATA[:1], ids=DATA_IDS[:1]) +def test_load_with_wrong_merge_strategy( + inputs: list[pathlib.Path], opts: dict, exp +) -> None: + assert exp # dummy to avoid an error of unused argument. + with pytest.raises(ValueError): + TT.load(inputs, ac_merge="wrong_merge_strategy", **opts) + + +def test_load_with_ignore_missing_option(): + paths = [ + "/path/to/file_not_exist_0.json", + "/path/to/file_not_exist_1.json", + "/path/to/file_not_exist_2.json", + ] + with pytest.raises(FileNotFoundError): + TT.load(paths) + + assert TT.load(paths, ac_ignore_missing=True) == {} diff --git a/tests/api/load/multi_load/test_multi_types.py b/tests/api/load/multi_load/test_multi_types.py new file mode 100644 index 00000000..b2851759 --- /dev/null +++ b/tests/api/load/multi_load/test_multi_types.py @@ -0,0 +1,35 @@ +# +# Copyright (C) 2021 - 2024 Satoru SATOH +# SPDX-License-Identifier: MIT +# +# pylint: disable=missing-docstring +"""Test cases for anyconfig.api.load with multi type inputs.""" +from __future__ import annotations + +import typing + +import pytest + +import anyconfig.api._load as TT + +from .common import ( + NAMES, load_data_for_testfile, get_test_ids +) + +if typing.TYPE_CHECKING: + import pathlib + + +DATA = load_data_for_testfile(__file__) +DATA_IDS: list[str] = get_test_ids(DATA) + + +def test_data() -> None: + assert DATA + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_load( + inputs: list[pathlib.Path], opts: dict, exp +) -> None: + assert TT.load(inputs, **opts) == exp diff --git a/tests/api/load/multi_load/test_query.py b/tests/api/load/multi_load/test_query.py new file mode 100644 index 00000000..8d7ffc3e --- /dev/null +++ b/tests/api/load/multi_load/test_query.py @@ -0,0 +1,53 @@ +# +# Copyright (C) 2021 - 2024 Satoru SATOH +# SPDX-License-Identifier: MIT +# +# pylint: disable=missing-docstring +"""Test cases for anyconfig.api.load with query options.""" +from __future__ import annotations + +import typing + +import pytest + +import anyconfig.api._load as TT +import anyconfig.query + +from .common import ( + load_data_for_testfile, get_test_ids +) + +if typing.TYPE_CHECKING: + import pathlib + + +if not anyconfig.query.SUPPORTED: + pytest.skip( + "jmespath lib to neede for query is not available.", + allow_module_level=True + ) + +NAMES: tuple[str, ...] = ("inputs", "query", "exp") +DATA = load_data_for_testfile(__file__, values=(("q", ""), ("e", None))) +DATA_IDS: list[str] = get_test_ids(DATA) + + +def test_data() -> None: + assert DATA + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_load( + inputs: list[pathlib.Path], query: str, exp +) -> None: + assert TT.load(inputs, ac_query=query) == exp + + +@pytest.mark.parametrize(NAMES, DATA[:1], ids=DATA_IDS[:1]) +def test_load_with_invalid_query( + inputs: list[pathlib.Path], query: str, exp +) -> None: + assert query or exp # To avoid an error not using them. + assert TT.load( + inputs, ac_query="" + ) == TT.load(inputs) diff --git a/tests/api/load/multi_load/test_schema.py b/tests/api/load/multi_load/test_schema.py new file mode 100644 index 00000000..8b951a84 --- /dev/null +++ b/tests/api/load/multi_load/test_schema.py @@ -0,0 +1,72 @@ +# +# Copyright (C) 2021 - 2024 Satoru SATOH +# SPDX-License-Identifier: MIT +# +# pylint: disable=missing-docstring +"""Test cases for anyconfig.api.load with schema validation.""" +from __future__ import annotations + +import typing + +import pytest + +import anyconfig.api._load as TT +import anyconfig.schema + +from anyconfig.api import ValidationError + +from . import common + +if typing.TYPE_CHECKING: + import pathlib + + +if "jsonschema" not in anyconfig.schema.VALIDATORS: + pytest.skip( + "jsonschema lib is not available.", + allow_module_level=True + ) + + +def scm_path_from_inputs(inputs: list[pathlib.Path]) -> pathlib.Path: + path = inputs[0] + name = path.name[:-len(path.suffix)] + return list((path.parent / "s").glob(f"{name}.*"))[0] + + +NAMES: tuple[str, ...] = (*common.NAMES, "scm") +DATA = [ + (inputs, *rest, scm_path_from_inputs(inputs)) + for inputs, *rest in common.load_data_for_testfile(__file__) +] +DATA_IDS: list[str] = common.get_test_ids(DATA) + + +def test_data() -> None: + assert DATA + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_load( + inputs: list[pathlib.Path], opts: dict, exp, scm: pathlib.Path +) -> None: + assert TT.load(inputs, ac_schema=scm, **opts) == exp + + +SCM_NG_0 = '{"type": "object", "properties": {"a": {"type": "string"}}}' + + +@pytest.mark.parametrize(NAMES, DATA[:1], ids=DATA_IDS[:1]) +def test_load_with_validation_failure( + inputs: list[pathlib.Path], opts: dict, exp, scm: pathlib.Path, + tmp_path: pathlib.Path +) -> None: + assert exp or scm # dummy + + scm = tmp_path / "scm.json" + scm.write_text(SCM_NG_0) + + with pytest.raises(ValidationError): + TT.load( + inputs, ac_schema=scm, ac_schema_safe=False, **opts + ) diff --git a/tests/api/load/multi_load/test_template.py b/tests/api/load/multi_load/test_template.py new file mode 100644 index 00000000..9aa566ff --- /dev/null +++ b/tests/api/load/multi_load/test_template.py @@ -0,0 +1,43 @@ +# +# Copyright (C) 2021 - 2024 Satoru SATOH +# SPDX-License-Identifier: MIT +# +# pylint: disable=missing-docstring +"""Test cases for anyconfig.api.load with template options.""" +from __future__ import annotations + +import typing + +import pytest + +import anyconfig.api._load as TT +import anyconfig.template + +from . import common + +if typing.TYPE_CHECKING: + import pathlib + +if not anyconfig.template.SUPPORTED: + pytest.skip( + "jinja2 lib neede for template option is not available", + allow_module_level=True + ) + + +NAMES: tuple[str, ...] = (*common.NAMES, "ctx") +DATA: list = common.load_data_for_testfile( + __file__, values=(("o", {}), ("e", None), ("c", {})) +) +DATA_IDS: list[str] = common.get_test_ids(DATA) + + +def test_data() -> None: + assert DATA + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_load( + inputs: list[pathlib.Path], opts: dict, exp, ctx: dict +) -> None: + assert TT.load(inputs, ac_context=ctx, **opts) == exp diff --git a/tests/api/loads/common.py b/tests/api/loads/common.py deleted file mode 100644 index 597820ee..00000000 --- a/tests/api/loads/common.py +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (C) 2021 Satoru SATOH -# SPDX-License-Identifier: MIT -# -# pylint: disable=missing-docstring -import unittest - -from ... import base - - -class TestCase(unittest.TestCase, base.TDataCollector): - pattern = '*.txt' - - def setUp(self): - self.init() - -# vim:sw=4:ts=4:et: diff --git a/tests/api/loads/test_basics.py b/tests/api/loads/test_basics.py index b8619b9a..bbc82cb1 100644 --- a/tests/api/loads/test_basics.py +++ b/tests/api/loads/test_basics.py @@ -1,49 +1,61 @@ # -# Copyright (C) 2021 Satoru SATOH +# Copyright (C) 2021 - 2024 Satoru SATOH # SPDX-License-Identifier: MIT # # pylint: disable=missing-docstring +"""Basic test cases for anyconfig.api.loads.""" +from __future__ import annotations + +import typing import warnings +import pytest + import anyconfig.api._load as TT from anyconfig.api import UnknownProcessorTypeError -from . import common - - -class TestCase(common.TestCase): - - def test_loads(self): - for data in self.each_data(): - self.assertEqual( - TT.loads(data.inp, **data.opts), - data.exp, - f'{data.datadir!s}, {data.inp_path!s}' - ) - - def test_loads_intentional_failures(self): - for data in self.each_data(): - with self.assertRaises(AssertionError): - self.assertEqual(TT.loads(data.inp, **data.opts), {}) - - def test_loads_failure_ac_parser_was_not_given(self): - for data in self.each_data(): - with warnings.catch_warnings(record=True) as warns: - warnings.simplefilter('always') - self.assertEqual(TT.loads(data.inp), None) - self.assertEqual(len(warns), 1) - self.assertTrue(issubclass(warns[-1].category, UserWarning)) - self.assertTrue( - 'ac_parser was not given but' in str(warns[-1].message) - ) - - def test_loads_failure_invalid_ac_parser_was_given(self): - for data in self.each_data(): - with self.assertRaises(UnknownProcessorTypeError): - self.assertEqual( - TT.loads(data.inp, ac_parser='invalid_id'), - None - ) - -# vim:sw=4:ts=4:et: +from ... import common + +if typing.TYPE_CHECKING: + import pathlib + + +NAMES: tuple[str, ...] = ("content", "opts", "exp") + +# .. seealso:: tests.common.tdc +DATA_0: list[ + tuple[pathlib.Path, dict, typing.Any] +] = common.load_data_for_testfile(__file__) + +DATA: list[tuple[str, dict, typing.Any]] = [ + (i.read_text(), o, e) for i, o, e in DATA_0 +] +DATA_IDS: list[str] = common.get_test_ids(DATA_0) + + +def test_data() -> None: + assert DATA + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_loads(content: str, opts: dict, exp) -> None: + assert TT.loads(content, **opts) == exp + + +@pytest.mark.parametrize(NAMES, DATA[:1], ids=DATA_IDS[:1]) +def test_loads_withou_ac_parser_option(content: str, opts: dict, exp): + assert opts or exp + with warnings.catch_warnings(record=True) as warns: + warnings.simplefilter('always') + assert TT.loads(content) is None + assert len(warns) == 1 + assert issubclass(warns[-1].category, UserWarning) + assert "ac_parser was not given but" in str(warns[-1].message) + + +@pytest.mark.parametrize(NAMES, DATA[:1], ids=DATA_IDS[:1]) +def test_loads_with_invalid_ac_parser_option(content: str, opts: dict, exp): + assert opts or exp + with pytest.raises(UnknownProcessorTypeError): + assert TT.loads(content, ac_parser="invalid_parser") is None diff --git a/tests/api/loads/test_query.py b/tests/api/loads/test_query.py index 90718735..2c2650c1 100644 --- a/tests/api/loads/test_query.py +++ b/tests/api/loads/test_query.py @@ -3,34 +3,55 @@ # SPDX-License-Identifier: MIT # # pylint: disable=missing-docstring -import unittest +"""Basic test cases for anyconfig.api.loads.""" +from __future__ import annotations + +import typing + +import pytest import anyconfig.api._load as TT import anyconfig.query -from . import common +from ... import common + +if typing.TYPE_CHECKING: + import pathlib + + +if not anyconfig.query.SUPPORTED: + pytest.skip( + "Required query module is not available", + allow_module_level=True + ) + + +NAMES: tuple[str, ...] = ("content", "exp", "query", "opts") + +# .. seealso:: tests.common.tdc +DATA_0: list = common.load_data_for_testfile( + __file__, (("e", None), ("q", ""), ("o", {})) +) +DATA_IDS: list[str] = common.get_test_ids(DATA_0) +DATA: list[tuple[str, dict, typing.Any]] = [ + (i.read_text(), e, q.strip(), o) for i, e, q, o in DATA_0 +] + +def test_data() -> None: + assert DATA -@unittest.skipIf(not anyconfig.query.SUPPORTED, - 'jmespath lib is not available') -class TestCase(common.TestCase): - kind = 'query' - def test_loads_with_query(self): - for data in self.each_data(): - self.assertEqual( - TT.loads(data.inp, ac_query=data.query, **data.opts), - data.exp, - f'{data.datadir!s}, {data.inp_path!s}' - ) +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_loads(content: str, exp, query: str, opts: dict): + assert TT.loads(content, ac_query=query, **opts) == exp - def test_loads_with_invalid_query(self): - opts = dict(ac_parser='json') - for data in self.each_data(): - self.assertEqual( - TT.loads(data.inp, ac_query=None, **opts), - TT.single_load(data.inp_path, **opts), - f'{data.datadir!s}, {data.inp_path!s}' - ) -# vim:sw=4:ts=4:et: +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_loads_with_invalid_query_option( + content: str, exp, query: str, opts: dict +): + assert exp or query + assert TT.loads( + content, ac_query=None, **opts + ) == TT.loads(content, **opts) diff --git a/tests/api/loads/test_schema.py b/tests/api/loads/test_schema.py index fa0340ff..d16b2450 100644 --- a/tests/api/loads/test_schema.py +++ b/tests/api/loads/test_schema.py @@ -3,46 +3,64 @@ # SPDX-License-Identifier: MIT # # pylint: disable=missing-docstring -import unittest +"""Test cases for anyconfig.api.loads with schema validation option.""" +from __future__ import annotations + +import typing import warnings +import pytest + import anyconfig.api._load as TT import anyconfig.schema from anyconfig.api import ValidationError -from . import common +from ... import common + + +if "jsonschema" not in anyconfig.schema.VALIDATORS: + pytest.skip( + "Required schema module 'jsonschema' is not available", + allow_module_level=True + ) + + +NAMES: tuple[str, ...] = ("content", "exp", "scm", "opts") + +# .. seealso:: tests.common.tdc +DATA_0: list = common.load_data_for_testfile( + __file__, (("e", None), ("s", ""), ("o", {})) +) +DATA_IDS: list[str] = common.get_test_ids(DATA_0) +DATA: list[tuple[str, dict, typing.Any]] = [ + (i.read_text(), e, s.strip(), o) for i, e, s, o in DATA_0 +] + + +def test_data() -> None: + assert DATA + + +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_loads(content: str, exp, scm: str, opts: dict): + assert TT.loads(content, ac_schema=scm, **opts) == exp SCM_NG_0 = '{"type": "object", "properties": {"a": {"type": "string"}}}' -@unittest.skipIf("jsonschema" not in anyconfig.schema.VALIDATORS, - 'jsonschema lib is not available') -class TestCase(common.TestCase): - kind = 'schema' - - def test_loads_with_schema_validation(self): - for data in self.each_data(): - scm = data.scm.read_text().strip() - self.assertEqual( - TT.loads(data.inp, ac_schema=scm, **data.opts), - data.exp, - f'{data.datadir!s}, {data.inp_path!s}' - ) - - def test_loads_with_schema_validation_failures(self): - opts = dict(ac_parser='json', ac_schema=SCM_NG_0) - - for data in self.each_data(): - with warnings.catch_warnings(record=True) as warns: - warnings.simplefilter('always') - self.assertTrue( - TT.loads(data.inp, **opts) is None, - f'{data.datadir!s}, {data.inp_path!s}' - ) - self.assertTrue(len(warns) > 0) - self.assertTrue(issubclass(warns[-1].category, UserWarning)) - - with self.assertRaises(ValidationError): - TT.loads(data.inp, ac_schema_safe=False, **opts) +@pytest.mark.parametrize(NAMES, DATA[:1], ids=DATA_IDS[:1]) +def test_loads_without_schema(content: str, exp, scm: str, opts: dict): + assert scm or exp + + opts.update(ac_schema=SCM_NG_0) + + with pytest.raises(ValidationError): + TT.loads(content, ac_schema_safe=False, **opts) + + with warnings.catch_warnings(record=True) as warns: + warnings.simplefilter("always") + assert TT.loads(content, **opts) is None + assert len(warns) > 0 + assert issubclass(warns[-1].category, UserWarning) diff --git a/tests/api/loads/test_template.py b/tests/api/loads/test_template.py index e8b4f5b0..e3551bc9 100644 --- a/tests/api/loads/test_template.py +++ b/tests/api/loads/test_template.py @@ -1,37 +1,55 @@ # -# Copyright (C) 2021 Satoru SATOH +# Copyright (C) 2021 - 2024 Satoru SATOH # SPDX-License-Identifier: MIT # # pylint: disable=missing-docstring -import unittest +"""Test cases for anyconfig.api.single_load with schema options.""" +from __future__ import annotations + +import typing import warnings +import pytest + import anyconfig.api._load as TT import anyconfig.template -from . import common +from ... import common + + +if not anyconfig.template.SUPPORTED: + pytest.skip( + "jinja2 template lib is not available", + allow_module_level=True + ) + + +NAMES: tuple[str, ...] = ("content", "exp", "ctx", "opts") + +# .. seealso:: tests.common.tdc +DATA_0: list = common.load_data_for_testfile( + __file__, (("e", None), ("c", {}), ("o", {})) +) +DATA_IDS: list[str] = common.get_test_ids(DATA_0) +DATA: list[tuple[str, dict, typing.Any]] = [ + (i.read_text(), *eco) for i, *eco in DATA_0 +] + +def test_data() -> None: + assert DATA -@unittest.skipIf(not anyconfig.template.SUPPORTED, - 'jinja2 template lib is not available') -class TestCase(common.TestCase): - kind = 'template' - def test_loads_template(self): - for data in self.each_data(): - self.assertEqual( - TT.loads(data.inp, ac_context=data.ctx, **data.opts), - data.exp, - f'{data.datadir!s}, {data.inp_path!s}' - ) +@pytest.mark.parametrize(NAMES, DATA, ids=DATA_IDS) +def test_loads(content: str, exp, ctx: dict, opts: dict): + assert TT.loads(content, ac_context=ctx, **opts) == exp - def test_loads_from_template_failures(self): - inp = '{"a": "{{ a"}' - with warnings.catch_warnings(record=True) as warns: - warnings.simplefilter('always') - res = TT.loads(inp, ac_parser='json', ac_template=True) - self.assertEqual(res, dict(a='{{ a')) - # self.assertEqual(len(warns), 1) # Needs to fix plugins - self.assertTrue(issubclass(warns[-1].category, UserWarning)) -# vim:sw=4:ts=4:et: +def test_loads_failures(): + content = '{"a": "{{ a"}' + with warnings.catch_warnings(record=True) as warns: + warnings.simplefilter("always") + res = TT.loads(content, ac_parser="json", ac_template=True) + assert res == {"a": "{{ a"} + # self.assertEqual(len(warns), 1) # Needs to fix plugins + assert issubclass(warns[-1].category, UserWarning) diff --git a/tests/api/multi_load/common.py b/tests/api/multi_load/common.py index 1fcf0430..5d58692f 100644 --- a/tests/api/multi_load/common.py +++ b/tests/api/multi_load/common.py @@ -8,7 +8,6 @@ """ from __future__ import annotations -import anyconfig.api._load as TT import anyconfig.api.utils from ... import common diff --git a/tests/res/1/api/load/multi_load b/tests/res/1/api/load/multi_load new file mode 120000 index 00000000..c389992e --- /dev/null +++ b/tests/res/1/api/load/multi_load @@ -0,0 +1 @@ +../multi_load \ No newline at end of file diff --git a/tests/res/1/api/loads/basics/10/00.txt b/tests/res/1/api/loads/basics/10/00.txt new file mode 120000 index 00000000..0c5cd86a --- /dev/null +++ b/tests/res/1/api/loads/basics/10/00.txt @@ -0,0 +1 @@ +../../../single_load/basics/10/00.json \ No newline at end of file diff --git a/tests/res/1/api/loads/basics/10/10.txt b/tests/res/1/api/loads/basics/10/10.txt new file mode 120000 index 00000000..5247a50b --- /dev/null +++ b/tests/res/1/api/loads/basics/10/10.txt @@ -0,0 +1 @@ +../../../single_load/basics/10/10.json \ No newline at end of file diff --git a/tests/res/1/api/loads/basics/10/20.txt b/tests/res/1/api/loads/basics/10/20.txt new file mode 120000 index 00000000..661a4269 --- /dev/null +++ b/tests/res/1/api/loads/basics/10/20.txt @@ -0,0 +1 @@ +../../../single_load/basics/10/20.json \ No newline at end of file diff --git a/tests/res/loads/basics/10/e/00.json b/tests/res/1/api/loads/basics/10/e/00.json similarity index 100% rename from tests/res/loads/basics/10/e/00.json rename to tests/res/1/api/loads/basics/10/e/00.json diff --git a/tests/res/loads/basics/10/e/10.json b/tests/res/1/api/loads/basics/10/e/10.json similarity index 100% rename from tests/res/loads/basics/10/e/10.json rename to tests/res/1/api/loads/basics/10/e/10.json diff --git a/tests/res/loads/basics/10/e/20.json b/tests/res/1/api/loads/basics/10/e/20.json similarity index 100% rename from tests/res/loads/basics/10/e/20.json rename to tests/res/1/api/loads/basics/10/e/20.json diff --git a/tests/res/loads/basics/10/o/00.json b/tests/res/1/api/loads/basics/10/o/00.json similarity index 100% rename from tests/res/loads/basics/10/o/00.json rename to tests/res/1/api/loads/basics/10/o/00.json diff --git a/tests/res/loads/basics/10/o/10.json b/tests/res/1/api/loads/basics/10/o/10.json similarity index 100% rename from tests/res/loads/basics/10/o/10.json rename to tests/res/1/api/loads/basics/10/o/10.json diff --git a/tests/res/loads/basics/10/o/20.json b/tests/res/1/api/loads/basics/10/o/20.json similarity index 100% rename from tests/res/loads/basics/10/o/20.json rename to tests/res/1/api/loads/basics/10/o/20.json diff --git a/tests/res/1/api/loads/query/10/00_00.txt b/tests/res/1/api/loads/query/10/00_00.txt new file mode 120000 index 00000000..5974c6e1 --- /dev/null +++ b/tests/res/1/api/loads/query/10/00_00.txt @@ -0,0 +1 @@ +../../../single_load/query/10/00_00.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/00_10.txt b/tests/res/1/api/loads/query/10/00_10.txt new file mode 120000 index 00000000..385f168e --- /dev/null +++ b/tests/res/1/api/loads/query/10/00_10.txt @@ -0,0 +1 @@ +../../../single_load/query/10/00_10.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/10_00.txt b/tests/res/1/api/loads/query/10/10_00.txt new file mode 120000 index 00000000..328240fe --- /dev/null +++ b/tests/res/1/api/loads/query/10/10_00.txt @@ -0,0 +1 @@ +../../../single_load/query/10/10_00.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/10_10.txt b/tests/res/1/api/loads/query/10/10_10.txt new file mode 120000 index 00000000..388a8826 --- /dev/null +++ b/tests/res/1/api/loads/query/10/10_10.txt @@ -0,0 +1 @@ +../../../single_load/query/10/10_10.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/10_20.txt b/tests/res/1/api/loads/query/10/10_20.txt new file mode 120000 index 00000000..8d377b68 --- /dev/null +++ b/tests/res/1/api/loads/query/10/10_20.txt @@ -0,0 +1 @@ +../../../single_load/query/10/10_20.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/10_30.txt b/tests/res/1/api/loads/query/10/10_30.txt new file mode 120000 index 00000000..b13a05b8 --- /dev/null +++ b/tests/res/1/api/loads/query/10/10_30.txt @@ -0,0 +1 @@ +../../../single_load/query/10/10_30.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/10_40.txt b/tests/res/1/api/loads/query/10/10_40.txt new file mode 120000 index 00000000..7d600c64 --- /dev/null +++ b/tests/res/1/api/loads/query/10/10_40.txt @@ -0,0 +1 @@ +../../../single_load/query/10/10_40.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/10_50.txt b/tests/res/1/api/loads/query/10/10_50.txt new file mode 120000 index 00000000..46725333 --- /dev/null +++ b/tests/res/1/api/loads/query/10/10_50.txt @@ -0,0 +1 @@ +../../../single_load/query/10/10_50.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/20_00.txt b/tests/res/1/api/loads/query/10/20_00.txt new file mode 120000 index 00000000..82054765 --- /dev/null +++ b/tests/res/1/api/loads/query/10/20_00.txt @@ -0,0 +1 @@ +../../../single_load/query/10/20_00.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/20_10.txt b/tests/res/1/api/loads/query/10/20_10.txt new file mode 120000 index 00000000..f691a000 --- /dev/null +++ b/tests/res/1/api/loads/query/10/20_10.txt @@ -0,0 +1 @@ +../../../single_load/query/10/20_10.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/20_20.txt b/tests/res/1/api/loads/query/10/20_20.txt new file mode 120000 index 00000000..0a5f5e2f --- /dev/null +++ b/tests/res/1/api/loads/query/10/20_20.txt @@ -0,0 +1 @@ +../../../single_load/query/10/20_20.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/e b/tests/res/1/api/loads/query/10/e new file mode 120000 index 00000000..d8d2526b --- /dev/null +++ b/tests/res/1/api/loads/query/10/e @@ -0,0 +1 @@ +../../../single_load/query/10/e \ No newline at end of file diff --git a/tests/res/loads/query/10/o/00_00.json b/tests/res/1/api/loads/query/10/o/00_00.json similarity index 100% rename from tests/res/loads/query/10/o/00_00.json rename to tests/res/1/api/loads/query/10/o/00_00.json diff --git a/tests/res/loads/query/10/o/00_10.json b/tests/res/1/api/loads/query/10/o/00_10.json similarity index 100% rename from tests/res/loads/query/10/o/00_10.json rename to tests/res/1/api/loads/query/10/o/00_10.json diff --git a/tests/res/loads/query/10/o/10_00.json b/tests/res/1/api/loads/query/10/o/10_00.json similarity index 100% rename from tests/res/loads/query/10/o/10_00.json rename to tests/res/1/api/loads/query/10/o/10_00.json diff --git a/tests/res/loads/query/10/o/10_10.json b/tests/res/1/api/loads/query/10/o/10_10.json similarity index 100% rename from tests/res/loads/query/10/o/10_10.json rename to tests/res/1/api/loads/query/10/o/10_10.json diff --git a/tests/res/loads/query/10/o/10_20.json b/tests/res/1/api/loads/query/10/o/10_20.json similarity index 100% rename from tests/res/loads/query/10/o/10_20.json rename to tests/res/1/api/loads/query/10/o/10_20.json diff --git a/tests/res/loads/query/10/o/10_30.json b/tests/res/1/api/loads/query/10/o/10_30.json similarity index 100% rename from tests/res/loads/query/10/o/10_30.json rename to tests/res/1/api/loads/query/10/o/10_30.json diff --git a/tests/res/loads/query/10/o/10_40.json b/tests/res/1/api/loads/query/10/o/10_40.json similarity index 100% rename from tests/res/loads/query/10/o/10_40.json rename to tests/res/1/api/loads/query/10/o/10_40.json diff --git a/tests/res/loads/query/10/o/20_00.json b/tests/res/1/api/loads/query/10/o/10_50.json similarity index 100% rename from tests/res/loads/query/10/o/20_00.json rename to tests/res/1/api/loads/query/10/o/10_50.json diff --git a/tests/res/loads/query/10/o/20_10.json b/tests/res/1/api/loads/query/10/o/20_00.json similarity index 100% rename from tests/res/loads/query/10/o/20_10.json rename to tests/res/1/api/loads/query/10/o/20_00.json diff --git a/tests/res/loads/query/10/o/20_20.json b/tests/res/1/api/loads/query/10/o/20_10.json similarity index 100% rename from tests/res/loads/query/10/o/20_20.json rename to tests/res/1/api/loads/query/10/o/20_10.json diff --git a/tests/res/1/api/loads/query/10/o/20_20.json b/tests/res/1/api/loads/query/10/o/20_20.json new file mode 120000 index 00000000..4060f79c --- /dev/null +++ b/tests/res/1/api/loads/query/10/o/20_20.json @@ -0,0 +1 @@ +00_00.json \ No newline at end of file diff --git a/tests/res/1/api/loads/query/10/q b/tests/res/1/api/loads/query/10/q new file mode 120000 index 00000000..5169604f --- /dev/null +++ b/tests/res/1/api/loads/query/10/q @@ -0,0 +1 @@ +../../../single_load/query/10/q \ No newline at end of file diff --git a/tests/res/1/api/loads/schema/10/00.txt b/tests/res/1/api/loads/schema/10/00.txt new file mode 120000 index 00000000..7feafc4e --- /dev/null +++ b/tests/res/1/api/loads/schema/10/00.txt @@ -0,0 +1 @@ +../../../single_load/schema//10/00.json \ No newline at end of file diff --git a/tests/res/1/api/loads/schema/10/10.txt b/tests/res/1/api/loads/schema/10/10.txt new file mode 120000 index 00000000..0817d222 --- /dev/null +++ b/tests/res/1/api/loads/schema/10/10.txt @@ -0,0 +1 @@ +../../../single_load/schema//10/10.json \ No newline at end of file diff --git a/tests/res/1/api/loads/schema/10/20.txt b/tests/res/1/api/loads/schema/10/20.txt new file mode 120000 index 00000000..e14ac3af --- /dev/null +++ b/tests/res/1/api/loads/schema/10/20.txt @@ -0,0 +1 @@ +../../../single_load/schema//10/20.json \ No newline at end of file diff --git a/tests/res/loads/schema/10/e b/tests/res/1/api/loads/schema/10/e similarity index 100% rename from tests/res/loads/schema/10/e rename to tests/res/1/api/loads/schema/10/e diff --git a/tests/res/loads/schema/10/o b/tests/res/1/api/loads/schema/10/o similarity index 100% rename from tests/res/loads/schema/10/o rename to tests/res/1/api/loads/schema/10/o diff --git a/tests/res/1/api/loads/schema/10/s/00.txt b/tests/res/1/api/loads/schema/10/s/00.txt new file mode 120000 index 00000000..888d8dd8 --- /dev/null +++ b/tests/res/1/api/loads/schema/10/s/00.txt @@ -0,0 +1 @@ +../../../../single_load/schema/10/s/00.json \ No newline at end of file diff --git a/tests/res/1/api/loads/schema/10/s/10.txt b/tests/res/1/api/loads/schema/10/s/10.txt new file mode 120000 index 00000000..b64fd712 --- /dev/null +++ b/tests/res/1/api/loads/schema/10/s/10.txt @@ -0,0 +1 @@ +../../../../single_load/schema/10/s/10.json \ No newline at end of file diff --git a/tests/res/1/api/loads/schema/10/s/20.txt b/tests/res/1/api/loads/schema/10/s/20.txt new file mode 120000 index 00000000..c0b8448a --- /dev/null +++ b/tests/res/1/api/loads/schema/10/s/20.txt @@ -0,0 +1 @@ +../../../../single_load/schema/10/s/20.json \ No newline at end of file diff --git a/tests/res/1/api/loads/template/10/00.txt b/tests/res/1/api/loads/template/10/00.txt new file mode 120000 index 00000000..e72201f1 --- /dev/null +++ b/tests/res/1/api/loads/template/10/00.txt @@ -0,0 +1 @@ +../../../single_load/template/10/00.j2 \ No newline at end of file diff --git a/tests/res/1/api/loads/template/10/10.txt b/tests/res/1/api/loads/template/10/10.txt new file mode 120000 index 00000000..ed2a42a2 --- /dev/null +++ b/tests/res/1/api/loads/template/10/10.txt @@ -0,0 +1 @@ +../../../single_load/template/10/10.j2 \ No newline at end of file diff --git a/tests/res/1/api/loads/template/10/20.txt b/tests/res/1/api/loads/template/10/20.txt new file mode 120000 index 00000000..b48229f1 --- /dev/null +++ b/tests/res/1/api/loads/template/10/20.txt @@ -0,0 +1 @@ +../../../single_load/template/10/20.j2 \ No newline at end of file diff --git a/tests/res/1/api/loads/template/10/30.txt b/tests/res/1/api/loads/template/10/30.txt new file mode 120000 index 00000000..f0d4fad0 --- /dev/null +++ b/tests/res/1/api/loads/template/10/30.txt @@ -0,0 +1 @@ +../../../single_load/template/10/30.j2 \ No newline at end of file diff --git a/tests/res/1/api/loads/template/10/c b/tests/res/1/api/loads/template/10/c new file mode 120000 index 00000000..7e59bdfe --- /dev/null +++ b/tests/res/1/api/loads/template/10/c @@ -0,0 +1 @@ +../../../single_load/template/10/c \ No newline at end of file diff --git a/tests/res/1/api/loads/template/10/e b/tests/res/1/api/loads/template/10/e new file mode 120000 index 00000000..2ecd3b9a --- /dev/null +++ b/tests/res/1/api/loads/template/10/e @@ -0,0 +1 @@ +../../../single_load/template/10/e \ No newline at end of file diff --git a/tests/res/loads/template/10/o/00.json b/tests/res/1/api/loads/template/10/o/00.json similarity index 100% rename from tests/res/loads/template/10/o/00.json rename to tests/res/1/api/loads/template/10/o/00.json diff --git a/tests/res/loads/template/10/o/10.json b/tests/res/1/api/loads/template/10/o/10.json similarity index 100% rename from tests/res/loads/template/10/o/10.json rename to tests/res/1/api/loads/template/10/o/10.json diff --git a/tests/res/loads/template/10/o/20.json b/tests/res/1/api/loads/template/10/o/20.json similarity index 100% rename from tests/res/loads/template/10/o/20.json rename to tests/res/1/api/loads/template/10/o/20.json diff --git a/tests/res/1/api/loads/template/10/o/30.json b/tests/res/1/api/loads/template/10/o/30.json new file mode 120000 index 00000000..a9005a1b --- /dev/null +++ b/tests/res/1/api/loads/template/10/o/30.json @@ -0,0 +1 @@ +00.json \ No newline at end of file diff --git a/tests/res/1/api/single_load/query/10/10_40.json b/tests/res/1/api/single_load/query/10/10_40.json new file mode 120000 index 00000000..8da49fea --- /dev/null +++ b/tests/res/1/api/single_load/query/10/10_40.json @@ -0,0 +1 @@ +../../basics/10/10.json \ No newline at end of file diff --git a/tests/res/1/api/single_load/query/10/10_50.json b/tests/res/1/api/single_load/query/10/10_50.json new file mode 120000 index 00000000..8da49fea --- /dev/null +++ b/tests/res/1/api/single_load/query/10/10_50.json @@ -0,0 +1 @@ +../../basics/10/10.json \ No newline at end of file diff --git a/tests/res/loads/basics/10/00.txt b/tests/res/loads/basics/10/00.txt deleted file mode 120000 index b8e5136c..00000000 --- a/tests/res/loads/basics/10/00.txt +++ /dev/null @@ -1 +0,0 @@ -../../../base/basics/10/00.json \ No newline at end of file diff --git a/tests/res/loads/basics/10/10.txt b/tests/res/loads/basics/10/10.txt deleted file mode 120000 index b8c4d11c..00000000 --- a/tests/res/loads/basics/10/10.txt +++ /dev/null @@ -1 +0,0 @@ -../../../base/basics/10/10.json \ No newline at end of file diff --git a/tests/res/loads/basics/10/20.txt b/tests/res/loads/basics/10/20.txt deleted file mode 120000 index 374a2983..00000000 --- a/tests/res/loads/basics/10/20.txt +++ /dev/null @@ -1 +0,0 @@ -../../../base/basics/10/20.json \ No newline at end of file diff --git a/tests/res/loads/query/10/00_00.txt b/tests/res/loads/query/10/00_00.txt deleted file mode 120000 index 50a2bc6c..00000000 --- a/tests/res/loads/query/10/00_00.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/00_00.json \ No newline at end of file diff --git a/tests/res/loads/query/10/00_10.txt b/tests/res/loads/query/10/00_10.txt deleted file mode 120000 index 55252a92..00000000 --- a/tests/res/loads/query/10/00_10.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/00_10.json \ No newline at end of file diff --git a/tests/res/loads/query/10/10_00.txt b/tests/res/loads/query/10/10_00.txt deleted file mode 120000 index 4daf3acc..00000000 --- a/tests/res/loads/query/10/10_00.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/10_00.json \ No newline at end of file diff --git a/tests/res/loads/query/10/10_10.txt b/tests/res/loads/query/10/10_10.txt deleted file mode 120000 index 34f9433b..00000000 --- a/tests/res/loads/query/10/10_10.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/10_10.json \ No newline at end of file diff --git a/tests/res/loads/query/10/10_20.txt b/tests/res/loads/query/10/10_20.txt deleted file mode 120000 index f142b7cd..00000000 --- a/tests/res/loads/query/10/10_20.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/10_20.json \ No newline at end of file diff --git a/tests/res/loads/query/10/10_30.txt b/tests/res/loads/query/10/10_30.txt deleted file mode 120000 index bbbaf3de..00000000 --- a/tests/res/loads/query/10/10_30.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/10_30.json \ No newline at end of file diff --git a/tests/res/loads/query/10/10_40.txt b/tests/res/loads/query/10/10_40.txt deleted file mode 120000 index e9800dff..00000000 --- a/tests/res/loads/query/10/10_40.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/10_40.json \ No newline at end of file diff --git a/tests/res/loads/query/10/20_00.txt b/tests/res/loads/query/10/20_00.txt deleted file mode 120000 index 3bc60a8d..00000000 --- a/tests/res/loads/query/10/20_00.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/20_00.json \ No newline at end of file diff --git a/tests/res/loads/query/10/20_10.txt b/tests/res/loads/query/10/20_10.txt deleted file mode 120000 index d38cc55b..00000000 --- a/tests/res/loads/query/10/20_10.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/20_10.json \ No newline at end of file diff --git a/tests/res/loads/query/10/20_20.txt b/tests/res/loads/query/10/20_20.txt deleted file mode 120000 index 45716ff5..00000000 --- a/tests/res/loads/query/10/20_20.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/20_20.json \ No newline at end of file diff --git a/tests/res/loads/query/10/e b/tests/res/loads/query/10/e deleted file mode 120000 index d1af22eb..00000000 --- a/tests/res/loads/query/10/e +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/e \ No newline at end of file diff --git a/tests/res/loads/query/10/q b/tests/res/loads/query/10/q deleted file mode 120000 index 97115cee..00000000 --- a/tests/res/loads/query/10/q +++ /dev/null @@ -1 +0,0 @@ -../../../json/query/q \ No newline at end of file diff --git a/tests/res/loads/schema/10/00.txt b/tests/res/loads/schema/10/00.txt deleted file mode 120000 index b8e5136c..00000000 --- a/tests/res/loads/schema/10/00.txt +++ /dev/null @@ -1 +0,0 @@ -../../../base/basics/10/00.json \ No newline at end of file diff --git a/tests/res/loads/schema/10/10.txt b/tests/res/loads/schema/10/10.txt deleted file mode 120000 index b8c4d11c..00000000 --- a/tests/res/loads/schema/10/10.txt +++ /dev/null @@ -1 +0,0 @@ -../../../base/basics/10/10.json \ No newline at end of file diff --git a/tests/res/loads/schema/10/20.txt b/tests/res/loads/schema/10/20.txt deleted file mode 120000 index 374a2983..00000000 --- a/tests/res/loads/schema/10/20.txt +++ /dev/null @@ -1 +0,0 @@ -../../../base/basics/10/20.json \ No newline at end of file diff --git a/tests/res/loads/schema/10/s/00.txt b/tests/res/loads/schema/10/s/00.txt deleted file mode 120000 index a5f74b0a..00000000 --- a/tests/res/loads/schema/10/s/00.txt +++ /dev/null @@ -1 +0,0 @@ -../../../../base/basics/10/s/00.json \ No newline at end of file diff --git a/tests/res/loads/schema/10/s/10.txt b/tests/res/loads/schema/10/s/10.txt deleted file mode 120000 index 22496a9f..00000000 --- a/tests/res/loads/schema/10/s/10.txt +++ /dev/null @@ -1 +0,0 @@ -../../../../base/basics/10/s/10.json \ No newline at end of file diff --git a/tests/res/loads/schema/10/s/20.txt b/tests/res/loads/schema/10/s/20.txt deleted file mode 120000 index 74c954b1..00000000 --- a/tests/res/loads/schema/10/s/20.txt +++ /dev/null @@ -1 +0,0 @@ -../../../../base/basics/10/s/20.json \ No newline at end of file diff --git a/tests/res/loads/template/10/00.txt b/tests/res/loads/template/10/00.txt deleted file mode 120000 index ca42c775..00000000 --- a/tests/res/loads/template/10/00.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/template/00.json \ No newline at end of file diff --git a/tests/res/loads/template/10/10.txt b/tests/res/loads/template/10/10.txt deleted file mode 120000 index 9ea6be1d..00000000 --- a/tests/res/loads/template/10/10.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/template/10.json \ No newline at end of file diff --git a/tests/res/loads/template/10/20.txt b/tests/res/loads/template/10/20.txt deleted file mode 120000 index c14c6cc1..00000000 --- a/tests/res/loads/template/10/20.txt +++ /dev/null @@ -1 +0,0 @@ -../../../json/template/20.json \ No newline at end of file diff --git a/tests/res/loads/template/10/c b/tests/res/loads/template/10/c deleted file mode 120000 index cb440095..00000000 --- a/tests/res/loads/template/10/c +++ /dev/null @@ -1 +0,0 @@ -../../../base/basics/10/c \ No newline at end of file diff --git a/tests/res/loads/template/10/e b/tests/res/loads/template/10/e deleted file mode 120000 index cba86d3d..00000000 --- a/tests/res/loads/template/10/e +++ /dev/null @@ -1 +0,0 @@ -../../../json/template/e \ No newline at end of file