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 25cf78395c Fix two CheckLicense bugs and improve tests
Some recent "improvements" to CheckLicense were buggy, at least
partially because I did not increase test coverage when adding new code
paths. This change fixes two known mistakes and greatly increases test
coverage.

One bug was that the code assumed that match.groups()[0] would always be
the current year, but that assumption is invalid when a license regex is
passed in.

Another bug is that the new_license_re took away the possibility of the
license ending with */ but that is used in .css files.

The increased test coverage catches these and validates other
assumptions around new files.

The failures were reproduced and then the fixes validated using this
command:

  vpython3 tests/presubmit_unittest.py

Bug: 1098010
Change-Id: Ic91ca9f7a182660aef7b1eead79e841f58e15a3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4032366
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
3 years ago
..
gstools
OWNERS
PRESUBMIT.py Only run selected tests on py2 3 years ago
auth_test.py
autoninja_test.py
bot_update_coverage_test.py [no-sync] bot_update: Remove previous no-sync exp changes and implement new one. 3 years ago
cipd_bootstrap_test.py
detect_host_arch_test.py
download_from_google_storage_unittest.py
fetch_test.py fetch: make --no-history and --no-hooks switches consistent 3 years ago
fix_encoding_test.py
gclient_cipd_smoketest.py
gclient_eval_unittest.py
gclient_git_mutates_smoketest.py
gclient_git_smoketest.py Fix flaky testPreDepsHooks test 3 years ago
gclient_no_sync_smoketest.py [no-sync] Save previous values to files. 3 years ago
gclient_paths_test.py
gclient_scm_test.py
gclient_smoketest.py
gclient_smoketest_base.py
gclient_test.py [no-sync] Save previous values to files. 3 years ago
gclient_transitions_smoketest.py
gclient_utils_test.py Reduce retries in gclient_utils 3 years ago
gerrit_client_test.py
gerrit_util_test.py
git_cache_test.py
git_cl_creds_check_report.txt
git_cl_test.py Handle external changes on `git cl upload` 3 years ago
git_common_test.py
git_dates_test.py
git_find_releases_test.py
git_footers_test.py
git_hyper_blame_test.py
git_map_test.py
git_migrate_default_branch_test.py
git_number_test.py
git_rebase_update_test.py
gsutil_test.py
lockfile_test.py
metrics_test.py
my_activity_test.py
ninjalog_uploader_test.py
owners_client_test.py Reland "Remove old DepotToolsOwners implementation" 3 years ago
owners_finder_test.py
presubmit_unittest.py Fix two CheckLicense bugs and improve tests 3 years ago
rdb_wrapper_test.py Add snippets to presubmit failures in resultdb 3 years ago
recipes_test.py
roll_dep_test.py roll_dep: support multiple -r/--reviewer arguments 3 years ago
scm_unittest.py
split_cl_test.py
subcommand_test.py Use empty argument list in cmdhelp 3 years ago
subprocess2_test.py
upload_to_google_storage_unittest.py
utils_test.py
watchlists_unittest.py