(tmpdir, out_of_date)
| 282 | |
| 283 | |
| 284 | def test_does_not_reformat(tmpdir, out_of_date): |
| 285 | fmt = ( |
| 286 | 'repos:\n' |
| 287 | '- repo: {}\n' |
| 288 | ' rev: {} # definitely the version I want!\n' |
| 289 | ' hooks:\n' |
| 290 | ' - id: foo\n' |
| 291 | ' # These args are because reasons!\n' |
| 292 | ' args: [foo, bar, baz]\n' |
| 293 | ) |
| 294 | cfg = tmpdir.join(C.CONFIG_FILE) |
| 295 | cfg.write(fmt.format(out_of_date.path, out_of_date.original_rev)) |
| 296 | |
| 297 | assert autoupdate(str(cfg), freeze=False, tags_only=False) == 0 |
| 298 | expected = fmt.format(out_of_date.path, out_of_date.head_rev) |
| 299 | assert cfg.read() == expected |
| 300 | |
| 301 | |
| 302 | def test_does_not_change_mixed_endlines_read(up_to_date, tmpdir): |
nothing calls this directly
no test coverage detected