diff options
author | prettyboy <prettyboy@yandex-team.com> | 2023-01-20 09:21:05 +0300 |
---|---|---|
committer | prettyboy <prettyboy@yandex-team.com> | 2023-01-20 09:21:05 +0300 |
commit | 284f4572c3f7ace1bfe951c3242e0676e29d3690 (patch) | |
tree | 343664963a1e7a246457b9d563d79cd956d182f2 /library/python/pytest/yatest_tools.py | |
parent | 2db3d52777ce3feefdfc7ee592b95935ed59452a (diff) | |
download | ydb-284f4572c3f7ace1bfe951c3242e0676e29d3690.tar.gz |
[library/python/pytest/yatest_tools] Fixed unify_path for path that fully matches module name
Diffstat (limited to 'library/python/pytest/yatest_tools.py')
-rw-r--r-- | library/python/pytest/yatest_tools.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/python/pytest/yatest_tools.py b/library/python/pytest/yatest_tools.py index 723be996ed..bdcd0cc0b1 100644 --- a/library/python/pytest/yatest_tools.py +++ b/library/python/pytest/yatest_tools.py @@ -366,7 +366,9 @@ def _unify_path(path): assert path.endswith(py_ext), path parts = path[:-len(py_ext)].split(SEP) - for p in reversed(parts): + # Use SEP as trailing terminator to make an extra step + # and find a proper match when parts is a full matching path + for p in reversed([SEP] + parts): if p in node: node = node[p] res.append(p) |