summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <baker.dylan.c@gmail.com>2014-04-23 17:19:42 -0700
committerDylan Baker <baker.dylan.c@gmail.com>2014-05-13 16:06:49 -0700
commit69eb5118eb47a62f60c80d00ed061698d4822a6b (patch)
tree8653694e912c874583bb93ccd793b4ce56852715
parent16eb2fafebcadc70f32733ebd9c1dfa7e207c5ea (diff)
framework: rename profile.loadTestProfile to profile.load_test_profile
This is a more pythonic name for this method. This patch was created with the following shell command: find . -name '*py' | \ xargs sed -i -e 's!loadTestProfile!load_test_profile!g' Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
-rw-r--r--framework/profile.py8
-rw-r--r--framework/tests/profile_tests.py8
-rwxr-xr-xpiglit-print-commands.py2
3 files changed, 9 insertions, 9 deletions
diff --git a/framework/profile.py b/framework/profile.py
index 4777c6061..affd4b676 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -39,7 +39,7 @@ import framework.exectest
__all__ = [
'TestProfile',
- 'loadTestProfile',
+ 'load_test_profile',
'merge_test_profiles'
]
@@ -259,7 +259,7 @@ class TestProfile(object):
self.test_list.update(profile.test_list)
-def loadTestProfile(filename):
+def load_test_profile(filename):
""" Load a python module and return it's profile attribute
All of the python test files provide a profile attribute which is a
@@ -295,7 +295,7 @@ def merge_test_profiles(profiles):
profiles -- a list of one or more paths to profile files.
"""
- profile = loadTestProfile(profiles.pop())
+ profile = load_test_profile(profiles.pop())
for p in profiles:
- profile.update(TestProfile(p))
+ profile.update(load_test_profile(p))
return profile
diff --git a/framework/tests/profile_tests.py b/framework/tests/profile_tests.py
index 94354adb2..de4730f4a 100644
--- a/framework/tests/profile_tests.py
+++ b/framework/tests/profile_tests.py
@@ -38,17 +38,17 @@ def test_initialize_testprofile():
def test_load_test_profile_no_profile():
""" Loading a module with no profile name exits
- Beacuse loadTestProfile uses test.{} to load a module we need a module in
+ Beacuse load_test_profile uses test.{} to load a module we need a module in
tests that doesn't have a profile attribute. The only module that currently
meets that requirement is __init__.py
"""
- profile.loadTestProfile('__init__')
+ profile.load_test_profile('__init__')
def test_load_test_profile_returns():
- """ loadTestProfile returns a TestProfile instance """
- profile_ = profile.loadTestProfile('sanity')
+ """ load_test_profile returns a TestProfile instance """
+ profile_ = profile.load_test_profile('sanity')
assert isinstance(profile_, profile.TestProfile)
diff --git a/piglit-print-commands.py b/piglit-print-commands.py
index 547d964dd..757fe3a67 100755
--- a/piglit-print-commands.py
+++ b/piglit-print-commands.py
@@ -61,7 +61,7 @@ def main():
piglit_dir = path.dirname(path.realpath(sys.argv[0]))
os.chdir(piglit_dir)
- profile = framework.profile.loadTestProfile(args.testProfile)
+ profile = framework.profile.load_test_profile(args.testProfile)
def getCommand(test):
command = ''