Convert test_multiple and use custom xfail marker

This commit is contained in:
Raphael Pierzina 2015-04-03 18:25:28 +02:00
parent 9a47848794
commit f68cfc13e0
2 changed files with 12 additions and 7 deletions

View File

@ -25,9 +25,20 @@ from PyQt5.QtCore import Qt
from qutebrowser.utils import debug
@pytest.mark.xfail(reason="Broken but shouldn't generate a failure")
fixme = pytest.mark.xfail(reason="Broken but shouldn't generate a failure")
@fixme
def test_single():
"""Test with single value."""
flags = debug.qflags_key(Qt, Qt.AlignTop)
assert flags == 'AlignTop'
@fixme
def test_multiple():
"""Test with multiple values."""
flags = debug.qflags_key(Qt, Qt.AlignLeft | Qt.AlignTop)
assert flags == 'AlignLeft|AlignTop'

View File

@ -37,12 +37,6 @@ class QFlagsKeyTests(unittest.TestCase):
# https://github.com/The-Compiler/qutebrowser/issues/42
@unittest.skip('FIXME')
def test_multiple(self):
"""Test with multiple values."""
flags = debug.qflags_key(Qt, Qt.AlignLeft | Qt.AlignTop)
self.assertEqual(flags, 'AlignLeft|AlignTop')
def test_combined(self):
"""Test with a combined value."""
flags = debug.qflags_key(Qt, Qt.AlignCenter)