()
| 5 | |
| 6 | |
| 7 | def test_conflict_resolution_command(): |
| 8 | def check_call(command): |
| 9 | command, a_tmp, b_tmp = command |
| 10 | assert command == os.path.expanduser('~/command') |
| 11 | with open(a_tmp) as f: |
| 12 | assert f.read() == a.raw |
| 13 | with open(b_tmp) as f: |
| 14 | assert f.read() == b.raw |
| 15 | |
| 16 | with open(b_tmp, 'w') as f: |
| 17 | f.write(a.raw) |
| 18 | |
| 19 | a = Item('UID:AAAAAAA') |
| 20 | b = Item('UID:BBBBBBB') |
| 21 | assert _resolve_conflict_via_command( |
| 22 | a, b, ['~/command'], 'a', 'b', |
| 23 | _check_call=check_call |
| 24 | ).raw == a.raw |
nothing calls this directly
no test coverage detected