Skip to content

Commit a834459

Browse files
committed
fix test_analyzer.py
1 parent 3205c5f commit a834459

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

test/test_analytics/test_analyzer.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,39 +32,40 @@ async def test_analyzer_master_only(az):
3232

3333
history_truth = {
3434
'K': {
35-
'display': {'adds': 0, 'dels': 5}
35+
'display': {'adds': 0, 'dels': 5, 'added_units': 0, 'removed_units': 10}
3636
},
3737
'F': {
38-
'display': {'adds': 14, 'dels': 0},
39-
'count': {'adds': 12, 'dels': 0}
38+
'display': {'adds': 14, 'dels': 0, 'added_units': 23, 'removed_units': 0},
39+
'count': {'adds': 12, 'dels': 0, 'added_units': 19, 'removed_units': 0}
4040
},
4141
'E': {
42-
'append': {'adds': 29, 'dels': 0},
43-
'add': {'adds': 11, 'dels': 0}
42+
'append': {'adds': 29, 'dels': 0, 'added_units': 44, 'removed_units': 0},
43+
'add': {'adds': 11, 'dels': 0, 'added_units': 25, 'removed_units': 0}
4444
},
4545
'D': {
46-
'str_replace': {'adds': 26, 'dels': 0}
46+
'str_replace': {'adds': 26, 'dels': 0, 'added_units': 76, 'removed_units': 0}
4747
},
4848
# TODO: fix \No newline at the end of file
4949
'C': {
50-
'str_append_chr': {'adds': 30, 'dels': 4},
51-
'str_equals': {'adds': 0, 'dels': 1}
50+
'str_append_chr': {'adds': 30, 'dels': 4, 'added_units': 78, 'removed_units': 21},
51+
'str_equals': {'adds': 0, 'dels': 1, 'added_units': 0, 'removed_units': 0}
5252
},
5353
# Commit `B` is an example of imperfect diff,
5454
# it removes `str_append` and adds a new function `str_append_chr`
5555
# but because they are too similar,
5656
# diff doesn't separate these changes into two chunks
5757
# please see here: https://github.com/UltimateBeaver/test_feature_branch/commit/caaac10f604ea7ac759c2147df8fb2b588ee2a27
5858
'B': {
59-
'str_append': {'adds': 6, 'dels': 3},
60-
'str_append_chr': {'adds': 3, 'dels': 2},
61-
'str_equals': {'adds': 11, 'dels': 0}
59+
'str_append': {'adds': 6, 'dels': 3, 'added_units': 29, 'removed_units': 21},
60+
'str_append_chr': {'adds': 3, 'dels': 2, 'added_units': 21, 'removed_units': 15},
61+
'str_equals': {'adds': 11, 'dels': 0, 'added_units': 27, 'removed_units': 0}
6262
},
6363
'A': {
64-
'str_append': {'adds': 7, 'dels': 0},
65-
'str_len': {'adds': 6, 'dels': 0}
64+
'str_append': {'adds': 7, 'dels': 0, 'added_units': 29, 'removed_units': 0},
65+
'str_len': {'adds': 6, 'dels': 0, 'added_units': 13, 'removed_units': 0}
6666
},
6767

68+
6869
# # branch J from commit A, merge back through F
6970
# 'J': {
7071
# 'count': {'adds': 12, 'dels': 0},

0 commit comments

Comments
 (0)