diff options
author | Tor Norbye <tnorbye@google.com> | 2014-08-21 00:31:02 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-16 04:55:08 +0000 |
commit | 9cde0e3c015174898df8b8f3672185941fad4786 (patch) | |
tree | 80a55c7b59c38377216daaada4e8bc47b69ceb9a /python/helpers/pycharm/_bdd_utils.py | |
parent | 3b37877a2561bf9fbe072253a18688807d523505 (diff) | |
parent | d76e3920c56d37c942092b7dca20fcaded81c0a5 (diff) | |
download | idea-9cde0e3c015174898df8b8f3672185941fad4786.tar.gz |
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'python/helpers/pycharm/_bdd_utils.py')
-rw-r--r-- | python/helpers/pycharm/_bdd_utils.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/python/helpers/pycharm/_bdd_utils.py b/python/helpers/pycharm/_bdd_utils.py index 0c92532b516c..300feb286051 100644 --- a/python/helpers/pycharm/_bdd_utils.py +++ b/python/helpers/pycharm/_bdd_utils.py @@ -27,7 +27,7 @@ def get_path_by_args(arguments): assert os.path.exists(what_to_run), "{} does not exist".format(what_to_run) if os.path.isfile(what_to_run): - base_dir = os.path.dirname(what_to_run) # User may point to the file directly + base_dir = os.path.dirname(what_to_run) # User may point to the file directly return base_dir, what_to_run @@ -62,8 +62,11 @@ class BddRunner(object): """" Runs runner. To be called right after constructor. """ - self.tc_messages.testCount(self._get_number_of_tests()) + number_of_tests = self._get_number_of_tests() + self.tc_messages.testCount(number_of_tests) self.tc_messages.testMatrixEntered() + if number_of_tests == 0: # Nothing to run, so no need to report even feature/scenario start. (See PY-13623) + return self._run_tests() def __gen_location(self, location): @@ -175,9 +178,9 @@ class BddRunner(object): num_of_steps = 0 for feature in self._get_features_to_run(): if feature.background: - num_of_steps += len(feature.background.steps) * len(feature.scenarios) + num_of_steps += len(list(feature.background.steps)) * len(list(feature.scenarios)) for scenario in feature.scenarios: - num_of_steps += len(scenario.steps) + num_of_steps += len(list(scenario.steps)) return num_of_steps @abc.abstractmethod |