mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git.labs.intellij.net:idea/ultimate
This commit is contained in:
@@ -105,5 +105,7 @@ LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
cd "$PYCHARM_BIN_HOME"
|
||||
exec $PYCHARM_JDK/bin/java $JVM_ARGS $PYCHARM_MAIN_CLASS_NAME $*
|
||||
|
||||
while true ; do
|
||||
$PYCHARM_JDK/bin/java $JVM_ARGS -Djb.restart.code=88 $PYCHARM_MAIN_CLASS_NAME $*
|
||||
test $? -ne 88 && break
|
||||
done
|
||||
|
||||
@@ -119,7 +119,7 @@ class FunctionTestCase(TestBase):
|
||||
return func.__module__
|
||||
else:
|
||||
#TODO[kate]: get module of function in jython < 2.2
|
||||
return "Unknown module"
|
||||
return "Unknown module."
|
||||
|
||||
def _descriptors(self):
|
||||
"""In most cases, this is the function itself and no arguments. For
|
||||
@@ -161,7 +161,7 @@ class MethodTestCase(TestBase):
|
||||
return "%s.%s" % (func.__module__, self.cls.__name__)
|
||||
else:
|
||||
#TODO[kate]: get module of function in jython < 2.2
|
||||
return "Unknown module"
|
||||
return "Unknown module."
|
||||
|
||||
def __str__(self):
|
||||
func, arg = self._descriptors()
|
||||
|
||||
@@ -26,10 +26,6 @@ class TeamcityTestResult(TestResult):
|
||||
if test._testMethodName == "runTest":
|
||||
return str(test)
|
||||
return test._testMethodName
|
||||
elif hasattr(test, '__testMethodName'):
|
||||
if test.__testMethodName == "runTest":
|
||||
return str(test)
|
||||
return test.__testMethodName
|
||||
else:
|
||||
return str(test)
|
||||
|
||||
@@ -66,8 +62,12 @@ class TeamcityTestResult(TestResult):
|
||||
self.current_suite = suite
|
||||
self.messages.testSuiteStarted(strclass(self.current_suite), location="python_uttestid://" + strclass(self.current_suite))
|
||||
setattr(test, "startTime", datetime.datetime.now())
|
||||
self.messages.testStarted(self.getTestName(test), location="python_uttestid://" + str(test.id()))
|
||||
|
||||
if hasattr(test, "test"):
|
||||
id = test.id()[:test.id().find("..") + 1] + test.test.__name__
|
||||
else:
|
||||
id = test.id()
|
||||
self.messages.testStarted(self.getTestName(test), location="python_uttestid://" + str(id))
|
||||
|
||||
def stopTest(self, test):
|
||||
start = getattr(test, "startTime", datetime.datetime.now())
|
||||
d = datetime.datetime.now() - start
|
||||
|
||||
@@ -7,21 +7,39 @@ def fspath_to_url(fspath):
|
||||
return "file:///" + str(fspath).replace("\\", "/")
|
||||
|
||||
def pytest_collectstart(collector):
|
||||
messages.testSuiteStarted(collector.name, location=fspath_to_url(collector.fspath))
|
||||
if collector.name != "()":
|
||||
messages.testSuiteStarted(collector.name, location=fspath_to_url(collector.fspath))
|
||||
|
||||
def pytest_runtest_makereport(item, call):
|
||||
if call.when == "setup":
|
||||
fspath, lineno, msg = item.reportinfo()
|
||||
url = fspath_to_url(fspath)
|
||||
if lineno: url += ":" + str(lineno)
|
||||
messages.testStarted(item.name, location=url)
|
||||
# messages.testStarted(item.name, location=url)
|
||||
|
||||
def pytest_runtest_logreport(rep):
|
||||
if rep.failed:
|
||||
messages.testFailed(rep.item.name, details=rep.longrepr)
|
||||
elif rep.skipped:
|
||||
messages.testIgnored(rep.item.name)
|
||||
messages.testFinished(rep.item.name)
|
||||
def pytest_runtest_logreport(report):
|
||||
if report.item._args:
|
||||
name = report.item.function.__name__ + str(report.item._args)
|
||||
else:
|
||||
name = report.item.name
|
||||
if report.failed:
|
||||
messages.testFailed(name, details=report.longrepr)
|
||||
elif report.skipped:
|
||||
messages.testIgnored(name)
|
||||
messages.testFinished(name)
|
||||
|
||||
def pytest_collectreport(rep):
|
||||
messages.testSuiteFinished(rep.collector.name)
|
||||
def pytest_collectreport(report):
|
||||
if report.collector.name != "()":
|
||||
messages.testSuiteFinished(report.collector.name)
|
||||
|
||||
def pytest_itemstart(item, node=None):
|
||||
print item.__dict__
|
||||
if item._args:
|
||||
name = item.function.__name__ + str(item._args)
|
||||
else:
|
||||
name = item.name
|
||||
if hasattr(item, "_fslineno"):
|
||||
path = fspath_to_url(item._fslineno[0]) + ":" + str(item._fslineno[1] + 1)
|
||||
else:
|
||||
path = fspath_to_url(item.fspath)
|
||||
messages.testStarted(name, location=path)
|
||||
|
||||
@@ -100,6 +100,10 @@ public class PyTestRunConfiguration extends AbstractPythonRunConfiguration {
|
||||
if (runner.exists()) return runner.getPath();
|
||||
runner = new File(new File(bin_dir.getParentFile(), "scripts"), PY_TEST);
|
||||
if (runner.exists()) return runner.getPath();
|
||||
runner = new File(new File(bin_dir.getParentFile(), "local"), PY_TEST);
|
||||
if (runner.exists()) return runner.getPath();
|
||||
runner = new File(new File (new File(bin_dir.getParentFile(), "local"), "bin"), PY_TEST);
|
||||
if (runner.exists()) return runner.getPath();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user