From 4fa2f34af4ae5bab60f366363acfde80eedfa524 Mon Sep 17 00:00:00 2001 From: meles5 Date: Fri, 25 Sep 2015 18:51:07 +0200 Subject: [PATCH] Test for AppVeyor updated --- tests/unit/utils/test_jinja.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/unit/utils/test_jinja.py b/tests/unit/utils/test_jinja.py index 808d87716..d91e79742 100644 --- a/tests/unit/utils/test_jinja.py +++ b/tests/unit/utils/test_jinja.py @@ -19,6 +19,7 @@ """Tests for qutebrowser.utils.jinja.""" +import os import os.path import pytest @@ -59,7 +60,14 @@ def test_resource_url(): url = QUrl(data) assert url.isValid() assert url.scheme() == 'file' - with open(url.path(), 'r', encoding='utf-8') as f: + + path = url.path() + + if os.name == "nt": + path = path.replace("/", os.sep) + path = path[-1:] + + with open(path, 'r', encoding='utf-8') as f: assert f.read().splitlines()[0] == "Hello World!"