From 9101046fe5c7c6dda3a6a72a9b9b5f238e454beb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 21 Dec 2015 09:51:25 +0100 Subject: [PATCH] tests: Adjust error message comparison for Windows. --- tests/unit/commands/test_userscripts.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/unit/commands/test_userscripts.py b/tests/unit/commands/test_userscripts.py index 9848e5276..fdda6992b 100644 --- a/tests/unit/commands/test_userscripts.py +++ b/tests/unit/commands/test_userscripts.py @@ -220,9 +220,8 @@ def test_temporary_files_failed_cleanup(caplog, qtbot, tmpdir, py_proc, runner.run(cmd, *args, env={'QUTE_HTML': str(test_file)}) assert len(caplog.records) == 1 - expected = ("Failed to delete tempfile {file} ([Errno 2] No such file or " - "directory: '{file}')!".format(file=test_file)) - assert caplog.records[0].message == expected + expected = "Failed to delete tempfile {} (".format(test_file) + assert caplog.records[0].message.startswith(expected) def test_dummy_runner(qtbot):