Skip to content

Commit

Permalink
fix test_analyzer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yjwudi committed May 26, 2019
1 parent 3205c5f commit a834459
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions test/test_analytics/test_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,39 +32,40 @@ async def test_analyzer_master_only(az):

history_truth = {
'K': {
'display': {'adds': 0, 'dels': 5}
'display': {'adds': 0, 'dels': 5, 'added_units': 0, 'removed_units': 10}
},
'F': {
'display': {'adds': 14, 'dels': 0},
'count': {'adds': 12, 'dels': 0}
'display': {'adds': 14, 'dels': 0, 'added_units': 23, 'removed_units': 0},
'count': {'adds': 12, 'dels': 0, 'added_units': 19, 'removed_units': 0}
},
'E': {
'append': {'adds': 29, 'dels': 0},
'add': {'adds': 11, 'dels': 0}
'append': {'adds': 29, 'dels': 0, 'added_units': 44, 'removed_units': 0},
'add': {'adds': 11, 'dels': 0, 'added_units': 25, 'removed_units': 0}
},
'D': {
'str_replace': {'adds': 26, 'dels': 0}
'str_replace': {'adds': 26, 'dels': 0, 'added_units': 76, 'removed_units': 0}
},
# TODO: fix \No newline at the end of file
'C': {
'str_append_chr': {'adds': 30, 'dels': 4},
'str_equals': {'adds': 0, 'dels': 1}
'str_append_chr': {'adds': 30, 'dels': 4, 'added_units': 78, 'removed_units': 21},
'str_equals': {'adds': 0, 'dels': 1, 'added_units': 0, 'removed_units': 0}
},
# Commit `B` is an example of imperfect diff,
# it removes `str_append` and adds a new function `str_append_chr`
# but because they are too similar,
# diff doesn't separate these changes into two chunks
# please see here: https://github.com/UltimateBeaver/test_feature_branch/commit/caaac10f604ea7ac759c2147df8fb2b588ee2a27
'B': {
'str_append': {'adds': 6, 'dels': 3},
'str_append_chr': {'adds': 3, 'dels': 2},
'str_equals': {'adds': 11, 'dels': 0}
'str_append': {'adds': 6, 'dels': 3, 'added_units': 29, 'removed_units': 21},
'str_append_chr': {'adds': 3, 'dels': 2, 'added_units': 21, 'removed_units': 15},
'str_equals': {'adds': 11, 'dels': 0, 'added_units': 27, 'removed_units': 0}
},
'A': {
'str_append': {'adds': 7, 'dels': 0},
'str_len': {'adds': 6, 'dels': 0}
'str_append': {'adds': 7, 'dels': 0, 'added_units': 29, 'removed_units': 0},
'str_len': {'adds': 6, 'dels': 0, 'added_units': 13, 'removed_units': 0}
},


# # branch J from commit A, merge back through F
# 'J': {
# 'count': {'adds': 12, 'dels': 0},
Expand Down

0 comments on commit a834459

Please sign in to comment.