diff options
author | Yuheng Long <yuhenglong@google.com> | 2013-08-06 15:30:38 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-08-07 15:24:58 -0700 |
commit | c1fb0f1051208907df137371f3d100132f19cf10 (patch) | |
tree | e10f826b6fa029d962456237bb5c173f930cef85 /bestflags/generation_test.py | |
parent | f1f606e1c5b559aa264518a89595afd787f12e8a (diff) | |
download | toolchain-utils-c1fb0f1051208907df137371f3d100132f19cf10.tar.gz |
Add underscore to separate words in variables.
BUG=None
TEST=unit testings for the pipeline stage, pipeline workers, generation,
steering, task, flag and hill climbing.
Change-Id: I0efdf5e7ad85b42f37519b6e0cebea8352bbf563
Reviewed-on: https://gerrit-int.chromium.org/42430
Reviewed-by: Simon Que <sque@google.com>
Tested-by: Yuheng Long <yuhenglong@google.com>
Commit-Queue: Yuheng Long <yuhenglong@google.com>
Diffstat (limited to 'bestflags/generation_test.py')
-rw-r--r-- | bestflags/generation_test.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bestflags/generation_test.py b/bestflags/generation_test.py index 1249f7dd..cdb4b7ab 100644 --- a/bestflags/generation_test.py +++ b/bestflags/generation_test.py @@ -17,13 +17,13 @@ from mock_task import IdentifierMockTask # Pick an integer at random. -TESTSTAGE = -125 +TEST_STAGE = -125 # The number of tasks to be put in a generation to be tested. -NUMTASKS = 20 +NUM_TASKS = 20 # The stride of permutation used to shuffle the input list of tasks. Should be -# relatively prime with NUMTASKS. +# relatively prime with NUM_TASKS. STRIDE = 7 @@ -45,15 +45,15 @@ class GenerationTest(unittest.TestCase): random.seed(0) - testing_tasks = range(NUMTASKS) + testing_tasks = range(NUM_TASKS) # The tasks for the generation to be tested. - generation_tasks = [IdentifierMockTask(TESTSTAGE, t) for t in testing_tasks] + tasks = [IdentifierMockTask(TEST_STAGE, t) for t in testing_tasks] - gen = Generation(set(generation_tasks), None) + gen = Generation(set(tasks), None) # Permute the list. - permutation = [(t * STRIDE) % NUMTASKS for t in range(NUMTASKS)] + permutation = [(t * STRIDE) % NUM_TASKS for t in range(NUM_TASKS)] permuted_tasks = [testing_tasks[index] for index in permutation] # The Done method of the Generation should return false before all the tasks @@ -63,7 +63,7 @@ class GenerationTest(unittest.TestCase): # Mark a task as done by calling the UpdateTask method of the generation. # Send the generation the task as well as its results. - gen.UpdateTask(IdentifierMockTask(TESTSTAGE, testing_task)) + gen.UpdateTask(IdentifierMockTask(TEST_STAGE, testing_task)) # The Done method should return true after all the tasks in the permuted # list is set. |