You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_tools/tests
Bruce Dawson db8622bc6b Ensure _PresubmitResult._message is text
It is easy to get type confusion and end up passing a list as the
message parameter to _PresubmitResult. This error will not be detected
until the end of the run - perhaps hours later - when all evidence of
where the list came from is lost.

This change ensures that the message parameter is a string. If it is not
then the exception that is thrown should allow quick identification of
the problematic code.

This also fixes a presubmit unit test that passed None as the message.
We could support that but I don't think that we should.

Bug: 1309977
Change-Id: Ifb1d5100d47922b0ebd8bb834caa6fbba690b43c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3566436
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
3 years ago
..
gstools
OWNERS
PRESUBMIT.py
auth_test.py
bot_update_coverage_test.py Use pylint 2.7 for depot_tools 3 years ago
cipd_bootstrap_test.py
detect_host_arch_test.py
download_from_google_storage_unittest.py Use pylint 2.7 for depot_tools 3 years ago
fetch_test.py Update argument parsing to use argparse 3 years ago
fix_encoding_test.py
gclient_cipd_smoketest.py
gclient_eval_unittest.py
gclient_git_mutates_smoketest.py
gclient_git_smoketest.py
gclient_paths_test.py
gclient_scm_test.py Fix host and repo parsing for download-topics 3 years ago
gclient_smoketest.py
gclient_smoketest_base.py Use pylint 2.7 for depot_tools 3 years ago
gclient_test.py Revert "Remove unused functionality in bot_update.py" 3 years ago
gclient_transitions_smoketest.py
gclient_utils_test.py
gerrit_client_test.py
gerrit_util_test.py
git_cache_test.py
git_cl_creds_check_report.txt
git_cl_test.py Add git cl presubmit --files 3 years ago
git_common_test.py Fix git_common_test.py: git checkout -tb -> git checkout -t -b 3 years ago
git_dates_test.py
git_find_releases_test.py Use pylint 2.7 for depot_tools 3 years ago
git_footers_test.py
git_hyper_blame_test.py
git_map_test.py
git_migrate_default_branch_test.py Use pylint 2.7 for depot_tools 3 years ago
git_number_test.py
git_rebase_update_test.py Fix depot_tools tests when running without py2 3 years ago
gsutil_test.py
lockfile_test.py
metrics_test.py
my_activity_test.py
ninjalog_uploader_test.py fix ninjalog_uploader.py 3 years ago
owners_client_test.py
owners_finder_test.py
owners_unittest.py
presubmit_unittest.py Ensure _PresubmitResult._message is text 3 years ago
rdb_wrapper_test.py
recipes_test.py
roll_dep_test.py
scm_unittest.py
split_cl_test.py
subcommand_test.py
subprocess2_test.py Use pylint 2.7 for depot_tools 3 years ago
upload_to_google_storage_unittest.py
utils_test.py Add a basic depot_tools version information 3 years ago
watchlists_unittest.py