qutebrowser/tests/unit/browser
Ryan Roden-Corrent 888a1b8c57 Append multiple history backups on import.
Previously, a successful import of the text history into sqlite would
move 'history' to 'history.bak'. If history.bak already existed, this
would overwrite it on unix and fail on windows.

With this patch, the most recently imported history is appended to
history.bak to avoid data loss.

Resolves #3005.

A few other options I considered:

1. os.replace:
    - fast, simple, no error on Windows
    - potential data loss
2. numbered backups (.bak.1, .bak.2, ...):
    - fast, no data loss, but more complex
3. append each line to the backup as it is read:
    - more efficient than current patch (no need to read history twice)
    - potentially duplicate data if backup fails
2017-09-23 13:06:11 -04:00
..
webengine tests: Use pytest.param 2017-05-23 08:08:46 +02:00
webkit Use utils.is_* for platform checks everywhere 2017-09-20 11:10:24 +02:00
test_adblock.py Get rid of init_standarddir fixture 2017-09-15 14:30:46 +02:00
test_history.py Append multiple history backups on import. 2017-09-23 13:06:11 -04:00
test_pdfjs.py tests: relax pdfjs tests 2016-10-06 16:18:21 +02:00
test_qutescheme.py Fix unit tests for end2end SQL change 2017-09-17 11:49:42 +02:00
test_shared.py Update test_shared for new config 2017-07-04 15:08:04 +02:00
test_signalfilter.py Start using attrs 2017-09-19 22:21:45 +02:00
test_tab.py Drop support for Qt < 5.7.1 2017-09-18 23:01:17 +02:00