Fix what attempts means for PowerlineTestSuite.test
This commit is contained in:
parent
0ad1d9be40
commit
45e148b3a0
|
@ -237,8 +237,8 @@ class PowerlineTestSuite(object):
|
|||
def fail(self, test_name, message, allow_failure=False):
|
||||
return self.record_test_failure('F', test_name, message, allow_failure)
|
||||
|
||||
def test(self, name, attempts=0):
|
||||
if not attempts:
|
||||
def test(self, name, attempts_left=0):
|
||||
if not attempts_left:
|
||||
return PowerlineSingleTest(self, name)
|
||||
else:
|
||||
return PowerlineDummyTest()
|
||||
|
|
|
@ -245,7 +245,7 @@ def do_terminal_tests(tests, cmd, dim, args, env, suite, cwd=None, fin_cb=None,
|
|||
|
||||
for i, test in enumerate(tests):
|
||||
with suite.test(test.get('name', 'test_{0}'.format(i)),
|
||||
attempts) as ptest:
|
||||
attempts - 1) as ptest:
|
||||
try:
|
||||
test_prep = test['prep_cb']
|
||||
except KeyError:
|
||||
|
|
Loading…
Reference in New Issue