aboutsummaryrefslogtreecommitdiffstats
path: root/runtests.py
diff options
context:
space:
mode:
authorTymur Maryokhin2014-12-05 00:29:28 +0100
committerTymur Maryokhin2014-12-05 00:29:28 +0100
commitd9930181ee157f51e2fcea33a3af5ea397647324 (patch)
tree06e65d1f2a34b70c912dfa3e696611ca0cc00a65 /runtests.py
parent45dc44b2038f5533a472b015c45200b5d1ca6052 (diff)
downloaddjango-rest-framework-d9930181ee157f51e2fcea33a3af5ea397647324.tar.bz2
Removed unused imports, pep8 fixes, typo fixes
Diffstat (limited to 'runtests.py')
-rwxr-xr-xruntests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtests.py b/runtests.py
index 4da05ac3..abf15a62 100755
--- a/runtests.py
+++ b/runtests.py
@@ -17,24 +17,29 @@ FLAKE8_ARGS = ['rest_framework', 'tests', '--ignore=E501']
sys.path.append(os.path.dirname(__file__))
+
def exit_on_failure(ret, message=None):
if ret:
sys.exit(ret)
+
def flake8_main(args):
print('Running flake8 code linting')
ret = subprocess.call(['flake8'] + args)
print('flake8 failed' if ret else 'flake8 passed')
return ret
+
def split_class_and_function(string):
class_string, function_string = string.split('.', 1)
return "%s and %s" % (class_string, function_string)
+
def is_function(string):
# `True` if it looks like a test function is included in the string.
return string.startswith('test_') or '.test_' in string
+
def is_class(string):
# `True` if first character is uppercase - assume it's a class name.
return string[0] == string[0].upper()