Convert test_int

This commit is contained in:
Raphael Pierzina 2015-04-03 18:40:41 +02:00
parent 086f12600c
commit ff75d18e62
2 changed files with 7 additions and 6 deletions

View File

@ -64,3 +64,10 @@ def test_int_noklass():
with pytest.raises(TypeError):
debug.qflags_key(Qt, 42)
@fixme
def test_int():
"""Test passing an int with explicit klass given."""
flags = debug.qflags_key(Qt, 0x0021, klass=Qt.Alignment)
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_int(self):
"""Test passing an int with explicit klass given."""
flags = debug.qflags_key(Qt, 0x0021, klass=Qt.Alignment)
self.assertEqual(flags, 'AlignLeft|AlignTop')
def test_unknown(self):
"""Test passing an unknown value."""
flags = debug.qflags_key(Qt, 0x1100, klass=Qt.Alignment)