qubes.tests.init make pylint happy ♥
This commit is contained in:
parent
774cbd499e
commit
23e52775b6
@ -23,7 +23,6 @@
|
|||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
|
||||||
import unittest
|
import unittest
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@ -70,7 +69,7 @@ class TC_10_property(qubes.tests.QubesTestCase):
|
|||||||
try:
|
try:
|
||||||
class MyTestHolder(qubes.tests.TestEmitter, qubes.PropertyHolder):
|
class MyTestHolder(qubes.tests.TestEmitter, qubes.PropertyHolder):
|
||||||
testprop1 = qubes.property('testprop1')
|
testprop1 = qubes.property('testprop1')
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
self.skipTest('MyTestHolder class definition failed')
|
self.skipTest('MyTestHolder class definition failed')
|
||||||
self.holder = MyTestHolder(None)
|
self.holder = MyTestHolder(None)
|
||||||
|
|
||||||
@ -120,6 +119,7 @@ class TC_10_property(qubes.tests.QubesTestCase):
|
|||||||
self.assertIs(prop, MyTestHolder.testprop1)
|
self.assertIs(prop, MyTestHolder.testprop1)
|
||||||
self.assertEquals(value, 'testvalue')
|
self.assertEquals(value, 'testvalue')
|
||||||
return 'settervalue'
|
return 'settervalue'
|
||||||
|
|
||||||
class MyTestHolder(qubes.tests.TestEmitter, qubes.PropertyHolder):
|
class MyTestHolder(qubes.tests.TestEmitter, qubes.PropertyHolder):
|
||||||
testprop1 = qubes.property('testprop1', setter=setter)
|
testprop1 = qubes.property('testprop1', setter=setter)
|
||||||
holder = MyTestHolder(None)
|
holder = MyTestHolder(None)
|
||||||
@ -219,7 +219,6 @@ class TC_20_PropertyHolder(qubes.tests.QubesTestCase):
|
|||||||
|
|
||||||
self.holder = TestHolder(xml)
|
self.holder = TestHolder(xml)
|
||||||
|
|
||||||
|
|
||||||
def test_000_property_list(self):
|
def test_000_property_list(self):
|
||||||
self.assertListEqual([p.__name__ for p in self.holder.property_list()],
|
self.assertListEqual([p.__name__ for p in self.holder.property_list()],
|
||||||
['testprop1', 'testprop2', 'testprop3', 'testprop4'])
|
['testprop1', 'testprop2', 'testprop3', 'testprop4'])
|
||||||
@ -294,9 +293,9 @@ class TestVM(qubes.vm.BaseVM):
|
|||||||
uuid = uuid.uuid5(uuid.NAMESPACE_DNS, 'testvm')
|
uuid = uuid.uuid5(uuid.NAMESPACE_DNS, 'testvm')
|
||||||
|
|
||||||
def is_halted(self):
|
def is_halted(self):
|
||||||
return False
|
return True
|
||||||
|
|
||||||
def get_power_state():
|
def get_power_state(self):
|
||||||
return "Halted"
|
return "Halted"
|
||||||
|
|
||||||
class TestApp(qubes.tests.TestEmitter):
|
class TestApp(qubes.tests.TestEmitter):
|
||||||
|
Loading…
Reference in New Issue
Block a user