diff options
| author | Tom Christie | 2014-12-12 15:37:43 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-12-12 15:37:43 +0000 |
| commit | baaa356489dd51d7c68161db40e99cd59b1124c3 (patch) | |
| tree | 23dc5c4cbe1065580ff88ddd1bfa6dcda956ac68 /runtests.py | |
| parent | 5e6052811716a494e995a84c497579867ee6acaa (diff) | |
| parent | fd473aa905337908b41c9a1087967a19f0558f89 (diff) | |
| download | django-rest-framework-baaa356489dd51d7c68161db40e99cd59b1124c3.tar.bz2 | |
Merge master
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() |
