From d28dba35bc3deea12402d5810f6dac221553984c Mon Sep 17 00:00:00 2001 From: Joris Roovers Date: Tue, 27 Dec 2016 17:07:50 +0100 Subject: More unicode-related changes This commit adds more changes for proper unicode support: - Introduce of the utils module with the ustr function that is now used everywhere where we used str() before. ustr() is smart enough to convert handle unicode in both python 2 and 3. - Monkeypatch of unittest2.case.str to deal with lack of unicode support for assertRaisesRegex in unittest2 - handle_option_error decorator for gitlint.config to deal with configuration errors for general options more elegantly - flake8 errors are now printed in red color when running run_tests.sh - Multiple test cases have been updated so that they also test unicode compatibility: test_cli.py, test_config.py, test_config_builder.py Additional tests will be updated to include better unicode coverage in the follow-up commits. --- run_tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'run_tests.sh') diff --git a/run_tests.sh b/run_tests.sh index 5a0d077..8fb259c 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -56,8 +56,9 @@ run_pep8_check(){ FLAKE8_IGNORE="H307,H405,H803,H904,H802,H701" # exclude settings files and virtualenvs FLAKE8_EXCLUDE="*settings.py,*.venv/*.py" - echo "Running flake8..." + echo -e "Running flake8...${RED}" flake8 --ignore=$FLAKE8_IGNORE --max-line-length=120 --exclude=$FLAKE8_EXCLUDE gitlint qa examples + echo -ne "$NO_COLOR" } run_unit_tests(){ -- cgit v1.2.3