diff options
author | floatdrop <floatdrop@yandex-team.ru> | 2022-02-10 16:47:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:15 +0300 |
commit | e63b84f1d39557d9e46ac380b1f388271894293c (patch) | |
tree | 338cdaff3fb027e030b847db66df06019a0e3149 /contrib/python/Jinja2/py3/tests/conftest.py | |
parent | f60febb7ea449535e7b073c386c7ff0539637fc0 (diff) | |
download | ydb-e63b84f1d39557d9e46ac380b1f388271894293c.tar.gz |
Restoring authorship annotation for <floatdrop@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/Jinja2/py3/tests/conftest.py')
-rw-r--r-- | contrib/python/Jinja2/py3/tests/conftest.py | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/contrib/python/Jinja2/py3/tests/conftest.py b/contrib/python/Jinja2/py3/tests/conftest.py index 218c3c77cf..72df42a6a6 100644 --- a/contrib/python/Jinja2/py3/tests/conftest.py +++ b/contrib/python/Jinja2/py3/tests/conftest.py @@ -1,50 +1,50 @@ from pathlib import Path - -import pytest - -from jinja2 import loaders + +import pytest + +from jinja2 import loaders from jinja2.environment import Environment - - -@pytest.fixture -def env(): + + +@pytest.fixture +def env(): """returns a new environment.""" - return Environment() - - -@pytest.fixture -def dict_loader(): + return Environment() + + +@pytest.fixture +def dict_loader(): """returns DictLoader""" return loaders.DictLoader({"justdict.html": "FOO"}) - - -@pytest.fixture -def package_loader(): + + +@pytest.fixture +def package_loader(): """returns PackageLoader initialized from templates""" return loaders.PackageLoader("res", "templates") - - -@pytest.fixture -def filesystem_loader(): + + +@pytest.fixture +def filesystem_loader(): """returns FileSystemLoader initialized to res/templates directory""" import yatest.common here = Path(yatest.common.test_source_path()) return loaders.FileSystemLoader(here / "res" / "templates") - - -@pytest.fixture -def function_loader(): + + +@pytest.fixture +def function_loader(): """returns a FunctionLoader""" return loaders.FunctionLoader({"justfunction.html": "FOO"}.get) - - -@pytest.fixture -def choice_loader(dict_loader, package_loader): + + +@pytest.fixture +def choice_loader(dict_loader, package_loader): """returns a ChoiceLoader""" - return loaders.ChoiceLoader([dict_loader, package_loader]) - - -@pytest.fixture -def prefix_loader(filesystem_loader, dict_loader): + return loaders.ChoiceLoader([dict_loader, package_loader]) + + +@pytest.fixture +def prefix_loader(filesystem_loader, dict_loader): """returns a PrefixLoader""" return loaders.PrefixLoader({"a": filesystem_loader, "b": dict_loader}) |