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
|
export LD_LIBRARY_PATH
|
||||||
|
|
||||||
cd "$PYCHARM_BIN_HOME"
|
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__
|
return func.__module__
|
||||||
else:
|
else:
|
||||||
#TODO[kate]: get module of function in jython < 2.2
|
#TODO[kate]: get module of function in jython < 2.2
|
||||||
return "Unknown module"
|
return "Unknown module."
|
||||||
|
|
||||||
def _descriptors(self):
|
def _descriptors(self):
|
||||||
"""In most cases, this is the function itself and no arguments. For
|
"""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__)
|
return "%s.%s" % (func.__module__, self.cls.__name__)
|
||||||
else:
|
else:
|
||||||
#TODO[kate]: get module of function in jython < 2.2
|
#TODO[kate]: get module of function in jython < 2.2
|
||||||
return "Unknown module"
|
return "Unknown module."
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
func, arg = self._descriptors()
|
func, arg = self._descriptors()
|
||||||
|
|||||||
@@ -26,10 +26,6 @@ class TeamcityTestResult(TestResult):
|
|||||||
if test._testMethodName == "runTest":
|
if test._testMethodName == "runTest":
|
||||||
return str(test)
|
return str(test)
|
||||||
return test._testMethodName
|
return test._testMethodName
|
||||||
elif hasattr(test, '__testMethodName'):
|
|
||||||
if test.__testMethodName == "runTest":
|
|
||||||
return str(test)
|
|
||||||
return test.__testMethodName
|
|
||||||
else:
|
else:
|
||||||
return str(test)
|
return str(test)
|
||||||
|
|
||||||
@@ -66,8 +62,12 @@ class TeamcityTestResult(TestResult):
|
|||||||
self.current_suite = suite
|
self.current_suite = suite
|
||||||
self.messages.testSuiteStarted(strclass(self.current_suite), location="python_uttestid://" + strclass(self.current_suite))
|
self.messages.testSuiteStarted(strclass(self.current_suite), location="python_uttestid://" + strclass(self.current_suite))
|
||||||
setattr(test, "startTime", datetime.datetime.now())
|
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):
|
def stopTest(self, test):
|
||||||
start = getattr(test, "startTime", datetime.datetime.now())
|
start = getattr(test, "startTime", datetime.datetime.now())
|
||||||
d = datetime.datetime.now() - start
|
d = datetime.datetime.now() - start
|
||||||
|
|||||||
@@ -7,21 +7,39 @@ def fspath_to_url(fspath):
|
|||||||
return "file:///" + str(fspath).replace("\\", "/")
|
return "file:///" + str(fspath).replace("\\", "/")
|
||||||
|
|
||||||
def pytest_collectstart(collector):
|
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):
|
def pytest_runtest_makereport(item, call):
|
||||||
if call.when == "setup":
|
if call.when == "setup":
|
||||||
fspath, lineno, msg = item.reportinfo()
|
fspath, lineno, msg = item.reportinfo()
|
||||||
url = fspath_to_url(fspath)
|
url = fspath_to_url(fspath)
|
||||||
if lineno: url += ":" + str(lineno)
|
if lineno: url += ":" + str(lineno)
|
||||||
messages.testStarted(item.name, location=url)
|
# messages.testStarted(item.name, location=url)
|
||||||
|
|
||||||
def pytest_runtest_logreport(rep):
|
def pytest_runtest_logreport(report):
|
||||||
if rep.failed:
|
if report.item._args:
|
||||||
messages.testFailed(rep.item.name, details=rep.longrepr)
|
name = report.item.function.__name__ + str(report.item._args)
|
||||||
elif rep.skipped:
|
else:
|
||||||
messages.testIgnored(rep.item.name)
|
name = report.item.name
|
||||||
messages.testFinished(rep.item.name)
|
if report.failed:
|
||||||
|
messages.testFailed(name, details=report.longrepr)
|
||||||
|
elif report.skipped:
|
||||||
|
messages.testIgnored(name)
|
||||||
|
messages.testFinished(name)
|
||||||
|
|
||||||
def pytest_collectreport(rep):
|
def pytest_collectreport(report):
|
||||||
messages.testSuiteFinished(rep.collector.name)
|
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();
|
if (runner.exists()) return runner.getPath();
|
||||||
runner = new File(new File(bin_dir.getParentFile(), "scripts"), PY_TEST);
|
runner = new File(new File(bin_dir.getParentFile(), "scripts"), PY_TEST);
|
||||||
if (runner.exists()) return runner.getPath();
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user