##// END OF EJS Templates
tests: added special no-newline test name generator
marcink -
r1720:a62461f9 default
parent child Browse files
Show More
@@ -56,7 +56,7 b' log = logging.getLogger(__name__)'
56 56 __all__ = [
57 57 'get_new_dir', 'TestController', 'SkipTest',
58 58 'url', 'link_to', 'ldap_lib_installed', 'clear_all_caches',
59 'assert_session_flash', 'login_user',
59 'assert_session_flash', 'login_user', 'no_newline_id_generator',
60 60 'TESTS_TMP_PATH', 'HG_REPO', 'GIT_REPO', 'SVN_REPO',
61 61 'NEW_HG_REPO', 'NEW_GIT_REPO',
62 62 'HG_FORK', 'GIT_FORK', 'TEST_USER_ADMIN_LOGIN', 'TEST_USER_ADMIN_PASS',
@@ -249,3 +249,17 b' def assert_session_flash_is_empty(respon'
249 249 msg = 'flash messages are present in session:%s' % \
250 250 response.session['flash'][0]
251 251 pytest.fail(safe_str(msg))
252
253
254 def no_newline_id_generator(test_name):
255 """
256 Generates a test name without spaces or newlines characters. Used for
257 nicer output of progress of test
258 """
259 org_name = test_name
260 test_name = test_name\
261 .replace('\n', '_N') \
262 .replace('\t', '_T') \
263 .replace(' ', '_S')
264
265 return test_name or 'test-with-empty-name'
General Comments 0
You need to be logged in to leave comments. Login now