mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-29371: Sync with teamcity(#176): purge tests on "scenario" call
When some scenarios are skipped due to tags, behave reports their steps but never reports "match" for them. So, on next "match" stale (ignored actually) step is left on stack and used instead of real one
This commit is contained in:
@@ -55,6 +55,7 @@ class TeamcityFormatter(Formatter):
|
||||
assert isinstance(scenario, Scenario)
|
||||
self.__scenario = scenario
|
||||
self.__scenario_opened = False
|
||||
self.__steps.clear()
|
||||
|
||||
def step(self, step):
|
||||
assert isinstance(step, Step)
|
||||
|
||||
@@ -22,9 +22,10 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Provides high level API for number of tests calculations in {@link SMTestProxy}
|
||||
*
|
||||
* @author Ilya.Kazakevich
|
||||
*/
|
||||
final class SMRootTestsCounter {
|
||||
public final class SMRootTestsCounter {
|
||||
/**
|
||||
* Filter to exclude suites
|
||||
*/
|
||||
@@ -41,7 +42,7 @@ final class SMRootTestsCounter {
|
||||
/**
|
||||
* @param testProxy proxy to wrap
|
||||
*/
|
||||
SMRootTestsCounter(@NotNull final SMRootTestProxy testProxy) {
|
||||
public SMRootTestsCounter(@NotNull final SMRootTestProxy testProxy) {
|
||||
myTestProxy = testProxy;
|
||||
}
|
||||
|
||||
@@ -53,18 +54,18 @@ final class SMRootTestsCounter {
|
||||
/**
|
||||
* @return number of failed tests
|
||||
*/
|
||||
int getFailedTestsCount() {
|
||||
public int getFailedTestsCount() {
|
||||
return myTestProxy.collectChildren(NOT_SUIT.and(Filter.FAILED_OR_INTERRUPTED)).size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return number of passed tests
|
||||
*/
|
||||
int getPassedTestsCount() {
|
||||
public int getPassedTestsCount() {
|
||||
return myTestProxy.collectChildren(NOT_SUIT.and(Filter.PASSED)).size();
|
||||
}
|
||||
|
||||
int getIgnoredTestsCount() {
|
||||
public int getIgnoredTestsCount() {
|
||||
return myTestProxy.collectChildren(NOT_SUIT.and(Filter.IGNORED)).size();
|
||||
}
|
||||
|
||||
@@ -72,7 +73,7 @@ final class SMRootTestsCounter {
|
||||
/**
|
||||
* @return number of all tests
|
||||
*/
|
||||
int getAllTestsCount() {
|
||||
public int getAllTestsCount() {
|
||||
return myTestProxy.collectChildren(NOT_SUIT).size();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user