Skip to content

Commit

Permalink
Reinstate test-diff asserts
Browse files Browse the repository at this point in the history
Possibly commented out by accident in
b5f7c7c
  • Loading branch information
craigds committed May 7, 2020
1 parent 304c827 commit cec3a13
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tests/test_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,21 +1128,21 @@ def _extract(diff_json):
return ds

# changes from HEAD (R1 -> WC)
# r = cli_runner.invoke(["diff", "--exit-code", "--json", R1])
# assert r.exit_code == 1, r
# odata = json.loads(r.stdout)["sno.diff/v1+hexwkb"]
# ddata = _extract(odata)
# assert ddata == {
# 1: ('a1', 'a'),
# 3: ('c', 'c1'),
# 4: ('d1', 'd2'),
# 5: ('e1', None),
# 6: (None, 'f'),
# 8: ('h', 'h1'),
# 9: ('i', None),
# 11: (None, 'k'),
# 12: (None, 'l1'),
# }
r = cli_runner.invoke(["diff", "--exit-code", "--json", R1])
assert r.exit_code == 1, r
odata = json.loads(r.stdout)["sno.diff/v1+hexwkb"]
ddata = _extract(odata)
assert ddata == {
1: ('a1', 'a'),
3: ('c', 'c1'),
4: ('d1', 'd2'),
5: ('e1', None),
6: (None, 'f'),
8: ('h', 'h1'),
9: ('i', None),
11: (None, 'k'),
12: (None, 'l1'),
}

# changes from HEAD^1 (R0 -> WC)
r = cli_runner.invoke(["diff", "--exit-code", "--json", R0])
Expand Down

0 comments on commit cec3a13

Please sign in to comment.