Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: tools/telemetry/telemetry/user_story/user_story_runner.py

Issue 1108993004: Move user_story.shared_user_story_state to story.shared_state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_user_story
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/user_story/user_story_runner.py
diff --git a/tools/telemetry/telemetry/user_story/user_story_runner.py b/tools/telemetry/telemetry/user_story/user_story_runner.py
index 112d6eaba887fe3ebee485ece810e07201e76ceb..a69b888fc76a5a6e36ac786fd4d2fca13abde8b3 100644
--- a/tools/telemetry/telemetry/user_story/user_story_runner.py
+++ b/tools/telemetry/telemetry/user_story/user_story_runner.py
@@ -112,27 +112,27 @@ def _RunUserStoryAndProcessErrorIfNeeded(expectations, user_story, results,
msg='Exception from DidRunUserStory: ')
class UserStoryGroup(object):
- def __init__(self, shared_user_story_state_class):
- self._shared_user_story_state_class = shared_user_story_state_class
+ def __init__(self, shared_state_class):
+ self._shared_state_class = shared_state_class
self._user_stories = []
@property
- def shared_user_story_state_class(self):
- return self._shared_user_story_state_class
+ def shared_state_class(self):
+ return self._shared_state_class
@property
def user_stories(self):
return self._user_stories
def AddUserStory(self, user_story):
- assert (user_story.shared_user_story_state_class is
- self._shared_user_story_state_class)
+ assert (user_story.shared_state_class is
+ self._shared_state_class)
self._user_stories.append(user_story)
def StoriesGroupedByStateClass(user_story_set, allow_multiple_groups):
""" Returns a list of user story groups which each contains user stories with
- the same shared_user_story_state_class.
+ the same shared_state_class.
Example:
Assume A1, A2, A3 are user stories with same shared user story class, and
@@ -148,20 +148,20 @@ def StoriesGroupedByStateClass(user_story_set, allow_multiple_groups):
"""
user_story_groups = []
user_story_groups.append(
- UserStoryGroup(user_story_set[0].shared_user_story_state_class))
+ UserStoryGroup(user_story_set[0].shared_state_class))
for user_story in user_story_set:
- if (user_story.shared_user_story_state_class is not
- user_story_groups[-1].shared_user_story_state_class):
+ if (user_story.shared_state_class is not
+ user_story_groups[-1].shared_state_class):
if not allow_multiple_groups:
raise ValueError('This UserStorySet is only allowed to have one '
- 'SharedUserStoryState but contains the following '
- 'SharedUserStoryState classes: %s, %s.\n Either '
- 'remove the extra SharedUserStoryStates or override '
+ 'SharedState but contains the following '
+ 'SharedState classes: %s, %s.\n Either '
+ 'remove the extra SharedStates or override '
'allow_mixed_story_states.' % (
- user_story_groups[-1].shared_user_story_state_class,
- user_story.shared_user_story_state_class))
+ user_story_groups[-1].shared_state_class,
+ user_story.shared_state_class))
user_story_groups.append(
- UserStoryGroup(user_story.shared_user_story_state_class))
+ UserStoryGroup(user_story.shared_state_class))
user_story_groups[-1].AddUserStory(user_story)
return user_story_groups
@@ -208,7 +208,7 @@ def Run(test, user_story_set, expectations, finder_options, results,
for user_story in group.user_stories:
for _ in xrange(finder_options.page_repeat):
if not state:
- state = group.shared_user_story_state_class(
+ state = group.shared_state_class(
test, finder_options, user_story_set)
results.WillRunPage(user_story)
try:

Powered by Google App Engine
This is Rietveld 408576698