Fix what attempts means for PowerlineTestSuite.test

This commit is contained in:
Foo 2017-08-05 13:58:41 +03:00
parent 0ad1d9be40
commit 45e148b3a0
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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: