diff options
author | Florian Bruhin <git@the-compiler.org> | 2017-09-20 10:39:39 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2017-09-20 11:10:24 +0200 |
commit | ef1c83862b8166066a860fbfac93a19ec26bb8c3 (patch) | |
tree | 935b912783da214bd9301d6fe6ca42767f574937 /tests/unit/utils/test_qtutils.py | |
parent | e4594bd68878727606d5138a686f545eba7364aa (diff) | |
download | qutebrowser-ef1c83862b8166066a860fbfac93a19ec26bb8c3.tar.gz qutebrowser-ef1c83862b8166066a860fbfac93a19ec26bb8c3.zip |
Use utils.is_* for platform checks everywhere
Diffstat (limited to 'tests/unit/utils/test_qtutils.py')
-rw-r--r-- | tests/unit/utils/test_qtutils.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/unit/utils/test_qtutils.py b/tests/unit/utils/test_qtutils.py index f3c1afc04..8045bb0d3 100644 --- a/tests/unit/utils/test_qtutils.py +++ b/tests/unit/utils/test_qtutils.py @@ -21,7 +21,6 @@ import io import os -import sys import os.path import unittest import unittest.mock @@ -36,7 +35,7 @@ import pytest from PyQt5.QtCore import (QDataStream, QPoint, QUrl, QByteArray, QIODevice, QTimer, QBuffer, QFile, QProcess, QFileDevice) -from qutebrowser.utils import qtutils +from qutebrowser.utils import qtutils, utils import overflow_test_cases @@ -458,13 +457,13 @@ class TestSavefileOpen: with qtutils.savefile_open(str(filename)) as f: f.write('foo\nbar\nbaz') data = filename.read_binary() - if os.name == 'nt': + if utils.is_windows: assert data == b'foo\r\nbar\r\nbaz' else: assert data == b'foo\nbar\nbaz' -if test_file is not None and sys.platform != 'darwin': +if test_file is not None and not utils.is_mac: # If we were able to import Python's test_file module, we run some code # here which defines unittest TestCases to run the python tests over # PyQIODevice. |