summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorevasquez <eric.vasquez@calxeda.com>2013-08-27 08:51:03 -0500
committerevasquez <eric.vasquez@calxeda.com>2013-08-27 08:51:03 -0500
commitce806151e61c95a2fcf60cf83ebf3d222fa79fa5 (patch)
tree583d9d2509a66870c045aa5fbd9a2a44e1d4a810
parentc46008c3f6e842373521b1b18d6dc3af0a459841 (diff)
downloadcxmanage-ce806151e61c95a2fcf60cf83ebf3d222fa79fa5.tar.gz
nojira: fixed pylint warnings.
-rw-r--r--cxmanage_test/__init__.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/cxmanage_test/__init__.py b/cxmanage_test/__init__.py
index 2033b60..61bf116 100644
--- a/cxmanage_test/__init__.py
+++ b/cxmanage_test/__init__.py
@@ -1,3 +1,6 @@
+"""Calxeda: __init__.py"""
+
+
# Copyright (c) 2012, Calxeda Inc.
#
# All rights reserved.
@@ -29,8 +32,6 @@
# DAMAGE.
-""" Various objects used by tests """
-
import os
import random
import tempfile
@@ -39,17 +40,20 @@ from cxmanage_api.image import Image
def random_file(size):
""" Create a random file """
- contents = "".join([chr(random.randint(0, 255)) for a in range(size)])
- fd, filename = tempfile.mkstemp(prefix='cxmanage_test-')
- with os.fdopen(fd, "w") as f:
- f.write(contents)
+ contents = "".join([chr(random.randint(0, 255)) for _ in range(size)])
+ file_, filename = tempfile.mkstemp(prefix='cxmanage_test-')
+ with os.fdopen(file_, "w") as file_handle:
+ file_handle.write(contents)
+
return filename
class TestImage(Image):
+ """TestImage Class."""
def verify(self):
return True
-class TestSensor:
+# pylint: disable=R0903
+class TestSensor(object):
""" Sensor result from bmc/target """
def __init__(self, sensor_name, sensor_reading):
self.sensor_name = sensor_name