diff options
| author | Tymur Maryokhin | 2014-12-05 00:29:28 +0100 |
|---|---|---|
| committer | Tymur Maryokhin | 2014-12-05 00:29:28 +0100 |
| commit | d9930181ee157f51e2fcea33a3af5ea397647324 (patch) | |
| tree | 06e65d1f2a34b70c912dfa3e696611ca0cc00a65 /runtests.py | |
| parent | 45dc44b2038f5533a472b015c45200b5d1ca6052 (diff) | |
| download | django-rest-framework-d9930181ee157f51e2fcea33a3af5ea397647324.tar.bz2 | |
Removed unused imports, pep8 fixes, typo fixes
Diffstat (limited to 'runtests.py')
| -rwxr-xr-x | runtests.py | 5 |
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() |
