diff options
| author | robot-piglet <[email protected]> | 2025-08-28 10:42:11 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2025-08-28 10:55:38 +0300 |
| commit | b8d1a9799cb775bca70c28659d06af534fef2451 (patch) | |
| tree | 9381fa9a70641e6017280d0c5e40780cd5269491 /library/python/testing | |
| parent | aca3df9166eb754cec4dbf8cbd2b0c2119d8e190 (diff) | |
Intermediate changes
commit_hash:7cb1b858db9e1e66d33dcb3808a3ad884bd1c5b5
Diffstat (limited to 'library/python/testing')
| -rw-r--r-- | library/python/testing/yatest_lib/ya.make | 1 | ||||
| -rw-r--r-- | library/python/testing/yatest_lib/ya.py | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/library/python/testing/yatest_lib/ya.make b/library/python/testing/yatest_lib/ya.make index 79442b8faf1..90273c0856e 100644 --- a/library/python/testing/yatest_lib/ya.make +++ b/library/python/testing/yatest_lib/ya.make @@ -15,6 +15,7 @@ PEERDIR( IF(PYTHON2) PEERDIR( + library/python/strings contrib/deprecated/python/enum34 ) ENDIF() diff --git a/library/python/testing/yatest_lib/ya.py b/library/python/testing/yatest_lib/ya.py index 89a82b55a6d..f2b3dcc411c 100644 --- a/library/python/testing/yatest_lib/ya.py +++ b/library/python/testing/yatest_lib/ya.py @@ -7,6 +7,7 @@ import six from .tools import to_str from .external import ExternalDataInfo + TESTING_OUT_DIR_NAME = "testing_out_stuff" # XXX import from test.const yatest_logger = logging.getLogger("ya.test") @@ -40,11 +41,15 @@ class Ya(object): gdb_path=None, data_root=None, env_file=None, + project_path=None, ): context_file_path = os.environ.get("YA_TEST_CONTEXT_FILE", None) if context_file_path: with open(context_file_path, 'r') as afile: test_context = json.load(afile) + if six.PY2: + from library.python.strings import ensure_str_deep + test_context = ensure_str_deep(test_context) context_runtime = test_context["runtime"] context_internal = test_context.get("internal", {}) context_build = test_context.get("build", {}) @@ -89,7 +94,7 @@ class Ya(object): self._test_params.update(dict(x.split('=', 1) for x in test_params)) self._test_params.update(context_runtime.get("test_params", {})) - self._context["project_path"] = context_runtime.get("project_path") + self._context["project_path"] = context_runtime.get("project_path") or project_path self._context["modulo"] = context_runtime.get("split_count", 1) self._context["modulo_index"] = context_runtime.get("split_index", 0) self._context["work_path"] = to_str(context_runtime.get("work_path")) |
