summaryrefslogtreecommitdiff
path: root/cxmanage_test/tasks_test.py
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2013-11-19 17:06:33 +0000
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2013-11-19 17:06:33 +0000
commit54116d3c486ed7aa49f284e4cad9e6e7c293bea6 (patch)
treefa32a75ebba262def85af97cc34a7db69bc69034 /cxmanage_test/tasks_test.py
parent7087e92d40310d9bb6c8b4a6bb1baf7c3b73bee7 (diff)
parent4da2f9c7eaa95ebf357eeca3a497b6a206675ef8 (diff)
downloadcxmanage-54116d3c486ed7aa49f284e4cad9e6e7c293bea6.tar.gz
Merge tag 'v0.10.2' into baserock/morphbaserock/morph
v0.10 post-release tag for pyinstaller support
Diffstat (limited to 'cxmanage_test/tasks_test.py')
-rw-r--r--cxmanage_test/tasks_test.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/cxmanage_test/tasks_test.py b/cxmanage_test/tasks_test.py
index a936b06..2d7b9a3 100644
--- a/cxmanage_test/tasks_test.py
+++ b/cxmanage_test/tasks_test.py
@@ -1,4 +1,7 @@
-# Copyright (c) 2012, Calxeda Inc.
+"""Calxeda: task_test.py"""
+
+
+# Copyright (c) 2012-2013, Calxeda Inc.
#
# All rights reserved.
#
@@ -28,16 +31,21 @@
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
+
import unittest
import time
from cxmanage_api.tasks import TaskQueue
+
+# pylint: disable=R0904
class TaskTest(unittest.TestCase):
+ """Test for the TaskQueue Class."""
+
def test_task_queue(self):
""" Test the task queue """
task_queue = TaskQueue()
- counters = [Counter() for x in xrange(128)]
+ counters = [Counter() for _ in xrange(128)]
tasks = [task_queue.put(counters[i].add, i) for i in xrange(128)]
for task in tasks:
@@ -61,6 +69,8 @@ class TaskTest(unittest.TestCase):
self.assertGreaterEqual(finish - start, 2.0)
+
+# pylint: disable=R0903
class Counter(object):
""" Simple counter object for testing purposes """
def __init__(self):