diff options
author | Vinson Lee <vlee@vmware.com> | 2009-08-23 00:32:29 -0700 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2009-08-23 00:32:29 -0700 |
commit | 491a658b97bf949600726b620349a302aafa5fe3 (patch) | |
tree | b3f65b3f94b76d2e0a8f28e3e268bc4af04109dc /framework | |
parent | 4f9b764c77251e152845513bbaeffc83bf487708 (diff) |
Python: Add spaces after commas.
Diffstat (limited to 'framework')
-rw-r--r-- | framework/core.py | 20 | ||||
-rw-r--r-- | framework/exectest.py | 2 | ||||
-rw-r--r-- | framework/summary.py | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/framework/core.py b/framework/core.py index 8e1631f72..ff6a9248d 100644 --- a/framework/core.py +++ b/framework/core.py @@ -103,10 +103,10 @@ class TestResult(dict): 'dict': dict.__repr__(self) } - def allTestResults(self,name): + def allTestResults(self, name): return {name: self} - def write(self,file,path): + def write(self, file, path): print >>file, "@test: " + encode(path) for k in self: v = self[k] @@ -142,7 +142,7 @@ class GroupResult(dict): def allTestResults(self, groupName): collection = {} - for name,sub in self.items(): + for name, sub in self.items(): subfullname = name if len(groupName) > 0: subfullname = groupName + '/' + subfullname @@ -150,7 +150,7 @@ class GroupResult(dict): return collection def write(self, file, groupName): - for name,sub in self.items(): + for name, sub in self.items(): subfullname = name if len(groupName) > 0: subfullname = groupName + '/' + subfullname @@ -237,7 +237,7 @@ class TestrunResult: stack[-1](line[0:-1]) linenr = linenr + 1 - def parseDir(self,path,PreferSummary): + def parseDir(self, path, PreferSummary): main = None filelist = [path + '/main', path + '/summary'] if PreferSummary: @@ -264,10 +264,10 @@ class Environment: self.execute = True self.filter = [] - def run(self,command): + def run(self, command): p = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - (stdout,stderr) = p.communicate(); + (stdout, stderr) = p.communicate(); return stderr+stdout def collectData(self): @@ -316,7 +316,7 @@ class Test: print " result: %(result)s" % { 'result': result['result'] } - result.write(env.file,path) + result.write(env.file, path) if Test.sleep: time.sleep(Test.sleep) else: @@ -382,12 +382,12 @@ def loadTestProfile(filename): traceback.print_exc() raise Exception('Could not read tests profile') -def loadTestResults(path,PreferSummary=False): +def loadTestResults(path, PreferSummary=False): try: mode = os.stat(path)[stat.ST_MODE] testrun = TestrunResult() if stat.S_ISDIR(mode): - testrun.parseDir(path,PreferSummary) + testrun.parseDir(path, PreferSummary) else: file = open(path, 'r') testrun.parseFile(file) diff --git a/framework/exectest.py b/framework/exectest.py index 8d6a3bcca..d1c9d62f8 100644 --- a/framework/exectest.py +++ b/framework/exectest.py @@ -44,7 +44,7 @@ class PlainExecTest(Test): stderr=subprocess.PIPE, universal_newlines=True ) - out,err = proc.communicate() + out, err = proc.communicate() outlines = out.split('\n') outpiglit = map(lambda s: s[7:], filter(lambda s: s.startswith('PIGLIT:'), outlines)) diff --git a/framework/summary.py b/framework/summary.py index 18bfc8b33..08dd13b62 100644 --- a/framework/summary.py +++ b/framework/summary.py @@ -28,13 +28,13 @@ import core ##### Vector indicating the number of subtests that have passed/failed/etc. ############################################################################# class PassVector: - def __init__(self,p,w,f,s): + def __init__(self, p, w, f, s): self.passnr = p self.warnnr = w self.failnr = f self.skipnr = s - def add(self,o): + def add(self, o): self.passnr += o.passnr self.warnnr += o.warnnr self.failnr += o.failnr @@ -106,7 +106,7 @@ results is an array of GroupResult instances, one per testrun # Perform some initial annotations for j in range(len(self.results)): result = self.results[j] - result.passvector = PassVector(0,0,0,0) + result.passvector = PassVector(0, 0, 0, 0) result.testrun = self.summary.testruns[j] # Collect, create and annotate children |