test-locked-requirements: Cache only one copy of each valid hash.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-04-03 19:26:40 -07:00 committed by Tim Abbott
parent bc6862b949
commit bcc040b01c
1 changed files with 1 additions and 2 deletions

View File

@ -106,8 +106,7 @@ def main():
# Cache the hash so that we need not to run the `update_locked_requirements`
# tool again for checking this set of requirements.
valid_hash = get_requirements_hash(tmp_dir, use_test_lock_files=True)
hash_list.append(valid_hash)
update_cache(hash_list)
update_cache([h for h in hash_list if h != valid_hash] + [valid_hash])
if not requirements_are_consistent:
for test_locked_file in glob.glob(os.path.join(tmp_dir, "*.txt")):
fn = os.path.basename(test_locked_file)