[Piglit] [PATCH 6/9] rename core.loadTestResults to core.load_results
Dylan Baker
baker.dylan.c at gmail.com
Tue Oct 15 12:13:28 CEST 2013
This is in keeping with PEP8 sytle guidelines for function names:
"Function names should be lowercase, with words separated by underscores
as necessary to improve readability."
Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
framework/core.py | 2 +-
framework/summary.py | 2 +-
piglit-merge-results.py | 4 ++--
piglit-run.py | 2 +-
piglit-summary-junit.py | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/framework/core.py b/framework/core.py
index e00392d..44e5307 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -609,7 +609,7 @@ def loadTestProfile(filename):
return ns['profile']
-def loadTestResults(filename):
+def load_results(filename):
""" Loader function for TestrunResult class
This function takes a single argument of a results file.
diff --git a/framework/summary.py b/framework/summary.py
index 30e1fc3..a7d9902 100644
--- a/framework/summary.py
+++ b/framework/summary.py
@@ -339,7 +339,7 @@ class Summary:
# Create a Result object for each piglit result and append it to the
# results list
- self.results = [core.loadTestResults(i) for i in resultfiles]
+ self.results = [core.load_results(i) for i in resultfiles]
self.status = {}
self.fractions = {}
diff --git a/piglit-merge-results.py b/piglit-merge-results.py
index ec47bca..e78a5d0 100755
--- a/piglit-merge-results.py
+++ b/piglit-merge-results.py
@@ -38,10 +38,10 @@ def main():
help="Space seperated list of results files")
args = parser.parse_args()
- combined = core.loadTestResults(args.results.pop(0))
+ combined = core.load_results(args.results.pop(0))
for resultsDir in args.results:
- results = core.loadTestResults(resultsDir)
+ results = core.load_results(resultsDir)
for testname, result in results.tests.items():
combined.tests[testname] = result
diff --git a/piglit-run.py b/piglit-run.py
index 4c87187..d27581a 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -97,7 +97,7 @@ def main():
# in the specified path
if args.resume is True:
# Load settings from the old results JSON
- old_results = core.loadTestResults(resultsDir)
+ old_results = core.load_results(resultsDir)
profileFilename = old_results.options['profile']
# Changing the args to the old args allows us to set them
diff --git a/piglit-summary-junit.py b/piglit-summary-junit.py
index d9e4b9c..e60514e 100755
--- a/piglit-summary-junit.py
+++ b/piglit-summary-junit.py
@@ -267,7 +267,7 @@ class Writer:
self.path = []
def write(self, arg):
- results = [core.loadTestResults(arg)]
+ results = [core.load_results(arg)]
summary = Summary(results)
self.report.start()
--
1.8.1.5
More information about the Piglit
mailing list