Extract test_no_metaobj to separate module
This commit is contained in:
parent
7e51addeb0
commit
64b1b48be6
@ -35,15 +35,6 @@ class QEnumKeyTests(unittest.TestCase):
|
||||
|
||||
"""Tests for qenum_key."""
|
||||
|
||||
def test_no_metaobj(self):
|
||||
"""Test with an enum with no meta-object."""
|
||||
with self.assertRaises(AttributeError):
|
||||
# Make sure it doesn't have a meta object
|
||||
# pylint: disable=pointless-statement,no-member
|
||||
QStyle.PrimitiveElement.staticMetaObject
|
||||
key = debug.qenum_key(QStyle, QStyle.PE_PanelButtonCommand)
|
||||
self.assertEqual(key, 'PE_PanelButtonCommand')
|
||||
|
||||
def test_metaobj(self):
|
||||
"""Test with an enum with meta-object."""
|
||||
# pylint: disable=pointless-statement
|
||||
|
30
qutebrowser/test/utils/test_debug/test_qenum_key.py
Normal file
30
qutebrowser/test/utils/test_debug/test_qenum_key.py
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
|
||||
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
|
||||
|
||||
#
|
||||
# This file is part of qutebrowser.
|
||||
#
|
||||
# qutebrowser is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# qutebrowser is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
"""Tests for qutebrowser.utils.debug."""
|
||||
|
||||
|
||||
def test_no_metaobj(self):
|
||||
"""Test with an enum with no meta-object."""
|
||||
with self.assertRaises(AttributeError):
|
||||
# Make sure it doesn't have a meta object
|
||||
# pylint: disable=pointless-statement,no-member
|
||||
QStyle.PrimitiveElement.staticMetaObject
|
||||
key = debug.qenum_key(QStyle, QStyle.PE_PanelButtonCommand)
|
||||
self.assertEqual(key, 'PE_PanelButtonCommand')
|
Loading…
Reference in New Issue
Block a user