about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@hut.pm>2018-01-28 16:32:58 +0100
committerhut <hut@hut.pm>2018-01-28 16:32:58 +0100
commit1c44d556112c0bacf875fc80133d00097f2336fb (patch)
treeaa9f3669b80ca6b276e4ff9aca1408e24c1c4ae9
parenta410d09312402d158322f324715d16a9f08caa5f (diff)
downloadranger-1c44d556112c0bacf875fc80133d00097f2336fb.tar.gz
fix tests
-rwxr-xr-xtests/manpage_completion_test.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/manpage_completion_test.py b/tests/manpage_completion_test.py
index bfc8fa22..a1dd06e0 100755
--- a/tests/manpage_completion_test.py
+++ b/tests/manpage_completion_test.py
@@ -9,7 +9,7 @@ import sys
 sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
 
 
-def test(boolean, errormessage):
+def report(boolean, errormessage):
     if not boolean:
         sys.stderr.write('TEST FAILURE: ')
         sys.stderr.write(errormessage)
@@ -40,15 +40,16 @@ def get_sections():
     return sections
 
 
-def check_if_settings_are_documented():
+def find_undocumented_settings():
     from ranger.container.settings import ALLOWED_SETTINGS
     sections = get_sections()
     setting_section = sections['SETTINGS']
     matcher_pattern = r'^=item [\w\d_, ]*{setting}'
     for setting in ALLOWED_SETTINGS:
         matcher = re.compile(matcher_pattern.format(setting=setting), re.M)
-        test(matcher.search(setting_section), ('Setting %s is not documented in the man page!' % setting))
+        report(matcher.search(setting_section),
+               ('Setting %s is not documented in the man page!' % setting))
 
 
 if __name__ == '__main__':
-    check_if_settings_are_documented()
+    find_undocumented_settings()