Make sure spm tests are picked up by runtests.

Lists in py2 don't have the clear method
This commit is contained in:
Pedro Algarvio 2015-09-14 17:54:51 +01:00 committed by Pablo Suárez Hernández
parent 2605f34849
commit ec0cc943e0

View file

@ -129,12 +129,12 @@ class SPMTest(TestCase):
('summary', 'Summary: {0}')):
assert line.format(_F1['definition'][key]) in lines
# Reinstall with force=False, should fail
self.ui._error.clear()
self.ui._error = []
self.client.run(['local', 'install', pkgpath])
assert len(self.ui._error) > 0
# Reinstall with force=True, should succeed
__opts__['force'] = True
self.ui._error.clear()
self.ui._error = []
self.client.run(['local', 'install', pkgpath])
assert len(self.ui._error) == 0
__opts__['force'] = False
@ -167,7 +167,7 @@ class SPMTest(TestCase):
)
for args in fail_args:
self.ui._error.clear()
self.ui._error = []
self.client.run(args)
assert len(self.ui._error) > 0