diff options
| author | Brad Walker <brad@bradmwalker.com> | 2014-11-12 16:06:12 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-11-20 14:33:30 -0500 |
| commit | 54d3dcbc51819ea0e36bb4dbe7de1a1e33f62c4d (patch) | |
| tree | 34e33572ca362dcb4cc6bc78f62eb9ac345531f7 /tests | |
| parent | cfa26f29bdd9b0f82211e6f5ff7f4cd63bd66150 (diff) | |
Removed reduce() usage in makemigrations; refs #23796.
A lambda all_items_equal() replaced a reduce() that was broken for potential
3+-way merges. A reduce(operator.eq, ...) accumulates bools and can't
generically check equality of all items in a sequence:
>>> bool(reduce(operator.eq, [('migrations', '0001_initial')] * 3))
False
The code now counts the number of common ancestors to calculate slice offsets
for the branches. Each branch shares the same number of common ancestors.
The common_ancestor for loop statement had incomplete branch coverage.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions
