mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-56529: Fix test runner replacing "." in test parameter with "::"
GitOrigin-RevId: ab6a6e91d19e1279e191c474cf20247099c5cdf4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
df4a4c67b7
commit
fddc5e1b79
@@ -289,10 +289,10 @@ def jb_patch_targets(targets, fs_glue, old_python_glue, new_python_glue, fs_to_p
|
||||
|
||||
def _patch_target(target):
|
||||
# /path/foo.py::parts.to.python
|
||||
match = re.match("^(:?(.+)[.]py::)?(.+)$", target)
|
||||
match = re.match("^(:?(.+)[.]py::)?([^\\[]+)(.*)$", target)
|
||||
assert match, "unexpected string: {0}".format(target)
|
||||
fs_part = match.group(2)
|
||||
python_part = match.group(3).replace(old_python_glue, new_python_glue)
|
||||
python_part = match.group(3).replace(old_python_glue, new_python_glue) + match.group(4)
|
||||
if python_parts_action is not None:
|
||||
python_part = python_parts_action(fs_part, python_part)
|
||||
if fs_part:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
@pytest.mark.parametrize("test_input,expected", [
|
||||
("three plus file", 8),
|
||||
("three.plus file", 8),
|
||||
("(2)+(4)", 6),
|
||||
(" six times nine.", 42),
|
||||
])
|
||||
|
||||
@@ -295,7 +295,7 @@ public final class PythonPyTestingTest extends PyEnvTestCase {
|
||||
"[root](-)\n" +
|
||||
".test_pytest_parametrized(-)\n" +
|
||||
"..test_eval(-)\n" +
|
||||
"...(three plus file-8)(-)\n" +
|
||||
"...(three_plus file-8)(-)\n" +
|
||||
((runner.getCurrentRerunStep() == 0) ? "...((2)+(4)-6)(+)\n" : "") +
|
||||
"...( six times nine_-42)(-)\n", runner.getFormattedTestTree());
|
||||
}
|
||||
@@ -326,7 +326,7 @@ public final class PythonPyTestingTest extends PyEnvTestCase {
|
||||
else {
|
||||
configuration.setAdditionalArguments("--debug");
|
||||
}
|
||||
configuration.setMetaInfo("test_eval[three plus file-8]");
|
||||
configuration.setMetaInfo("test_eval[three.plus file-8]");
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -342,7 +342,7 @@ public final class PythonPyTestingTest extends PyEnvTestCase {
|
||||
[root](-)
|
||||
.test_pytest_parametrized(-)
|
||||
..test_eval(-)
|
||||
...(three plus file-8)(-)
|
||||
...(three_plus file-8)(-)
|
||||
""", runner.getFormattedTestTree());
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user