Convert test_int_noklass
This commit is contained in:
parent
df3096fbb5
commit
9e59108788
@ -35,11 +35,6 @@ class QEnumKeyTests(unittest.TestCase):
|
||||
|
||||
"""Tests for qenum_key."""
|
||||
|
||||
def test_int_noklass(self):
|
||||
"""Test passing an int without explicit klass given."""
|
||||
with self.assertRaises(TypeError):
|
||||
debug.qenum_key(QFrame, 42)
|
||||
|
||||
def test_int(self):
|
||||
"""Test passing an int with explicit klass given."""
|
||||
key = debug.qenum_key(QFrame, 0x0030, klass=QFrame.Shadow)
|
||||
|
@ -53,3 +53,10 @@ def test_add_base():
|
||||
|
||||
key = debug.qenum_key(QFrame, QFrame.Sunken, add_base=True)
|
||||
assert key == 'QFrame.Sunken'
|
||||
|
||||
|
||||
def test_int_noklass():
|
||||
"""Test passing an int without explicit klass given."""
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
debug.qenum_key(QFrame, 42)
|
||||
|
Loading…
Reference in New Issue
Block a user